Commit Graph

4109 Commits

Author SHA1 Message Date
Jean Bredeche f640f331c2 Merge pull request #1335 from quantopian/more-calendars
ENH: ICE calendar, more calendar tests, cleaned up CME calendar
2016-07-20 08:29:35 -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
David Michalowicz b364b0fbfc Merge pull request #1307 from quantopian/sid-to-sid-2
Factor-to-factor correlations and regressions
2016-07-19 13:14:40 -04:00
dmichalowicz a8486c5f6e ENH: Factor-to-factor correlations/regressions 2016-07-19 11:16:55 -04:00
Andrew Daniels dffdf0a670 Merge pull request #1333 from quantopian/fix-days-at-time-offset
BUG: Fixes issue with offsetting days in days_at_time calendar helper
2016-07-18 17:53:11 -04:00
Andrew Daniels bcc867b143 BUG: Use Timedelta instead of DateOffset in days_at_time calendar helper
Prior to pandas 17, there were issues with offsetting dates with
DateOffset around discontinuities (like the start of DST). We can use
Timedelta here instead, which handles these edge cases.
2016-07-18 17:11:11 -04:00
Jean Bredeche 5f09203827 Merge pull request #1330 from quantopian/fix-daily-bar-writer
Fix daily bar writer
2016-07-15 15:41:20 -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
Jean Bredeche 2af26ee38f Merge pull request #1327 from quantopian/fix-brainfarts
Fix some mistakes from a previous merge.
2016-07-14 20:53:41 -04:00
Joe Jevnik 835fab8ebd Merge pull request #1323 from quantopian/pmap-blaze-query
ENH: Adds the ability to run blaze queries concurrently
2016-07-14 18:40:57 -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
Joe Jevnik 5473ec240d ENH: Adds the ability to run blaze queries concurrently 2016-07-14 17:32:30 -04:00
Joe Jevnik 90035e7bed Merge pull request #1325 from quantopian/lwma
ENH: Adds LinearWeightedMovingAverage factor
2016-07-14 15:52:15 -04:00
Jean Bredeche 295cfa3846 Fix some mistakes from a previous merge.
No tests failed, which was worrisome.  Will file issues to take a look
later.
2016-07-14 15:40:36 -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 8b9a9dd547 Merge pull request #1324 from quantopian/rate-of-change-percentage
Rate of change percentage
2016-07-13 21:23:35 -04:00
Jean Bredeche 3d6fdc0755 Make sure we are passing ints to nth. 2016-07-13 20:40:57 -04:00
Richard Frank c9b0e4050d TST: Added more test cases for RateOfChangePercentage 2016-07-13 19:48:18 -04:00
Richard Frank dc0784b88d MAINT: Removed defaults from RateOfChangePercentage
since it's general enough that we don't need to assume closes
2016-07-13 19:46:59 -04:00
Elizaveta239 8a32c2b7ce ENH: Add Rate of change Percentage indicator 2016-07-13 18:07:20 -04:00
Joe Jevnik 4a0629b894 Merge pull request #1263 from quantopian/cloud-computing
Ichimoku Cloud
2016-07-13 15:27:58 -04:00
Jean Bredeche 4af61d2c39 unused 2016-07-13 09:13:39 -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 db4e06055c Merge pull request #1317 from quantopian/reduce-number-of-days-for-test-misc-api
TST: Speed up TestMiscellaneousAPI
2016-07-11 15:47:51 -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
Richard Frank 7c170274a3 Merge pull request #1310 from quantopian/vagrantf
VagrantFile for Ubuntu 14.04 that includes all the development requirements
2016-07-07 16:25:29 -04:00
Richard Frank 424d7747da DOC: Updated whatsnew with VagrantFile update 2016-07-07 16:01:48 -04:00
Richard Frank 8f9bc98eb1 DEV: Added cleaning of cython assets to dev Dockerfile as well
Added same comment to vagrant init
2016-07-07 15:56:46 -04:00
Richard Frank 95d59c1ddb DOC: Include info about location of zipline repo inside vagrant 2016-07-07 15:56:46 -04:00
Richard Frank bd45bb0230 MAINT: Tee output to console and log file 2016-07-07 15:56:46 -04:00
Richard Frank ec4336ff0c DEV: Exit on error 2016-07-07 15:56:45 -04:00
Richard Frank a728ef2bf1 DEV: Merged updated Vagrantfile with vagrant_init.sh 2016-07-07 15:56:45 -04:00
Eric LaFevers 86938d4457 DEV: VagrantFile for Ubuntu 14.04 that includes the development environment. 2016-07-07 15:56:45 -04:00
David Michalowicz 459366c17a Merge pull request #1301 from quantopian/blaze-loader-single-columns
Return column vector for datasets with no sids
2016-07-01 13:35:49 -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 65a1e3465c Merge pull request #1311 from quantopian/prefix-equity-bar-fixtures
MAINT:  Add equity to naming of bar data classes.
2016-06-30 09:55:35 -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 e0e18bc328 DOC: Add AverageDollarVolume change to release notes. 2016-06-29 13:47:56 -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
Nathan Wolfe e70490a415 BUG: Correct AverageDollarVolume NaN handling
`AverageDollarVolume` used `nanmean`, which discards NaNs before
averaging, giving an ADV which is too high for any equities that have
any NaNs.

Changing the method to `nansum` divided by window length so that the
denominator is the same no matter whether there are NaNs or not.
2016-06-28 17:20:09 -04:00
Andrew Daniels c89e957905 Merge pull request #1308 from quantopian/fix-pipeline-calendar
BUG: Don't use calendar from daily bars in USEquityPricingLoader
2016-06-28 14:27:33 -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