Commit Graph

2364 Commits

Author SHA1 Message Date
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
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
David Edwards 17dd0d207d MAINT: Refactored RandomWalkSource
This makes the drift and standard deviation used in RandomWalkSource
keyword args to give the user more control over the price series that
are emitted.

The standard deviation of prices is very different at different frequencies,
users should have the ability to specify the standard deviation used.

The drift term should also be configurable to give the user more control.
2014-11-22 15:21:43 -08:00
Joe Jevnik e7a5e097c4 BUG: Explicitly guard against empty bar data in history container
contstruction.

BarData can be falsey. in create_buffer_panel, the intention of the
check against bar_data was to see if it was passed at all, not if it was
truthey. In order to make that check more explicit, the check now
asserts that bar_data is not None.
2014-11-19 11:55:13 -05:00
Joe Jevnik fcea785b01 MAINT: Makes RandomWalkSource emit midnight UTC events in daily mode. 2014-11-19 11:55:13 -05:00
Joe Jevnik f7b4d3100d ENH: Makes the offset of market_close relative to 20:00 UTC
Changed from relative to 20:01 UTC.
2014-11-19 11:38:26 -05:00
Luke Schiefelbein 1542b41fbd BUG: Fix price caching for tickers with '/' char
On Ubuntu (assume this is true for all posix) tickers containing a slash char ("CRD/A", "BRK/A", both valid tickers with yahoo api accessible timeseries) lead to a path error in loader.py line 286.
2014-11-19 11:26:27 +01:00
Thomas Wiecki 8dd74b15b2 DOC: Fix tutorial import. Closes #430. 2014-11-19 11:18:30 +01:00
Joe Jevnik 68e44353ce MAINT: Make RandomWalkSource accept the standard daily instead of day for the frequency 2014-11-18 15:23:10 -05:00
Joe Jevnik aac87ada5d BUG: Ensure that the bar count is an integer in minutely mode simple
transforms

total_seconds can return a float, which when divided by `60` would
still yield a float causing a value error when passed to range.
2014-11-18 11:25:23 -05:00
Joe Jevnik 9e94193d4b BUG: Off by one error in runtime construction of digest panel
When a history minute digest panel was constructed at runtime, there
would be 1 minute missing between the current minute at iloc[-1] and the
next prior minute at iloc[-2].
2014-11-18 11:22:17 -05:00
Joe Jevnik 39eb80ef0c DOC: Adds the new transform work to the release notes. 2014-11-17 13:16:30 -05:00
Joe Jevnik 25c3297c9d BUG: Fixes a bug in the test date_gen for non-daily timedeltas 2014-11-17 13:16:30 -05:00
Joe Jevnik a2fb729c00 DOC: Updates the comments around the caching in siddata 2014-11-17 13:16:30 -05:00
Joe Jevnik 82dffe8360 MAINT: Updates the add_trading_days to use the index of the date for a
more efficient means of jumping larger gaps of dates.

Adds a docstring to explain the usage of the function.
2014-11-17 13:16:30 -05:00
Joe Jevnik df3af31fc1 MAINT: Makes the date_gen skip non-market times. 2014-11-17 13:16:30 -05:00
Joe Jevnik e3d8b1034e ENH: Replaces the simple transforms with history calls. Switches
transforms to quantopian syntax.

Adds the sid attribute to the siddata so it is aware of which security
it represents.
2014-11-17 13:16:30 -05:00
Philipp Kosel 7889f93522 BUG: Fix ta-lib url in vagrant init shell script. 2014-11-12 18:22:29 -05:00
Joe Jevnik c2aae2e0f4 BUG: rolling panel data became misaligned after extend_back 2014-11-12 16:47:44 -05:00
Joe Jevnik 8df1a49031 BUG: When increasing the length dynamically, the rolling panel was
getting filled with the wrong datetimes and causing errors.

Updates the logic for addressing missing datetimes and adds unit tests
for the 2 main cases (no missing datetimes, and some missing datetimes).
2014-11-11 13:29:57 -05:00
Joe Jevnik 54b1f15983 STY: Removes unused import in run_algo.py 2014-11-10 10:21:43 -05:00
Joe Jevnik e56457c671 ENH: Makes breakpoints work in algoscripts started with the run_algo.py
script.

Adds an option kwarg to TradingAlgorithm named 'algo_filename' that
represents the file where the algoscript came from (if any). The
run_algo.py script will pass this argument with the value passed to the
'-f' flag. The default name is '<string>' to represent that the script
is coming from a string in python and not a file. This matches the
behavior of exec and the python convention for compiling code objects.
2014-11-10 10:14:56 -05:00
Joe Jevnik ca59abcc43 ENH: Makes schedule_function work in daily mode. 2014-11-06 10:49:49 -05:00
Joe Jevnik 93429d69f5 BUG: HistoryContainer creation at runtime did not work as intended. 2014-11-05 18:31:11 -05:00
llllllllll 9ddb033e67 ENH: Changes the default offset for time_rules.market_open to 1, and
makes it an offset from 13:30 UTC.

This is to be more consistent with the market_close, which is an offset
from 20:00 UTC.

This also makes market_open and market_close cache the dt to offset from
for each day.
2014-11-05 14:59:48 -05:00
Joe Jevnik e1a55131ec DOC: Updates the release notes to include information about the dynamic
history update.
2014-11-04 00:08:19 -05:00