MCPcopy Create free account
hub / github.com/quantopian/zipline / initialize

Method initialize

tests/test_ordering.py:265–270  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

263 # Test that we correctly forward values passed via `style` to Order
264 # objects.
265 def initialize(context):
266 api.schedule_function(
267 func=do_order,
268 date_rule=api.date_rules.every_day(),
269 time_rule=api.time_rules.market_open(),
270 )
271
272 def do_order(context, data):
273 assert len(context.portfolio.positions.keys()) == 0

Callers

nothing calls this directly

Calls 3

schedule_functionMethod · 0.80
every_dayMethod · 0.80
market_openMethod · 0.80

Tested by

no test coverage detected