6093 Commits

Author SHA1 Message Date
Eddie Hebert 95a9b7b3c2 MAINT: Updates docstring for performance tracker class. 2013-03-20 11:27:57 -04:00
Eddie Hebert 060b565cdc DEV: Adds stashing to pre-commit hook.
So that the code that is linted/tested is only the staged commits.
Useful when editing by only staging parts of files via git.
2013-03-20 11:00:38 -04:00
Eddie Hebert 8bf4c60169 MAINT: Removes unused member from performance tracker class.
`last_dict` is not referenced elsewhere.
2013-03-20 10:46:59 -04:00
fawce d740394184 Merge branch 'master' of github.com:quantopian/zipline 2013-03-20 02:23:08 -04:00
fawce 93e22aa8b7 added more acceptable number types for event fields in batch
transforms.
2013-03-20 02:21:44 -04:00
Eddie Hebert f054835cd1 DEV: Provides an example pre-commit hook.
This pre-commit hook can be activated by copying or symlinking to
the .git/hooks directory

This particular commit hook is best suited for git versions < 1.8.2
The running of nosetests would be better suited for a push hook,
but those are not added until 1.8.2.
2013-03-19 23:33:36 -04:00
Eddie Hebert 0169251c89 MAINT: Removes unused init method from algorithm.
The init method had been copied to method called initialize,
to avoid confusion with __init__
2013-03-19 22:59:38 -04:00
Eddie Hebert d2bdfc931d BUG: Fixes error added while rearticulating sim_params.
Previous attempt to make sim_parms logic clearer had clobbered the
override logic when sim_params is passed to the run function.

Added a few comments as well as restructuring how the sim_params
that are passed to run overrides the default values or not.

This also makes the passing of sim_params to run to no longer have
the side-effect of overwriting the default sim_params.
2013-03-19 22:46:04 -04:00
Eddie Hebert ccef17dec6 MAINT: Fixes comment about perf type. 2013-03-19 21:35:01 -04:00
Eddie Hebert a645b2a86e MAINT: Fixes comment about returned performance types.
The simulator had been changed to return dictionary objects instead
of ndicts.
2013-03-19 20:56:56 -04:00
Eddie Hebert 50e0334b3d STY: Uses if/else for setting sim_params in algorithm.
Instead of checking 'if' and then 'if not', uses an if/else.
2013-03-19 20:53:44 -04:00
Eddie Hebert 1909a0576f MAINT: Removes unused frame_count member from algorithm class.
frame_count is only over incremented, but never read or otherwise
used.
2013-03-19 20:36:53 -04:00
Eddie Hebert 0b6e4650d9 MAINT: Removes unused flag from algorithm class.
The `self.done` member of TradingAlgorithm is never used.
2013-03-19 19:50:40 -04:00
Eddie Hebert 3e65980bda MAINT: Updates copyright of algorithm module to current year. 2013-03-19 19:06:54 -04:00
Eddie Hebert 351d5e8686 MAINT: Updates copyright to current year for returns module. 2013-03-19 17:14:01 -04:00
Eddie Hebert d17fb1c266 STY: Removes unused import. 2013-03-19 17:13:44 -04:00
Eddie Hebert ff991549b8 MAINT: Removes ipython related requirements.
Removes from requirements_dev.txt, since requirements_dev.txt is
used in various unit testing environments, ipython, pyzmq, etc.
is extra weight that is being unecessarily pulled in.
2013-03-19 14:38:55 -04:00
Tony Worm 086679c3d6 ENH: Adds new order types.
Adds the following order types:
- market
- limit
- stop
- stop limit
2013-03-19 14:32:11 -04:00
fawce dba86153d2 ENH: added a CUSTOM datasource type for custom data.
- perf modified to let non-performance related events flow through.
- changes to support streaming non-trading data through batch transforms
and for mixing in sids with just custom data.
- allowing CUSTOM events to flow through to transforms.
- Added logic to maintain pre-specified sid filter.
2013-03-19 11:39:23 -04:00
fawce 890762bde7 MAINT: added typed errors module
- added exceptions in place of asserts for expected fields for rolling
transforms.
- removed assertions with Messages in favor of typed exceptions.
2013-03-19 11:39:23 -04:00
Jonathan Kamens 9ad33ec941 MAINT: PyPI updates: six==1.3.0, delorean==0.2.0 2013-03-19 09:13:56 -04:00
Eddie Hebert 632cbf2e62 MAINT: Updates copyright for recently changed files. 2013-03-18 18:04:34 -04:00
Eddie Hebert 77bc821025 MAINT: Defines members of the Order object.
Instead of a loosely defined object for Order, explicitly
defines the parameters and corresponding members.

Clearing the way for adding more members to the Order object.
2013-03-18 17:59:14 -04:00
Jonathan Kamens 8f91711390 MAINT: New pytz version in requirements.txt 2013-03-15 13:31:29 -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
Eddie Hebert ea11a43f68 MAINT: Removes unneeded assignment in slippage.
`direction` is set on each iteration of the loop,
making the initial assignment unneeded.
2013-03-12 20:37:36 -04:00
Eddie Hebert 43fac333a1 BUG: Fixes check reversal in slippage transact_stub.
Previous commit accidentally flipped the check when converting
to use `allclose`.
2013-03-12 20:34:16 -04:00
Eddie Hebert 2bf285b084 MAINT: More slippage comparison changes for floating point.
Continues conversion of floating point comparisons in slippage to
use numpy's allclose.
2013-03-12 20:28:47 -04:00
Eddie Hebert 27761f9dec MAINT: Uses copysign to extract order direction in FixedSlippage.
Uses copysign instead of division by fabs.
2013-03-12 19:47:01 -04:00
Eddie Hebert 080c54d4dc MAINT: Accounts for possible floating point rounding in slippage.
Uses numpy's allclose instead of straight comparison of floating
points, so that there is some tolerance of floating point rounding.
2013-03-12 19:40:24 -04:00
Eddie Hebert 39cfdaa7c9 MAINT: Updates copyright date of slippage module. 2013-03-12 19:18:52 -04:00
Eddie Hebert f7b4df4a09 MAINT: Uses copysign to extract direction of order.
Instead of using division of the amount by itself to extract
the direction, uses math's copysign.

Should be almost functionally equivalent,
but copysign won't have a possible floating point error leading
the direction to not be exactly 1.
2013-03-12 19:14:02 -04:00
Eddie Hebert 085eb040af MAINT: Updates pep8 from 1.4.4 -> 1.4.5 2013-03-09 17:32:55 -05:00
fawce 045773264b ENH: Adds a flag for optionally not serializing positions.
So that both computational and memory overhead is reduced,
this turns off serializing positions for cumulative performance.

Positions were essentially being doubled up by being stored
in both cumalative and daily.
2013-03-08 15:06:41 -05:00
Eddie Hebert a4e6520137 MAINT: Reverses polarity on keep transactions default.
So that transactions are kept by default.

This prepares for the addition of the serialize flag added by
@fawce.

Setting the default to True, so that the flags will be aligned.
2013-03-08 15:00:12 -05:00
Thomas Wiecki 0113765f70 Merge pull request #103 from mdengler/for-quantopian
README.md: update "Dependencies" section from setup.py
2013-03-07 11:29:30 -08:00
Martin Dengler 66fb0c583c README.md: update "Dependencies" section from setup.py 2013-03-07 01:08:21 +00:00
fawce 6a3e402a32 Merge pull request #101 from quantopian/fix_1516
Fix 1516
2013-03-06 14:26:33 -08:00
fawce a12eeb2383 incorporating feedback from @richafrank 2013-03-06 16:49:31 -05:00
Eddie Hebert e53622c930 MAINT: Changes unittest use of ndict to use specific objects.
Instead of using ndict, changing over to using the objects that
are created used when an algorithm is run.
2013-03-06 15:48:01 -05:00
Jeremiah Lowin 2095679a1d ENH: Adjust OHLC when loading bars to remove split/dividend noise
The adjustment is optional so that previous unadjusted values
can be compared to adjusted.
2013-03-06 11:04:24 -05:00
fawce b8144cea2a added tests to ensure:
- repeated calls with the same data window do not update batch transform
    windows.
    - repeated calls with the same data and same supplemental parameters do
    not update batch transform results
    - repeated calls with the same data and different supplemental params
    do update batch transform results
2013-03-05 22:59:31 -05:00
fawce 530f1cce55 added checks for change in optional parameters to trigger transform
recalculation.
2013-03-04 22:33:30 -05:00
Eddie Hebert 718ce0270a ENH: Improves handling of edge case in data update.
If the trading_days end date is not greater than the date being
tested, (this can happen if the algorithm's end date is set to a date
that is before the latest date available saved in the msgpacks),
then trying to get the location will fail, instead searchsorted
will get the lastest date available in the trading day map to use
as a test date.
2013-03-04 21:54:11 -05:00
Ryan Day 4170c05fb6 ENH: Update msgpack files if new data is available. 2013-03-04 21:54:05 -05:00
fawce a47143099c refining the batch transform interface:
- removed use_panel
  - default for refresh_period is now 0
  - refresh_period will only affect the recreation of the datapanel
  - user's transform method is invoked on every call to batch transform
2013-03-04 21:08:15 -05:00
Eddie Hebert 3e21ea52bc DEV: Adds a script to test data saved as msgpacks.
The loader_tool currently facilitates:
- Finding the last date in each source
- Forcing a complete reload of benchmark and treasury.
- Manipulating the msgpacks so that trailing dates are dropped,
  so that the condition for an update can be recreated.

This is intended to make it easier to test the update logic added
by @rday in PR #88
2013-03-04 17:07:36 -05:00
Eddie Hebert 092af814b8 MAINT: Adds license to treasuries module. 2013-03-04 11:11:57 -05:00
fawce 6329f477b8 removed data_panel option from BatchTransform.
- the underlying dequeue shouldn't be modified, so forwarding to the
user function is a bit misleading
- if we want to provide a dequeue we should consider another class
or an EventWindow decorator.
2013-03-04 06:26:41 -05:00
Jonathan Kamens 95e702ac84 MAINT: Update pyzmq version in dev requirements 2013-03-03 16:03:02 -05:00