Commit Graph

4986 Commits

Author SHA1 Message Date
Jean Bredeche 5b8b2f68bc BUG: Blotter should process as many splits as it can 2017-04-24 15:41:23 -04:00
Jean Bredeche 825866948b BUG: get_splits should return empty list, not empty dict 2017-04-24 15:41:23 -04:00
Jean Bredeche fe84ff3582 REF: Remove assetfinder from PerformancePeriod 2017-04-24 15:41:22 -04:00
Jean Bredeche 0b4b058065 REF: Remove asset_finder and multipliers from PositionTracker 2017-04-24 15:41:22 -04:00
Jean Bredeche b7b8c46d74 REF: Blotter no longer needs AssetFinder 2017-04-24 15:41:21 -04:00
Jean Bredeche 483012ccf6 REF: Make dataportal emit splits that hold Assets, not sids 2017-04-24 15:41:21 -04:00
Jean Bredeche 450690801a BUG: Position cost basis was calculated incorrectly for Futures
For futures, we need to divide the position’s commission by the
contract size to get a per-unit commission in order to properly update
the position’s cost basis.
2017-04-24 15:41:20 -04:00
Jean Bredeche 8d275d8d83 REF: Explicitly use Assets in Position, Order, Transaction
(Instead of `sid`, which were already usually assets)

Perf packets are unchanged and still emit `sid`: int
2017-04-24 15:41:13 -04:00
Jean Bredeche 21976dd651 Merge pull request #1760 from quantopian/constant-futures
TST: New fixture for constant futures data
2017-04-24 14:33:47 -04:00
Jean Bredeche e0060f61e8 TST: New fixture for constant futures data 2017-04-24 14:15:26 -04:00
David Michalowicz 1d1c244e84 Merge pull request #1755 from quantopian/schedule-function-calendar
Add calendar factory for the schedule_function API
2017-04-24 10:07:30 -04:00
dmichalowicz 2f33ddb023 API: Add factory for calendars 2017-04-24 09:37:32 -04:00
David Michalowicz cd91d518bb Merge pull request #1754 from quantopian/premature-continuous-futures-2
Allow gaps between auto close and start date
2017-04-21 16:34:53 -04:00
dmichalowicz 0ec8841ea0 BUG: Ordered contracts could end prematurely 2017-04-21 15:52:21 -04:00
Andrew Daniels acf345e1d3 PERF: Optimize session close lookups in resample bar reader (#1749)
Optimize session close lookups in MinuteResampleSessionBarReader:

- Adds `session_closes_in_range` method (along with
  `session_opens_in_range`) to TradingCalendar to allow vectorized
  retrieval of all values in a range of sessions.
- Improves code path for resampling a single session's worth of data (as
  is the case when calling `get_value`), since we don't actually need to
  look up the close minute.
2017-04-11 16:35:04 -04:00
Andrew Daniels 26ffda9ca1 Merge pull request #1747 from quantopian/calendar-perf-improvements
Improve TradingCalendar perf with scalar-optimized accesses
2017-04-11 10:15:28 -04:00
Andrew Daniels 1d7d3fe33f PERF: Only get session close in MinuteResampleSessionBarReader
We only need the close, not the open.
2017-04-10 17:23:07 -04:00
Andrew Daniels 12f1429a8c PERF: Use scalar lookups for TradingCalendar.schedule
When retrieving the open and close for a given session, we only care
about the scalar values, so using DataFrame.at instead of DataFrame.loc
is significantly faster.
2017-04-10 17:23:07 -04:00
Maya Tydykov 0c88ba21b9 Merge pull request #1737 from quantopian/bump-blaze
BLD: bump blaze
2017-04-10 16:22:09 -04:00
David Michalowicz 9e0cf08c18 Merge pull request #1738 from quantopian/slippage-and-commissions-futures
Add preliminary support for Futures slippage models
2017-04-10 15:05:28 -04:00
Andrew Daniels f9d55cf9cd Merge pull request #1742 from quantopian/only-get-value-once
MAINT: Refactor DataPortal._get_minute_spot_value to avoid two lookups
2017-04-10 14:56:29 -04:00
dmichalowicz bc27e369ff ENH: Preliminary support for Futures slippage and commission models 2017-04-10 14:37:20 -04:00
David Michalowicz d5aa5b0c36 Merge pull request #1745 from quantopian/reconcile-default-args
Make certain continuous future arguments optional
2017-04-10 11:24:50 -04:00
dmichalowicz ec8880a066 API: Make certain continuous future arguments optional 2017-04-07 14:02:36 -04:00
Maya Tydykov 9350759119 Merge pull request #1739 from quantopian/fix-zipline-and-pandas-bug
Fix zipline and pandas bug
2017-04-07 12:22:06 -04:00
David Michalowicz b35ec1b5cd Merge pull request #1743 from quantopian/premature-continuous-futures
OrderedContracts chain could sometimes terminate on first contract
2017-04-07 11:03:33 -04:00
dmichalowicz 845dea3e5b BUG: OrderedContracts chain could sometimes terminate on first contract 2017-04-07 10:01:22 -04:00
Joe Jevnik e6f2f562b3 BUG: reload_symbol_maps should clear the equity_supplementary_maps 2017-04-06 19:04:09 -04:00
Andrew Daniels 569998179a Merge pull request #1735 from quantopian/speedup-daily-history-aggregator-closes
PERF: Avoid repeated recursive calls when getting forward-filled close
2017-04-06 10:24:29 -04:00
Andrew Daniels f8eced41bf PERF: Avoid repeated recursive calls when getting forward-filled close
Instead of recursively calling `DailyHistoryAggregator.closes` until we
find a non-nan close, we can instead call `load_raw_arrays` once, and
find the value from the returned array.
2017-04-06 09:51:01 -04:00
Andrew Daniels ad7f727c47 MAINT: Refactor DataPortal._get_minute_spot_value to avoid two lookups 2017-04-06 08:54:17 -04:00
David Michalowicz 1212d2f0a1 Merge pull request #1741 from quantopian/remove-adj-method
Remove ContinuousFuture adjustment method
2017-04-05 16:24:24 -04:00
dmichalowicz 276b65f527 CRUFT: Remove ContinuousFuture adjustment method 2017-04-05 15:25:50 -04:00
Freddie Vargus 18b0def1a1 Merge pull request #1731 from quantopian/update-assetdbwriter-docs
DOC: Show exchange as required for equities
2017-04-04 23:27:50 -04:00
Scott Sanderson e914b23c80 Merge pull request #1740 from quantopian/guarantee-can-trade-order
BUG: Return from can_trade in same order as input.
2017-04-04 18:39:53 -04:00
David Michalowicz 340a66afd5 Merge pull request #1729 from quantopian/us-futures-cal-in-tests
Use 'us_futures' calendar in test fixtures
2017-04-04 17:49:51 -04:00
Scott Sanderson d289e86895 MAINT: Guarantee bool dtype for can_trade. 2017-04-04 17:26:38 -04:00
dmichalowicz c701f200c2 REV: Only use benchmark csv files in source for testing 2017-04-04 17:18:49 -04:00
Scott Sanderson 65381ecbcd BUG: Return from can_trade in same order as input.
This matches the behavior of history and data.current.
2017-04-04 17:12:21 -04:00
Maya Tydykov 63ad5a5b55 BUG: address pandas normalization bug on non-sorted DT index 2017-04-04 17:00:32 -04:00
Maya Tydykov 63951ad9e9 BUG: test DatetimeIndex equality correctly 2017-04-04 17:00:16 -04:00
Freddie Vargus 3dfc20ec1c DOC: Show exchange required for equities 2017-04-04 15:02:00 -04:00
dmichalowicz dee19a0d8b TST: Make TradingEnvironment resources static 2017-04-04 10:58:45 -04:00
Maya Tydykov a89d05dd56 BLD: bump blaze 2017-04-03 15:20:49 -04:00
dmichalowicz 0c49c5bbc7 TST: Use 'us_futures' calendar in test fixtures 2017-04-03 10:18:03 -04:00
Eddie Hebert 84b24d2cee Merge pull request #1734 from quantopian/prepare-for-validity-checks
MAINT: Prepare parameter check for adding an additional check.
2017-03-30 14:02:03 -04:00
David Michalowicz 0182d62cc8 Merge pull request #1730 from quantopian/no-current-contract
Add safeguard if current contract of continuous future is None
2017-03-30 13:32:15 -04:00
dmichalowicz 69a0e5c31b BUG: Getting continuous future current contract failed on None 2017-03-30 12:09:55 -04:00
Eddie Hebert fc65ac33ca MAINT: Prepare parameter check for adding an additional check.
Should be no functional change.

By making the raise on `if not isinstance` instead of doing a continue on `if
isinstance` (with a raise at the end of the loop if no 'good' conditions were
met'), the function should be more amenable to adding an additional validity
check, after the type check passes.

This is on the path to adding an additional validity checks parameter to
`check_parameters`, e.g. adding an 'is positive' check.
2017-03-30 10:47:29 -04:00
David Michalowicz 0bcdb640ca Merge pull request #1726 from quantopian/cf-adjustment-arg
Make continuous future adjustment style an argument
2017-03-29 09:15:22 -04:00