Merge pull request #1359 from quantopian/refactor_subperiod

MAINT: Refactor application of capital changes
This commit is contained in:
Andrew Liang
2016-08-01 14:00:48 -04:00
committed by GitHub
5 changed files with 42 additions and 35 deletions
+3 -4
View File
@@ -2264,12 +2264,11 @@ shares in position"
pt.execute_transaction(txn)
pp.handle_execution(txn)
# sync prices and calculate performance before we introduce a capital
# change
# sync prices before we introduce a capital change
pt.sync_last_sale_prices(trades[2].dt, False, data_portal)
pp.calculate_performance()
pp.subdivide_period(1000.0)
pp.initialize_subperiod_divider()
pp.set_current_subperiod_starting_values(1000.0)
pt.sync_last_sale_prices(trades[-1].dt, False, data_portal)
pp.calculate_performance()