rungfolio

A backtest's assumptions

Hypothetical results, not investment advice

A backtest shows what the engine's rules would have done on past prices. No order was placed, and no real account holds its lots. Its results come from a model, and the past doesn't say what the next session will do. They aren't investment advice.

Everything the simulator doesn't model applies to a backtest too: partial fills, slippage beyond the trade-through rule, settlement, dividends and taxes. The list below is what a backtest assumes on top of that.

5-minute bars, against practice's 1-minute

A practice night fills orders on the day's 1-minute bars. A backtest uses 5-minute bars by default, which load and run faster over years of prices. For a range of a year or less, you can choose 1-minute bars instead.

The fill rules are the same on either: an order fills only when the price trades through it, a session that opens past a limit fills at the open, and only regular hours count. But a 5-minute bar holds five minutes of trading and records only its open, high, low and close. So a buy and its sell that a practice night would fill a few minutes apart can fall in the same 5-minute bar, where a sell can't fill with its buy, and the sale waits for a later bar. A 5-minute run can differ a little from what practice nights would have done. A 1-minute run fills as they do.

$0 fees

Every trade is free. Many brokers charge no commission on US stocks and ETFs online, and any other fee a real trade carries isn't counted.

No dividends, no interest

Neither the ladder nor buy-and-hold is paid dividends, and cash earns no interest. A real account would have had both. On a fund that pays dividends, holding it would really have returned more each year than buy-and-hold shows here, by about its yield: what the fund pays out in a year, as a share of its price. A ladder keeps much of its account in cash, which would have earned interest. So read the gap between the two with both in mind: each return leaves out something the money would have earned.

Whole shares

Every buy is for whole shares, as a practice night's is. Buy-and-hold buys as many whole shares as its starting cash covers at the first session's open, and keeps the rest as cash.

Splits, applied automatically

Rungfolio stores each day's prices as they traded, and a record of each split. When the ticker splits during a run, the run adjusts the ladder's lots, orders and settings to the new terms on the day the split takes effect, before that session's fills, as stock splits describes. Buy-and-hold holds its shares through the split.

In practice, some splits wait for you to review them. A backtest has no one to ask, so it applies every split by itself. If the adjusted settings no longer pass Rungfolio's checks, the run stops before the split's session, and the results say so, and when. Everything up to that night still counts.

The starting price

A run's starting price, rung 0, is the close before its first session, as a new ladder's is the last close. Every other rung is measured from it. So a run can't start on the first day Rungfolio has prices for: its first session needs a close before it.

A dropped floor

A ladder's price floor is a price in today's terms. After a split, a floor from years ago would sit in the wrong place. So when you prefill a backtest from one of your ladders, its floor is dropped, and the results say so. You can type a floor for the run, in the prices of the close before its first session, its starting price. A split during the run moves the floor with the ladder's other prices.

One ladder, its own account

A run is one ladder on its own: its own starting cash and its own capital cap, shared with no other ladder. In a practice account, ladders share the account's cash and cap in priority order, so the same settings there can buy less.

The prices Rungfolio has

A backtest needs the ticker's minute bars, and Rungfolio has them only for the tickers it stores:

  • The nine tickers it started with: from January 2016.
  • A ticker someone added since: from the session its first ladder traded in.
  • A ticker that rested: not for the sessions it rested through.

A range has to fall within the ticker's minute bars. One that starts before they begin, or crosses the sessions a ticker rested through, is refused, and the form offers the range after them. A ticker woken after resting can have its minute bars start partway through a month: a run that starts in that month starts at the first session with minute bars, and the assumptions say so. Any other session without minute bars, such as a day trading was halted, still runs, with no order filled though prices moved, and the assumptions count those sessions.

A run's first session also needs the close before it, its starting price. With the moving-average pause on, it needs as many closes before it as the average has days, so with the default 150-day average, a run on one of the nine can start about seven months after January 2016 at the earliest. When a start is too early, the form says the first one it can use.

A run can end at the latest night the nightly job has finished.

The monthly download budget

A run downloads the ticker's minute bars a month at a time. Your browser keeps them, so running again, or changing a setting, downloads nothing new.

Each person can download 300 MB a month, about 100 five-year runs on 5-minute bars. The budget resets on the 1st of each month, New York time. 1-minute bars cost several times what 5-minute bars do, so a run on them uses more of it. Past your budget, the form says when it resets.

Rungfolio also has a limit for everyone together, 2 GB a month. If this month's downloads reach it, backtests pause for everyone until the month ends.

Educational software, not investment advice.