Commit Graph

3969 Commits

Author SHA1 Message Date
jfkirk 705fb4e89f MAINT: Removes use of partials in schedule classes 2016-06-08 13:34:19 -04:00
jfkirk ddaf3d5b02 MAINT: Consolidates minute_window methods in schedule classes 2016-06-08 13:34:19 -04:00
jfkirk 26742dda67 MAINT: Removes obsolete tradingcalendar module 2016-06-08 13:34:19 -04:00
jfkirk 241abda2a5 STY: Flake8 2016-06-08 13:34:19 -04:00
jfkirk 4b7390ac81 WIP: Refactors tests to use TradingSchedule 2016-06-08 13:34:19 -04:00
jfkirk c8304e8601 ENH: Adds ExchangeCalendar, TradingSchedule, and implementations
Conflicts:
	tests/data/test_minute_bars.py
	tests/data/test_us_equity_pricing.py
	tests/finance/test_slippage.py
	tests/pipeline/test_engine.py
	tests/pipeline/test_us_equity_pricing_loader.py
	tests/serialization_cases.py
	tests/test_algorithm.py
	tests/test_assets.py
	tests/test_bar_data.py
	tests/test_benchmark.py
	tests/test_exception_handling.py
	tests/test_fetcher.py
	tests/test_finance.py
	tests/test_history.py
	tests/test_perf_tracking.py
	tests/test_security_list.py
	tests/utils/test_events.py
	zipline/algorithm.py
	zipline/data/data_portal.py
	zipline/data/us_equity_loader.py
	zipline/errors.py
	zipline/finance/trading.py
	zipline/testing/core.py
	zipline/utils/events.py
2016-06-08 13:34:18 -04:00
Richard Frank c9b5979f45 BUG: Fixed repr of PerShare
Format string didn't match keyword arg
2016-06-08 10:41:24 -04:00
Richard Frank 787906590c Merge pull request #1254 from ChrisPappalardo/dockerfile_cap
created dockerfile for zipline dev
2016-06-07 13:33:18 -04:00
ChrisPappalardo 7e70f8fa98 DEV: created dockerfile for zipline development 2016-06-07 09:08:18 -07:00
Eddie Hebert fd57705676 Merge pull request #1256 from quantopian/fix-history-daily-freq-in-minute
BUG: Apply latest adjustment for minute `1d`
2016-06-07 11:08:18 -04:00
Eddie Hebert 58467f9b3e MAINT: Only calc inverse ratio if it applies.
Avoid unneeded work by only calcultaing the inverse ratio when it
applies to the current range.
2016-06-07 10:41:18 -04:00
Eddie Hebert b450ab841f BUG: Apply latest adjustment for minute 1d
Fix behavior in minute mode history with frequency `1d`, where on the
day immediately following an adjustment action, the overnight adjustment
would not apply. (However the adjustment would be applied after a 1 day
lag.)

The root cause of the bug was that the history data for minute mode when
using `1d` stitches together a sliding window of the daily data for
previous  and the current minute. That daily data sliding window and
corresponding adjustments was being read as if the data was being viewed
from on the last day of the window; however in this case the data is
being viewed from the day after the window has completed. The difference
in view points requires the adjustments to popped and applied by the
adjusted array one index earlier. The fix uses the `extra_slot` value as
signifier on whether the data is being viewed on the following day and
then accordingly adjusts the index of the mulitpy object.

Also, change the split and merger test data ratios to have different values,
to ensure that different adjustment values are applied; as opposed to
doubling up on just one of the values.
2016-06-07 10:41:18 -04:00
Jonny Elliott 6979ae8d6a ENH: fast stochastic oscillator added (#1255)
ENH: fast stochastic oscillator added.

A fast stochastic oscillator has been added to the technical
factors. This is the simplest of the stochastic oscillators,
and can be used to build the others.

Tests have been added that compare against the values expected
from that of ta-lib STOCHF.

FastStochasticOscillator is marked as window_safe=True to allow taking
moving averages for smoothing.
2016-06-06 17:06:34 -04:00
Joe Jevnik 6cf080f4b5 BLD: fix blaze commit 2016-06-06 15:46:18 -04:00
Joe Jevnik af38b02870 Merge pull request #1258 from femtoghoti/add_aroon_indicator
ENH: Add Aroon indicator.
2016-06-03 20:23:37 -04:00
Eric Batalden 696e81b911 ENH: Add Aroon indicator. 2016-06-03 16:28:13 -07:00
Andrew Liang 7d1c79715d Merge pull request #1221 from quantopian/schedule_func_args
Support the passing of a time rule positionally on the date_rule arg
2016-06-03 17:44:28 -04:00
Eddie Hebert b0827f44db Merge pull request #1257 from quantopian/remove-data-source-tables-gen
MAINT: Remove unused data conversion script.
2016-06-03 17:09:52 -04:00
Richard Frank 8218176c47 Merge pull request #1248 from wilsonkichoi/master
DOC: remove "python -m" and "--symbols" from the example
2016-06-03 12:52:15 -07:00
Richard Frank 60bb681a04 Merge pull request #1250 from quantopian/cycle-breaker
MAINT: Break reference cycle between algorithm and simulator
2016-06-03 12:36:25 -07:00
Andrew Liang 1056501b27 MAINT: Support the passing of a time rule positionally on the date_rule arg
But log a warning to the user
2016-06-03 15:28:53 -04:00
Eddie Hebert e75c4650b0 MAINT: Remove unused data conversion script.
The file format converted by this script has no support for reading in
Zipline. Remove since it requires import of a library not defined in
requirements.
2016-06-03 15:13:45 -04:00
Wilson Choi 1c2e0da299 DOC: fix typo 2016-06-03 11:25:41 -07:00
Richard Frank bcc187605c MAINT: Break reference cycle between algorithm and simulator
when simulation finishes, so that resources are cleaned up
deterministically.
2016-06-03 11:24:43 -07:00
Joe Jevnik cf1687ec72 Merge pull request #1227 from quantopian/blaze-loader-perf
ENH: improve performance of blaze core loader
2016-06-03 14:15:33 -04:00
Joe Jevnik b4892d34ae Merge pull request #1249 from JimStearns206/update-tutorial-doc
DOC: Fix bullet list format (minor).
2016-06-03 14:11:04 -04:00
Joe Jevnik 7ca53f2233 Merge pull request #1252 from jasonwirth/master
Correct typo
2016-06-03 14:10:37 -04:00
Jason Wirth 4dd6e4fb61 correct CLI command 2016-06-02 19:36:18 -07:00
Jason Wirth 850ce33961 Correct typo 2016-06-02 18:51:04 -07:00
JimStearns206 6aa847ca2d DOC: Fix bullet list format (minor). 2016-06-02 16:35:36 -07:00
Wilson Choi 25cc65e393 DOC: add ingesting data ref to beginner tutorial 2016-06-02 16:07:41 -07:00
Wilson Choi 13f506d9c8 DOC: remove "python -m" and "--symbols" from the example 2016-06-02 14:57:24 -07:00
Joe Jevnik 1f327f5b51 Merge pull request #1246 from jeremyblow/fix_namespace_del
BUG: Don't delete namespace if import fails.
2016-06-02 15:47:21 -04:00
Eddie Hebert 4ba7412a01 Merge pull request #1247 from quantopian/move-minute-history-tests
TST: Move tests that use minute data.
2016-06-02 15:15:45 -04:00
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
Eddie Hebert 27d7b9aabb TST: Move tests that use minute data.
Make the delineation between `DailyEquityHistoryTestCase` and
`MinuteEquityHistoryTestCase` whether or not minute dts or daily dts are
used as the query timestamp, instead of whether the frequency is `1d`
vs. `1m`.

Preparing for adding a repro case for where using `1d` with minute data
fails when there is an adjustment occuring the day before the query
minute dt.
2016-06-02 14:39:43 -04:00
Jeremy Blow acc49ef9aa BUG: Don't delete namespace if import fails.
datashape should be optional, this ensures it is actually optional.
2016-06-02 11:05:53 -07:00
Andrew Daniels f8e0d8e13e Merge pull request #1242 from quantopian/data-portal-explicit-first-day
MAINT: Adds first_trading_day arg to DataPortal
2016-06-02 13:59:49 -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 38d6107faf Merge pull request #1243 from quantopian/source-daily-from-minute
TST:  Enable sourcing daily data from minute data.
2016-06-02 13:10:28 -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
Richard Frank 8f0b3f41a1 BLD: Don't require gfortran on OSX either 2016-05-29 23:19:24 -07:00
Scott Sanderson 85327d8944 Merge pull request #1238 from quantopian/windows-doesnt-use-gfortran
BLD: Don't require gfortran on windows.
2016-05-27 20:07:31 -04:00
Scott Sanderson e7cdcc72ec BLD: Don't require gfortran on windows. 2016-05-27 19:35:25 -04:00
Scott Sanderson 0cef5eff2f BLD: Update MANIFEST to include .pyi and .pxi. 2016-05-27 18:21:29 -04:00
Joe Jevnik aa0592a4ea BLD: conda selectors for libgfortran when np==19 2016-05-27 17:28:40 -04:00
Scott Sanderson 24f30803bd REL: 1.0.1.
Update docs, whatsnew, and stub files for the release.
2016-05-27 16:41:47 -04:00
Scott Sanderson 05ac438c3c DOC/DEV: Add sphinx-autobuild to docs.
Adds a `make livehtml` target that spawns a server that rebuilds and
serves the docs every time a change happens.
2016-05-27 16:39:29 -04:00
Joe Jevnik 9448117b6e MAINT: update mask_between_time and attribute the original to pandas 2016-05-27 14:34:19 -04:00