Vortex Indicator

← strategies

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

Vortex Indicator uses the relationship between current and prior highs/lows to define positive (VI+) and negative (VI−) trend movement. Enters long when VI+ crosses above VI−, exits on the reverse.

Implementation

class VortexIndicator(Strategy):
    n = 14

    def init(self):
        vi_plus, vi_minus = _vortex(self.data.High, self.data.Low, self.data.Close, self.n)
        self.vi_plus = self.I(lambda: vi_plus, name="VI+")
        self.vi_minus = self.I(lambda: vi_minus, name="VI-")

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

Performance metrics

Total return+9.996%
Net profit$99,956
Gross profit$629,935
Gross loss$526,901
CAGR+1.267%
Annualized return+1.267%
Monthly average return+0.149%
Median monthly return-0.347%
Best month return+7.600%
Worst month return-9.236%
Rolling 1-month return+14.572%
Return per trade+0.189
Log return CAGR+11.482%
Compounded vs simple return difference-10.481%

Equity curves

Chart for symbol:

Charts & distributions

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

Equity curve vs ^GSPC — buy/sell signals

Strategy equityIndex (normalized)▲ Buy▼ Sell

27 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.560%
Net profit$75,600
Gross profit$446,870
Gross loss$352,570
CAGR+2.216%
Annualized return+2.216%
Monthly average return+0.216%
Median monthly return+0.717%
Best month return+6.220%
Worst month return-8.878%
Rolling 1-month return+14.382%
Return per trade+0.272
Log return CAGR+2.690%
Compounded vs simple return difference-6.501%