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

Method __init__

backtesting/_util.py:163–169  ·  view source on GitHub ↗
(self, df: pd.DataFrame)

Source from the content-addressed store, hash-verified

161 for performance reasons.
162 """
163 def __init__(self, df: pd.DataFrame):
164 self.__df = df
165 self.__len = len(df) # Current length
166 self.__pip: Optional[float] = None
167 self.__cache: Dict[str, _Array] = {}
168 self.__arrays: Dict[str, _Array] = {}
169 self._update()
170
171 def __getitem__(self, item):
172 return self.__get_array(item)

Callers 1

__init__Method · 0.45

Calls 1

_updateMethod · 0.95

Tested by

no test coverage detected