Comments (4)
:), the problem is stake=5000,when i change this parameter it works.
from btgym.
the training episode is ok, but I always get 0 reward, do you know why?
no, but you definitely have to change broker account settings to match your trading instrument, cause those in example were set to match exact currency pair:
# Set leveraged account:
MyCerebro.broker.setcash(2000)
MyCerebro.broker.setcommission(commission=0.0001, leverage=10.0) # commisssion to imitate spread
MyCerebro.addsizer(bt.sizers.SizerFix, stake=5000,)
Refer backtrader documentation for details.
Also, amplifier constant inside strategy class is instrument sensitive and may need tuning:
...
...
def get_market_state(self):
T = 2e3 # EURUSD
# T = 1e2 # EURUSD, Z-norm
# T = 1 # BTCUSD
...
...
make and attach here screenshot of images
tab in tensorboard, including episode rendering and state input rendering. It can give some hints on what's going wrong.
from btgym.
@vincetom1980, no, I haven't seen this before. Seems to be distributed TF error. Have you tried to run it as notebook under jupyter kernel?
from btgym.
yes,when �I use jupyter kernel the error disapeared. But it's really difficult for me to debug with jupyter for I don't know how to trace into the backend code.
Now I try to replace the input file DAT_ASCII_EURUSD_M1_201703.csv with the Future contract file, whose content like:
20171130 105900;2991.0;2993.0;2991.0;2991.0;776.0
20171130 110000;2992.0;2997.0;2995.0;2991.0;2004.0
20171130 110100;2995.0;2995.0;2993.0;2992.0;666.0
20171130 110200;2993.0;2996.0;2996.0;2993.0;644.0
20171130 110300;2996.0;2996.0;2995.0;2994.0;824.0
20171130 110400;2995.0;2995.0;2995.0;2994.0;324.0
20171130 110500;2994.0;2998.0;2997.0;2994.0;1546.0
20171130 110600;2998.0;3000.0;2999.0;2997.0;2078.0
20171130 110700;3000.0;3000.0;2996.0;2995.0;1166.0
20171130 110800;2997.0;2997.0;2994.0;2993.0;1260.0
20171130 110900;2993.0;2996.0;2995.0;2993.0;768.0
20171130 111000;2995.0;2996.0;2995.0;2994.0;606.0
20171130 111100;2994.0;2995.0;2992.0;2991.0;1948.0
20171130 111200;2992.0;2992.0;2988.0;2988.0;3150.0
20171130 111300;2989.0;2990.0;2989.0;2987.0;1932.0
20171130 111400;2990.0;2992.0;2992.0;2989.0;1060.0
20171130 111500;2992.0;2993.0;2993.0;2991.0;626.0
20171130 111600;2993.0;2994.0;2992.0;2992.0;720.0
20171130 111700;2992.0;2993.0;2989.0;2988.0;1266.0
20171130 111800;2989.0;2990.0;2987.0;2985.0;1718.0
20171130 111900;2987.0;2991.0;2990.0;2986.0;2018.0
20171130 112000;2991.0;2993.0;2991.0;2990.0;1768.0
20171130 112100;2991.0;2991.0;2984.0;2983.0;3684.0
20171130 112200;2984.0;2989.0;2987.0;2983.0;5100.0
20171130 112300;2988.0;2988.0;2986.0;2984.0;2464.0
the training episode is ok, but I always get 0 reward, do you know why? I have to stop here for nearly 3 days, than you for your help.
from btgym.
Related Issues (20)
- Is there any real-life cases of successful application of reinforcement learning in trading / asset management? HOT 4
- Overestimated Value Function in Actor Critic Framework HOT 7
- signal.pause() - workers exit, but signal never received -- software issue? (debian linux) HOT 16
- loading multiple features - question ? HOT 3
- Amazing project <3
- PR Request for Docker addition HOT 2
- Train Test routine sampling - IndexError HOT 2
- BTgymMultiData - Sync between different data stream HOT 5
- Discussion: Long Episode Duration HOT 3
- Tutorial: Integration with TF-Agents RL Framework HOT 4
- Erroneous static_RNN policy behavior explanation.
- 2020
- BTGym Slack Join Link Broken HOT 1
- Problem with dependencies in installation on window HOT 1
- Examples that do more that randomly selects an action?
- Support Tensorflow 2 HOT 14
- ValueError: Axis limits cannot be NaN or Inf HOT 1
- INFOS
- Use btgym custom environment
- _pickle.PicklingError: Can't pickle <class 'pandas.core.frame.Pandas'>: attribute lookup Pandas on pandas.core.frame failed 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 btgym.