Backtest Your Strategy All articles  · KO

How to Use This Tool, and What the Strategy Does

Updated 2026-09-06 · 5 min read

This site tests a split-buying strategy against historical prices. It places no orders and connects to no brokerage account. It only answers one question: what would have happened if you had followed these rules in the past.

The strategy in one sentence

Divide your capital into tranches, buy one tranche when price falls, and sell each tranche separately when it reaches its own profit target.

Here it is in more detail.

1. Split the capital

With $10,000 and six tranches, you do not deploy everything at once. You allocate across six entries with weights you choose. Weights of 10, 15, 20, 25, 20, 10 mean $1,000 on the first buy, $1,500 on the second, and so on.

Smaller at the start and larger in the middle means you commit lightly to shallow dips and more heavily as price falls further.

2. Buy on declines

When today's close falls below yesterday's close by your threshold, the next tranche is bought in full. A larger drop does not buy more.

With the trigger set to −1%:

So at most one tranche enters per day. With six tranches, the seed is fully deployed across six declining days. If the decline continues after all six are used, one reserve entry is made with whatever cash remains.

How sensitive you make the trigger changes the character completely. Something as shallow as −0.01% buys on almost any red day and exhausts the seed quickly; −3% only enters on large drops but rarely gets a chance.

3. Sell tranche by tranche

This part matters. Nothing is sold all at once. Each tranche remembers its own entry price, and sells on its own when it reaches the profit target.

With a 1.5% target, a tranche bought third exits as soon as it is 1.5% above its entry, while the first and second tranches keep holding.

4. Force-close stale positions

This is the time cut. A tranche that never reaches its target is sold anyway once a set number of trading days has passed, at a loss if necessary.

With a 10-day cut, any tranche held for 10 trading days is closed at that day's close. It stops capital from sitting trapped indefinitely.

5. A cycle ends when everything is sold

Once all tranches are closed, the cycle ends and the next cycle's tranche sizes are recalculated from the new balance. Profit makes the next tranche bigger; a loss makes it smaller. That is cycle compounding.

Whole shares only

This tool buys only whole shares. It does not assume fractional trading.

If a tranche is worth $1,000 and the share price is $700, it buys one share and leaves the rest in cash. Many brokers do support fractional shares, but the calculation stays conservative so the results hold in accounts that do not.

This means a small seed against an expensive stock will not behave as expected. With $1,000 split six ways, each tranche is about $167; if the share price is $700, no purchase happens at all and those days simply record no trade. If your results look suspiciously flat, raise the seed and run it again.

The inputs

Field What it does
Ticker The instrument to test. Only listed tickers are available.
Start / End date The test window. Make sure a real decline is inside it.
Seed Starting capital in dollars.
Fee One-way commission in percent. 0.1 means 0.1%.
Split settings How many tranches, and the weight of each.
Buy triggers How far price must fall from the prior close. Enter negatives.
Profit target The exit threshold for each individual tranche.
Time cut Trading days after which a tranche is closed regardless.
Entry filters Moving average, RSI, Bollinger and MACD conditions that further restrict buying.

The RSI filter has a direction. Buy at or below enters on oversold readings; buy at or above waits for strength to appear first. The same threshold produces very different results either way, so it is worth running both.

Filters only block buys. Turning them on reduces the number of trades, which usually lowers both return and drawdown. The results show how many days each filter blocked. If that count is zero, the filter did nothing.

Reading the results

Work through the numbers in this order.

1. Read maximum drawdown first. Before the return. Whether you can live with this number decides whether you can hold the strategy at all. See why drawdown matters more than returns.

2. Compare against buy-and-hold. If return rose but drawdown did not fall, you have mostly just added risk.

3. Use CAGR, not total return, to compare. Especially across different windows. See total return vs CAGR.

4. Check trade count and average holding period. Frequent trading gets eaten by fees and slippage in practice. Raise the fee from 0.1% to 0.3% and see whether profit survives.

5. Open the 15-year breakdown. Look for concentration. If one year produced all of the gains, you may be measuring that year rather than the strategy.

Limits of these results

The simulation simplifies several things. Know where it departs from real trading.

Above all, a strategy that tested well has no obligation to keep working. A backtest tells you how a rule behaved in specific past conditions, nothing more. The reasons are in five ways a backtest looks better than reality.

This site provides analytical tools only. It does not recommend buying or selling any security, and responsibility for investment decisions rests with you.

Read the other guides Drawdown, annualised return, entry filters and the limits of backtesting.