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

Price norm_method #43

Closed jpmediadev closed 6 years ago

jpmediadev commented 6 years ago

Greetings!

Thank you for posting your incredible work!

if I understood you correctly - then the normalization of prices in the current code is not used "norm_method": "relative", / "absolute" I did not find where the function "pricenorm3d" is called the percentage of price increment/decrements is used as a result - y Is it so that the "RAW" price values are used - X?

How does the network summarize price data for the past periods when prices differed by an order of magnitude? or is it done intentionally to take only the closest experience when prices were on the same scale?

I apologize if this is an obvious question, and also for my English

thank you

dexhunter commented 6 years ago

Did you check out the paper?

Quoting myself from a previous issue

y is price relative vector for two adjacent price vector(v_t & v_{t-1}) while Eq. (18) states the normalization of the price in the training set. You can see the normalization code for y and for X

Maybe this will help a bit.

jpmediadev commented 6 years ago

thanks,

normalization code for y - ok but for X - 404

dexhunter commented 6 years ago

but for X - 404

for X it's done at batch training, in code

network = network / network[:, :, -1, 0, None, None]

So to put in simple words, it's the batch of relative prices divided by the last period of the relative price.

jpmediadev commented 6 years ago

understood thanks!