Open mcrowson opened 4 years ago
@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
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.
I do not plan to work on this. Go for it.
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?
@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
The migration process is not easy in this case. I would need some help here https://github.com/Kismuz/btgym/pull/144
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?
@viper7882
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!
@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
@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?
- 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.
@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
@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)
Expected behaviour:
Environment fully supports TF2
Actual behaviour:
Only 1.5 is supported for certain scripts
I ran the automatic upgrade tool on the library and it generated the following report. For the most part it moved everything along, but there are several errors in the script for fully deprecated classes that we'll need to reference another way.