btce-bot icon indicating copy to clipboard operation
btce-bot copied to clipboard

Add ability to play back a database

Open alanmcintyre opened this issue 11 years ago • 5 comments

Being able to play back a database through a bot to measure performance (both processing time and profitability) would be helpful.

alanmcintyre avatar May 23 '13 17:05 alanmcintyre

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.

hsharrison avatar May 23 '13 19:05 hsharrison

Thanks for mentioning Zipline; I'll have a look!

alanmcintyre avatar May 23 '13 23:05 alanmcintyre

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).

hsharrison avatar May 24 '13 01:05 hsharrison

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.

alanmcintyre avatar Jun 09 '13 01:06 alanmcintyre

is this function available?

matigumma avatar Mar 04 '14 04:03 matigumma