Comments (14)
- in general, yes, I do not see reasons to further develop the project since it became evident that one can't build realistic trading strategies based only on OHLC data and its derivative indicators. To get good predictors one should utilise level2 data and build features upon order flow and order book events. This can't be implemented without rebuilding Btgym from scratch since it is the limitation imposed by Backtrader package -- a core backtesting library Btgym uses under the hood.
Hello, it's so sad to see this project will not be updated. You mentioned before " To get good predictors one should utilise level2 data and build features upon order flow and order book events. This can't be implemented without rebuilding Btgym from scratch",
I really don't know why I can't use features like order flow to train in this environment. Because I don't think what features users use has anything to do with the environment framework itself, the environment just need receive my feature dataframe (eg. the df include ohlcv columns and other features columns), and then it's ok.
The environment does not need to be related to the specific feature implementation at all, and users will use other methods to generate this feature DF.
Therefore, I only need an environment, which can provide the correct order matching process, correctly simulate the commission fee, margin, support long and short selling, etc., and provide users with their own reward function and action space. thats enough! Thank you again for your work.
from btgym.
@mcrowson , sorry for late reply/ I do not have plans to make support for TF2 ( should been mentioned that in package description) in near future due to lack of time/ If you can do commit on that - think it would be extremely helpful for others/ note that current tf code relies heavily on variables collections which needs to be refactored manually, so the process could take more time than expected
from btgym.
Hi @mcrowson! Are you going to work on this upgrade? If not- I can take it. If you have some work already done please commit it to your repo, then I could start from that point.
from btgym.
I do not plan to work on this. Go for it.
from btgym.
I did some fixes and now I am try to run all notebooks in examples. I can't see any unit tests in the project. Are they somewhere? Any suggestions how to test my changes?
from btgym.
@woj-i - sorry for late reply,
no there is no unit tests for algorithms-related code.
I only used it for some complex data iteration checks like here:
https://github.com/Kismuz/btgym/blob/master/btgym/datafeed/test_data.py
from btgym.
The migration process is not easy in this case. I would need some help here #144
from btgym.
Hi @Kismuz,
Using Virtual Environment created through PyCharm UBuntu Linux, I'm getting the following error during installation of setup.py:
ERROR: Could not find a version that satisfies the requirement tensorflow<2,>=1.5 (from btgym) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.7.0rc0, 2.7.0rc1)
ERROR: No matching distribution found for tensorflow<2,>=1.5
It does not seems like PyPI is officially supporting tensorflow <2 anymore. If no one is willing to migrate this btgym to Tensorflow 2, I foresee that btgym is going to EOL soon because new user like myself could no longer install btgym.
If that's the direction btgym is heading to, I feel sad to see this fantastic project going to EOL.
Alternatively, is there a plan to allow user to switch to other backend such as PyTorch besides Tensorflow?
Or even better, strip btgym from any backend and let user hook them up by their own?
My understanding for matplotlib to plot chart is slower than Plotly. Is there any plan to allow user to switch to Plotly as graph backend as well?
from btgym.
- environment itself does not requires TF, it is only algorithms subpackage that uses it. One can comment out the requirement and proceed with installation. As far as I know there are users running standalone btgym env with pytorch-implemented policies
- TF 2 can be run in v1 compatibility mode, there is a branch by contributing people went to stall, see #144
- in general, yes, I do not see reasons to further develop the project since it became evident that one can't build realistic trading strategies based only on OHLC data and its derivative indicators. To get good predictors one should utilise level2 data and build features upon order flow and order book events. This can't be implemented without rebuilding Btgym from scratch since it is the limitation imposed by Backtrader package -- a core backtesting library Btgym uses under the hood.
from btgym.
it became evident that one can't build realistic trading strategies based only on OHLC data and its derivative indicators.
@Kismuz even for statistical arbitrage scenario? I remembered you have mentioned some fund had success in applying RL in arbitrage (sure, we don't know if they use level2 or OHLC)? Maybe you could share some of your personal experience? thanks!
from btgym.
@Kismuz even for statistical arbitrage scenario?
@mysl - It depends on market efficiency. From my experience OHLC-data approach does not works steadily on FX, stocks and other mature markets. A year ago it was possible to apply it to crypto; but as for now these strategies performance has been degraded.
I remembered you have mentioned some fund had success in applying RL in arbitrage (sure, we don't know if they use level2 or OHLC)? Maybe you could share some of your personal experience? thanks!
to my humble experience LOB and trade flow data bear sufficient predictive ability even on mature markets
from btgym.
@Kismuz , thanks so much for the sharing. May I know the timeframe of the trade driven by the prediction from LOB? Holding position for a few or dozens of seconds?
from btgym.
@yglpyn8888 , you're correct
which can provide the correct order matching process,
... and that's exactly what is not possible with current environment implementation which uses Backtrader package as core backtesting engine
from btgym.
@yglpyn8888 , you're correct
which can provide the correct order matching process,
... and that's exactly what is not possible with current environment implementation which uses Backtrader package as core backtesting engine
OK,do you have plan to implement a new trading environment in the future, which is not based on backtrader, just provides the core functions of an environment ?
(by the way, a fully functional trading environment is hard to find. I tried tensortrade before, but they don't support short selling)
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?
- 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.