Thanks for your code.
We should output portfolio analysis (alpha, beta, sharpe ratio, sortino ratio ...)
I didn't find a good tutorial about zipline
maybe you have any pointer to provide me ?
we should also add entry / exit point efficiency.
There there are some examples:
https://github.com/quantopian/zipline/tree/master/zipline/examplesBut I haven't found a ton of documentation. At the moment if feels like one might be doing some code skimming and pydoc usage to look at the API. I haven't tried compiling the documentation in the repo but the few files I looked at didn't seem to expand far beyond that.
Here's an example that extends MtQuid's notebook to try a method on the zipline mailing list:
http://nbviewer.ipython.org/ec53445ececcd94980b8I'm not sure if those are correct or not, didn't check that the dates are actually UTC.
you was talking about trading fees...
but there is an other kind of fee that is not modeled here : spread
bid and ask price for a given BTC volume are differents !
difference is called spread = ask - bid
even if trading fees were 0% you will lose money to buy and sell BTC simultaneously
For now, we only have price... we don't know what spread value was for a
given datetime !
moreover unlike Forex market where spread is either fixed
or time dependant... in BTC market spread is volume dependant.
the higher BTC volume is, the higher spread is !!!
but that's probably only noticeable for very big BTC volume
Yeah, this is one thing that makes me the most concerned about backtesting. I don't know if there are any data sources that keep book history that could be used for this purpose either. I can think of ways to maybe get a sense for it from the data by looking for alternating jumps in the data, but that'd be an approximation at best.
The only thing that came up in a quick search regarding order book history was this other thread which links to data from 2012:
https://bitcointalk.org/index.php?topic=88054.0I'd be interested in other theories on how to deal with this. I'd be thinking maybe either some estimated factor, or binning the data and going by the low, or doing priced asks/bids rather than market orders? Or, as you suggest perhaps we could collect some data and do a model based on volume? One could also look at trades that alternatingly up/down to get an idea of the spread? Any modeling would need some test data though.