6093 Commits

Author SHA1 Message Date
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 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 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
Jonathan Kamens 1097c37e3d MAINT: Peg pip version and fix incompatibility with pip 7.0.3
In d01e718373, we made a change for
compatibility with a change introduced in pip 7.0.0. Then the pip
maintainers went and reverted the change in pip 7.0.2, thereby
breaking our requirements file for the second time in ten days. This
change reverts the prior change so that we are once again compatible
with the current version of pip.

Also, to make it easier for people to avoid pip compatibility issues,
we're now specifying pip>=7.0.3 in etc/requirements.txt.
2015-06-03 14:50:56 -04:00
warren-oneill f9d3dbff47 allow passing of data type from data source 2015-06-03 15:10:54 +02:00
jfkirk 9996502573 DEP: Removes use of 'count'-defined test sources
Test sources are now defined by the sim_params period_start and period_end, rather than by the period_start and a defined 'count' of bars. This allows us to consider the sim_params.period_end as the canonical definition of the end of a simulation.
2015-05-28 12:29:33 -04:00
Stewart Douglas b24bd561e7 BUG: Stop account_needs_update from blocking performance updates
Referencing context.account in handle_data() can block updates to account,
portfolio and performance metrics, which can cause unintended changes in
financial performance. Additionally, since context.account metrics are not
updating frequenctly enough (daily, rather than minutely) algos which base
decisions on these metrics can have undesired behavior.

To address this we do not base our decision to update performance on the
state of account_needs_update.

When we call get_account() from the market and minute close methods, we
set the performance_needs_update parameter to False since we just updated
performance.

_get_account() is renamed to _update_account() since the method does not
return account information.

Also remove redundant asset_needs_update = True lines.
2015-05-28 11:15:40 -04:00
Jonathan Kamens d01e718373 MAINT: PIP requirements syntax change for current PIP compatibility 2015-05-26 15:48:42 -04:00
Eddie Hebert 3c862df336 Merge pull request #579 from grundgruen/tracker-days
WIP BUG: env.next_trading_day() not Timezone aware when passed market_open/close
2015-05-26 10:57:51 -04:00
warren-oneill 064d973ec2 pass day instead of market_open to next_open_and_closes and use day instead of market_close for benchmark index 2015-05-26 16:17:55 +02:00
Eddie Hebert 862cfbbd19 MAINT: Group events by type before processing.
Make the ordering in which processing of event types both explicit and
independent of the sort ordering of the incoming sources.

The overhead of creating the list per snapshot and the iterators appears
to be marginal in the minute data case when tested locally.

This patch is intended as part of the path towards making the trade
simulation loop not depend on consuming and tracking every trade event.
The timing of where last_sale_date was needed to be changed was proving
difficult to adapt in the previous model.

Should also allow the removal of sorting of the various source streams.
2015-05-20 11:41:54 -04:00
Jeremiah Lowin cebbe19319 Fix code block formatting in release notes 2015-05-19 14:25:36 -04:00
Scott Sanderson bf3cb6e7a5 Merge pull request #586 from DruRly/DruRly-patch-1
Fix typo in release notes
2015-05-19 10:40:36 -04:00
Jonathan Kamens 723e3e299a MAINT: Upgrade flake8 to 2.4.1 2015-05-19 10:27:20 -04:00
Dru Riley a72fa81bbe Fix typo in release notes 2015-05-18 22:50:39 -04:00
Jonathan Kamens ec395d84f6 MAINT: Switch to python-excel/xlrd.git 2015-05-17 10:24:51 -04:00
Eddie Hebert 1e76be611b MAINT: Remove unused method on performance period.
set_positions is no longer referenced.
2015-05-15 23:31:28 -04:00
Eddie Hebert 9e57198e16 MAINT: Remove unused property on performance period.
The last sale prices property is no longer referenced elsewhere.
2015-05-14 15:46:17 -04:00
Jonathan Kamens 8188d9c975 MAINT: Upgrade pytz to 2015.4 2015-05-13 22:55:10 -04:00
Jonathan Kamens 3790a5631f MAINT: Upgrade certifi to 2015.4.28 2015-05-13 06:04:53 -04:00
Jonathan Kamens 9dab742725 MAINT: Upgrade pandas to 0.16.1 and requests to 2.7.0 2015-05-12 21:21:28 -04:00
Jonathan Kamens e32d79807f TEST: Object serialization test requires a trading environment
The object serialization test case requires a trading environment
because risk report generation requires treasury curves.
2015-05-12 15:25:44 -04:00
Jonathan Kamens 63169961b7 MAINT: Upgrade Logbook to 0.9.1 2015-05-12 14:46:55 -04:00