# The RSI(2) strategy on the DAX, daily closes (Connors' rules, replicated from SPY) - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-11-12 (approved by the owner the same day: "aprob, si urca ca nu voi fi la calculator"; draft 2 unchanged)**, before any RSI(2) value, signal or trade was computed on the DAX. Draft 2 is draft 1 plus the facts of the download and the data check; no rule changed between them. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed.

## Why this test, and what was looked at before
- **Chosen by the owner** on 2026-11-12 ("rsi-2-strategy-spy asta sa incercam pe o piata noua"; market chosen the same day: "DAX"), from four candidates proposed that day (the DAX from Yahoo, gold, WTI crude oil, the DAX file already in the workspace). ES and YM futures were set aside as not independent of SPY (the same index and the Dow) and too short (2020-2026).
- **A replication.** The rules that passed every gate on SPY (`rsy_spec.md`, RS2-10 Survivor; RS2-5 buried by its trade count only) are applied here **unchanged**: same indicators, thresholds, exit, costs, period boundaries, gates and control. A rule chosen after a good result elsewhere is a weaker test than a new idea; that is stated.
- **Partly independent of SPY.** The DAX is another stock index, in another country and currency, but large falls are often shared. The DAX closes at 17:30 Frankfurt (11:30 New York), before the US session ends, so a US afternoon drop often reaches the DAX the next trading day. The entry days shared with SPY are reported (the same date, and the next DAX day after a SPY entry).
- **Why it might not (written before the run):** the DAX is more volatile than the S&P 500 and lost more than half its value twice (2000-2003, 2007-2009), so a buy-the-dip rule without a stop can sit through large open losses; it may spend more of its history below its 200-day average than SPY, which means fewer trades; a German, export-heavy index trends with the world economic cycle more than the S&P 500 does.
- **Looked at before (disclosed):**
  - RSI(2) with these rules on **SPY** (published 2026-11-06): RS2-10 Survivor 6/6 (257 trades, +0.616% a trade, development t 6.74), RS2-5 Buried 5/6 (trade count).
  - The same rules on **QQQ** (published 2026-11-07): RQ2-10 Buried 3/6 (36 trades in 2000-2005, development t 2.32, control 93.2th percentile), RQ2-5 Buried 5/6 (trade count).
  - RSI(2) on **ES futures**, 60-minute bars with extra rules of our own, buried; RSI(2) versions on four FX pairs in the FX study, buried.
  - The **DAX on 1-minute HistData quotes** (2011-2020 and 2023-2026) in two intraday tests, the 15-minute opening-range breakout and the Fibonacci pullback, both buried. Different rules, but those prices were seen.
  - **No DAX daily close series and no RSI(2) value on the DAX** have been used on the site.

## Instrument and data
- **The DAX** (the German blue-chip index; DAX 30 until September 2021, DAX 40 since). It is a **performance index**: dividends are reinvested in the index itself, so the change from one close to the next is already a total return, as the dividend-adjusted SPY returns were. No dividend file is used.
- **Source: Yahoo Finance, symbol ^GDAXI, daily bars** (open, high, low, close as Yahoo gives them; the rule uses only the close, the next-open fills use the open).
- **Downloaded by Claude on 2026-11-12 with the owner's agreement** ("da descarca"): one request to Yahoo's chart service, saved unchanged as `data_gdaxi/gdaxi_yahoo_chart_raw.json` (976,761 bytes, SHA-256 40f254b8edb459f6b7006c20583a1b7396cedff1708ec50aeab15cfb8a8ac242). `rdx_parse.js` writes `gdaxi_daily.csv` (SHA-256 2181396d23d284dfa224209cbe0d7a2262f6f5008ad5f7995e45059801cd967c): 9,830 days from 1987-12-30 to 2026-11-11, dated by the Frankfurt calendar. It also writes `gdaxi_null_rows.csv`: 168 Yahoo dates that carry no price (holidays; see the data check). The price files are **not republished**.
- **Used from 1987-12-30 to 2026-10-20** (9,814 days), the last day of the SPY and QQQ tests. The 16 later days are not used.
- **Why not the DAX file already in the workspace** (`data_dax`, HistData GRX/EUR): it is a 1-minute CFD quote from November 2010 only, and it holds Euro Stoxx 50 prices from 2020-06-15 to 2023-12-01. With about 11 usable years, fewer than 50 trades per period would be certain before any result. It is used here only to cross-check the Yahoo closes.
- **Opening prices:** from 1987 to 1993-12-13 Yahoo has no intraday prices (open = high = low = close); real opens start on 1993-12-14. The next-open fills (descriptive only) are therefore reported for **trades entered from 1994-01-01**.

## Data check (automated, `rdx_datacheck.js`, after the download and before the freeze; no indicator or return of the rule)
1. First and last day; the cut at 2026-10-20.
2. No Saturday or Sunday; no duplicate or backward date; no missing, zero or negative close; open, high and low consistent with the close where present.
3. Trading days per full year (expected about 250). Every missing weekday is listed and classed as:
   - a current Xetra holiday (1 January, Good Friday, Easter Monday, 1 May, 24, 25, 26 and 31 December);
   - an older Frankfurt holiday (Ascension, Whit Monday, Corpus Christi, 3 October; 17 June until 1990; the Day of Prayer and Repentance until 1994);
   - otherwise a **gap**.
   A year with fewer than 240 or more than 258 days is flagged.
4. Stale quotes: runs of 3 or more identical closes are listed.
5. Daily moves above 8% are listed and checked by hand against known events.
6. **Cross-check against the HistData file:** for the days both sources hold (2011-01-03 to 2020-06-12 and 2023-12-04 to 2026-10-20), compare Yahoo's close with the last HistData minute of the cash session (up to 17:29 Frankfurt, `dax_data.js`). Reported: the number of common days, the median absolute difference of the levels, the correlation of the daily changes, and every day that differs by more than 1%. A CFD quote at the last minute is not the official closing auction, so small differences are expected.
7. The MT4 clock check does not apply: this is a daily series with dates only, not an MT4 file (stated).
The result of the check is shown to the owner before the freeze. Gaps found by check 3 fall under the data rule (rule 3 of the 8 Oct rules): trades open across a gap are counted, and every gate is recomputed without them; a changed verdict becomes Inconclusive.

**Result of the check (`node rdx_datacheck.js`, 2026-11-12; `rdx_out/rdx_datacheck.txt`). No indicator or return of the rule was computed.**
1. The data runs from 1987-12-30. The cut falls on 2026-10-20 as planned.
2. No duplicate or backward date and no weekend day. Every close is present and positive. The adjusted close equals the close. Open, high and low are consistent wherever they exist.
3. Every full year has 248 to 257 days. There are 311 missing weekdays:
   - 242 are current Xetra holidays;
   - 66 are older Frankfurt holidays (Ascension, Whit Monday, Corpus Christi, 3 October, 17 June, the Day of Prayer and Repentance);
   - 3 are not on either list:
     - **2017-10-31** was Reformation Day, a one-off national holiday that year. The HistData quote file also has no minute that day, so it is **treated as a holiday**.
     - **1988-12-30 and 1989-12-29** are Fridays before a New Year's Eve that fell on a weekend. Yahoo lists both dates without a price. They may have been exchange closures, but this is not confirmed, so they are **treated as gaps under rule 3**.
4. There is no run of identical closes; not even two consecutive closes are equal.
5. Eight daily moves exceed 8%, and each one matches a known event:
   - 1989-10-16: -13.1%;
   - 1991-08-19: -9.2%, the Moscow coup;
   - 2001-09-11: -8.5%;
   - 2008-10-13: +11.4%;
   - 2008-10-28: +11.3%;
   - 2008-11-24: +10.3%;
   - 2020-03-12: -12.2%;
   - 2020-03-24: +11.0%.
   The largest move is 13.1%.
6. Against HistData, on 3,088 common days, the levels differ by a median of 0.071% (95th percentile 0.293%, maximum 0.936%). No day differs by more than 1%. Over 3,078 consecutive common days, the daily changes correlate at 0.9917.
7. The MT4 clock check does not apply.

## Indicators and rules (identical to rsy_spec.md)
- SMA(200) and SMA(5) of closes; RSI(2), Wilder's (smoothing 1/2, seeded with the plain mean of the first two changes). Signals from the 250th day (1988-12-27).
- **Entry** at the close when the close is above its SMA(200) and RSI(2) is below the threshold, if no position is open. **Exit** at the close of the first later day whose close is above its SMA(5); the next entry is considered from the next day. No stop, no target, no time limit; a position open at the end closes at the last close.
- **Two variants:** **RD2-10** (RSI(2) below 10) and **RD2-5** (below 5). Long only.

## Costs
- **0.04% of the price per round trip**, unchanged from SPY (about what a DAX future or a large DAX ETF costs); 0.10% as a scenario. The verdict is that of 0.04%.

## Results, periods, gates, control
- **Unit:** net % per trade.
- **Periods (by entry date), the SPY boundaries:** development from the first possible signal (1988-12-27) to 2005; validation 2006 .. 2015; holdout 2016 .. 2026-10-20. Development starts earlier than on SPY (1993) only because the data does. The holdout has not been used by any daily DAX test, but those years were seen through the two intraday DAX tests, and the SPY and QQQ results are known, so it is reported as **partly used**.
- **Six gates per variant:** validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (the protocol's bar when more than four versions of a strategy have been tried; RSI(2) now has far more on the site: ES, FX, SPY, QQQ); above the 95th percentile of 500 runs of the matched control; positive without the 10 best trades; holdout net positive (flagged partly used). Fewer than 30 trades: Inconclusive.
- **Matched control (as on SPY and QQQ):** random entries on days with the close above its SMA(200) and below its SMA(5), while flat, with one probability calibrated to the real trade count; same exit, costs and fills; 500 runs, seeds 1000 + run; statistic: average net % per trade.

## Also reported (descriptive, after the gates; nothing here can change the rule or the verdict)
As on SPY and QQQ:
- win rate with its Wilson interval; holding days; time in the market; the worst open loss;
- results by year and by period; without the 10 and the 20 best trades;
- the 0.10% cost; fills at the next open.

Specific to the DAX:
- the whole strategy against buy-and-hold, with **no interest while out of the market** (the workspace has no euro money-market series; SPY used US T-bills);
- the same calendar crash windows as SPY;
- the DAX next to SPY and QQQ, including the entry days shared with SPY.

## Engine and self-test (before the run)
The SPY engine `rsy_lib.js` unchanged, with a DAX loader in `rdx_lib.js` (no dividends, interest 0, the development period from 1988). `rdx_selftest.js` must pass before any result is printed:
- the SPY self-test still passes;
- the loader matches an independent re-read of the raw file (its own parser): every day, close and open, and the cut;
- the engine equals the independent re-implementation `rsy_ref.js`, trade by trade, for both variants on the DAX, fed from that independent re-read;
- the control with the real entries reproduces the real trades; the control's pool and calibration are correct;
- mutations (the exit average of 6 days, a threshold of 15, fills at the next close) are detected.
`rdx_run.js` refuses to run unless this file is frozen and the self-test passed on the current code.

## Before the article
Results go to the owner first (in Romanian), with every variant and every gate. One article, only if the owner asks for it; the commercial page that prompted the SPY test is not cited (owner's rule).

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. A "Survivor" here would be a replication on a partly correlated index from one free data source, not independent proof.

## Log
- 2026-11-12: draft 1 written. Nothing downloaded or computed.
- 2026-11-12: the owner chose the DAX ("DAX") and agreed to the download ("da descarca"). Claude downloaded the series, extracted it with rdx_parse.js and ran rdx_datacheck.js (results above). Draft 2 adds those facts and the treatment of the three unlisted missing days; no rule changed. No indicator, signal or trade computed.
- 2026-11-12: frozen (draft 2 unchanged), approved by the owner ("aprob, si urca ca nu voi fi la calculator", relayed verbatim by the parent session; the owner also asked for the article to be published without waiting for them). SHA-256 of the frozen text (before this log grew): 4142d93c49fdebf4c402878f71fdb51ca46b78e70ab6d7157aa02b0bdb440513.
- 2026-11-12, before any result: rdx_selftest.js passed on its first run (the SPY self-test still passes; the loader equals an independent re-read of the raw Yahoo file: 9,814 days 1987-12-30 to 2026-10-20, no dividend, no interest; signals from 1988-12-27; indicators and trades equal to the independent reference rsy_ref.js fed from that re-read; control checks; four mutations detected; no trade open across a gap day). Counts only: RD2-10 270 trades, RD2-5 138. Rerun unchanged after rdx_run.js was written (the run requires a self-test newer than the code).
- 2026-11-12, the run (`node rdx_run.js`, once, outputs in `rdx_out/`): **RD2-10 Buried, 3 of 6** (270 trades, +0.154% a trade net, 66.3% winners; fails validation PF 0.87, development t 1.80 and the control (45.0th percentile; random dips in an uptrend +0.168%); passes the trade count 119 / 75 / 76, without the 10 best +6.7%, holdout +13.0% PF 1.30). **RD2-5 Buried, 3 of 6** (138 trades, +0.352% a trade; fails the trade count 63 / 39 / 36, development t 1.90 and the control (87.6th percentile); passes validation PF 1.34, without the 10 best +18.4%, holdout +8.5% PF 1.44). Rule 3: no trade open across a gap day. Nothing was rerun or changed.
- 2026-11-12: the article was built for publication as the owner asked ("aprob, si urca"), from the outputs of the single run, unchanged.
- 2026-11-13: published on the site at the owner's request in the session ("Da, urcă acum"; the deploy of 12 Nov had been refused by the permission check). The publication notes are dated 13 Nov. Nothing was rerun.
