btce-bot
btce-bot copied to clipboard
Add ability to play back a database
Being able to play back a database through a bot to measure performance (both processing time and profitability) would be helpful.
Hi Alan, I just saw you posted this, and I wanted to draw your attention to the zipline project: https://github.com/quantopian/zipline
It's a platform for backtesting and running trading algorithms.
I've been working on a class that will take your MarketDatabase class and mimic zipline's DataSource class, so that it can be used in backtesting in zipline. I think integrating your work into zipline makes more sense than building your own backtester, so I figured I'd alert you to the possibility. In any case I'll post my work when it's ready.
On the other hand, having the database spoof the live feed (your solution I imagine) sounds far simpler. Zipline seems to offer some advantages but it may not be worth it. Let me know your thoughts. I'm more interested in testing algorithms than actually trading them (I'm a researcher) so if my efforts were best directed elsewhere maybe I could contribute more directly.
Thanks for mentioning Zipline; I'll have a look!
Hmm, after getting past the easy part, I've come to think zipline's not quite ready for this, until they develop built-in support for market depth (currently you can import the order book as a custom field but simulated orders are placed at the "price", i.e. of the last trade) and currencies (my plan was to model all the *_btc pairs as equities).
If it seems feasible at some point to use the btce-bot database for something like Zipline, and you need a hand getting it to work, let me know. It would be good to have an option to play it back into professional trading/analysis tools, since I doubt btce-bot will be able to have the kinds of features those tools offer.
is this function available?