Trend-Following ETF Backtest Calculator: Test a Moving-Average Rule

Written by

in

This free calculator tests whether a simple moving-average trend rule improved an ETF’s historical risk-adjusted performance. You paste your own price data, and it replays the rule with no lookahead bias, comparing the trend strategy against buy-and-hold. It does not fetch or invent any market data.

1Enter ETF price data

Paste two columns: date and close. Accepts headers like date, time, close, adj close. Order does not matter; blank lines are ignored.

2Configure the strategy

A transaction cost is applied every time the strategy switches between invested and cash.

3Optional benchmark

How to use it

Download or copy daily closing prices for any ETF (Yahoo Finance and most brokers export a CSV), paste the date and close columns into step 1, set your lookback period (200 is the classic trend-following default), and run it. The calculator moves the strategy to cash whenever the price closes below its moving average, and back in when it closes above, applying your transaction cost on each switch.

To understand what the numbers mean before trusting them, read how to backtest without fooling yourself, and pair the result with our other free tools.

FAQ

How does this backtest avoid lookahead bias?

The moving average at each period uses only prior closing prices, and the signal sets the position for the NEXT period. So no future information leaks into the trading decision.

What data do I need to run it?

A CSV with two columns: date and close price, pasted from any source such as Yahoo Finance or your broker. The calculator does not fetch or invent any market data.

Does it predict future returns?

No. It replays a rule on the prices you supply. Historical backtests are hypothetical and do not predict future performance.

Disclaimer: Educational tool only, not financial advice. It performs arithmetic on data you supply; it does not predict future performance or recommend any trade. Full disclaimer and affiliate disclosure.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *