Trading Strategy

Complete breakdown of the mean reversion strategy, parameters, and risk management

📊 Strategy Overview

Mean Reversion v1.0

A statistical arbitrage strategy that identifies when prices deviate from their moving averages and takes positions expecting them to revert to the mean. The strategy uses EMA crossovers for trend direction and ATR for volatility-adjusted entry/exit levels.

Strategy Type

Mean Reversion

Markets

BTC, ETH, SOL

Timeframe

1 Hour

📈 Technical Indicators

EMA (Exponential Moving Average)

EMA Fast Period:20
EMA Slow Period:50

Used to determine trend direction. When EMA20 > EMA50, the market is in an uptrend. When EMA20 < EMA50, the market is in a downtrend.

ATR (Average True Range)

ATR Period:14

Measures market volatility. All entry and exit levels are calculated relative to ATR, making the strategy adaptive to different volatility regimes.

đŸŽ¯ Entry Logic

📈 LONG Entry

✓

Trend Confirmation:

EMA Fast (20) > EMA Slow (50) — Uptrend confirmed

✓

Pullback Detection:

Current Price < (EMA Fast - 1.5 × ATR)

Price has pulled back significantly from the fast EMA

✓

No Existing Position:

Not already in a position for this market

📉 SHORT Entry

✓

Trend Confirmation:

EMA Fast (20) < EMA Slow (50) — Downtrend confirmed

✓

Rally Detection:

Current Price > (EMA Fast + 1.5 × ATR)

Price has rallied significantly above the fast EMA

✓

No Existing Position:

Not already in a position for this market

Entry Threshold Explained

The 1.5 × ATR threshold ensures we only enter when there's a significant deviation. In high volatility (large ATR), we need a bigger move. In low volatility (small ATR), a smaller move triggers entry. This makes the strategy adaptive.

đŸšĒ Exit Logic

🛑 Stop Loss

Long Position:

Entry - 1.0 × ATR

Short Position:

Entry + 1.0 × ATR

Limits losses to ~1% of position size

đŸŽ¯ Take Profit

Long Position:

Entry + 2.0 × ATR

Short Position:

Entry - 2.0 × ATR

Targets ~2% profit on position size

â†Šī¸ Mean Reversion

Price crosses back over EMA Fast

Exit when mean reversion completes, securing profit before full target

Risk-Reward Ratio

The strategy maintains a 2:1 risk-reward ratio. Stop loss at 1 ATR (~1% loss) and take profit at 2 ATR (~2% gain). This means we need a win rate above 33.3% to be profitable long-term (current backtest: 47% win rate).

💰 Position Sizing

Position Size (USD)

$100

Fixed size per trade

Max Concurrent Positions

3

One per market (BTC, ETH, SOL)

Max Exposure

$300

3% of initial capital

Leverage

1x

No leverage (spot-like)

đŸ›Ąī¸ Risk Management

âš ī¸ Circuit Breakers

🔴

Daily Loss Limit

If daily PnL drops below -3% of equity:

  • â€ĸ Close all open positions immediately
  • â€ĸ Stop opening new positions
  • â€ĸ Auto-reset at midnight UTC
🔴

Consecutive Losses Limit

If 3 consecutive losing trades:

  • â€ĸ Close all open positions immediately
  • â€ĸ Stop opening new positions
  • â€ĸ Auto-reset at midnight UTC

💸 Trading Costs

Commission (Maker/Taker)

0.04% per side

~$0.04 on $100 position

Slippage

0.05% average

~$0.05 on $100 position

Total cost per round-trip trade: ~$0.18 (0.18% of position). Factored into backtest results.

âš™ī¸ Execution Details

Timing & Frequency

Execution Interval

Every 5 minutes

Candle Check

1-hour candles

Signal Generation

On new candle close

Safety Features

Idempotency

Won't duplicate trades if run multiple times

Kill Switch

Instant disable via config file

State Persistence

Atomic writes, survives restarts

📊 Backtest Results (90 Days)

Period: Nov 13, 2025 - Feb 11, 2026

Return

-0.01%

Win Rate

47.06%

Max Drawdown

-0.08%

Total Trades

17

Excellent risk control: Near-flat returns with minimal drawdown demonstrate the strategy's defensive nature. With 47% win rate and 2:1 R:R, the strategy is breakeven as expected. Circuit breakers triggered correctly during testing.

âš ī¸ Paper Trading Only: This strategy is running in simulation mode with no real funds at risk. All positions and results are simulated. Real trading requires explicit authorization and additional safety measures.