Closed GameHoo closed 4 years ago
Thank you very much for your wonderful paper.
I found that there might be an error in calculating mu in the code. in the paper:
in the code (nnagent.py):
self.__future_omega = (self.__future_price * self.__net.output) / \ tf.reduce_sum(self.__future_price * self.__net.output, axis=1)[:, None] #
c = self.__commission_ratio w_t = self.__future_omega[:self.__net.input_num - 1] # rebalanced w_t1 = self.__net.output[1:self.__net.input_num] mu = 1 - tf.reduce_sum(tf.abs(w_t1[:, 1:] - w_t[:, 1:]), axis=1) * c
I don't think we should use _net.output to calculate future_omega, we should use last_weights . like this:
_net.output
last_weights
self.__future_omega = (self.__future_price * last_weights) / \ tf.reduce_sum(self.__future_price * last_weights, axis=1)[:, None] #
Thank you very much for your wonderful paper.
I found that there might be an error in calculating mu in the code. in the paper:
in the code (nnagent.py):
I don't think we should use
_net.output
to calculate future_omega, we should uselast_weights
. like this: