Commit Graph
3243 Commits
Author SHA1 Message Date
Eddie HebertandGitHub 84b24d2cee Merge pull request #1734 from quantopian/prepare-for-validity-checks
MAINT: Prepare parameter check for adding an additional check.
2017-03-30 14:02:03 -04:00
dmichalowicz 69a0e5c31b BUG: Getting continuous future current contract failed on None 2017-03-30 12:09:55 -04:00
Eddie Hebert fc65ac33ca MAINT: Prepare parameter check for adding an additional check.
Should be no functional change.

By making the raise on `if not isinstance` instead of doing a continue on `if
isinstance` (with a raise at the end of the loop if no 'good' conditions were
met'), the function should be more amenable to adding an additional validity
check, after the type check passes.

This is on the path to adding an additional validity checks parameter to
`check_parameters`, e.g. adding an 'is positive' check.
2017-03-30 10:47:29 -04:00
dmichalowicz f0f8bac2ab EHN: Make continuous future adjustment style an argument 2017-03-29 08:49:12 -04:00
dmichalowicz 066a7776d2 BUG: Open and close resampling code could hit index errors 2017-03-28 16:06:29 -04:00
Eddie Hebert 2792de1f92 MAINT: Clear up naming and logic in resample close.
- Instead of maintaining a separate `j` value, set the bounds of the range so
that `i` is the values emitted by the range.
- Change `close_loc` to `prev_close_loc` since the market close location is used
to ensure that the data index stops at the market open if the entire day is
nans.
- Change the setting of `loc` to be done before the loop which check for nans,
instead of setting to the previous close loc at the end of the loop.

This prepares for a separate fix to prevent out of bounds access when the first
session has nans for all minutes.
2017-03-28 13:30:12 -04:00
Eddie Hebert 63c80109ec STY: Cleanup trailing whitespace in resample module. 2017-03-28 12:16:39 -04:00
Jean BredecheandPaul Sutherland 81b943c61d ENH: Allow override of order amount rounding. (#1722)
* ENH: Use regular rounding to calculate order amounts.

We previously tried to prevent accidental over-ordering by truncating
orders down unless they were within 1e-4 of the next higher integer.
Unfortunately, this makes it easy for a sell order to be one share short
of the desired position.

Using regular rounding treats both buys and sells in the same way.

* ENH keep non-rounding behavior consistent, but leave code structured to make easier to override

* DOC make round_order public and describe behavior in docstring
2017-03-27 20:44:12 -04:00
Maxwell RoundsandMaxwell Rounds 24ce67a7cf ENH: Adding CFE Adhoc Holidays
The CFE was closed along with the NYSE in observation of the days of
mourning in honor of the passing of presidents Gerald Ford and Ronald
Reagan. The CFE also observed the closures due to Hurricane Sandy,
along with NYSE. Adding those adhoc holidays to exchange_calendar_cfe
and removing them from cfe.csv in tests. To fit with
USNationalDaysofMourning, also removing the closure in observation of
the day of mourning in honor of the passing of president Nixon in
1994, despite the fact that the exchange did not exist at that time.

Signed-off-by: Maxwell Rounds <maxwell.j.rounds@gmail.com>
2017-03-26 15:54:14 -07:00
David MichalowiczandGitHub 7ef17ae3af Merge pull request #1718 from quantopian/more-generic
Add ContinuousFuture to lookup_generic
2017-03-25 09:23:35 -04:00
dmichalowicz c0355af316 ENH: Add ContinuousFuture to lookup_generic 2017-03-25 09:04:17 -04:00
dmichalowicz 8a25ac3af0 ENH: Allow DataPortal.get_spot_value to accept multiple assets 2017-03-25 09:02:10 -04:00
Andrew DanielsandGitHub c0a76a5303 ENH: Adds StaticSids pipeline filter (#1717)
Useful for avoiding the need to create Asset objects when sids are
easier to use.

This is based off the existing implementation of StaticAssets, and
StaticAssets is now implemented as a wrapper around StaticSids.
2017-03-22 14:28:54 -04:00
Freddie VargusandGitHub 2860708a44 Merge pull request #1683 from shadiakiki1986/bugfix_index_should_be_int
BUG: Convert index to int so that the pandas indexing doesnt fail
2017-03-16 13:36:10 -04:00
dmichalowicz 825ba5717e ENH: Better error message for non-existent root symbol 2017-03-16 11:18:17 -04:00
David MichalowiczandGitHub f561e2ea54 Merge pull request #1714 from quantopian/test-fixture-fix
Equity daily data test fixture was using wrong sids
2017-03-15 16:44:05 -04:00
Maya TydykovandGitHub 83756d4660 Merge pull request #1710 from quantopian/sort-pipeline-data-on-asofdate
Sort pipeline data on asofdate
2017-03-15 14:40:11 -04:00
Maya Tydykov 58fb830ebd BUG: sort data on asof_date to resolve ts conflicts
MAINT: fix arg default and update docstring
2017-03-15 14:10:58 -04:00
Jean Bredeche c9254d395d ENH: teach BarData about current session's minutes 2017-03-15 13:40:33 -04:00
dmichalowicz fa56fe4954 TST: Equity daily data test fixture was using wrong sids 2017-03-15 13:16:45 -04:00
Eddie Hebert 4071a52702 MAINT: Apply linter recommendations to adjustments module.
Remove unused variables.

Add type for values used to access arrays.
2017-03-15 11:26:38 -04:00
Shadi Akiki 9a7e847ab7 BUG: use integer division for index so that pandas indexing doesnt fail 2017-03-13 07:42:51 +00:00
Freddie VargusandRichard Frank 40fc1c9185 REL: Update stubs for 1.1.0 release 2017-03-10 17:19:57 -05:00
Joe JevnikandJoe Jevnik beb4bd8c6e BUG: fix label array code dtype condense 2017-03-08 20:54:57 -05:00
Richard FrankandGitHub 85eef5cb6b Merge pull request #1699 from quantopian/yahoo-url-update
MAINT: Updated yahoo url for SSL
2017-03-08 16:04:51 -05:00
Ana Ruelas 5d77a4bf94 BUG: ceil returns float, int needed for array indexing 2017-03-08 11:05:54 -05:00
dmichalowicz 6596c03351 BUG: Set data portal last trading session if passed 2017-03-08 09:07:03 -05:00
Ana Ruelas 9252b62b2b TST: Add tests for winsorize factor 2017-03-07 17:14:27 -05:00
Ana Ruelas 799bad957d ENH: Add winsorize factor 2017-03-06 14:08:28 -05:00
Richard Frank cb76f1fc16 MAINT: Updated yahoo url for SSL 2017-03-05 17:37:45 -05:00
Joe JevnikandGitHub cfdbe883b1 Merge pull request #1672 from quantopian/narrow-labelarray
narrow labelarray
2017-03-02 19:32:56 -05:00
Ana Ruelas 0d4ca54900 ENH: Make invalid data behavior optional 2017-03-01 10:41:30 -05:00
Joe Jevnik a8d6ecd545 ENH: make LabelArray.from_codes_and_metadata public 2017-02-28 23:12:55 -05:00
Joe Jevnik a4e445153c ENH: make NaT_for_dtype coerce the input to a dtype 2017-02-28 22:49:17 -05:00
Alexey DegtyarevandRichard Frank dd7fa4ba25 DOC: Fix typo in -k/--keep-last option description 2017-02-28 22:27:18 -05:00
Jean Bredeche cf063abcf1 Rename _attrs_to_check to asdict 2017-02-23 11:32:04 -05:00
Andrew DanielsandGitHub 8e1f8d75f5 MAINT: Removes unnecessary capital_base arg to TradingAlgorithm (#1677)
Capital base is included in the sim params, so we should define the
value there, or use the default.

This change also unifies the default capital base as 1e5, as was
previously defined in algorithm.py.
2017-02-17 09:04:50 -05:00
dmichalowicz 63063aa709 ENH: Eliminate potential look-ahead bias in volume rolls 2017-02-16 09:01:16 -05:00
Maya TydykovandGitHub 5ab0880ad7 Merge pull request #1684 from quantopian/fix-earnings-estimates-1-day-bug
BUG: fix loader bug for 1 day
2017-02-15 17:20:31 -05:00
Maya Tydykov 59acadbccf BUG: fix loader bug for 1 day 2017-02-15 16:44:45 -05:00
Andrew DanielsandGitHub c2560c6079 TST: Adds TestingSlippage slippage model (#1679)
Allows specifying a constant number of shares filled per tick.

Also adds the WithConstantEquityMinuteBarData fixture, relocated from
internal repo.
2017-02-09 08:56:15 -05:00
Eddie HebertandGitHub e81287e8e1 Merge pull request #1678 from quantopian/flake8-line-too-longs
STY: Wrap/reformat lines over 80 chars.
2017-02-09 05:57:00 -05:00
Andrew LiangandGitHub 54c8e6c358 Merge pull request #1676 from quantopian/param_sapce
TEST: Allow parameter_space to work on repeated calls of test
2017-02-08 18:39:51 -05:00
Andrew Liang cb6c5f09a6 TEST: Allow parameter_space to work on repeated calls of test
If we have a test that's being called more than once (i.e. two
test cases, both subclasses of the same base test case, with
different setup but calling the same test), allow the subsequent
calls to re-consume the same params
2017-02-08 18:19:14 -05:00
Eddie Hebert 8878d0ddd5 STY: Wrap/reformat lines over 80 chars.
Newer versions of flake8 detect these versions, though current zipline version
of flake8 does not.
2017-02-08 00:47:33 -05:00
Joe Jevnik b4ed1fcff3 MAINT: windows definition for log2 2017-02-07 17:01:37 -05:00
dmichalowicz db2440871e Change to a 10.5 hour futures calendar 2017-02-06 11:41:29 -05:00
Joe Jevnik d378c9fca3 ENH: store the 'codes' for a labelarray in the narrowest int type possible 2017-02-02 20:58:36 -05:00
Freddie VargusandGitHub 5fbd0251aa Merge pull request #1625 from quantopian/ambiguous-cli-shortopt
ENH: change the clean --before shortopt from -b to -e
2017-02-02 14:04:07 -05:00
Joe JevnikandJoe Jevnik d9321f4795 TST: assert_equal dispatch for tuples 2017-02-01 19:42:10 -05:00