Andrew Liang
a382dda034
MAINT: Remove __eq__ implementation from slippage
2017-05-22 23:00:24 -04:00
Scott Sanderson
5115b14557
Merge pull request #1794 from Peque/peque
...
Fix docstring in TradingEnvironment class
2017-05-19 05:52:56 -07:00
Richard Frank
8734224701
TST: Use testing market data with run_algorithm
...
so env doesn't need to download it
2017-05-18 12:54:06 -04:00
Miguel Sánchez de León Peque
60f04b7345
Fix docstring in TradingEnvironment class
2017-05-17 18:42:36 +02:00
David Michalowicz
43d1af0240
MAINT: Refactor commission model class hierarchies
2017-05-12 12:31:36 -04:00
dmichalowicz
a4464e7d20
MAINT: Various futures slippage model fixes and cleanup
...
- Handle history lookback error before start date
- Adjust default futures slippage volume limit
- Allow subclassing EquitySlippageModel and FutureSlippageModel together.
2017-05-09 11:47:55 -04:00
Freddie Vargus
caed14adcc
Merge pull request #1746 from quantopian/update-transaction-repr
...
MAINT: Add better repr for transactions
2017-05-08 14:54:24 -04:00
Richard Frank
45c48afa8e
MAINT: allowed_asset_types is already defined in the base class
2017-05-05 14:09:02 -04:00
Richard Frank
0e0cb2f343
BUG: Fixed abstractness of MarketImpactBase
2017-05-05 14:09:02 -04:00
Richard Frank
ca2e3a04f3
MAINT: process_order is a method
...
and call super's __init__ to set up base state
2017-05-05 14:09:01 -04:00
Freddie Vargus
e0433c4718
MAINT: Add better repr for transactions
...
Flake8
2017-04-28 11:13:40 -04:00
dmichalowicz
6beb4d6a36
BUG: Futures slippage model could have zero transaction volume
2017-04-26 13:35:00 -04:00
dmichalowicz
62c03a757f
API: Don't require custom models to define allowed types
2017-04-25 18:44:31 -04:00
dmichalowicz
dd21346eca
API: Add slippage and commission models for futures
2017-04-25 17:29:41 -04:00
Jean Bredeche
bed00a1b77
BUG: use isinstance
2017-04-24 17:06:26 -04:00
Jean Bredeche
15d8dc93a3
MAINT: PR feedback.
2017-04-24 15:41:23 -04:00
Jean Bredeche
8c5e4b7bbc
BUG: Blotter should process as many splits as it can
2017-04-24 15:41:23 -04:00
Jean Bredeche
5305fbe471
REF: Remove assetfinder from PerformancePeriod
2017-04-24 15:41:22 -04:00
Jean Bredeche
9a0d9d868c
REF: Remove asset_finder and multipliers from PositionTracker
2017-04-24 15:41:22 -04:00
Jean Bredeche
e429664fa6
REF: Blotter no longer needs AssetFinder
2017-04-24 15:41:21 -04:00
Jean Bredeche
1f8e194e09
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
b1248cb6d6
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
dmichalowicz
f6e1a95ca9
ENH: Preliminary support for Futures slippage and commission models
2017-04-10 14:37:20 -04:00
Jean Bredeche
f11b6467ac
Rename _attrs_to_check to asdict
2017-02-23 11:32:04 -05:00
Andrew Daniels
ba484e5469
MAINT: Removes unnecessary capital_base arg to TradingAlgorithm ( #1677 )
...
Capital base is included in the sim params, so we should define the
value there, or use the default.
This change also unifies the default capital base as 1e5, as was
previously defined in algorithm.py.
2017-02-17 09:04:50 -05:00
dmichalowicz
b891fd00d5
BUG: Multipliers were not removed when closing a position
2017-01-25 17:23:09 -05:00
Jean Bredeche
0b8fee49d1
ENH: Solidify equality comparisons for SlippageModel classes
2017-01-24 11:28:32 -05:00
Jean Bredeche
a9c0ce1dde
ENH: Small refactoring of fill price check.
2017-01-18 09:22:05 -05:00
Richard Frank
8ea3226a5c
ENH: Renamed to batch_order and added batch_order_target_percent
2016-12-20 11:58:05 -05:00
Richard Frank
74a3247892
MAINT: Renamed order_batch parameter and added docs
2016-12-20 11:57:27 -05:00
Richard Frank
7aefa9c311
MAINT: Allow for orders with id 0
2016-12-20 11:57:26 -05:00
Richard Frank
321e52481c
ENH: Blotter support for ordering a batch
2016-12-20 11:57:26 -05:00
Richard Frank
86c4c27a6a
MAINT: Factored out order arg calculation methods
...
so callers can use them to construct args for a batch of orders
2016-12-20 11:57:26 -05:00
Eddie Hebert
117d228fc2
ENH: Allow future chains to only use certain delivery months.
...
To support contracts such as `PL` which should roll from F->J->N->V, add the
ability to pass a predicate function to the ordered contract chain contstrution
which returns `True` if the contract is allowed in the chain.
2016-12-01 13:26:07 -05:00
Eddie Hebert
be8326baf2
TMP: Add temporary fix for transactions with nan fill prices.
...
Protect a case where data is written with a non-zero volume, but a 0/nan for the
OHLC values. The slippage model was relying on a non-zero volume implying that
there was a valid trade price for the corresponding bar. When there was a mismatch,
a transaction with a nan value was created, which would in turn propagate the
nan into portfolio value, which would then cause errors when the portfolio value
was used to size orders during rebalancing.
When data is fixed, can remove.
(Also may want to add behavior to minute bar writer to ensure that 0 volumes
always have corresponding nan ohlc.)
2016-11-17 12:00:28 -05:00
Andrew Liang
b0aba20a6e
BUG: Restrictions passed into HistoricalRestrictions not sorted correctly
2016-10-05 14:09:26 -04:00
Andrew Liang
c5ee71afe6
DOC: Clean up Restrictions documentation
2016-09-30 16:35:24 -04:00
Andrew Liang
2104a35af8
ENH: _UnionRestrictions for combining multiple Restrictions
2016-09-30 16:35:24 -04:00
Andrew Liang
3b5031a829
MAINT: Rename restrictions.py to asset_restrictions.py
...
For clarity as to what sort of restrictions these are
2016-09-30 16:35:24 -04:00
Scott Sanderson
d47144dfb8
DOC: Rename NoopRestrictions to NoRestrictions.
2016-09-30 16:35:23 -04:00
Andrew Liang
e465f64f91
MAINT: Create SecurityListRestrictions that takes a SecurityList
...
The SecurityList implements a non-exposed method
`current_securities(dt)` which SecurityListRestrictions calls to
determine if an asset is restricted. Deprecate the `__iter__` and
`__contains__` methods of security lists in favor of
`current_securities(dt)`
2016-09-29 10:11:14 -04:00
Andrew Liang
b70084c6bf
ENH: can_trade should take restricted list into account
...
Additionally, create an option for a violation of a 'do not order'
trading control to log an error instead of failing
2016-09-29 10:11:14 -04:00
Andrew Liang
0119aba410
ENH: A point-in-time restricted list with restrictions stored in memory
...
An ABC Restrictions defines a group of restrictions responsible
for returning restriction information for sids on certain dts. An
InMemoryRestrictions is a point-in-time group of such restrictions,
with all restrictions and their dates passed in upon instantiation.
A StaticRestrictedList takes a list of sids, restricting them at all
dates
2016-09-27 18:19:51 -04:00
Scott Sanderson
ccc31152a5
MAINT: Use arange instead of rolling_count.
...
It's faster, and rolling_count is deprecated.
2016-09-20 16:24:55 -04:00
Richard Frank
b924c3b795
PERF: Use empyrical with ndarrays instead of Series
2016-09-19 15:51:06 -04:00
Richard Frank
29c65d95b9
MAINT: Removing unused array and unused attribute
2016-09-19 15:19:30 -04:00
Joe Jevnik
cf2abf10e2
Merge pull request #1449 from quantopian/getitem-is-not-getattr
...
MAINT: remove __getitem__ as alias of __getattr__
2016-09-06 13:48:17 -04:00
Ana Ruelas
9063cb3ce4
BUG: Do not adjust returns for sharpe and sortino
2016-09-02 10:41:50 -04:00
Joe Jevnik
1714b2d03a
MAINT: remove __getitem__ as alias of __getattr__
2016-08-31 12:38:20 -04:00
John Ricklefs
97b562044a
PERF: Send pre-adjusted returns to information_ratio
2016-08-29 12:13:19 -04:00