# Doing the exact opposite: every strategy on this site, reversed - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-11-02 by Claude, at the owner's request ("baga tu un test nefacut, care va fi epica"). The owner delegated the choice of the test and did not review this draft before it was frozen.** No reversed trade, reversed total or reversed gate of any version has been computed. 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
- **The question everyone asks:** if a strategy loses, why not do the opposite? This site has per-trade logs for every version it ever published, losers included, so it can answer on real data instead of on one example.
- **Chosen after seeing every published result (disclosed):** the author of this specification knows which versions lost the most, knows from our cost study that many losses come from costs, and knows the one exact mirror pair on the site (VW-TREND and VW-REV on ES, both buried). The rules below were therefore written to be decided by the data of an early period only, and measured only on later data.
- **Prediction, written before any number:** reversing does not work in general, because a reversed trade pays the cost again. Rules A and B below should leave **fewer than half** of the reversed versions positive after costs on later data. Rule C (versions clearly bad before costs) should do best, but with few versions. A version that lost only because of costs cannot be rescued by reversing it.

## Data
- **Every version with a per-trade log:** at the time of writing 68 tests and 435 versions (`cost_lib.inventory()`, the list our site checker reads), in their own unit ($, R, pips or %). No price data is read and no strategy is re-simulated.
- **A trade** = its entry date, its gross result and its net result, from its log. **Cost** = gross - net. A log with no gross column uses the version's average cost per trade, (total gross - total net) / trades, from its published summary; those versions are marked, and the main results are also reported without them.
- **Check before any result:** each log must match its published summary in trades, net and gross.
- **Periods, by entry date, the same as in each test:**

| Market group | Development | Validation | Holdout (already used) |
|---|---|---|---|
| Index futures (ES, NQ, YM, and GC futures) | to 2023 | 2024 to March 2025 | from April 2025 |
| Spot gold, FX | to 2012 | 2013 to 2019 | from 2020 |
| Bitcoin | to June 2021 | July 2021 to 2023 | from 2024 |
| SPY | to 2005 | 2006 to 2015 | from 2016 |

## The reversal
- **Reversed trade:** the same entry and exit, on the other side, paying the same cost. **Reversed gross = -gross; reversed net = -gross - cost = net - 2 x gross**, trade by trade.
- **What this is not (stated wherever it is reported):** it is taking the other side of each trade at the same prices, not a new run of a mirrored rule, so a stop does not become a target. It adds no short-borrow fee, and any dividend or swap already inside a gross figure simply changes sign. A long-only version becomes short-only, against whatever drift the market had. So it is, if anything, generous to the reversal.

## The tests
**Part 1, hindsight (not evidence):** over the whole history, how many versions lost after costs, how many of those lost before costs, and how many become positive after costs once reversed. Reversing the worst versions after seeing them is exactly the mistake the next part avoids.

**Part 2, the real test (primary):** decide from the development period only, measure on validation + holdout only. A version is eligible with at least 30 trades in development and at least 30 later. Three rules for choosing what to reverse:
- **Rule A:** it lost after costs in development (net < 0).
- **Rule B (primary):** it lost before costs in development (gross < 0).
- **Rule C:** it was clearly bad before costs in development (t-statistic of gross per trade <= -2).

For each rule: the share of reversed versions **positive after costs on later data**, by count and **with each test weighing the same** (versions of one test share the data, so they are not independent); the same share before costs; and, as the reference, versions **not** chosen by the rule. **Significance:** the rule's label is shuffled among the eligible versions inside each test, 10,000 times, seed 20261102; the statistic is the test-weighted difference between chosen and not chosen.

**Part 3, the gates:** every reversed version, as if it were a new strategy, against the six gates: validation profit factor >= 1.2; at least 50 trades in each period; development t >= 2.5; above the 95th percentile of the control; positive without its 10 best reversed trades; holdout net positive (flagged used). **Control:** with the same cost per trade, reversing a version and its moved trades turns its percentile p into 100 - p, so gate 4 is read as 100 minus the percentile in the version's published gates file. This holds exactly only if a trade's cost does not change when moved; versions with no readable percentile are reported as not assessed. **Testing 435 reversed versions is 435 more tries:** anything that passes is a candidate for a new frozen test with the mirrored rule, not a result.

**Part 4, costs:** the Part 2 shares with no cost, half the cost and twice the cost, reversed trades only.

**Part 5, where (descriptive, no verdict):** Part 2 by market group and by family (the labels of our trend following vs mean reversion guide; versions without a label are counted apart); the 10 versions most reversible in development and how they did later.

## Engine and self-test (before the run)
`flip_lib.js`, independent re-implementation `flip_ref.js` (its own log reader and calculations), `flip_selftest.js` that must pass before any result is printed: the reversal, the costs and the rules on hand-made logs; the t-statistic, the weights and the shuffle; the periods at their boundaries; every log against its published summary; trades per period against the published summaries where they exist; **the real mirror pair: VW-TREND reversed by this formula must equal VW-REV, trade by trade**; the reference matched on every version; and a mutation check, in which deliberate changes to the rules must make the test fail.

## Before the article
Results go to the owner first. One guide, published only with the owner's agreement, linked to the cost study and the trend vs mean reversion guide. Working title for search: "What If You Do the Exact Opposite of a Losing Trading Strategy? 435 Backtests Reversed".

## Reading the result
This study reads published logs; it does not trade anything. Versions of one test share data, and many tests share markets, so the counts are not independent. Exploratory: every period was seen before this specification was written, even though the rules were not fitted to them.
