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.73k stars 748 forks source link

problems about state representation `datametrices.py` #106

Closed AchillesJJ closed 5 years ago

AchillesJJ commented 5 years ago

In marketdata/datametrices.py, line 172, there is a function get_submatrix(self, ind). This function is suppose to gives the state representation for a given time index ind. Here, the state should be a history price(or return) between time period [ind-window_size, ind]. However, in get_submatrix, we have

return self.__global_data.values[:, :, ind:ind+self._window_size+1]

which means it use future price(or return) to represent current state at time ind. Is there any explanation about this problem ?

AchillesJJ commented 5 years ago

@kumkee @DexHunter Thank you

ZhengyaoJiang commented 5 years ago

@AchillesJJ Thanks for your question. Has your question been answered in private? If so, I'll close this issue.

AchillesJJ commented 5 years ago

No, but I know understand. Thanks