Commit Graph

1093 Commits

Author SHA1 Message Date
Scott Sanderson 3cc1cf078a TEST: Parameterize over window_length. 2016-07-24 21:21:40 -04:00
Gil Wassermann ea01fb074a STY: style changes 2016-07-22 16:08:33 -04:00
Gil Wassermann b4aa0aecbb STY: Flake8 2016-07-22 15:08:34 -04:00
Gil Wassermann 36a727f4af ENH: sum vs nansum cleared up 2016-07-22 14:56:59 -04:00
Gil Wassermann 5e991a16d3 ENH: Test added and runs without error 2016-07-22 14:30:35 -04:00
Gil Wassermann c31d3b7904 ENH: Test now works 2016-07-21 12:25:02 -04:00
Gil Wassermann 21b33f03f9 ENH: test filter up and running 2016-07-21 10:21:19 -04:00
Gil Wassermann 98be158c20 ENH: storing commits. test case added 2016-07-21 08:49:41 -04:00
Jean Bredeche adea192f02 BLD: Fix some imports. 2016-07-20 09:10:32 -04:00
Jean Bredeche 21aca754ba ENH: Reorganized internal calendar implementation.
Added tests for CME calendar.

Added ICE calendar (and tests).

Added CFE calendar (and tests).
2016-07-19 22:27:34 -04:00
Andrew Daniels 6cebf05417 BUG: Further corrections for days_at_time (#1334)
* BUG: Further corrections for days_at_time

- Revert to using DateOffset, as Timedelta doesn't handle offsetting by
  one day over a tz change properly:

    In [12]: pd.Timestamp('2004-04-05', tz='America/Chicago') + pd.Timedelta(days=-1)
    Out[12]: Timestamp('2004-04-03 23:00:00-0600', tz='America/Chicago')

    In [13]: pd.Timestamp('2004-04-05', tz='America/Chicago') + pd.DateOffset(days=-1)
    Out[13]: Timestamp('2004-04-04 00:00:00-0600', tz='America/Chicago')

  By creating a DateOffset using the `days` kwarg, the issue previously
  fixed in bcc867b is addressed.

- To preempt any other pandas issues around day offsets, changes to
  performing these with no timezone, then localizing to the local
  timezone when shifting the time.
- Adds unit test for days_at_time

* STY: Remove unused import
2016-07-19 13:19:40 -04:00
dmichalowicz a8486c5f6e ENH: Factor-to-factor correlations/regressions 2016-07-19 11:16:55 -04:00
Jean Bredeche 5a0f840917 Clean up daily bar reader/writer to take advantage of new trading calendar. The reader
is backwards-compatible with the previous format.

In USEquityLoader, use dailyreader's trading_calendar.

This is backwards compatible and will fall back to the NYSE calendar if
the reader doesn’t have a calendar specified.
2016-07-15 15:13:57 -04:00
Scott Sanderson e0f6abda2e Merge pull request #1328 from quantopian/sample-event-utils-test
PERF: Speed up event utils test case.
2016-07-15 09:53:02 -04:00
Scott Sanderson 67f76e4d67 PERF: Speed up event utils test case.
Just take a sample of all 5000 permutations of 7 dates.
2016-07-14 17:38:58 -04:00
Samuel Woo 5756f2932d ENH: Adds LinearWeightedMovingAverage factor 2016-07-14 15:10:42 -04:00
Jean Bredeche e22108b7ef Merge pull request #1312 from quantopian/24-5-backtesting
Re-implemented the calendar API.
2016-07-14 10:05:18 -04:00
Richard Frank c9b0e4050d TST: Added more test cases for RateOfChangePercentage 2016-07-13 19:48:18 -04:00
Elizaveta239 8a32c2b7ce ENH: Add Rate of change Percentage indicator 2016-07-13 18:07:20 -04:00
Joe Jevnik 0f1c08024a ENH: Adds the ichimoku cloud factor 2016-07-12 18:49:24 -04:00
Joe Jevnik 958d455a7a ENH: Support default params for terms 2016-07-12 18:49:24 -04:00
Jean Bredeche 6fb4923cc7 Re-implemented the Calendar API.
Instead of having separate ExchangeCalendar and TradingSchedule objects, we
now just have TradingCalendar.  The TradingCalendar keeps track of each
session (defined as a contiguous set of minutes between an open and a close).
It's also responsible for handling the grouping logic of any given minute
to its containing session, or the next/previous session if it's not a market
minute for the given calendar.
2016-07-12 13:13:50 -04:00
Eddie Hebert 4840e124af TST: Speed up TestMiscellaneousAPI
Limit the date range to one day, instead of a year.

On my local machine the following goes from taking 12 seconds to 0.6 seconds.

`$ nosetests -x tests/test_algorithm.py:TestMiscellaneousAPI`
2016-07-11 10:34:08 -04:00
dmichalowicz d8e9fa91bd Loader return column vector for no sids case 2016-07-01 12:18:32 -04:00
David Michalowicz d6c1c5fce9 Merge pull request #1309 from nathanwolfe/adv-fix
BUG: Correct AverageDollarVolume NaN handling
2016-06-30 14:04:43 -04:00
Eddie Hebert 51eda06323 MAINT: Add equity to naming of bar data classes.
In preparation of adding futures, add equity to the names of both the
classes and methods for writing bcolz data. Futures data will use a
different minutes per day with a separate reader. This change will allow
both equity and futures fixtures to be side by side.

Also, break out the method which generates the dataframes and trading
days member into fixtures (`EquityMinuteBarData` and
`EquityDailyBarData`) on which the `*BarReader` fixture depends.  This
fixture is separated out to enable reader/writers in different formats
to use the same data setup. (There is internal code which needs to write
minute and daily bar data in a database format.)
2016-06-30 08:21:42 -04:00
Nathan Wolfe 985e6bafee DOC: Add comment explaining ADV NaN test expected result calculation. 2016-06-29 11:34:21 -04:00
Nathan Wolfe e67b5e5516 TST: Change AverageDollarVolume test to check case of partial NaNs 2016-06-29 11:16:39 -04:00
Nathan Wolfe ebbcca73e8 TST: Add NaN cases to AverageDollarVolume factor test. 2016-06-29 10:12:35 -04:00
Andrew Daniels 5ac66aa19e BUG: Don't use calendar from daily bars in USEquityPricingLoader
This calendar only has up to the last trading day, use
default_nyse_schedule instead.
2016-06-28 13:38:17 -04:00
Eddie Hebert ca58632815 MAINT: Remove DataSource and derived classes.
The `DataSource` class and other classes derived from it are no longer
used. Instead `DataPortal` and various `MinuteBarReader` and
`DailyBarReaders` should be used.
2016-06-27 13:06:41 -04:00
Scott Sanderson 07b84f87fb PERF: Speed up test_events.
Use arrays in more places, and use permutations of indexers instead of
permutations of the values.

MAINT: add testing of boundary conditions

MAINT: use check_arrays to work with both pandas versions
2016-06-23 13:54:37 -04:00
Maya Tydykov 321e6f719f TST: expand tests
DOC: add comment to workaround line
2016-06-23 12:14:24 -04:00
Maya Tydykov 9395a469f0 BUG: change timestamp normalization to account for pandas bug
BUG: revert to old normalization algo with extra normalization
2016-06-23 12:14:22 -04:00
dmichalowicz 393f82e81e ENH: Add single-column input/output capabilities to pipeline terms 2016-06-23 10:24:09 -04:00
Scott Sanderson e510cbbf7b Merge pull request #1280 from quantopian/bad-pipeline-columns
BUG: Fail fast on invalid pipeline columns
2016-06-22 18:44:40 -04:00
Richard Frank 69b6cff964 Merge pull request #1289 from quantopian/wildcard
wildcard object and doctests
2016-06-22 18:09:57 -04:00
Joe Jevnik d608e0af4f Merge pull request #1276 from quantopian/blaze-loader-checkpoints
ENH: add ffill checkpointing to blaze core loader
2016-06-21 16:48:08 -04:00
Joe Jevnik ca37d73c7b TST: fix setup in test_flip_algo 2016-06-21 15:07:03 -04:00
Joe Jevnik 5925107052 TST: fix doctests to actually run 2016-06-21 15:07:03 -04:00
Joe Jevnik cb266b983a TST: more test for checkpoints 2016-06-21 13:20:52 -04:00
Andrew Liang 65bf854897 Merge pull request #1296 from quantopian/fix_month_start_rule
BUG: get_first_trading_day_of_month needs to return normalized dt
2016-06-21 12:55:06 -04:00
Andrew Liang 1643bd1db6 BUG: get_first_trading_day_of_month needs to return normalized dt 2016-06-21 12:26:40 -04:00
Eddie Hebert 87843e22fe MAINT: Remove unused module.
Remove module, last usage was removed during lazy access pattern
rewrite.
2016-06-21 09:50:00 -04:00
Joe Jevnik caebdf7cfc MAINT: shuffle the complex expression checks 2016-06-20 13:35:07 -04:00
Joe Jevnik cb67ee425e TST: coverage 2016-06-17 17:59:56 -04:00
Joe Jevnik c8cf5a6761 ENH: add ffill checkpointing to blaze core loader 2016-06-17 17:59:56 -04:00
dmichalowicz 6b9b9fb8e7 BUG: Fail fast on invalid pipeline columns 2016-06-15 17:46:41 -04:00
Scott Sanderson bc302beec9 MAINT: Rework event datasets.
- Refactored EventsLoader and BlazeEventsLoader to not require a
  subclass per dataset.  Instead, you now pass a map from columns to
  event fields directly to the EventsLoader constructor.

- Removed a large number of Quantopian-specific datasets and associated
  tests.

- Rewrote the core logic of EventsLoader and BlazeEventsLoader to share
  index calculations across multiple requested columns.

- Fixed a bug where event fields were incorrectly forward-filled when
  null values were present in an event.
2016-06-10 19:22:27 -04:00
Andrew Daniels 60cd4aab91 Use new API in tests/data/bundles/test_core.py 2016-06-08 16:24:36 -04:00