Commit Graph

1506 Commits

Author SHA1 Message Date
Eddie Hebert 6f1cbcbc4f MAINT: Moves internal state variables in performance tracker.
Slight refactoring of grouping the tracking variables in the
PerformanceTracker together.

So that it's easier to see which are config members and which are
members used to track internal state.
2013-03-25 12:44:45 -04:00
Eddie Hebert 19a1279385 REL: v0.5.7
Highlights, with thanks to contributors inline:

- Runtime performance improvements
- Fixed the omission of peformance messages on days with no trades
- Changes to batch_transform implementation
-- supports sid filtering
-- performance improvements using pandas
-- added an option for only computating when there is a window length's
   worth of data
- Added new risk metrics
-- Sortino
-- information ration
  (Ryan Day, ryanday2@gmail.com @rday)
- Added stop and limit orders
  (Tony Worm, verdverm@gmail.com @verdverm)
- Added variable recording
- Deprecated market_aware and delta kwargs to EventWindow
- Fixes to trading calendars for missing holidays
- Added TradingEnviorment context manager
- Added support for streaming through dividends
- Yahoo source now has OHLC
- Updates downloaded benchmark and treasury data when new data is available.
  (Ryan Day, ryanday2@gmail.com @rday)
- Added optional adjustment of Yahoo data
  (Jeremiah Lowin, jlowin@lowindata.com @jlowin)
2013-03-25 12:44:45 -04:00
Richard Frank eb6b7c08fc MAINT: Using zone attribute of tzinfo instead of string 2013-03-25 11:52:29 -04:00
Richard Frank fdf38d3562 BUG: Moved asserts back to before calculations that rely on them.
This means we get a failed assert immediately, instead of an
OverflowError later.
2013-03-25 11:52:29 -04:00
Eddie Hebert 2504874a84 DEV: Updates README with numpy installation tip.
Adds `pip install numpy` to the installation notes,
since `pip install zipline` will not work out of the box
if numpy is not installed beforehand.
2013-03-22 13:54:10 -04:00
fawce 5b59bf3453 Merge branch 'master' of github.com:quantopian/zipline 2013-03-21 15:14:48 -04:00
fawce 0e0fecf4ee allows config to force no datasources by passing a None.
absence of the parameter triggers the default.
2013-03-21 15:13:56 -04:00
Eddie Hebert 832c93134f MAINT: Removes comment referreing to removed started_at member. 2013-03-20 22:18:30 -04:00
Eddie Hebert 279e125ab8 MAINT: Pull initialization of simulation dt out of event loop.
Fakes a 'peek' into the data stream, so that the 'do we have a
simulation_dt?' check isn't called on each leoop iteration.
2013-03-20 14:34:12 -04:00
Eddie Hebert 08882bc8aa MAINT: Updates copyright on risk module. 2013-03-20 14:30:11 -04:00
Eddie Hebert 5dc449ba19 MAINT: Changes boolean check for snapshot existence in performance.
Small tweak to check for existence of elements using built-in
boolean of lists, instead of checking for `len`.
2013-03-20 13:19:39 -04:00
Eddie Hebert 75049fdd15 MAINT: Removes unused started_at member from performance tracker. 2013-03-20 13:05:38 -04:00
Eddie Hebert 3707c7b225 MAINT: Changes name of grouping of by dt in generator chain.
Changes name to `grouped_by_dt` instead of `grouped_by_date` to
clarify that the grouping is by dt, which can be by minute, instead
of grouping by calendar date.
2013-03-20 12:12:33 -04:00
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