MCPcopy Index your code
hub / github.com/quantopian/zipline / on_dt_changed

Method on_dt_changed

zipline/algorithm.py:1461–1470  ·  view source on GitHub ↗

Callback triggered by the simulation loop whenever the current dt changes. Any logic that should happen exactly once at the start of each datetime group should happen here.

(self, dt)

Source from the content-addressed store, hash-verified

1459 self.logger = logger
1460
1461 def on_dt_changed(self, dt):
1462 """
1463 Callback triggered by the simulation loop whenever the current dt
1464 changes.
1465
1466 Any logic that should happen exactly once at the start of each datetime
1467 group should happen here.
1468 """
1469 self.datetime = dt
1470 self.blotter.set_date(dt)
1471
1472 @api_method
1473 @preprocess(tz=coerce_string(pytz.timezone))

Callers 4

_create_generatorMethod · 0.95
every_barMethod · 0.80
once_a_dayMethod · 0.80
transformMethod · 0.80

Calls 1

set_dateMethod · 0.80

Tested by

no test coverage detected