Strategy

Methodology

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.

Methodology

TRIX is the percentage rate of change of a triple-smoothed EMA. Crossing above its signal line indicates upward momentum with noise filtered out by the triple smoothing. Exits on the reverse crossover.

Implementation

class TRIX(Strategy):
    n = 15
    signal_n = 9

    def init(self):
        trix = _trix(self.data.Close, self.n)
        self.trix = self.I(lambda: trix, name="TRIX")
        self.signal = self.I(lambda: trix.ewm(span=self.signal_n, adjust=False).mean(), name="Signal")

    def next(self):
        if crossover(self.trix, self.signal) and not self.position:
            self.buy()
        elif crossover(self.signal, self.trix) and self.position:
            self.position.close()

Performance metrics

Total return+13.399%
Net profit$133,995
Gross profit$546,646
Gross loss$412,573
CAGR+2.211%
Annualized return+2.211%
Monthly average return+0.233%
Median monthly return+1.692%
Best month return+13.108%
Worst month return-7.738%
Rolling 1-month return+20.126%
Return per trade+0.434
Log return CAGR+49.141%
Compounded vs simple return difference-3.947%

Equity curves

Chart for symbol:

Charts & distributions

2024-05 → 2026-04 · 5-year daily data

Equity curve vs ^GSPC — buy/sell signals

Strategy equityIndex (normalized)▲ Buy▼ Sell

25 trades · green dashes = buy entries · red dashes = sell exits

Drawdown (underwater)

Rolling 1-month Sharpe

Rolling 1-month return (%)

Period return (≈ monthly)

Return distribution (bar returns)

MAE vs MFE (trades)

Rolling 12m Beta

Rolling 12m correlation

Monthly returns (run)

Performance Matrix

Total return+7.646%
Net profit$76,460
Gross profit$434,060
Gross loss$339,200
CAGR+2.240%
Annualized return+2.240%
Monthly average return+0.218%
Median monthly return+2.992%
Best month return+17.748%
Worst month return-13.398%
Rolling 1-month return+17.759%
Return per trade+0.294
Log return CAGR+2.585%
Compounded vs simple return difference-6.628%