fin-ml icon indicating copy to clipboard operation
fin-ml copied to clipboard

Chapter 9, Case study 1 - no buy signal on the test set

Open Abaminog opened this issue 4 years ago • 8 comments

Hello,

I have been trying to run Case 1 of Chapter 9 (Reinforcement Learning) both on Jupyter and on Pyhton on my local PC. Every time I get a blank result from running the trained model on the test set - there are no buy signals and hence no P&L generated. I tried different options including using the train set instead of the test set, but still the result is the same. The model training goes ok by going through a number of episodes, but then when it comes to using the model that has been created, there seems to be an issue as there are no buy signals generated. Could you please look into this to see if the Jupyter code as posted on GitHub works fine and whether there are any typos or errors in it.

Thank you and kind regards, Alex M.

Abaminog avatar Dec 20 '20 17:12 Abaminog

I use the Jupyter code, and get the same result with Alex M. Actions always are 2. I don‘t know if hyperparameter is different. Could you please check the code.

Thank you!

Thunder-Fire avatar Jan 22 '21 09:01 Thunder-Fire

Same here. Using all the library with the same version listed in the requirement. No errors at all but also no result. If you run it at Binder also same with error your cpu doesnt support the tensorflow instruction. I have tried this at various pc with the same result.

The book is so well written. I thought the sample would work. Already spent dozen of hours still unable to make it work with my 20 years of c# experience. I am hoping python expert would come in to fix the broken code.

darenwai avatar Dec 31 '21 07:12 darenwai

Its quite sensitive to the seed and probably change in python version. We might update it in the next iteration.

tatsath avatar Jan 02 '22 01:01 tatsath

Hi. May i know what is the python version when this sample work? I try to install that specific version. Thank you.

darenwai avatar Jan 05 '22 13:01 darenwai

Hello, can you please let us know if you were able to find out which version of Python we need to use?

IGleiser avatar Jan 18 '22 19:01 IGleiser

I had a high hopes using this Chapter#9 Case#1. The training is taking a lots of time, my computer is running the cell since last 120 mins. And now I see that there are issues in the BUY signal as well. It is bit disappointing.

adsd19 avatar Oct 10 '22 01:10 adsd19

Hello, I tried a smaller batch size and it fixed the issue for me. My test data was smaller than the tutorial so having a smaller batch size makes sense.

miladasgari380 avatar Apr 01 '23 19:04 miladasgari380

hi miladasgari380., I use a test size of 0.01 and it still does not work. Can i know what is the exact python, tensorflow and keras you are using?

darenwai avatar Jul 20 '23 00:07 darenwai