@xvks42 ·

How it works

The ratio-breakout signal, illustrated with real NIFTYBEES/GOLDBEES data - so you can check the logic yourself instead of taking it on faith.

1. Take the ratio of two ETFs

Every day, divide one ETF's close by the other's: ratio = close(NIFTYBEES) / close(GOLDBEES). When the ratio rises, NIFTYBEES is outperforming GOLDBEES; when it falls, GOLDBEES is outperforming.

2. Build a rolling 20-day band around it

band_high is the highest ratio close over the previous 20 trading days; band_low is the lowest. Today's own close is never part of its own band - it's compared against where the ratio has already been.

3. Flip when the ratio breaks out of the band

If today's ratio closes above band_high, hold NIFTYBEES. If it closes below band_low, hold GOLDBEES. Anywhere in between, keep holding whatever you already held - no signal, no trade. Always fully invested in one side, never split, never cash.

Ratio (NIFTYBEES / GOLDBEES) 20-day band Flip (new hold)
Loading chart…

Same days, as numbers

The chart's last 15 days, so you can hand-check the arithmetic - each row's band should be the highest/lowest ratio among the 20 rows before it (excluding itself). The highlighted cells are the two numbers being compared that day, and Signal is the result of that comparison.

Ratio broke above band_high Ratio broke below band_low
Loading…

Full daily series for every pair - including this one going back to 2009 - is on the pairs list as a downloadable CSV, and every pair's backtest (CAGR, drawdown, vs. buy-and-hold) is on the backtest page.