Commit Graph

1099 Commits

Author SHA1 Message Date
Eddie Hebert 58bf8ceed9 Adds .noseids generated by nosetests --failed to ignore list. 2012-10-19 11:18:47 -04:00
Eddie Hebert 05bb179aba Accounts for negative values when creating compounded returns.
Sets the value sent to log to a value that doesn't crash out because
of negative value.
Setting the value to 0 instead.
2012-10-19 11:18:26 -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 44efa4294f Adds section about hosting of the source to README. 2012-10-17 15:29:31 -04:00
Eddie Hebert b61a5a31a5 Removes notes about data soures in README.
This should live in the docs instead.
2012-10-17 15:22:58 -04:00
Eddie Hebert b1ed4c6d8c Removes unused sum_true method. 2012-10-16 21:48:38 -04:00
Eddie Hebert ae41a94c8f flake8 cleanup to protocol_utils 2012-10-16 16:35:23 -04:00
Eddie Hebert 9545c2672f Removes unused trading day rules in date_utils.
This logic is now captured in trading calendar.
2012-10-16 16:31:13 -04:00
Eddie Hebert 3395d3ad3b Removes unused date_to_datetime in zipline. 2012-10-16 15:20:22 -04:00
Eddie Hebert 1843447552 Removes unused utcdatetime class from date_utils. 2012-10-16 15:18:01 -04:00
Eddie Hebert 077fc38806 Removes unused d_tuple from date_utils. 2012-10-16 15:16:36 -04:00
fawce c008a957df added a __contains__ method that looks for a special property _ndict_contains__ (must be a function)
when present, the in operator behavior will be determined by the return of the special property.
2012-10-16 12:59:22 -04:00
Eddie Hebert 16aa63ac6e Changes import to use tuple-like syntax. 2012-10-15 23:32:55 -04:00
Eddie Hebert 0608d53b16 Changes import of ndict in optimize to avoid threading through protocol. 2012-10-15 23:29:47 -04:00
Eddie Hebert 95ce2d90cf Removes unused constant and redirection of imports.
Removes TRANSFORM_TYPE from protocol, since it is unused.

Also, removes use of ndict as a member of protocol, since it's
import there was for the TRANSFORM_TYPE. Changed to
utils.protocol_utils instead.
2012-10-15 22:57:06 -04:00
Eddie Hebert c26a6442e5 Moves project back over to using setuptools.
distutils was throwing errors about install_requires nor was
it successfully uploading to PyPI.

We'll look at distutils2 when it's pulled into core.
2012-10-15 21:21:38 -04:00
Eddie Hebert 3456a583d0 Adds missing license header to protocol_utils module. 2012-10-15 16:53:44 -04:00
Eddie Hebert d80099db80 Removes log_utils module.
The log_utils module is not needed to run zipline core.
2012-10-15 16:24:00 -04:00
Eddie Hebert 56b23c46ef Removes unused timeout module. 2012-10-15 15:29:00 -04:00
Eddie Hebert c626f527e1 Adjusts indentation of lists.
Getting some sublists to render correctly.
2012-10-15 15:17:22 -04:00
Eddie Hebert b23ca3f442 Removes unused gens.merge module. 2012-10-15 15:11:11 -04:00
Eddie Hebert cc5481daab Adds linebreak so that Markdown list is enabled. 2012-10-15 14:54:02 -04:00
Eddie Hebert 3c51014b21 Removes references to old project name.
Also, changes capitalization of some external projects.
2012-10-15 14:48:45 -04:00
Eddie Hebert 35616582e8 Removes references to pavement in README.
The project is no longer using paver, so removing old comments.
2012-10-15 14:44:49 -04:00
Eddie Hebert 97df95a441 Adds information style guide, discussion, and contact info to README. 2012-10-15 14:39:23 -04:00
Eddie Hebert 44d614591d Removes non-zipline specific delayed_signals module.
The delayed_signals module isn't actually necessary for the
running of zipline, so removing to reduce the surface area.
2012-10-15 14:16:50 -04:00
Eddie Hebert 25ce71651f Removes unused namelookup function.
Cutting out function whose only use was an unused constant.
2012-10-15 14:02:26 -04:00
Eddie Hebert 557f93f1e6 Removes unused FrameExceptionFactory. 2012-10-15 13:43:25 -04:00
Jonathan Kamens 7bc1e99ad8 Don't strip #.* from ends of lines
Revert e99ab2e9d07573e24e6d106877ff35eab46cdab1, which was intended to
strip comments from lines fed to pip, but had the unintended side
effect of stripping egg specifiers in URLs. The easiest way to address
this is to simply not put trailing comments in requirements files, so
we'er going to solve the problem that way instead.
2012-10-15 11:36:45 -04:00
Eddie Hebert 78bc364c45 Imports submodules of zipline on import of top-level module. 2012-10-12 17:03:34 -04:00
Eddie Hebert a7e2accd05 Updates pandas to latest release version. 2012-10-12 16:52:10 -04:00
Eddie Hebert 4955ceea44 Adds submodules to setup.py 2012-10-12 16:10:39 -04:00
Eddie Hebert 5eb4b171a9 Removes unused module. 2012-10-12 15:15:32 -04:00
Eddie Hebert 35b0bb9b26 Removes unused log_path method. 2012-10-12 15:15:07 -04:00
Eddie Hebert fcccca1530 Removes qexec reference from test logger. 2012-10-12 15:12:44 -04:00
Eddie Hebert 0c96915404 Removes requirement of existence /var/log/zipline.log
Instead log to test.log in working directory when running tests.

Also, removes config file for logging module, that is no longer
used since we are now using LogBook.
2012-10-12 11:27:42 -04:00
Eddie Hebert aa0d3e06b1 Removes outdated comments in README.
Removes:
- Reference to ZeroMQ, since the project no longer uses it.
- Reference to requirements_sci.txt, since it has now been collapsed
  into requirements.txt
2012-10-12 11:05:09 -04:00
Eddie Hebert 699c304321 Merge pull request #131 from quantopian/integrate-algo-class-and-remove-sids
Integrate algo class and remove sids
2012-10-12 07:37:45 -07:00
Jonathan Kamens df729e01ed Strip comments from ends of lines before passing to pip 2012-10-11 16:16:20 -04:00
Eddie Hebert 23076ae7f1 Allows for collapsed orders by changing the current order filter.
Changes our filter so that instead of just checking for the current
day, we ensure that orders are before or on the current event time.

This adds a delay, (defaulting to one minute), to the order so that we
avoid filling an order exactly when it is placed.
2012-10-11 13:42:53 -04:00
Jonathan Kamens 7c2bdb7b56 Strip comments from ends of lines before passing to pip 2012-10-11 10:57:27 -04:00
Eddie Hebert 5e87e174f0 Changes name of filled order variable.
So that we don't replace the orders variable with the list comp.

No functional change, but easier to compare the original and the
results of the list comp when debugging.
2012-10-10 16:19:07 -04:00
Eddie Hebert 9fef466323 Uses min function in place of taking the minimum with an if statement. 2012-10-10 16:19:06 -04:00
Eddie Hebert 69a4e542ea Filters out orders in the future.
Enforcing filling open orders that exist on or before the current event.
2012-10-10 16:19:06 -04:00
Eddie Hebert c510cab915 Removes unit test exercising expiring orders.
We have removed expiring orders, so this tests behavior that currently
doesn't exist.
2012-10-10 16:19:06 -04:00
Eddie Hebert a220bc4e8f Removes expiration from orders.
Expiration is something that way may want to have in the future,
but this current is implementation is dropping orders that
aren't meant to be expired. So removing expiration, so that all
expected orders are executed.
2012-10-10 16:18:46 -04:00
Eddie Hebert a3c3a5c6f9 Removes extra assert. 2012-10-10 16:17:06 -04:00
Eddie Hebert a83f9f9106 First pass at writing unit tests to exercise slippage models. 2012-10-10 16:17:05 -04:00
Eddie Hebert 29a87ef7a2 Normalizes indentation before editing. 2012-10-10 16:11:27 -04:00
Eddie Hebert 98f063464e Adds extra constraint of year to check for day inequality.
The .day member of datetime only gives the number of the day of the
year, which is insufficient when checking for < than.

However in this use, we may just want to check for an 'not equals'
2012-10-10 16:11:16 -04:00