Commit Graph

14 Commits

Author SHA1 Message Date
Eddie Hebert b3efb5eb69 MAINT: Remove ndict class.
Now that ndict is no longer used in any part of the system during
a backtest, remove all remaining references in tests, etc.
2013-04-26 16:03:01 -04:00
Thomas Wiecki 89ab65c413 REF: Import interface.
Makes TradingAlgorithm available at the top-level.
So that algorithms can do:
```
import zipline

class MyAlgo(zipline.TradingAlgorithm)
```

OR

```
from zipline import TradingAlgorithm

class MyAlgo(TradingAlgorithm)
```
2013-03-15 13:07:44 -04:00
Thomas Wiecki ddb007a6f9 Removed optimize from __init__.py file. 2012-10-22 09:04:12 -04:00
Thomas Wiecki b976c1252b Provides an iterative version of risk metrics.
I wrote this a little while ago as I noticed that a lot of time is spent
computing risk statistics. This is done over the complete history over
and over again while this could be done just by using the previously
computed value (iteratively).

We didn't go forward back then because for minute trade data the
difference was not significant enough. However, now with zipline
standalone I think most people will use daily (because that's
what's available) and it makes a huge difference
(speed-up of a couple of 100%).

Unfortunately, we can't just replace the existing one with an
iterative as for the final cumulative stats the batch is still
better. So that's not as nice, but the performance increase is
big enough for me to issue this PR (zipline is actually painfully
slow with daily data).

There is a unittest that compares that both produce exactly
the same outputs.

Speed measurements (for 500 trading days, daily source):

with iterative:
real 26.617 user 12.909 sys 6.112 pcpu 71.46

prior:
real 44.176 user 31.030 sys 11.381 pcpu 96.00
2012-10-17 23:41:30 -04:00
Eddie Hebert 78bc364c45 Imports submodules of zipline on import of top-level module. 2012-10-12 17:03:34 -04:00
fawce 81718011df cut most of protocol, cut most of log_utils. 2012-09-08 23:20:38 -04:00
fawce 06dc6f7acb beginning refactor to use single threaded simulator. 2012-08-06 13:11:20 -04:00
fawce dd1056bf30 generator backed component, and a starter test for a source. 2012-08-01 23:41:44 -04:00
Stephen Diehl e04415e63f Remove all namedicts. 2012-05-14 11:35:43 -04:00
Stephen Diehl 8b95aebcf2 Refactor lots of things. 2012-05-14 10:57:40 -04:00
Stephen Diehl ca60d3f8e0 Refactor component tree. 2012-05-14 09:14:26 -04:00
Stephen Diehl 81d9214b40 Updated toplevel & logging. 2012-05-10 17:31:16 -04:00
Stephen Diehl f60794067e reworked directory 2012-05-09 09:12:11 -04:00
fawce 2fd2808e28 renamed to zipline 2012-02-14 12:23:48 -05:00