Stock Strategy Backtester from CSV

Paste a price CSV, pick a strategy and its settings, and see the equity curve, CAGR, maximum drawdown, volatility and trades compared with buy and hold.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Get price data

    Download a CSV of prices for a fund or stock.

  2. 2
    Paste it in

    Paste the CSV into the data box.

  3. 3
    Choose a strategy

    Pick a rule and its settings.

  4. 4
    Set costs

    Enter starting capital and cost per trade.

  5. 5
    Read the results

    Check CAGR, drawdown, volatility and trades.

  6. 6
    Compare

    Add other strategies and compare them.

Informazioni su questo strumento

Before trusting an investing rule with real money, it is worth seeing how it would have behaved in the past. A backtest replays a strategy over historical prices and measures the result. This backtester runs entirely in your browser on data you provide. Paste a CSV of daily, weekly or monthly prices exported from your broker or a free price website; the tool finds the date column and uses the adjusted close if present, otherwise the close, or several price columns for a two-asset portfolio. Choose a strategy: buy and hold, a moving-average crossover that is invested when the fast average is above the slow one, a trend rule that is invested when the price is above its moving average, momentum that is invested when the price is higher than a set number of bars ago, monthly investing of a fixed amount, or rebalancing between two assets at a target weight every month or year. Set the starting capital and the trading cost. The results show final value, compound annual growth rate, maximum drawdown, annual volatility, a Sharpe ratio, the number of trades and time in the market, with buy and hold alongside. Charts show the equity curve and drawdown. Add each strategy as a tab and compare them.

Who this is for

DIY investors, students of finance and anyone curious whether a simple rule would have beaten buying and holding.

Strategies

| Strategy | Invested when | |---|---| | Buy and hold | always | | SMA crossover | fast moving average is above the slow one | | Price above moving average | price is above its moving average | | Momentum | price is higher than N bars ago | | Monthly investing | a fixed amount is invested at each new month | | Rebalance two assets | always, reset to the target weight monthly or yearly |

Reading the metrics

| Metric | Meaning | |---|---| | CAGR | average yearly growth rate | | Maximum drawdown | worst fall from a peak, in percent | | Volatility | how much returns swing, annualised | | Sharpe ratio | return per unit of volatility (no risk-free rate) |

Getting data

Many brokers and free finance websites let you download historical prices as CSV. Use adjusted close prices where possible, because they include dividends and splits. The example data in the tool is synthetic, made up for demonstration, and does not represent any real security.

Avoiding false confidence

Trying many settings until one looks good is called overfitting: the rule fits past noise and often fails in the future. Test on several periods and assets, include realistic costs and remember that taxes and delays reduce real-world results.

Worked example

On the synthetic weekly example, buy and hold grows $10,000 to about $13,143 with a 59% maximum drawdown. A 10/40 moving-average crossover ends at about $13,698 with a 31% drawdown and 12 trades, and 52-week momentum ends at about $16,998.

Limits

Backtests use the past and do not predict future returns. This tool is for education, not investment advice. Data stays in this browser.

Esempio svolto

Synthetic data: buy and hold $13,143 (−59% drawdown) vs SMA 10/40 $13,698 (−31%).

In breve

Domande frequenti

What data format do I need?

A CSV with a date column and a price column, such as Close or Adj Close.

Which strategies can I test?

Buy and hold, SMA crossover, price above moving average, momentum, monthly investing and two-asset rebalancing.

Are trading costs included?

Yes, set a cost per trade as a percentage.

Is the example data real?

No, it is synthetic and for demonstration only.

Can I compare strategies?

Yes, add each as a tab and use Compare all.

Is my data uploaded?

No, your CSV is processed in this browser.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue