tatsath / fin-ml

This github repository of "Machine Learning and Data Science Blueprints for Finance". Please star.
887 stars 408 forks source link

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

Open Abaminog opened 3 years ago

Abaminog commented 3 years ago

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.

Thunder-Fire commented 3 years ago

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!

darenwai commented 2 years ago

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.

tatsath commented 2 years ago

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

darenwai commented 2 years ago

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

IGleiser commented 2 years ago

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

adsd19 commented 2 years ago

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.

miladasgari380 commented 1 year ago

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.

darenwai commented 1 year ago

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?