Strategy
This strategy is backtested on daily OHLCV price data across major US equity indices and ETFs. Entry and exit signals are generated from the strategy's indicators with no lookahead bias — trades execute at the open of the bar following the signal.
Performance metrics are computed per symbol and shown individually. The parameter optimization section (where available) runs a grid search over the strategy's key parameters, optimizing for Sharpe ratio. Transaction costs and slippage are not modeled.
The signal logic and indicator code for this strategy is shown in the methodology code section below.
Intraday Intensity Index measures where the close falls within the day's range, weighted by volume. Positive values indicate buying pressure. Enters long when the smoothed III crosses above zero.
class IntradayIntensity(Strategy):
n = 21
def init(self):
h,l,c,v = pd.Series(self.data.High), pd.Series(self.data.Low), pd.Series(self.data.Close), pd.Series(self.data.Volume)
iii = (2*c - h - l) / (h-l).replace(0,1e-10) * v
self.iii = self.I(lambda: iii.rolling(self.n).sum() / v.rolling(self.n).sum().replace(0,1e-10), name="III")
def next(self):
if self.iii[-1] > 0 and self.iii[-2] <= 0 and not self.position: self.buy()
elif self.iii[-1] < 0 and self.position: self.position.close()| Total return | -1.205% |
| Net profit | -$12,054 |
| Gross profit | $552,815 |
| Gross loss | $546,654 |
| CAGR | -0.651% |
| Annualized return | -0.651% |
| Monthly average return | +0.006% |
| Median monthly return | -1.089% |
| Best month return | +7.957% |
| Worst month return | -8.789% |
| Rolling 1-month return | +11.674% |
| Return per trade | -0.035 |
| Log return CAGR | -7.715% |
| Compounded vs simple return difference | -3.130% |
What this shows: Normalized strategy equity versus benchmark path, with optional buy/sell markers when signal timestamps are available.
How to read it: Track whether the strategy line stays above benchmark through stress periods and whether entries/exits align with major swings.
33 trades · green dashes = buy entries · red dashes = sell exits
What this shows: The panels below break risk and return into drawdown, rolling quality metrics, return distribution, and optional trade diagnostics.
How to read it: Read them together: a strategy with good total return but unstable rolling Sharpe or deep drawdown concentration may be less robust.
| Total return | +19.132% |
| Net profit | $191,320 |
| Gross profit | $750,240 |
| Gross loss | $525,430 |
| CAGR | +5.321% |
| Annualized return | +5.321% |
| Monthly average return | +0.503% |
| Median monthly return | -2.751% |
| Best month return | +1.948% |
| Worst month return | -7.737% |
| Rolling 1-month return | +7.723% |
| Return per trade | +0.532 |
| Log return CAGR | -23.331% |
| Compounded vs simple return difference | -29.138% |