Chandelier Exit

← 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

Chandelier Exit sets a stop at the N-period highest high minus a multiple of ATR. Enters long when price is above the exit line, exits when price falls below it. Designed to keep you in trends while protecting against reversals.

Implementation

class ChandelierExit(Strategy):
    n = 22
    mult = 3

    def init(self):
        self.ce = self.I(_chandelier_exit_long, self.data.High, self.data.Low, self.data.Close, self.n, self.mult)

    def next(self):
        if self.data.Close[-1] > self.ce[-1] and not self.position:
            self.buy()
        elif self.data.Close[-1] < self.ce[-1] and self.position:
            self.position.close()

Performance metrics

Total return+83.526%
Net profit$835,257
Gross profit$1,106,910
Gross loss$846,758
CAGR+5.018%
Annualized return+5.018%
Monthly average return+0.440%
Median monthly return-1.128%
Best month return+3.801%
Worst month return-10.203%
Rolling 1-month return+11.539%
Return per trade+0.215
Log return CAGR-8.392%
Compounded vs simple return difference-88.712%

Equity curves

Chart for symbol:

Charts & distributions

2025-01 → 2026-04 · 5-year daily data

Equity curve vs ^GSPC — buy/sell signals

Strategy equityIndex (normalized)▲ Buy▼ Sell

44 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+28.950%
Net profit$289,500
Gross profit$957,450
Gross loss$645,850
CAGR+7.946%
Annualized return+7.946%
Monthly average return+0.721%
Median monthly return+0.563%
Best month return+3.118%
Worst month return-8.780%
Rolling 1-month return+10.929%
Return per trade+0.580
Log return CAGR-5.017%
Compounded vs simple return difference-30.972%