PGPortfolio icon indicating copy to clipboard operation
PGPortfolio copied to clipboard

Low benefit if the end_date is after 2018/02/10

Open istvanmo opened this issue 6 years ago • 26 comments

I tried to train the network with default parameters which can be found in the netconfig.json file, except the end date. First, I changed it to 2018/02/10. With this setting, I wasn't able to train an agent which had a higher quantity of BTC than 1.3 at the end of the backtest (which is nice, but much less than the values in the paper). I experienced the same issue with every end_date after 2018/02/10.

istvanmo avatar Mar 02 '18 13:03 istvanmo

I have noticed a big difference as well. For example, can you confirm that you also observe a good performance in January (especially at the end?)

ziofil avatar Mar 02 '18 16:03 ziofil

Yes, I can. For a one month long backtest period the quantity of the BTC was around 4. Besides, I tried to change some of the hyperparameters, but couldn't find any promising settings.

istvanmo avatar Mar 02 '18 20:03 istvanmo

I guess there is a correlation between the dropping BTC course and the "bad" results in the backtest. If you teach the Agent with a continuously rising course (until end of 2017) and test it then on a dropping course - the agent faces completely new experiences.

btcourse

DoktorDaveJoos avatar Mar 05 '18 10:03 DoktorDaveJoos

But isn't this strange? I mean, for the agent BTC always has a constant value.

ziofil avatar Mar 05 '18 10:03 ziofil

What do you mean with constant? The BTC (your cash) represents the value of your portfolio. And because the agent is trading the currencies against each other, the value of the Bitcoin does have an impact on your profit. Correct me if this is wrong.

DoktorDaveJoos avatar Mar 05 '18 10:03 DoktorDaveJoos

Its true that 1 cash will always be 1 cash, you cant just ignore all fundamental factors though.

  1. $BTC is an incredibly powerful market leader, its price action directly influences every single altcoin.
  2. The agent likes to use reversed_USDT due to high volume

Heres a little scenario using the Total Marketcap of Crypto, not just BTC:

You probably define your input as 2015/07/01 to 2018/03/01 with the default test_portion of 8%

This means the agent will train from 2015/07/01 to 2017/12/13 which looks like this

image

then you test on 2017/12/13 until now which looks like this:

image

Depending on which network you use in the EIIE this data will mess up your weights. Simply because there was no way for it to learn how to filter out BTC Movement since all it did was go up.

fbrusch-ik avatar Mar 05 '18 10:03 fbrusch-ik

@DoktorDaveJoos the agent doesnt care about $ it only cares about the logarithmic return in BTC

"Financial Profit" isnt relevant.

fbrusch-ik avatar Mar 05 '18 10:03 fbrusch-ik

@insaneKane sorry you are absolutely right. It's not about $/BTC Course but CryptoX/BTC. So i checked ETH/BTC Course and saw that BTC lost against other cryptocurrencies as well (correlation between $/BTC course?).

Course ETH/BTC around new years:

ethgetsstronger

DoktorDaveJoos avatar Mar 05 '18 11:03 DoktorDaveJoos

@insaneKane "Depending on which network you use in the EIIE this data will mess up your weights." If I understand well, there is a possibility that with RNN network it could do better (in all of my train, I used the CNN network)? I doubt it, because of the change of the data.

istvanmo avatar Mar 06 '18 14:03 istvanmo

We have two guesses about this:

  1. the agent perform worse when there are big differences in the market. The agent bases its decision on the history of the market. So once there are fundamental changes in the market, making the price movement patterns varied, the performance of the agent will drop. This hypothesis can be checked by some experiments.

  2. As many people have deployed this model on the market, the profit space has been squeezed. This hypothesis is a bit difficult to be checked.

ZhengyaoJiang avatar Mar 11 '18 10:03 ZhengyaoJiang

@ZhengyaoJiang So any suggestion to make the model work in bear market (e.g., now)?

nian-liu avatar Mar 23 '18 14:03 nian-liu

@ZhengyaoJiang I tried the model on the recent market data, from 2016/03/21 or 2017/03/21 to 2018/03/21, and kept other net_config settings unchanged. I made 6 subfolders but all the models led to loss (total assets < 1BTC).

I also tried to change the "test_portion" to 0.04 to make the models be trained on the January and February market data (which are also in bear market) and tested on the recent 20-days data, but the model still failed to make profits.

Now I am trying to train on more recent market data (from Sep, 2017). I guess the model is also very sensitive to the hyperparameters, so I will tune them next. Do you have any other suggestion? Thx!

nian-liu avatar Mar 23 '18 15:03 nian-liu

@DexHunter Any suggestion to make the model work in bear market (plz see above)? Thank you. BTW, the new results show that training on more recent market data (from Sep, 2017) doesn't help. The model is still losing.

nian-liu avatar Mar 25 '18 18:03 nian-liu

There are some improvements, but that's related to our unpublished work. I think @ZhengyaoJiang 's hypotheses shed some lights to the problem. Maybe you can do some experiments as well @nian-liu

dexhunter avatar Mar 26 '18 01:03 dexhunter

@DexHunter Thanks for your response. But if impossible, could you please disclose a few of your improvements? Using more input features (e.g., volume, order book, MACD)? Improving the network structure? Or just tuning the hyperparameters?

nian-liu avatar Mar 26 '18 02:03 nian-liu

It's really not hard to try all the 3 modifications you mentioned. You probably can try do it yourself to see if it works. The repo is under GPL-3.0 license, so feel free to make changes.

dexhunter avatar Mar 26 '18 03:03 dexhunter

@DexHunter Ok, thank you.

nian-liu avatar Mar 26 '18 03:03 nian-liu

Same issues, I tranied the agent from 2015/01/01 to 2018/01/30 and then perfomr a test from 2018/01/30 to 2018/05/01. The portfolio loses a lot of value. agent

fedecaccia avatar May 18 '18 14:05 fedecaccia

why don't you train in similar market conditions to what we are in now? ie. dec 13 - jan 15

gibo avatar Jun 14 '18 09:06 gibo

The conditions in the period dec 13 - Jan 15 IMHO are very different than the current conditions. Also, it’s a very short period for training.

Le jeu. 14 juin 2018 à 11:26, rob gibson [email protected] a écrit :

why don't you train in similar market conditions to what we are in now? ie. dec 13 - jan 15

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ZhengyaoJiang/PGPortfolio/issues/63#issuecomment-397231518, or mute the thread https://github.com/notifications/unsubscribe-auth/AIh9O-715WvUvsEzTsbXDm8LyTQAnABlks5t8ixbgaJpZM4SZ2-c .

-- — Prof Filippo Miatto Télécom ParisTech, LTCI, Université Paris Saclay

ziofil avatar Jun 14 '18 09:06 ziofil

I see the conditions are remarkably similar, ie. the boom and bust cycle of crypto.

But nether the less, as you have pointed out, the training period is too short.

gibo avatar Jun 14 '18 09:06 gibo

That’s true, there is a similarity on the surface, but for some reason that I don’t understand up until Jan 15 the agent makes considerably less effort to learn, whereas later on it’s always struggling. I interpreted this as a difference in market conditions. This is a difference that we might not be able to perceive, but the agent clearly feels it.

Le jeu. 14 juin 2018 à 11:35, rob gibson [email protected] a écrit :

I see the conditions are remarkably similar, ie. the boom and bust cycle of crypto.

But nether the less, as you have pointed out, the training period is too short.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ZhengyaoJiang/PGPortfolio/issues/63#issuecomment-397233972, or mute the thread https://github.com/notifications/unsubscribe-auth/AIh9OyJK0O1xRGu8Ecjp6xvpbbYi_tfoks5t8i5fgaJpZM4SZ2-c .

-- — Prof Filippo Miatto Télécom ParisTech, LTCI, Université Paris Saclay

ziofil avatar Jun 14 '18 09:06 ziofil

shouldn't it be the case for the agent to make profits with e.g. 0.5H trading window regardless of the market trend during the wider trading window e.g. 3M? So, the training dataset trend should not impact the performance?

0xdarkman avatar Jun 28 '18 08:06 0xdarkman

@DexHunter "There are some improvements, but that's related to our unpublished work." do you plan to publish it in the future?

lorrp1 avatar Jul 20 '18 09:07 lorrp1

@LorenzoPanico Thank you for your interest in our work. We are working on it.

dexhunter avatar Jul 21 '18 03:07 dexhunter

@DexHunter have you tried using some sort of indicator (support and resistance)?

lorrp1 avatar Jul 21 '18 13:07 lorrp1