Commit Graph

1014 Commits

Author SHA1 Message Date
Andrew Daniels 1cf8e46ae6 Merge pull request #1245 from quantopian/daily-bars-first-day-attr
BUG: Fixes reading and writing of daily bars first_trading_day attr
2016-06-02 15:09:12 -04:00
Andrew Daniels 8e6c98e9aa BUG: Fixes reading and writing of daily bars first_trading_day attr
When writing first_trading_day, it is already in the correct frame of
reference (seconds since epoch) and does not need to be transformed
further. Adjusts the reader to expect this value.
2016-06-02 13:41:09 -04:00
Andrew Daniels 71f12ec272 MAINT: Adds first_trading_day arg to DataPortal
Instead of inferring it from the minute/daily writer, we now require the
first trading day to be passed explicitly, so the creator of the
DataPortal controls what is used as the first trading day.
2016-06-02 13:16:43 -04:00
Eddie Hebert 2f80e94203 TST: Enable sourcing daily data from minute data.
Allow `WithBcolzDailyBarData` to opt-in to reading data defined by
`WithBcolzMinuteBarData`, so that the daily and minute test for the same
asset and dts correlate between the two readers.
The correlation is relevant for history tests which blend daily and
minute data.

Also, make the test data for the split and mergers assets in the minute
suite align at the thousands place if the adjustmets are applied
correctly, by starting the prices with a base of 4000 and then halving
the start value each day.
2016-06-02 12:28:53 -04:00
Stewart Douglas 17c20da026 TST: Add test to append minutely data 2016-05-26 09:38:25 -04:00
Scott Sanderson 5caccaeed5 Merge pull request #1230 from quantopian/pipeline-example
DOC/TEST: Add example algo using Pipeline.
2016-05-25 22:35:59 -04:00
Scott Sanderson 5e87bf2496 HACK: Call gc.collect in test_examples.
We need to call gc.collect before tearing down our class because we have
a cycle between TradingAlgorithm and AlgorithmSimulator which ultimately
holds a reference to the pipeline engine passed to the tests here.

This means that we're not guaranteed to have deleted our disk-backed
resource readers (e.g. SQLiteAdjustmentReader) before trying to delete
the tempdir, which causes failures on Windows because Windows doesn't
allow you to delete a file if someone still has an open handle to that
file.

The real fix for this is to break the cycle between TradingAlgorithm and
AlgorithmSimulator, but that requires significant breaking API changes.
2016-05-25 17:09:30 -04:00
dmichalowicz 86486803b6 BUG: custom factor outputs naming collisions 2016-05-25 15:41:16 -04:00
Andrew Daniels f1cfe1f2db BUG: Fixes bcolz padding to not always pad 390 minutes
If minutes already exist for the last existing day, adjust the number of
minutes padded to account for them. Previously we would always pad 390,
leading to a mismatch in the number of rows.
2016-05-25 14:26:16 -04:00
Scott Sanderson 392ac2f9d6 DOC/TEST: Add example algo using Pipeline. 2016-05-24 22:34:05 -04:00
Scott Sanderson 244664b6a3 MAINT: Clean up default handling in TradingAlgorithm. 2016-05-24 22:17:01 -04:00
Andrew Liang 40f42b43f5 DEV: Adjust performance calculations for capital changes
Refactor PerformancePeriod so that it creates a sub-period every
time a capital change happens within the period
2016-05-24 17:23:36 -04:00
Jean Bredeche 39bf1dbd7b DEV: Re-implement commission models to return correct results in the case of multiple fills. 2016-05-23 21:19:06 -04:00
Maya Tydykov e5039a43b0 TST: add tests to ensure no forward filling of non-missing values
STY: fix indentation

DOC: add docs to clarify test input/output
2016-05-23 16:48:52 -04:00
Maya Tydykov c0eb798cc6 TST: modify test class to use WithAssetFinder fixture.
BUG: assign result to var

TST: remove obsolete assertion

STY: fix line length
2016-05-23 15:53:55 -04:00
Maya Tydykov c94f3d0c9b BUG: fix replacement of NaN with None
TST: finish test with expected data

STY: alphabetize imports

MAINT: simplify condition - remove unnecessary statement
2016-05-23 15:53:55 -04:00
Maya Tydykov 8e630bff77 TST: remove obsolete test and update test 2016-05-23 15:53:55 -04:00
Joe Jevnik a0f9915290 Merge pull request #1218 from quantopian/datareader-replace
MAINT: replace usages of pandas.io.data.DataReader with pandas_datare…
2016-05-20 12:36:00 -04:00
Joe Jevnik 0bd790d122 MAINT: replace usages of pandas.io.data.DataReader with pandas_datareader.data.DataReader 2016-05-20 11:23:28 -04:00
Maya Tydykov 751a08a8a1 MAINT: move constants to appropriate files 2016-05-20 10:47:56 -04:00
Maya Tydykov 3d0764a50c ENH: add dividend type column
BUG: add back constant
2016-05-20 10:47:56 -04:00
Maya Tydykov 8a3b82c536 ENH: add column for currency type 2016-05-20 10:47:55 -04:00
Maya Tydykov 18d1577d56 MAINT: incorporate string support 2016-05-20 10:47:55 -04:00
Scott Sanderson 65de1215e0 Merge pull request #1204 from quantopian/tell-me-what-my-choices-were
Tell me what my choices were
2016-05-19 18:52:04 -04:00
dmichalowicz d57872f2be TST: Test correlation/regression factors with nonexistent asset 2016-05-18 15:11:12 -04:00
dmichalowicz 1ec0bced6d ENH: Add builtin factors for correlation and regression 2016-05-18 15:11:12 -04:00
Scott Sanderson 4a513360b6 ENH: Include choices in no-output-found errormsg. 2016-05-17 17:51:24 -04:00
Stewart Douglas 8217cdb1bd ENH: Allow BcolzMinuteBarWriter to append to most recent day
Minutely data can now be appended to bcolz files even when
minutes in the same day have already been written. For example,
previously attempting to write data for the minute 2016-05-11 16:30
would raise an exception if any OHLCV data for 2016-05-11 had been
written to the same file.

Trying to overwrite existing minutes still raises a
BcolzMinuteOverlappingData exception.

Note that previously all sids' bcolz files ended at the same time.
This is no longer necessarily the case. The last record in each
sid's bcolz file now corresponds to the latest minute for which
OHLCV data is provided to the writer.
2016-05-13 16:24:21 -04:00
Joe Jevnik 784d5f4a16 Merge pull request #1199 from quantopian/boybands-factor
BollingerBands factor
2016-05-13 15:35:10 -04:00
Scott Sanderson f4d96e065a TEST/PERF: Don't slice twice. 2016-05-13 14:44:26 -04:00
Scott Sanderson c4b69d6223 TEST: Don't mask unexpected exceptions from TALIB.
We know when we expect the error to be raised.
2016-05-13 14:32:21 -04:00
Scott Sanderson 2f90665676 TEST: Add a test for bbands output ordering. 2016-05-13 14:31:58 -04:00
Scott Sanderson cbd4ea36bc STY: No need for these to be vertical. 2016-05-13 14:31:33 -04:00
Joe Jevnik 19c87fd871 Merge pull request #1188 from quantopian/api-docstrings
api documentation
2016-05-12 22:42:48 -04:00
Joe Jevnik c128b69a91 STY: get Scott to stop yelling at me 2016-05-12 22:15:32 -04:00
Joe Jevnik 78db90a858 STY: flake8 2016-05-12 17:01:17 -04:00
Joe Jevnik a345e6f3f5 TST: Clean up metaclass usage in fixtures 2016-05-12 17:00:51 -04:00
Joe Jevnik 9b76731143 ENH: adds with_metaclasses and tests for metautils 2016-05-12 15:58:19 -04:00
Maya Tydykov 6b60e447a0 MAINT: incorporate string support
STY: remove unused imports

MAINT: change dtype to object for compatibility with python3

MAINT: rename pipeline columns and constants for clarity

MAINT: rename column
2016-05-12 10:50:31 -04:00
Joe Jevnik 2297ace20c ENH: Adds BollingerBands factor. 2016-05-11 21:41:55 -04:00
Joe Jevnik f494d6f0d1 BUG: Fix check that pipeline argument is hashable.
Adds test coverage for the caes where it is not hashable.
2016-05-11 21:37:12 -04:00
Maya Tydykov 3d521561f5 TST: update tests to handle new buyback auth design
MAINT: add back cash amount constant

BUG: fix field names

BUG: pass remaining args

WIP: make buyback units parameterized so that user can choose

BUG: fix filtering based on units parameter

WIP: test for undesired units

Revert "WIP: make buyback units parameterized so that user can choose"

This reverts commit df3b838d525bff5026eba1d81865c6645d534c88.
2016-05-11 16:24:32 -04:00
Scott Sanderson 65ac5c2faa Merge pull request #1195 from quantopian/test-string-groupby
String Classifier Cleanup
2016-05-10 20:54:24 -04:00
Jean Bredeche 83d70f4a70 DEV: pull remove-open-orders logic into its own method
And test it.
2016-05-10 20:14:44 -04:00
Scott Sanderson 8b1136d9d5 ENH: Validate missing_values at term construction.
Finds bugs in several bad tests that were constructing invalid terms.
2016-05-10 19:43:56 -04:00
Scott Sanderson f7e9281b14 BUG: Fix groupby with string columns.
The previous algorithm assumed that the group labels were integers. It
produced nonsense with LabelArrays (though sadly didn't crash because
numpy promotes None and void to object).
2016-05-10 16:57:59 -04:00
Scott Sanderson 2431aaefb5 BUG: Fix bad error message for element_of.
It referred to the wrong method name (`is_element`).
2016-05-10 16:57:59 -04:00
Joe Jevnik 55f1548160 BUG: fix inverted splits in quandl data 2016-05-09 14:00:35 -04:00
Joe Jevnik d888c4faaa DOC: update docs for api functions 2016-05-06 15:25:30 -04:00
Joe Jevnik 0562179060 Merge pull request #1178 from quantopian/quantopian-quandl
ENH: Adds quantopian-quandl bundle as new default.
2016-05-06 12:53:07 -04:00