Test an idea Backtest a stock trading rule without code
Pick a US stock and an idea, and see how it did against holding, after costs. Free, no account.
Historical simulation, free, no account needed.
A free stock backtesting tool, with the assumptions in view
A backtest is a test of a fixed rule on past prices: what would have happened if you had followed it. Here you can run one on a US stock or ETF, with no code and no account. The rule is then set against just holding the same stock over the same years. A past result is a lead to check, not a forecast.
How the daily test works
- Choose a symbol and one of the starting rules. Each rule sets its own exit. To change the exit, cap the holding time or pick the years, open the rule in Advanced. Some stocks have less than 10 years of history.
- The test reads each day’s closing price and buys at the next day’s open. It starts with $100,000 and only buys; it never sells short.
- Read the cost notes under the result. The rule pays a commission and a price slip on each trade (slippage), in and out. Simply holding pays no trading costs.
- Compare the return, the biggest drop and the number of trades. Check whether the answer rests on one period, a few trades or a kind guess about costs.
What this test can and cannot tell you
Daily prices do not show what happened inside the day, and they are not real orders. Modeled costs cannot promise a fill, enough buyers and sellers, or the real price slip. Short sales, options and opening-range rules are outside this daily test.
Read the dividend notes on each result. Both sides include dividends when we have them; if not, both use price alone. Testing only stocks listed today can also leave out the ones that failed (survivorship bias).
Changing settings after you see a result reuses the same history. Our 6 tests of whether a rule holds up (checks) reuse it too: they do not keep back recent years you have not seen (a holdout sample). Learn how to avoid look-ahead bias and count trading costs before you trust a result.
Read a documented study
Each of these studies lists its own data, costs and limits. The daily tool above does not copy how they trade inside the day or overnight.
- QQQ opening-range breakout: historical result and cost-model correction
- SPY overnight: the first result and the later re-tests
- All published rule tests, including negative and inconclusive results
Common questions
Do I need an account or code to run a test?
No. Running this daily historical simulation is free and does not require an account or code. Saving studies is a separate account feature. See current plans
How much history does a test use?
Up to 10 years of daily bars without an account and on the free and Starter plans. Pro and Pro Plus also start at 10 years and go up to 20 with the History option. Some symbols have a shorter history.
Which trading costs are included?
Each trade of the rule includes modeled commission and slippage on both sides, with a lower estimate for the most liquid symbols (major index ETFs, the largest stocks and leveraged ETFs) and a higher one for everything else. The holding comparison has no trading costs.
Are dividends included?
Both sides include dividends when they are available; otherwise both use price returns. Each result says which one it used.
Does beating just holding prove that a rule works?
No. One historical comparison can reflect chance, selection bias or settings chosen after seeing the result. Review the number of trials, test another period and keep an untouched sample before drawing conclusions.
Can a backtest tell me how many shares to buy?
The backtest studies a rule under its own account assumptions, and a planned stop can fill at a worse price than planned. For a separate account-risk scenario, use the position size calculator. Open the position size calculator