MCPcopy Index your code
hub / github.com/kernc/backtesting.py / init

Method init

backtesting/backtesting.py:182–194  ·  view source on GitHub ↗

Initialize the strategy. Override this method. Declare indicators (with `backtesting.backtesting.Strategy.I`). Precompute what needs to be precomputed or can be precomputed in a vectorized fashion before the strategy starts. If you extend composable

(self)

Source from the content-addressed store, hash-verified

180
181 @abstractmethod
182 def init(self):
183 """
184 Initialize the strategy.
185 Override this method.
186 Declare indicators (with `backtesting.backtesting.Strategy.I`).
187 Precompute what needs to be precomputed or can be precomputed
188 in a vectorized fashion before the strategy starts.
189
190 If you extend composable strategies from `backtesting.lib`,
191 make sure to call:
192
193 super().init()
194 """
195
196 @abstractmethod
197 def next(self):

Callers 1

runMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected