# Backtesting

## Backtesting

Test your trading strategies on historical market data before risking real capital. Backtesting is your most valuable tool for validating strategies, optimizing parameters, and establishing realistic expectations.

### What is Backtesting?

Backtesting runs your trading strategy against genuine historical market data to show how it would have performed in past market conditions. It's the method serious traders use to:

* **Fine-tune strategy logic** — Identify weaknesses and optimize entry/exit rules
* **Eliminate costly mistakes** — Catch flaws before deploying real capital
* **Establish realistic expectations** — Understand potential returns and drawdowns
* **Stress-test strategies** — See how approaches handle different market phases

### Key Features

#### Market Data Coverage

| Feature           | Specification                                                      |
| ----------------- | ------------------------------------------------------------------ |
| Historical Period | Up to 2 years                                                      |
| Exchanges         | 10+ spot and futures exchanges                                     |
| Trading Pairs     | 10,000+ pairs available                                            |
| Data Types        | Candlestick (OHLCV), order book snapshots, trade execution records |

#### Technical Indicators

Access **80+ built-in technical indicators** across all major categories:

* **Trend Indicators** — MA, EMA, MACD, ADX, Parabolic SAR, SuperTrend
* **Momentum Oscillators** — RSI, Stochastic, CCI
* **Volatility Indicators** — Bollinger Bands, ATR
* **Volume Indicators** — OBV, A/D Line
* **Chart Patterns** — Double Top/Bottom, Head & Shoulders, Triangles
* **Candlestick Patterns** — Hammer, Doji, Engulfing

#### Logic Operators

Combine indicators using **AND**, **OR**, **NOT** logic operators to create sophisticated multi-condition strategies without writing any code.

#### Realistic Simulation

Configure your backtests to mirror actual trading conditions:

* **Trading fees** — Maker/taker commissions based on your exchange tier
* **Slippage** — Account for execution delays and price impact
* **Volume-based adjustments** — Customize based on your trading volume

### How to Run a Backtest

#### Step 1: Build Your Strategy

Create your trading strategy using the Strategy Builder:

1. Select 2-3 indicators from different categories
2. Define entry conditions (when to buy/sell)
3. Define exit conditions (when to close positions)
4. Set risk management rules (stop-loss, take-profit)

#### Step 2: Configure Backtest Parameters

| Parameter         | Description                         |
| ----------------- | ----------------------------------- |
| Trading Pair      | Choose from 10,000+ available pairs |
| Historical Period | Select date range (up to 2 years)   |
| Fees              | Set realistic trading costs         |

#### Step 3: Analyze Results

Review detailed performance metrics:

* **Win Rate** — Percentage of profitable trades
* **Profit Factor** — Gross profit / Gross loss ratio
* **Maximum Drawdown** — Largest peak-to-trough decline
* **Sharpe Ratio** — Risk-adjusted returns
* **Total Trades** — Number of executed trades
* **Equity Curve** — Visual representation of performance over time

### Why Backtesting Matters

#### Problems Traders Face Without Backtesting

| Problem                  | Description                                                             |
| ------------------------ | ----------------------------------------------------------------------- |
| Flying Blind             | Executing strategies without understanding their historical performance |
| Unrealistic Expectations | Overestimating potential returns without data-backed validation         |
| Hidden Risk Exposure     | Not understanding the true risk profile of your strategy                |
| Time-Wasting Validation  | Manually testing strategies takes months of real-time observation       |
| Overfitting              | Creating strategies that only work on specific market conditions        |
| Costly Trial-and-Error   | Learning from expensive mistakes with real capital                      |

### Backtesting vs Demo Trading

| Aspect            | Backtesting                                 | Demo Trading                                  |
| ----------------- | ------------------------------------------- | --------------------------------------------- |
| **Data Source**   | Historical market data                      | Live market data                              |
| **Time Required** | Instant results (years of data in minutes)  | Real-time (days/weeks to gather data)         |
| **Best For**      | Rapid strategy development and optimization | Validating execution under current conditions |
| **Use Case**      | Historical performance analysis             | Real-time strategy validation                 |

**Recommendation:** Use backtesting for initial strategy development and optimization, then validate with demo trading before going live.

### Best Practices

#### Strategy Development

1. **Start simple** — Begin with 2-3 indicators and gradually add complexity
2. **Combine indicator types** — Use trend + momentum + volume for confirmation
3. **Include stop-losses** — Always define exit conditions for losing trades
4. **Test multiple timeframes** — Validate strategies across different periods

#### Avoiding Common Pitfalls

* **Overfitting** — Don't optimize for one specific market period
* **Ignoring fees** — Always include realistic trading costs
* **Survivorship bias** — Test across diverse market conditions
* **Curve fitting** — Avoid excessive parameter optimization

#### Validation Process

1. Backtest on 70% of historical data (training set)
2. Validate on remaining 30% (testing set)
3. Run demo trading for 1-2 weeks
4. Deploy with small position sizes initially

### Comparing Strategy Variations

Skyrexio allows you to save, organize, and compare unlimited strategy versions:

* Run multiple parameter sets against identical data
* Analyze side-by-side performance metrics
* Identify which modifications genuinely improve results
* Avoid changes that simply overfit historical data

### Exporting Results

Export detailed backtest reports including:

* Complete performance metrics
* Trade-by-trade logs
* Equity curves and charts
* Statistical analysis

Use exports for documentation, sharing with communities, or external analysis.

### Limitations

While backtesting is essential, understand its limitations:

* **Past ≠ Future** — Historical performance cannot predict future results
* **Data quality matters** — Results depend on accurate historical data
* **Market evolution** — Cryptocurrency markets change over time
* **Execution differences** — Real trading may face liquidity constraints

### Getting Started

1. [Create a free Skyrexio account](https://app.skyrexio.com/register)
2. Access the Strategy Builder
3. Build your first strategy
4. Run your first backtest
5. Analyze results and iterate

Backtesting is available on all plans, including the free Basic plan.

***

### FAQ

#### Can I trust backtesting results to predict future performance?

Backtesting accuracy depends on data quality and strategy robustness. While it cannot forecast future movements, it reveals how your strategy would have performed under past conditions — making it invaluable for risk assessment and optimization.

#### What data does Skyrexio use for backtesting?

Authentic historical data from all supported exchanges including candlestick (OHLCV), order book snapshots, and trade records across multiple timeframes.

#### Are trading fees included in results?

Yes. Configure realistic trading fees, maker/taker commissions, and slippage to match your actual exchange conditions.

#### How long of a historical period can I test?

Up to 2 years — significantly more than most platforms. This allows testing across bull runs, bear markets, and ranging conditions.

#### Can I compare multiple strategies?

Yes. Save and compare unlimited strategy variations side-by-side under identical market conditions.
