Comments (16)
@Kalelv45 @kkuette @iorobot @edwardhdlu.I tried it myself and found that tweaking the code a little bit yields very good results. I changed the way reward was provided. If there were more that 20 consecutive buys or 50 consecutive "no action", then I gave the agent a big negative reward like -500. Apart from this I removed the max(in the buy action) and multiplied the reward by 100. I trained the model for 220 episodes and the 220th showed a profit of 25000 dollars on the last three year google stock price data.
from q-trader.
I used a window size of 20, and found that my model converges and profits the most on my 30th episode. All models after 100 seems to diverge and just never buy anything. Any ideas on how to tweak the model to further converge?
from q-trader.
Your agent did not learn well, i think it's just overfitting.
from q-trader.
Look at #1.
I also have that problem but even with that solution my results using almost the same model(model_1000 or model_1010) are extremely volatile.
from q-trader.
Try to tweak your settings.
if you want something with more functionalities you can look at this
from q-trader.
Nice!Can you pull the code?
from q-trader.
@Kalelv45 @kkuette @iorobot @edwardhdlu.I tried it myself and found that tweaking the code a little bit yields very good results. I changed the way reward was provided. If there were more that 20 consecutive buys or 50 consecutive "no action", then I gave the agent a big negative reward like -500. Apart from this I removed the max(in the buy action) and multiplied the reward by 100. I trained the model for 220 episodes and the 220th showed a profit of 25000 dollars on the last three year google stock price data.
You mean that you removed the max function in the sell action, right?
from q-trader.
Are you sure that your model isnt overfitted ?
from q-trader.
I removed the max function because otherwise the model is not penalized for wrong decisions. Then you can increase the size of the penalty(not everytime) by multiplying the reward it gets after selling by 100.
As far as overfitting is concerned, I have tried it with a bunch of other stocks and it is working really good.
from q-trader.
What's the window size you're using? @satinder147
from q-trader.
@calvin-is-seksy 10
from q-trader.
I just made an pull request. You all can have a look
from q-trader.
Even with your code i still have 0 profit with the GSPC dataset. Any ideas why?
from q-trader.
well, it seems to me that is only a coincidence, have you try to use different data?Do you find the same behaviour?
from q-trader.
I used a window size of 20, and found that my model converges and profits the most on my 30th episode. All models after 100 seems to diverge and just never buy anything. Any ideas on how to tweak the model to further converge?
hello, I want to know how to plot this graph??
from q-trader.
I used a window size of 20, and found that my model converges and profits the most on my 30th episode. All models after 100 seems to diverge and just never buy anything. Any ideas on how to tweak the model to further converge?
@ How about your running time? It is super slow on my laptop, I have RTX 2060 , But still 10 episodes took 1 hour. THX
from q-trader.
Related Issues (20)
- No action at all (zero output) when evaluating a training result. HOT 5
- HELP
- No directory HOT 1
- how to draw the graph of the stock HOT 1
- please sir solve my problem HOT 1
- error when running training HOT 2
- Cannot use GPU for training.. HOT 1
- dont close or delete this issue! HOT 1
- no convergence HOT 1
- "memory" is never cleared? HOT 1
- Why I train the model very slow though with GPU
- evaluete.py not working return a error testing a model 'Shape' object has no attribute 'as_list'
- Dead link
- Multiple buy before any sell HOT 2
- Minor mistype HOT 1
- Some possible optimization HOT 1
- IndexError in train.py HOT 2
- Trying to implement in tfjs... can anyone explain this bit of code? HOT 2
- Training time and async/await HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q-trader.