Commit Graph

2388 Commits

Author SHA1 Message Date
fawce 233bf3080d security list type is a class level property now 2015-02-09 13:32:01 -05:00
fawce 67da7ca7a3 import statement cleanup 2015-02-09 12:54:50 -05:00
fawce e3b21835f3 name changed to protect the innocent 2015-02-09 12:27:30 -05:00
fawce 1c2560a1fa added cutpoint for overriding SecurityList implementation. 2015-02-09 12:23:46 -05:00
fawce ffe5a7a171 Merge pull request #478 from quantopian/dnt_list
ENH: no order guard, security lists
2015-02-05 15:15:34 -05:00
fawce 412baa3c3f fixed catastrophic bug in load_from_directory
and added a new test case
was not iterating over lookup date directory names, and
therefore mising all by one list of stocks.
discovered because of differing sort orders between
my local machine, other devs, and travis ci.
2015-02-05 13:57:41 -05:00
fawce 08a0d1b604 python 3.3 compatible iterators 2015-02-05 13:57:40 -05:00
fawce 2f7983fa35 adding data files to the egg for pip distribution. 2015-02-05 13:57:40 -05:00
fawce 1ab082102a first edition of leveraged etf list 2015-02-05 13:57:28 -05:00
fawce 536ace94b8 new security list class
and tests
2015-02-05 13:57:27 -05:00
fawce 909b412e9b modified do not order guard to take an iteratble or a container
container allows for dynamic restrictions, necessary for a
point in time implementation of the restricted list.
2015-02-05 13:56:46 -05:00
fawce 52f78fcbc7 restricted list trading control added. 2015-02-05 13:56:45 -05:00
Eddie Hebert 4255016747 PERF: Add a wrapper around Series to speed up perf tracker bottleneck.
Alleviates bottleneck caused re-indexing into a pd.Series during a tight
loop, by keeping track of the index value into the underlying `.values`
in a lookup table.

Based on suggestion from @dalejung
2015-02-03 12:57:32 -05:00
Thomas Wiecki c734f23102 BUG: kwargs.pop() requires default argument. 2015-02-03 12:20:45 +01:00
Thomas Wiecki 9bdc2c8734 BUG: Support algo_filename being None. Fixes #480. 2015-02-03 11:36:00 +01:00
Thomas Wiecki 65c038d0da Revert "MAINT Update pandas to 0.15.2."
This reverts commit b121759c68.
2015-01-28 10:39:41 +01:00
fawce 575abf747f Merge pull request #471 from quantopian/add_risk_to_datapanel
ENH: risk measures in datapanel
2015-01-27 13:13:31 -05:00
fawce 9ccb2c571f added cumulative risk measures to the
datapanel produced from perf frames.
2015-01-22 22:31:40 -05:00
Thomas Wiecki a5eefc7f8c TST: Add nose-timer to travis. 2015-01-21 18:25:14 +01:00
Thomas Wiecki b121759c68 MAINT Update pandas to 0.15.2. 2015-01-18 00:11:40 +01:00
fawce ec055b62bc Merge pull request #464 from quantopian/expand_perf_packet
adding net leverage, long/short exposure, long/short position count
2015-01-08 17:33:22 -05:00
fawce 893e8bec09 added notes for new perf fields. 2015-01-08 13:31:48 -05:00
fawce 6c3e1e1ba4 added tests for performance pack fields 2015-01-07 21:47:13 -05:00
fawce 7ed5461f8f de-linting 2015-01-07 21:47:01 -05:00
fawce 7668858c17 adding net leverage, long/short exposure, long/short position count
to performance packets.
2015-01-06 22:33:28 -05:00
Thomas Wiecki 6a41faf474 MAINT: Make beta calculation robust to missing values.
Risk calculations are robust to nans, except for
beta which calls numpy with the complete list of
algorithm_returns. If nans are present the result
of covar will be nan.

This is fixed by filtering out nans in
algorithm_returns.
2015-01-02 16:00:37 +01:00
Jeremiah Lowin 82c94b1dc4 DOC: Fix typo in midnight 2015-01-01 13:54:04 +01:00
Thomas Wiecki f474ee7eed BUG: Various functions were missing from the API. 2014-12-31 09:43:35 +01:00
John Ricklefs 994f7ceee5 BUG: 'inf' is in Numpy, not Pandas. 2014-12-29 21:23:34 -05:00
John Ricklefs 96cbec3f54 BUG: Fix division-by-zero error if net_liquidation was 0.
Converted _net_liquidation_value to a property to
streamline it a bit, too.
2014-12-29 14:52:31 -05:00
llllllllll 38e4d10c65 BUG: Fixes a bug that caused NDaysBeforeLastTradingDayOfMonth to not
fire on the last day of december.
2014-12-26 18:20:30 -05:00
Jonathan Kamens a3d7483488 MAINT: Upgrade to requests 2.5.1 2014-12-26 10:02:28 -05:00
Thomas Wiecki d0eba3d1ca DOC: Fix typo in TradingAlgorithm doc string. 2014-12-26 13:13:53 +01:00
Thomas Wiecki 8f3671bf24 DOC: Fix typo in TradingAlgorithm doc string. 2014-12-26 13:12:52 +01:00
fawce e1ce6ff34e Merge pull request #452 from quantopian/leverage
ENH: Adding Leverage to performance tracking
2014-12-24 11:20:04 -05:00
Nicholas Pezolano afd95b72e1 CAL: Add world cup closing day to bmf calendar. Closes #390. 2014-12-24 09:16:21 +01:00
fawce 3d4d3d0c2b adding gross leverage to the perf packet. 2014-12-19 11:31:59 -05:00
Thomas Wiecki 71effa5e98 MAINT: Replace old ema_talib example with new one. 2014-12-19 14:04:27 +01:00
Mete Atamel 9d8bb3dfa9 DEV: Add quantopian_dual_ema_talib.py
This file is identical to dual_ema_talib.py but it's in Quantopian syntax for easy copy/paste to Quantopian.
2014-12-19 14:04:27 +01:00
fawce 22cb6dcb40 added leverage and gross leverage to account.
added tests and conditions for account values.
2014-12-18 17:07:19 -05:00
Delaney Granizo-Mackenzie a0c041dca6 Merge pull request #451 from quantopian/risk-metrics-float-cast
BUG: Assigned dtypes to the cumulative risk metrics DataFrame.
2014-12-17 15:13:11 -05:00
Delaney Granizo-Mackenzie bed1ff3bce BUG: Miniconda was breaking the travis build. Updated version. 2014-12-17 14:22:31 -05:00
Delaney Granizo-Mackenzie 05903a2031 BUG: Assigned dtypes to the cumulative risk metrics DataFrame. 2014-12-17 13:56:42 -05:00
fawce cd976ee2dd Merge pull request #449 from quantopian/bug_5089
expand get_environment
2014-12-12 17:42:58 -05:00
Scott Sanderson 51e43e3d61 BUG: Use string_types instead of basestring for py3 compat. 2014-12-09 11:17:28 -05:00
Scott Sanderson a701d0c47c DEV: Explicitly convert string to timezones in get_datetime. 2014-12-09 11:17:28 -05:00
Scott Sanderson 44f993c64e BUG: Use astimezone instead of tz_convert.
Makes get_datetime agnostic as to whether its input is a datetime or a
Timestamp.  (astimezone is an alias to tz_convert when the input is a
Timestamp).
2014-12-09 11:17:28 -05:00
fawce 34647ec6c4 added tests to confirm the full environment returns as expected. 2014-12-08 16:47:11 -05:00
fawce 0411627169 Modified get_environment to provide multiple fields. 2014-12-07 08:26:13 -05:00
Eddie Hebert eaea8e5317 Remove bottleneck caused by unnecessary check of the position index.
Instead of checking the positions indexes every time either
`_position_amounts` or `_position_last_sale_prices` is updated, check
and grow the individual Series on each update.

This gain with this patch is by reducing the following bottlenecks:
- Checking both vectors when only one is updated.
- Using try/except to trigger the growth, instead of incurring the cost
of checking the Index contains on every update.

In testing this change results in about a 33% speedup of the
`update_last_sale` algorithm when run with a buy and hold algorithm with
160 equities, resulting in a 20% speedup overall.
2014-12-04 12:08:00 -05:00