Chaikin Money Flow

← 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

Chaikin Money Flow sums the Money Flow Volume over N periods. Positive CMF indicates accumulation (buying pressure), negative indicates distribution. Enters long on cross above zero, exits on cross below.

Implementation

class ChaikinMoneyFlow(Strategy):
    n = 20

    def init(self):
        self.cmf = self.I(_chaikin_mf, self.data.High, self.data.Low, self.data.Close, self.data.Volume, self.n)

    def next(self):
        if self.cmf[-1] > 0 and self.cmf[-2] <= 0 and not self.position: self.buy()
        elif self.cmf[-1] < 0 and self.position: self.position.close()

Performance metrics

Total return+1.081%
Net profit$10,811
Gross profit$561,649
Gross loss$524,364
CAGR+0.107%
Annualized return+0.107%
Monthly average return+0.067%
Median monthly return-1.103%
Best month return+7.043%
Worst month return-7.470%
Rolling 1-month return+11.823%
Return per trade+0.040
Log return CAGR-3.680%
Compounded vs simple return difference-4.116%

Equity curves

Chart for symbol:

Charts & distributions

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

Equity curve vs ^GSPC — buy/sell signals

Strategy equityIndex (normalized)▲ Buy▼ Sell

31 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+8.003%
Net profit$80,030
Gross profit$694,900
Gross loss$565,670
CAGR+2.342%
Annualized return+2.342%
Monthly average return+0.296%
Median monthly return-4.098%
Best month return+0.687%
Worst month return-6.108%
Rolling 1-month return+7.754%
Return per trade+0.252
Log return CAGR-28.298%
Compounded vs simple return difference-20.369%