Closed QuentinLew closed 7 years ago
How can I fix this? I tried install 0.8.0 from source code but failed too.
Hi @QuentinLewes this notebook is currently not using the latest version of zipline, as many API changes have occurred since then. If you'd like to open a PR to that repository to fix that notebook, feel free to do that.
You can look at the q2 migration guide here to see what changes need to be made, and also look at the latest zipline code
Hey @QuentinLewes I'm going to go ahead and close this as it's being handled in https://github.com/quantopian/research_public/pull/134/ 😃
Environment
Description of Issue
https://github.com/quantopian/research_public/blob/master/research/Markowitz-blog.ipynb
add_history
.TradingAlgorithm
gotKeyError
C:\Python27\lib\site-packages\zipline\algorithm.pyc in run(self, data, overwrite_sim_params) 686 try: 687 perfs = [] --> 688 for perf in self.get_generator(): 689 perfs.append(perf) 690
C:\Python27\lib\site-packages\zipline\gens\tradesimulation.pyc in transform(self) 218 for dt, action in self.clock: 219 if action == BAR: --> 220 for capital_change_packet in every_bar(dt): 221 yield capital_change_packet 222 elif action == SESSION_START:
C:\Python27\lib\site-packages\zipline\gens\tradesimulation.pyc in every_bar(dt_to_use, current_data, handle_data) 131 perf_tracker.process_commission(commission) 132 --> 133 handle_data(algo, current_data, dt_to_use) 134 135 # grab any new orders from the blotter, then clear the list.
C:\Python27\lib\site-packages\zipline\utils\events.pyc in handle_data(self, context, data, dt) 182 context, 183 data, --> 184 dt, 185 ) 186
C:\Python27\lib\site-packages\zipline\utils\events.pyc in handle_data(self, context, data, dt) 201 """ 202 if self.rule.should_trigger(dt): --> 203 self.callback(context, data) 204 205
C:\Python27\lib\site-packages\zipline\algorithm.pyc in handle_data(self, data) 457 def handle_data(self, data): 458 if self._handle_data: --> 459 self._handle_data(self, data) 460 461 # Unlike trading controls which remain constant unless placing an