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

training on cash rather than BTC. #56

Closed AhmMontasser closed 6 years ago

AhmMontasser commented 6 years ago

Hello.

I've been trying to train the model on cash and assets rather than BTC and cryptos.

I change initial cash everywhere i know (trader classes) and did the required changes to fetch assets data and return global panel and data management is very good.

However, when i start training. The agent seems not recognizing the cash change, it's still outputting

portfolio value on test set is 1.412 for example.

what did i miss ?

ZhengyaoJiang commented 6 years ago

Hi, What do you exactly mean by "train on cash and assets"? I think the BTC is just cash and alter-coins are assets in this project?

Regards Zhengyao

AhmMontasser commented 6 years ago

I mean to train the model on trading in stock market.

I edited globaldatamatrix to fetch stocks data instead of cryptos and changed the initial_btc at the trader class to 1000000 for example.

when it's training it doesn't raise an error but doesn't recognize the change in initial value.

ZhengyaoJiang commented 6 years ago

In pre-training stage, the initial portfolio value is always one. Only in backtest stage, the initial_btc will affect the final results.

portfolio value on test set is 1.412 for example.

This seems to indicate the migration from crypto-market to stock market has been successful since there is 40% return.

AhmMontasser commented 6 years ago

Great, thank you