Eddie Hebert
a05253b1b6
BLD: Add contextlib2 to TravisCI build config.
...
Need to extract the value specified by requiremenst.txt so that TravisCI
will install the library.
2015-07-02 10:31:54 -04:00
jfkirk
1ec70b2a26
ENH: Removes use of lookup_generic in DataFrame index mapping
2015-07-01 13:43:31 -04:00
jfkirk
2421753509
TST: Fixes broken tests for DataFrameSource
2015-07-01 13:43:31 -04:00
jfkirk
258b5ea2ca
API: DataFrame/Panel sources expect integer sids, not identifiers
...
This commit modifies the DataFrameSource and DataPanelSource to accept only Int64Indexes on the incoming data and moves the burden of mapping user identifiers to TradingAlgorithm.run().
2015-07-01 13:43:31 -04:00
jfkirk
a4ce9712b8
DEP: Removes sids field from SimulationParameters
2015-07-01 13:43:31 -04:00
jfkirk
31f24a238a
DEP: Removes unnecessary identifier_cache from asset_finder
...
The identifier cache's usage was nearly identical to using lookup_generic, so this commit removes identifier-keyed caching and modifies anything that uses it.
2015-07-01 13:43:31 -04:00
Eddie Hebert
0769e7698b
MAINT: Use full function for creating empty vector.
...
np.full is a preferred choice when initializing a vector.
2015-07-01 11:14:48 -04:00
Eddie Hebert
9bf4855b8c
MAINT: Move ZiplineAPI context so that it always wraps main loop.
...
Move the responsibility of wrapping the main simulation loop in the
ZiplineAPI context from the algorithm modules generator setup to the
main trade simulation loop, so that different methods of invoking loop
do not need to duplicate how the context is set.
To make it easier for internal implementation of handle_data to
transition off of calling the ZiplineAPI every bar, to only invoking the
context once per simulation.
2015-07-01 10:58:47 -04:00
Eddie Hebert
62ab540fa2
PERF: Remove repeated member lookup for cumulative metrics.
...
The metrics DataFrame is referred to several times, so remove the extra
attribute lookups.
2015-07-01 10:52:02 -04:00
Eddie Hebert
7a1a6ddb37
PERF: Reduce time spent indexing in risk cumulative update.
...
Instead of using the pandas.Series datetime index for every single
vector, get the index at the beginning of the update loop based on the
dt and then use that index to set the values.
Also, since the dt lookup is no longer needed, store the values as numpy
arrays, which are more lightweight.
Locally, this patch cuts out about 60% of the time spent in the update
method.
2015-07-01 10:52:02 -04:00
Scott Sanderson
b71b76e133
Merge pull request #605 from grundgruen/data-freq-docstring
...
DOC: removes suggested hourly data_frequency and changes minutely to …
2015-06-30 08:24:35 -04:00
Warren O'Neill and warren-oneill
e15b6b0484
DOC: removes suggested hourly data_frequency and changes minutely to minute in docstring
2015-06-30 13:33:37 +02:00
Andrew Daniels
759f346c93
BUG: Fixes issues with AssetFinder future lookups
...
Contracts must have been trading at the as_of_date to be considered valid, and a contract's position in the chain is now zero-indexed.
2015-06-29 09:51:50 -04:00
Andrew Daniels
cc77a52322
ENH: Adds future chain cache and future lookups to AssetFinder
2015-06-25 10:18:18 -04:00
Andrew Daniels
60418f931d
DEV: Refactor logic for populating AssetFinder caches
...
Now populate_cache actually handles the population, and spawn_asset is non-public, i.e. _spawn_asset
2015-06-25 10:18:18 -04:00
Andrew Daniels
46e7b06991
ENH: Adds root_symbol attribute to Future class
...
Also update AssetFinder to handle root_symbol in meta data
2015-06-25 10:18:18 -04:00
Andrew Daniels
1ae6037a81
TST: Correct and clean up mock futures data for clarity
2015-06-25 10:18:18 -04:00
jfkirk and John Ricklefs
9291a89599
BUG: Prevents payout of dividend on final trading close
2015-06-24 21:45:55 -04:00
Scott Sanderson
a2008f644a
TEST: Remove unused test class.
2015-06-24 16:11:14 -04:00
Scott Sanderson
1c7aaf885f
MAINT: Remove left-behind comment.
2015-06-24 11:10:47 -04:00
Scott Sanderson
a0cec5d093
TEST: Clean AssetFinder initialization and tests.
...
- AssetFinder no longer accepts an unused trading_calendar.
- AssetFinder correctly accepts a DataFrame as input.
- Tests for AssetFinder no longer rely on a global trading environment.
2015-06-24 09:50:09 -04:00
Richard Frank
c101e82399
BLD: Pass args to ordered_pip through to pip
...
This way, we can specify an index-url, for example.
2015-06-22 14:54:44 -04:00
Jonathan Kamens
ed8b3b6c8c
MAINT: Upgrade mistune to 0.6
2015-06-17 18:46:08 -04:00
Scott Sanderson
e2bc13d2fa
Merge pull request #613 from quantopian/consume-metadata-error-text
...
BUG: Completes ConsumeAssetMetaDataError message
2015-06-17 17:21:15 -04:00
jfkirk
8b4552a887
BUG: Completes ConsumeAssetMetaDataError message
2015-06-17 15:54:19 -04:00
Eddie Hebert
3da3cbe7e7
MAINT: Remove position proxy.
...
Use explicit references to the performance tracker instead of the proxy
lookup.
Mainly a putative change, which surfaced when reasoning about places
where the position tracker and period need access to the last sale
price.
2015-06-16 16:57:41 -04:00
jfkirk
aa92922ea8
ENH: Adds security_start_date and _end_date with deprecation warnings
2015-06-16 14:26:05 -04:00
Jonathan Kamens
3a88da28ca
MAINT: Upgrade mccabe to 0.3.1
2015-06-15 08:34:17 -04:00
jfkirk
bfc992363e
TST: Fixes broken test_close_position_event
2015-06-12 17:17:10 -04:00
jfkirk
847b5bdc42
BUG: The 'file_name' metadata arg now overwrites 'symbol', if it is given
...
This is to fix the issue where 'GOOG_L's metadata lists its symbol as 'GOOG'. To resolve this, the 'file_name' is used as the canonical symbol, if it is given.
2015-06-12 16:09:19 -04:00
Scott Sanderson
4aa5072154
DOC: Add docstring for risk.py:choose_treasury.
2015-06-12 10:59:43 -04:00
jfkirk
eced4e700d
TST: Adds close position tests for both Equity and Future
2015-06-12 10:07:50 -04:00
jfkirk
4ef8df2fca
ENH: Adds handling of Assets passed to AssetFinder as identifiers
2015-06-11 16:49:23 -04:00
jfkirk
3ee3a1226b
BUG: Fixes handling of CLOSE_POSITION events for Futures
2015-06-11 11:40:54 -04:00
warren-oneill and jfkirk
0d7e23857e
TST: add unittest for CLOSE_POSTION event type for futures, add commission to TestAlgorithm
2015-06-11 11:39:10 -04:00
jfkirk
13180d5348
PERF: Removes unnecessary and expensive caching of values and exposures
2015-06-11 11:35:49 -04:00
jfkirk
7e5c638eb8
PERF: Removes asset lookups on every transaction
2015-06-11 11:35:49 -04:00
jfkirk
1b98d23b91
PERF: Removes asset lookups on ever trade event
2015-06-11 11:35:49 -04:00
jfkirk
a5d1f79a37
TST: Reconciles tests with asset management system
2015-06-11 11:35:49 -04:00
jfkirk
b84ac01cbf
ENH: Adds futures trading and asset management logic to TradingAlgorithm and performance classes
2015-06-11 11:35:49 -04:00
jfkirk
035bfbd514
ENH: Adds AssetFinder and asset metadata management
2015-06-11 11:35:48 -04:00
jfkirk
9da644f767
ENH: Moves calling of TradingAlgorithm.initialize to _create_generator
2015-06-11 10:14:07 -04:00
warren-oneill and jfkirk
3d18a2954f
TST:adds algo unittest for ClOSE_POSITON event type, adds commission as parameter to TestAlgorithm
2015-06-11 10:11:01 -04:00
Jonathan Kamens
5ff04c4ea6
Old version of pyflakes required by flake8 2.4.1
2015-06-09 19:21:48 -04:00
Jonathan Kamens
7411ca2b26
MAINT: Upgrade tornado, TA-Lib versions
2015-06-09 17:29:34 -04:00
Jonathan Kamens
a9affd5cfc
MAINT: Upgrade nose and pyflakes
2015-06-09 13:31:05 -04:00
James Kirk
68dbd5ed4a
Merge pull request #593 from grundgruen/close_pos_event
...
ENH: Add CLOSE_POSTION as DataSource event type
2015-06-08 17:45:25 -04:00
Eddie Hebert
c37f914c68
PERF: Use tolerant_equals instead of np.allclose in order types.
...
np.allclose creates a vector of size 1 if passed a scalar, which showed
up as a bottleneck in algorithms with a large number of
order_target_percent calls.
2015-06-05 20:59:13 -04:00
warren-oneill
77fb100ae6
adding type as variable to create_test_panel
2015-06-04 15:50:41 +02:00
warren-oneill
44fbdff4ac
added CLOSE_POSITION as source type, added pt.close_position_event(), added process_close_postion(), added close processing to tradesimulation, added unittest for close_position_event
2015-06-04 14:23:46 +02:00