6093 Commits

Author SHA1 Message Date
Thomas Wiecki 6f2e1672d7 BUG: Forward initialize args and kwargs to user-defined function.
The initialize method of TradingAlgorithm no longer accepts and
silently ignores args and kwargs, but instead forwards them
to the user-defined function referenced by self._initialize.

To avoid passing unexpected arguments to self._initialize, the
following additional adjustments are made:

 - pop 'namespace' from the kwargs supplied to TradingAlgorithm
   rather than simply get()ing it

 - do not pass an AssetFinder to the TradingAlgorithm in
   test_modelling_algo.py, as this has been deprecated and will
   cause self._initialize to fail
2015-09-14 10:42:20 -04:00
jfkirk a6e677a1d7 MAINT: Removes unused __init__ from AssetDBWriter 2015-09-14 10:01:36 -04:00
jfkirk b0195c0d17 MAINT: Abstracts-away Timestamp conversion of Asset fields 2015-09-11 15:58:46 -04:00
jfkirk a6ce1e5e8d ENH: Adds auto_close_date field to Future objects 2015-09-11 14:08:03 -04:00
Stewart Douglas 29321af1b4 DEP: Remove quantopian_buy_applye.py as logic covered in buyapple.py 2015-09-10 17:17:46 -04:00
jfkirk 4770c5956c TST: Fixes modelling test tearDown 2015-09-10 11:53:29 -04:00
jfkirk 6e6ef447d2 TST: Adds tearDownClass methods to delete TradingEnvironments 2015-09-10 11:53:29 -04:00
jfkirk 65a4c4523e STY: Renames serialization_utils dump and load methods 2015-09-10 11:53:29 -04:00
jfkirk 262f0b7d09 MAINT: Removes mutable default method args
Also removes accidental modifications to Jenkins
2015-09-10 11:53:29 -04:00
jfkirk 608dff245b TST: Updates test for set_symbol_lookup_date 2015-09-10 11:53:29 -04:00
jfkirk 265bffbe01 TST: Updates modelling test base for new TradingEnvironment 2015-09-10 11:53:29 -04:00
jfkirk 3c1eea4ca1 MAINT: Removes references to trading.environment 2015-09-10 11:53:29 -04:00
jfkirk fd907dbabc ENH: Adds mapping of company_name and ensures str types in AssetFinder 2015-09-10 11:53:29 -04:00
jfkirk 5320fd0fc5 BUG: Adds missing parens to AssetFinder sids property 2015-09-10 11:53:28 -04:00
jfkirk 6c6ecd0a86 ENH: Adds asset_db_path arg to TradingEnvironment init 2015-09-10 11:53:28 -04:00
jfkirk fa5f24fb2a BUG: Removes default table values causing issues 2015-09-10 11:53:28 -04:00
jfkirk 93c8808e4a ENH: Adds root_symbol_id column for use in creating Future sids 2015-09-10 11:53:28 -04:00
jfkirk 2a28d09380 MAINT: Removes exchange_id and root_symbol_id columns from AssetDB 2015-09-10 11:53:28 -04:00
jfkirk 35ed8c28a8 TST: Fixes modelling test to use new TradingEnvironment framework 2015-09-10 11:53:28 -04:00
jfkirk a2cacfb613 MAINT: Pulls out methods that should be free 2015-09-10 11:53:28 -04:00
jfkirk f1f3f9b751 TST: Fixes broken event test 2015-09-10 11:53:28 -04:00
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
jfkirk 661314ce49 ENH: AssetWriter now writes one Asset per insert statement 2015-09-10 11:53:27 -04:00
Stewart Douglas a517929cbb DOC: Improve documentation in asset_writer.py 2015-09-10 11:53:27 -04:00
Stewart Douglas 22827d1c89 MAINT: Convert map to list in lookup_future_chain 2015-09-10 11:53:27 -04:00
Stewart Douglas ee9c79a6f8 MAINT: Reduce end_date int for SQLite Python3.3 compatibility 2015-09-10 11:53:27 -04:00
Stewart Douglas 593e114f0a BLD: Include sqlalchemy and toolz in .travis.yml 2015-09-10 11:53:27 -04:00
Stewart Douglas d3516959a3 MAINT: Don't set string to upper before writing, remove unused libs 2015-09-10 11:53:27 -04:00
Stewart Douglas 3224085a1d ENH: Check whether identifier columns provided in DataFrame 2015-09-10 11:53:27 -04:00
Stewart Douglas 7be2cf8652 MAINT: Allow algo.run() to write to db 2015-09-10 11:53:27 -04:00
Stewart Douglas 1ef2274d11 MAINT: Update tests to conform to new reader/writer structure 2015-09-10 11:53:26 -04:00
Stewart Douglas 8ccdae9870 MAINT: Change defaults when parsing kwargs in TradingEnvironment 2015-09-10 11:53:26 -04:00
Stewart Douglas bd7be19198 ENH: Allow write_data to consume DataFrames 2015-09-10 11:53:26 -04:00
Stewart Douglas 92f99e62f0 MAINT: AssetFinder should not write to db 2015-09-10 11:53:26 -04:00
Stewart Douglas 9d313ab877 BUG: Various bug fixes to assets.py
Bug fixes include:
	- Do not call float on tuples
	- Correct indentation
	- Do not call value() on int
	- Use fuzzy correctly
	- Use symbol for lookup
	- Ensure we raise Error
2015-09-10 11:53:26 -04:00
Stewart Douglas 16488d9053 ENH: Base new sid creation on existing sids in database 2015-09-10 11:53:26 -04:00
Stewart Douglas 1d958bd7eb ENH: Allow AssetDBWriterFromList to consume Assets 2015-09-10 11:53:26 -04:00
Stewart Douglas aa110dd149 ENH: Add init_db to transaction so table exists=>it has also been written to 2015-09-10 11:53:26 -04:00
Stewart Douglas 667f0695d5 BUG: Avoid NOT NULL violation by checking for data first 2015-09-10 11:53:26 -04:00
Stewart Douglas e5875af784 DOC: Documentation improvements 2015-09-10 11:53:26 -04:00
Stewart Douglas e529df06ea ENH: Add autoload=True for compatibility with SQLAlchemy < 1.0.0 2015-09-10 11:53:25 -04:00
Stewart Douglas ded6f8543f BUG: Cast datetime to Timestamp to call value 2015-09-10 11:53:25 -04:00
Stewart Douglas 3af8b6d6c8 DEP: Remove unecessary calls to write_data 2015-09-10 11:53:25 -04:00
Stewart Douglas 1c512c5478 TST: Update test_algorithm.py to incorporate TradingEnvironment.write_data 2015-09-10 11:53:25 -04:00
Stewart Douglas c8b88432cc BUG: Account for sid == 0 in if statement 2015-09-10 11:53:25 -04:00
Stewart Douglas 4300ab357a BUG: Convert sqlalchemy RowProxy to dict for assignment 2015-09-10 11:53:25 -04:00
Stewart Douglas 46346ecb5d BUG: Ensure symbols are made upper case in db 2015-09-10 11:53:25 -04:00
Stewart Douglas 678aec2cae MAINT: Convert dates to INTs for SQLite and set default end_date 2015-09-10 11:53:25 -04:00
Stewart Douglas 32b663c5ca MAINT: Enforce uniqueness of sid column 2015-09-10 11:53:25 -04:00
Stewart Douglas 501fd58fdf ENH: Replace update_asset_finder with write_data
The write_data methods invokes the relevant AssetDBWriter subclass
to write data to the database. update_asset_finder is no longer
a relevant method since the AssetFinder is strictly a reader class.
2015-09-10 11:53:24 -04:00