We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1d26f7 commit 44fcb02Copy full SHA for 44fcb02
backtesting/backtesting.py
@@ -119,6 +119,13 @@ def I(self, # noqa: E743
119
120
def init():
121
self.sma = self.I(ta.SMA, self.data.Close, self.n_sma)
122
+
123
+ .. warning::
124
+ Rolling indicators may front-pad warm-up values with NaNs.
125
+ In this case, the **backtest will only begin on the first bar when
126
+ all declared indicators have non-NaN values** (e.g. bar 201 for a
127
+ strategy that uses a 200-bar MA).
128
+ This can affect results.
129
"""
130
def _format_name(name: str) -> str:
131
return name.format(*map(_as_str, args),
0 commit comments