Comments (2)
Have you looked at btgym @ https://github.com/Kismuz/btgym
I'm not 100% sure how it works yet, but it might be useful. The repo author has some implemented examples.
from tforce_btc_trader.
backtrader seems like a solid framework. Toyed with btgym that runs off of backtrader a bit but ran into issues using external data and didn't sink the time into changing the formatting to get it to play nice, but the goal was to pull from ccxt. The unreal LSTM strat in that repository is interesting.
Something to consider with the order types, not all exchanges support executing 'advanced' orders like that through their APIs (I believe kraken supports stop loss order, poloniex does not), so changing it at the level of what's sent to the API runs risk of limiting the supported exchanges. It seems like something that can easily be done via code, but should probably go into a separate process responsible for executing buy/sell orders and monitoring the ticker/order book.
Depending on the time scale you're looking at, time lag can turn a good buy/sell decision into a very bad one, pretty quickly. In an exchange with a maker/taker fee structure (most), we want maker as close to every time as we can to save those percents. That being said, there are times when taking a hit on the taker fee to secure an asset when the anticipated returns make up for the loss is better than not securing it at all.
Instead of doing highest bid or lowest ask, I take the highest bid and the bid below it, take the difference of those two and add it to the highest bid (same thing for the lowest ask), this pretty much guarantees slipping it in on a maker fee and puts it at the top of the book giving it a good chance of getting satisfied, then it's just a matter of refreshing the order if it doesn't get satisfied and the price shifts (have to determine if it's still a good decision at that point). When this gets screwy is when the spread between bids and asks is temporarily high due to volatility, might be worthwhile to wait a few ticks or base the order off the average spread prior to the execution tick?
Has anyone stumbled on any projects that feed the order book into a deep learning framework? I don't think the data is available historically through APIs which would limit the data to feed into backtesting, so it couldn't really be used as an 'indicator' in that sense, but feel it could be useful at least in the execution phase
from tforce_btc_trader.
Related Issues (20)
- Error: Cannot find module 'webpack' HOT 3
- ModuleNotFoundError: No module named 'data.data' HOT 2
- (psycopg2.ProgrammingError) relation "coinbase" does not exist HOT 3
- Live-mode NotImplementedError HOT 3
- Switching to conv1d/ LSTM-FCN representation
- Table runs does not exist HOT 5
- Visualisation issue HOT 3
- Non-existent input ^ConstantFoldingCtrl/ppo/cond/add/Switch_0 for node ConstantFolding/ppo/cond/strided_slice_2/stack_const_axis HOT 11
- Data Source HOT 1
- Volatile GPU-Util is low HOT 6
- Can we add a support and resistance indicator? HOT 1
- Actions exploration HOT 4
- v0.2 Save trials object to resume on next run HOT 2
- Python hung (likely because of too many psycopg2 connections) during attempted impmentation of https://github.com/deepmind/scalable_agent HOT 1
- Suggestion: setup docker to be easy to develop. HOT 2
- Can't find run.py? HOT 1
- Google Colab Tutorial not showing
- Typeerror occurred at tensorforce 0.4.3 When run hypersearch.py
- How to add new RL features from media news to train them?
- This is a question HOT 1
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 tforce_btc_trader.