ZhengyaoJiang / PGPortfolio

PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).
GNU General Public License v3.0
1.74k stars 750 forks source link

Questions about mu calculation #45

Closed lytkarinskiy closed 6 years ago

lytkarinskiy commented 6 years ago

Hello again!

In function __pure_pc(self) only initial guess for mu is used, the rest of the function is commented. Is it ok or some kind of mistake? Also, in commented block there is part mu = 1-3*c+c**2 where you subtract 3 x commission_rate, instead of 2 x commission_rate, as in the paper, but in `calculate_pv_after_commission(w1, w0, commission_rate) it seems like ok . Is it also some kind of mistake?

Thanks!

istvanmo commented 6 years ago

Hi there! I have the same question. Have you got your answer yet?

lytkarinskiy commented 6 years ago

Hi! Not yet, seems like it's done for train speedup. During backtest it's handled as it should

ZhengyaoJiang commented 6 years ago

Hi! Not yet, seems like it's done for train speedup. During backtest it's handled as it should

Sorry for the late response. Yes, the iterative method of calculating mu will slow down the training significantly, while using mu = 1 - tf.reduce_sum(tf.abs(w_t1[:, 1:]-w_t[:, 1:]), axis=1)*c the difference between the approximate value and true value is only O(c^2).

lytkarinskiy commented 6 years ago

Thanks for the response!