-
Notifications
You must be signed in to change notification settings - Fork 362
Resolved issue around inability to evaluate and overflow in sigmoid. Also added a few lines that I missed in merge last night. #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… a mod to Sigmoid function to prevent exp from overflorwing
… my local code when performing merge last night
python train.py ^GSPC 10 1000
Revise README.md
…ill have to build on this further once I have a better understanding of the keras Tensorboard implementation
…wdown. Will have to find a better way of graphing for keras in the future.
…rease performance
Thanks for your sharing. This modification can tackle no profit due to a "Buy" never occurring. But I don't think it really solve the core problem: why can't a trained agent take a proper(buy) action even in the trained data? If we can make it work, this example actually shows how we can deal with “Environment”. It is usually quite difficult to model environment in financial markets. |
Apply Actor-Critic method to train agent.
Was always getting a profit of 0 when evaluating model. This was primarily due to a "Buy" never occurring and therefore agent.inventory was always empty. So I set it so the first iteration a buy will occur and then the model will pick up from there. I'm thinking that in a future adjustment to this, we can infer the best time to buy in to the model based on the sliding window, or perhaps another means. For now, this at least allows for the evaluation to occur on other datasets.
Sigmoid was also overflowing when gamma (x) was higher than what math.exp could handle which on my system was around 700. The implementation used was one with which I found on SO.