62 Commits

Author SHA1 Message Date
jfkirk dc964a7e7d MAINT: Removes the ability to reference a global TradingEnvironment
This commit removes the ability to reference a shared TradingEnvironment through the zipline.finance.trading module. In place, the classes that require a TradingEnvironment, or its child AssetFinder, contain their own references to those objects.

This commit also adds serialization utilities that allow for the pickling/unpickling of objects without unintentionally their TradingEnvironments or AssetFinders.
2015-09-10 11:53:28 -04:00
Jonathan Kamens e942275108 STY: Flake8
Upgrade the version of the flake8, pep8, and mccabe PyPI packages, and
make the code changes necessary for compatibility with the updated
packages.
2015-03-19 17:21:25 -04:00
Joe Jevnik f7b4d3100d ENH: Makes the offset of market_close relative to 20:00 UTC
Changed from relative to 20:01 UTC.
2014-11-19 11:38:26 -05:00
Joe Jevnik ca59abcc43 ENH: Makes schedule_function work in daily mode. 2014-11-06 10:49:49 -05:00
Joe Jevnik 93429d69f5 BUG: HistoryContainer creation at runtime did not work as intended. 2014-11-05 18:31:11 -05:00
llllllllll 9ddb033e67 ENH: Changes the default offset for time_rules.market_open to 1, and
makes it an offset from 13:30 UTC.

This is to be more consistent with the market_close, which is an offset
from 20:00 UTC.

This also makes market_open and market_close cache the dt to offset from
for each day.
2014-11-05 14:59:48 -05:00
Joe Jevnik c6e85d08f0 ENH: Does value checking for time offsets for market_open and market_close 2014-10-20 17:17:34 -04:00
Joe Jevnik 69124cb6ab BUG: Fixed a bug with offsets in week_start and week_end 2014-10-20 17:17:34 -04:00
Joe Jevnik d360b9d9bd ENH: Provides a more descriptive error if market_open or market_close are provided a non-keyword argument that is not a datetime.timedelta 2014-10-20 17:17:34 -04:00
Joe Jevnik df234f516c BUG: Fixes various bugs with the event manager:
- NotHalfDay only worked at midnight
- week_(start|end) were actually month_(start|end)
- Removes check_args from api.
- Default offset of 30mins for market_(open|close)
2014-10-09 14:01:56 -04:00
Joe Jevnik 3c37704a5b ENH: Adds a new api method schedule_function.
schedule_function takes a date rule, a time rule, and a function and
will call the function, passing context and data only when the two rules
fire. This allows for code that is conditional to the datetime of the
algo.

This is implemented internally with `Event` objects which are pairings
of `EventRule`s and callbacks.

handle_data becomes a special event with a rule that always fires. This
makes the logic for handling events more complete and compact.
2014-10-06 13:42:36 -04:00
Joe Jevnik 4db4256cfe MAINT: Adds a tests/utils/ directory and renames test_utils.py
to utils/test_factory.py
2014-09-29 12:57:39 -04:00