Commit Graph

2533 Commits

Author SHA1 Message Date
Eddie Hebert c43d504212 MAINT: Remove unused hash_args from simulation object.
The `get_hash` method on the AlgorithmSimulator is never called, so
remove.
2015-05-04 11:03:01 -04:00
Jonathan Kamens fd0530d889 MAINT: Flake8 2015-05-01 11:03:01 -04:00
Jonathan Kamens 557e6a3009 Every setup_logger needs a teardown_logger 2015-05-01 07:38:42 -04:00
Jonathan Kamens 656bd86c17 TST: One more overwrite_sim_params=False needed 2015-04-30 15:38:09 -04:00
Jonathan Kamens c94880af2c TST: Suppress warnings in test_history_add_field_* tests
Temporarily suppress warnings for one line of the
test_history_add_field_* tests to work around #576 until it's fixed.
2015-04-30 15:31:21 -04:00
Jonathan Kamens 5c546b4f6c TST: overwrite_sim_params=False in tests when using list of sources
When specifying a list of sources to algorithm.py:run in a unit test,
specify overwrite_sim_params=False to suppress the unnessary
UserWarning.
2015-04-30 15:30:19 -04:00
Jonathan Kamens 8f9f65bdc6 MAINT: Flake8 2015-04-30 14:31:01 -04:00
Jonathan Kamens 73459333ef TST: Fix DeprecationWarning in xlrd by using custom version of it 2015-04-30 14:24:47 -04:00
Jonathan Kamens dcb8aa06af TST: Simplify test_examples and convert to unittest TestCase
Also, remove use of os.chdir() in the test, which causes other tests
to break by changing the current directory in the middle of the test
run.
2015-04-30 14:24:30 -04:00
Jonathan Kamens 7bb2677a9d TST: Convert test_munge.py tests to unittest format 2015-04-30 13:27:46 -04:00
Jonathan Kamens 865a20099a MAINT: Use "difference" instead of "-" to make Pandas happy 2015-04-30 13:19:00 -04:00
Jonathan Kamens d1b1708ccb Merge pull request #574 from quantopian/do_not_modify_security_lists_directory
TST: Don't modify master security lists directory during tests
2015-04-30 13:01:09 -04:00
Jonathan Kamens ca0f906b11 TST: Don't modify master security lists directory during tests
Rather than drop files temporarily into the master security lists
directory during unit tests, create temporary directories for the
tests. This avoids issues when the tests are being run at the same
time as other code that uses the real security lists data.
2015-04-29 21:41:32 -04:00
Eddie Hebert 00ea7b04d1 PERF: Reduce memory usage during risk metric calculations.
For beta calculation:

Remove `.dropna` , since it was creating a new
Series and Index which inflated memory usage as algorithm run time
progressed.

For downside risk calculations:

Instead of using pd.Series calculations, pass the underlying
numpy array which have already been sliced to the exact dt, so that the
call to `round` does not create a new Series.
2015-04-28 13:22:04 -04:00
Jonathan Kamens e5a93b6f7e MAINT: Upgrade requests to 2.6.2 2015-04-24 07:12:07 -04:00
Eddie Hebert a4f85b9436 Merge pull request #570 from quantopian/orders-by-modified-leak
Remove leaky defaultdicts
2015-04-23 15:43:03 -04:00
Jonathan Kamens 5ea4886dc1 MAINT: Upgrade requests to 2.6.1 2015-04-23 10:56:54 -04:00
Jonathan Kamens d39c0e830f Merge pull request #568 from quantopian/new_tweak_warnings_module
Scrubbing known warnings
2015-04-22 22:29:50 -04:00
Andrew Liang f44c15bb38 Scrubbing known warnings 2015-04-22 22:07:25 -04:00
Jonathan Kamens 74306f5d2d MAINT: Upgrade Markdown to 2.6.2 2015-04-22 21:12:44 -04:00
Jonathan Kamens 8ee7f6bd79 List dependencies before the things that depend on them
Because we use ordered_pip.sh to install requirements files, we want
dependencies in requirements_dev.txt to be listed _before_ the things
that depend on them, rather than after. Otherwise, with
ordered_pip.sh, stuff will get installed implicitly, and perhaps the
wrong version.
2015-04-22 16:06:33 -04:00
Eddie Hebert d343e06593 BUG: Remove use of defaultdict leading to memory growth.
defaultdict behavior was adding and never releasing a list and Timestamp
every time to_dict was called.
2015-04-22 10:46:20 -04:00
Eddie Hebert ec63397d28 BUG: Stop addition of new list in orders_by_modified on every dt.
Remove use of defaultdict for orders_by_modified, which was causing an
empty list to be added every time to_dict was called with a specified
dt.

Nnoticed in the minute emission case when hunting another memory leak,
every simulation minute a new Timestamp and list was created and never
let go.
2015-04-22 10:40:08 -04:00
warren-oneill fdd4940faf make calendar test compare generated calendar with the benchmark calendar
renaming cal_days to bench_days
2015-04-20 15:02:30 -04:00
Eddie Hebert 0fa44471be MAINT: Change expected type of treasury curves from load to DataFrame.
Instead of converting the curves back and forth from dictionaries to
DataFrame and back, use the DataFrame format when passing to
environment.
2015-04-20 10:26:09 -04:00
Brian Fink 82d2ddfa90 BUG: Fix limit orders
Only fill limit order if impacted fill price is better than the limit price.
If a limit order is partially filled, only fill the remaining shares if the
impacted fill price is better than the limit price.
2015-04-16 17:09:14 -04:00
Benjamin Berman ef598c7130 BUG: Handle a ValueError on from_csv calls
The cached market data could be corrupted. Pandas raises a ValueError in
that case, and this error handles it.
2015-04-14 12:40:37 -04:00
Scott Sanderson 885db87dea MAINT: Use logger instead of printing in loader.py
Makes it easier to filter logs when they're not desired.
2015-04-14 12:40:37 -04:00
Brian Fink 8baf52fe01 ENH: Add max leverage account guard 2015-04-10 15:19:54 -04:00
Brian Fink 2f895bddcd ENH: Track max leverage as risk 2015-04-10 15:19:54 -04:00
James Kirk 7af9b30a99 Merge pull request #560 from quantopian/calendar-clean
More flexible calendar implementation
2015-04-10 10:35:31 -04:00
Eddie Hebert 9bc40563b7 MAINT: Remove unused returns vector from perf tracker.
The returns Series in the perf tracker appears to be vestigial, so
remove.
2015-04-09 14:43:19 -04:00
warren-oneill 61571601ac added test for initialization of max_date in TradingEnvironment and removed trading_day from max_date if statement. 2015-04-08 16:57:32 -04:00
warren-oneill b62fadc76f adding NYSE trading_day and trading_days as default in load_market_data() 2015-04-08 16:57:23 -04:00
warren-oneill aa872afdf4 adding updates from master 2015-04-08 16:57:12 -04:00
warren-oneill 6432631981 uncommenting out test_calendar_vs_environment 2015-04-08 16:57:01 -04:00
warren-oneill 358d2a3b59 remove hardcoding of get_early_closes and passing trading_day and trading_days from env to load() 2015-04-08 16:56:52 -04:00
warren-oneill 49c168b3d0 adding trading_day and trading_days as variables to load_market_data 2015-04-08 16:56:13 -04:00
Thomas Wiecki d578d5825e BUG: Filter nans in DataFrame and Panel sources.
If a SID hasn't started trading yet, pandas' convention is to use nans.
Before this change, zipline would raise an exception if there were nans in the
input data.

We now skip events where the prices contains a nan and has not been traded
before (in which case forward fill).

Fixes #446.
2015-04-08 17:00:22 +02:00
Thomas Wiecki a257a43e99 DOC: Fix DataFrame and Panel sources doc strings. 2015-04-08 17:00:22 +02:00
Eddie Hebert 0821d3cad4 MAINT: Remove unused functions.
Found no references to these functions, so remove.
2015-04-06 16:43:35 -04:00
Jonathan Kamens 09c787829b MAINT: Upgrade nose to 1.3.6 2015-04-06 12:13:03 -04:00
Jonathan Kamens 80a704ff80 MAINT: Upgrade python-dateutil to 2.4.2 2015-04-02 20:16:36 -04:00
John Ricklefs b6b5275e67 MAINT: Downgrade Logbook to 0.6.0 2015-03-31 14:17:13 -04:00
Eddie Hebert 246b8bdcdc BLD: Fix Travis nosetests ability to use plugins.
In Python 3 builds, the miniconda version of nose was being used, which
was not finding the pip installed plugins.

Force the install of nose into the non-miniconda part of the
environment where the plugns are installed.
2015-03-31 14:09:21 -04:00
Eddie Hebert d4cf40099f BLD: Reduce the number of Travis build permutations.
Now that the pandas and numpy upgrade is complete, no longer need to
test for forwards and backwards compatibility.

Also, now that Cython is part of the build, the existence of Cython can
be assumed for building cyordereddict.
2015-03-31 14:08:56 -04:00
Eddie Hebert 314b22656f MAINT: Remove left over simple transform code.
Remove pieces that are no longer used now that the simple transforms are
wrappers around history via the SIDData object.

Move window length related pieces into batch_transform, since the rest
of the utils module is no longer used.
2015-03-30 14:18:39 -04:00
Jonathan Kamens 3b56a62660 MAINT: PyPI package updates, incl. pandas 0.16.0 2015-03-24 05:04:40 -04:00
Jonathan Kamens b3a2809bee BLD: ordered_pip.sh: don't count blank/comment lines as packages! 2015-03-23 09:56:31 -04:00
Jonathan Kamens 9b6fc00c5a BLD: Make backports.ssl-match-hostname line ok for ordered_pip.sh
Remove whitespace from the backports.ssl-match-hostname line in
requirements_dev.txt to make it more palatable to ordered_pip.sh.
2015-03-23 09:11:22 -04:00