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

Method initialize

tests/test_algorithm.py:2684–2689  ·  view source on GitHub ↗
(self, asset, max_shares, max_notional)

Source from the content-addressed store, hash-verified

2682 def test_set_max_position_size(self):
2683
2684 def initialize(self, asset, max_shares, max_notional):
2685 self.set_slippage(FixedSlippage())
2686 self.order_count = 0
2687 self.set_max_position_size(asset=asset,
2688 max_shares=max_shares,
2689 max_notional=max_notional)
2690
2691 # Buy one share four times. Should be fine.
2692 def handle_data(algo, data):

Callers

nothing calls this directly

Calls 8

FixedSlippageClass · 0.85
set_slippageMethod · 0.80
set_max_position_sizeMethod · 0.80
set_do_not_order_listMethod · 0.80
set_max_order_sizeMethod · 0.80
set_max_order_countMethod · 0.80
set_long_onlyMethod · 0.80

Tested by

no test coverage detected