Kismuz / btgym

Scalable, event-driven, deep-learning-friendly backtesting library
https://kismuz.github.io/btgym/
GNU Lesser General Public License v3.0
988 stars 261 forks source link

Regression issue with models on latest BTGym version #105

Closed JaCoderX closed 5 years ago

JaCoderX commented 5 years ago

@Kismuz I've been playing with a few variation of a model I've created since about gen 5 was published.

got some good (and fast) convergence for the simple sin data (~3000-5000 steps depended on what variation i was testing).

Then I got a few setbacks when encountered #95, which by this time I have updated the repo to the new gen 6 update.

I had retested the models that showed good results before both on gen 6 and 5 but I cannot reproduce the results anymore under the new code.

*I have kept the old results in tensorboard for comparison

not sure on how to continue from here, don't really want to revert the code and work with old version but new version doesn't give me the same results (not even close)

I'm just posting my latest experience, a bit general but I'm not sure what cause the big difference

Kismuz commented 5 years ago

@JacobHanouna , there are several changes has been made to btgym which can affect performance:

Anyway, if you can temporarily unroll the code and compare differences with current version (say, via Git) it can be beneficial to understand what caused performance drop.

JaCoderX commented 5 years ago

Anyway, if you can temporarily unroll the code and compare differences with current version (say, via Git) it can be beneficial to understand what caused performance drop.

@Kismuz it took me a while to unroll and run enough revisions to identify the commit that show first sign of the regression issue.

setup description:

results:

conclusions:

@Kismuz if any other info is needed I have the tensorboard result for each revision.

also if possible and accepted by you it would be nice if you can put back in the code MonoSpreadOUStrategy_0. I find it to be a very good and stable base strategy especially because of changes made to get_external_state

Kismuz commented 5 years ago

@JacobHanouna, sorry for very late reply. After a quick sweep I can't replicate mentioned performance degradation. Can you please post TB summaries here?

MonoSpreadOUStrategy_0

I'll look for that code.

JaCoderX commented 5 years ago

rev 593: rev 593

rev 594: rev 594

from rev 594 onward the summaries give more or less same results. and before rev 593 it show consistent results.

I also tried letting some of the revisions after 594 run for ~20 K but result stay the same

JaCoderX commented 5 years ago

I retested this issue after a few design changes I made in my models. Error doesn't seem to reoccur.

Still not sure what caused it in the first place, but it might have been model related