Commit Graph

4184 Commits

Author SHA1 Message Date
Nathan Wolfe ab9a899c5b MAINT: Switch PanelBarReader to take trading calendar and freq args 2016-07-29 17:36:08 -04:00
Nathan Wolfe 763f2ab8b4 MAINT: Combine daily and minute into PanelBarReader.
Also simplify `load_raw_arrays` and `get_last_traded_dt`.
2016-07-29 17:34:28 -04:00
Nathan Wolfe 69506570dd ENH: Guard against tz-naive index for Panel data. 2016-07-29 17:32:02 -04:00
Nathan Wolfe bdce4ef257 TST: Expand Panel data test to test for multiple sids. 2016-07-29 17:32:00 -04:00
Nathan Wolfe 3efbe6bc17 MAINT: Clean up data freq inference in TradingAlgorithm.run. 2016-07-29 17:15:47 -04:00
Nathan Wolfe 55b79e8f32 TST: Test TradingAlgorithm.run and run_algorithm on raw Panel data 2016-07-29 17:15:35 -04:00
Nathan Wolfe 19d493707f ENH: Improve TradingAlgorithm.run daily or minute data freq assumption
Changing TradingAlgorithm.run not to assume minute data if data freq is
specified as daily and sim params aren't allowed to be overwritten.
2016-07-29 17:11:51 -04:00
Nathan Wolfe 96dc1c3721 BUG: Generate sim_params within run_algorithm, fix it for raw data
Previously, run_algorithm caused an error if run on raw (non-bundle)
data, because of uninitialized variables. Initializing those variables
to None to allow run_algorithm to work with Panel data, etc.

Also, run_algorithm did not create sim_params for the TradingAlgorithm
instance it created; this kicked the can to TradingAlgorithm, which
gets default sim_params with data_frequency 'daily'. To support minute
bars, changing run_algorithm to create its own sim_params with the
data_frequency specified in its arguments.
2016-07-29 17:11:49 -04:00
Nathan Wolfe cfe755855c ENH: Add PanelMinuteBarReader, use it in TradingAlgorithm.run.
TradingAlgorithm.run didn't support Panel minute bar data, and assumed
all Panel data was daily.

To rectify this, adding PanelMinuteBarReader class.
TradingAlgorithm.run decides whether to use it or PanelDailyBarReader
by assuming data is daily if and only if the time of day of every
Timestamp is identical.
2016-07-29 17:10:21 -04:00
Jean Bredeche 70ac5323de Merge pull request #1351 from quantopian/daily-to-minutely-take-2
DEV: Change daily mode to use last minute of session instead of session
2016-07-27 11:12:45 -04:00
Jean Bredeche 3305933089 DEV: Change daily mode to use last minute of session instead of session itself. 2016-07-27 09:20:24 -04:00
Jean Bredeche 2462929368 Revert "Merge pull request #1340 from quantopian/by-daily-i-mean-minutely"
This reverts commit f4456719b0, reversing
changes made to 4be07e4628.
2016-07-26 16:20:14 -04:00
Eddie Hebert 52f3e91a4b Merge pull request #1341 from quantopian/generalize-minute-bars
ENH: Removes dependence of BcolzMinuteBarReader on 390 minutes per day
2016-07-26 15:17:00 -04:00
Joe Jevnik d6e3da9405 Merge pull request #1302 from quantopian/point-in-time-asset-db
Point in time asset db
2016-07-26 14:23:13 -04:00
Joe Jevnik b7bb6ca6b7 MAINT: remove redundant branch 2016-07-26 13:34:58 -04:00
Joe Jevnik e294d43388 BUG: coerce array scalars to ints in sqla select 2016-07-26 13:34:58 -04:00
Joe Jevnik bc10447b9e TST: add assert_equal dispatch for other ndframe objects 2016-07-26 13:34:58 -04:00
Joe Jevnik e246dc7661 MAINT: make asset classes know about their own kwargs 2016-07-26 13:34:58 -04:00
Joe Jevnik 166a8fe030 ENH: fix float default 2016-07-26 13:34:58 -04:00
Joe Jevnik 92d79f76aa MAINT: remove unused 'let' function 2016-07-26 13:34:58 -04:00
Joe Jevnik fc297544e0 MAINT: py2 compat 2016-07-26 13:34:58 -04:00
Joe Jevnik c18902496e STY: unused import 2016-07-26 13:34:58 -04:00
Joe Jevnik d7620b7063 DOC: update docstrings for lookup_*symbol 2016-07-26 13:34:58 -04:00
Joe Jevnik fb532c3fe8 TST: Adds test for symbol changes 2016-07-26 13:34:58 -04:00
Joe Jevnik 7fd8c29880 ENH: add point in time aspect to equity symbol mapping
Changes the overlap behavior so that it is an error to write data which
would have two companies holding the same ticker. Other than one test
around which company would win in that case, all the other tests are
passing. That single test has been changed to check the write-time
error.
2016-07-26 13:34:58 -04:00
Joe Jevnik 54be3858ba TST: adds test bundle to builtins to make it easier to rebuild when the asset db changes 2016-07-26 13:34:58 -04:00
Jean Bredeche f4456719b0 Merge pull request #1340 from quantopian/by-daily-i-mean-minutely
ENH: Change daily mode to use last minute of session instead of session label
2016-07-26 12:51:33 -04:00
Jean Bredeche bcb547d5a8 DEV: Change daily mode to use last minute of session instead of session itself. 2016-07-26 12:49:49 -04:00
Eddie Hebert 5cfccb9dd2 ENH: Add a format version to minute bar metadata.
Set the version to 1, with a fallback of version of 0 if version is not
found.

If the version is 0, use 390 (US Equities) for the number of minutes in
the day, so that existing files work as before.
2016-07-26 12:36:05 -04:00
Andrew Daniels 14489c8b10 ENH: Removes dependence of BcolzMinuteBarReader on 390 minutes per day
Adds a minutes_per_day field to BcolzMinuteBarMetadata, so that the
minutes_per_day value passed to the BcolzMinuteBarWriter is written as a
part of the minute bar metadata. This allows the reader to share this
value, instead of always assuming 390.

Also rebuilds the example data to incorporate this format change.
2016-07-26 12:36:05 -04:00
Scott Sanderson 4be07e4628 Merge pull request #1349 from quantopian/groupby-rank-top
Groupby rank top
2016-07-26 03:26:32 -04:00
Scott Sanderson a935943688 DOC: Add whatsnew for grouped top/bottom/rank. 2016-07-26 02:57:35 -04:00
Scott Sanderson 161771917e DOC: Mention groupby in top/bottom docs. 2016-07-26 02:57:35 -04:00
Scott Sanderson 49bb8264dc ENH: Finish adding groupby to rank/top/bottom.
- Added test coverage for grouped and masked top/bottom.

- Added test coverage for grouped rank on datetime factors.

- Fixed an issue where grouped rank would fail on datetime inputs
  because unary-negative isn't defined for datetimes.  We now instead
  directly invoke a function from rank.pyx that does the normalizations
  as neeeded.

- Fixed an issue where GroupedRowTransform assumed that it produced the
  same dtype as its input.  This isn't true for rank() of a
  datetime-dtype factor.  GroupedRowTransform now takes a required dtype
  parameter.

- Similarly, fixed an issue where GroupedRowTransform assumed that its
  missing_value was the same as its parent's, which isn't true for
  rank() of a datetime-dtype factor.  GroupedRowTransform now takes a
  required dtype parameter.

- Fixed an issue where Factor.demean() and Factor.zscore() weren't
  properly cached because their static_identity included a closure that
  was dynamically generated on each invocation.  They both now always
  use a function defined at module scope.
2016-07-26 02:57:35 -04:00
Andrey Portnoy 9e3404646e add groupby to rank, top, and bottom 2016-07-25 23:53:33 -04:00
Lotanna Ezenwa 161922897e Merge pull request #1282 from quantopian/fix-data-tests-discovery
TST: fix bundle test discovery
2016-07-25 18:36:38 -04:00
Joe Jevnik 828ddbd927 Merge pull request #1348 from quantopian/pycon2016_cap
TrueRange Factor
2016-07-25 15:05:11 -04:00
LotannaEzenwa f43941933f ENH: Makes working_dir work on Windows. Updates bundle core 2016-07-25 13:10:23 -04:00
Joe Jevnik b2ee6c6f84 BUG: forward show_progress in yahoo 2016-07-25 13:09:55 -04:00
Joe Jevnik ec0ecfc1b9 TST: don't use showprogress in tests 2016-07-25 13:09:55 -04:00
Joe Jevnik 25ed414a66 MAINT: use new tempdir for windows 2016-07-25 13:09:55 -04:00
Joe Jevnik e8728c0cd4 TST: fix data tests 2016-07-25 13:09:55 -04:00
Joe Jevnik ef4eafbbb8 TST: fix bundle test discovery 2016-07-25 13:09:55 -04:00
Joe Jevnik 25474cf475 DOC: add default inputs and window length to TrueRange 2016-07-25 12:37:25 -04:00
ChrisPappalardo 072ada812a STY: fixed flake8 failing test 2016-07-25 12:37:25 -04:00
ChrisPappalardo 5888cf1657 ENH: add true range technical factor 2016-07-25 12:37:25 -04:00
Andrew Liang 2fe94d0c29 Merge pull request #1337 from quantopian/margin_changes
Capital Changes Refactoring
2016-07-25 10:54:34 -04:00
Scott Sanderson 75b3dc6fe4 Merge pull request #1338 from quantopian/window-safe-filters
ENH: made filters window safe
2016-07-25 10:38:08 -04:00
Andrew Liang 0955515c46 TEST: Test capital changes using target values 2016-07-25 10:05:47 -04:00
Andrew Liang fdf8cdcd68 BUG: Account object missing initial total_positions_exposure attr 2016-07-25 10:05:47 -04:00