A struggling automated strategy creates a very human temptation: change something. Tighten the stop. Add a filter. Improve the entry. Optimize again.

Those changes may be sensible. They may also spend money solving the wrong problem. Before a strategy is rehabilitated, it helps to decide whether there is something worth preserving.

Two closely related parts of this decision are Trading Strategy Overfitting: How Optimization Can Make a Weak System Look Strong and Backtest vs Live Trading: 7 Reasons the Same Strategy Can Behave Differently.

Step 1: State the original idea plainly

What market behaviour was the strategy supposed to exploit? Trend continuation? Mean reversion? A breakout after compression? A carry premium? If the thesis cannot be stated clearly, it becomes difficult to tell whether the code is implementing the idea or simply containing a collection of rules that once produced a good backtest.

Step 2: Reproduce the baseline

Freeze the original source, parameters, data and assumptions. Reproduce the result where possible. If the baseline cannot be reconstructed, classify that uncertainty before making improvements. Otherwise the rehabilitation process can lose track of what actually changed.

Step 3: Separate thesis weakness from implementation weakness

A sound idea can be expressed badly. Indicator timing can be wrong. A Python port can disagree with MQL5. Costs can be missing. Stops can violate broker rules. Those are implementation problems.A different case is a perfectly implemented strategy whose underlying mechanism produces weak post-cost economics. Better engineering cannot create an edge that is not there.

Step 4: Check the market states

Does the strategy fail in conditions where the research says it should struggle, or does it fail everywhere? A mechanism that performs plausibly in the right states and poorly in known hostile states is a different rehabilitation candidate from a system with no coherent relationship to market context.

Step 5: Classify every proposed change

QuantWeaver distinguishes bug repairs, port corrections, thesis-preserving enhancements, risk or execution overlays and genuinely new hypotheses. That matters because a change to the core source of returns is a new research question. It should not inherit the old strategy's evidence automatically.

Step 6: Accept a negative answer

Rehabilitation is a research engagement, not a promise to manufacture profitability. Sometimes the best outcome is a clear rejection: the mechanism is unsupported, the required data is unavailable, execution consumes the edge or the strategy cannot survive serious validation.

A better backtest does not prove that you fixed the strategy

This sentence is worth keeping visible because it describes one of the most common mistakes in automated trading. Improvement should be judged against a frozen baseline, a defined change, fresh evidence and the original mechanism. Otherwise the process can optimize the symptoms until the chart becomes prettier.