Rearview Download

Why your results differ from another backtester

Move a strategy from AmiBroker, RealTest or Wealth-Lab to Rearview and its trades rarely match at first. Usually neither engine is wrong: they make different choices about when orders fill, which prices they trade, which stocks exist on a day and how much they buy. Rearview writes each of its choices down in How a script runs and the run settings. These are the usual reasons, most common first, and what to change to match the other tool.

When orders fill

Every rule is evaluated on a day’s close, and orders fill in the next session, at the open by default (fill next_open). Some tools fill on the signal bar by default.

  • fill next_close fills at the next session’s close.
  • fill same_close fills at the signal day’s own close. It isn’t tradable, so results that use it are marked approximate, and its orders never appear in a next-day order list.

Which prices it trades

Rearview stores the prices you actually traded at and works out split- and dividend-adjusted series itself. close is the day’s real close, averages run on split-adjusted prices, and percentage indicators on total-return prices. A tool fed adjusted prices sees different price levels, so price filters such as close > $5, share counts and per-share commissions come out differently.

Most per-symbol exports are already adjusted for splits, and often for dividends too. Rearview can’t tell, so it treats them as traded prices with no corporate actions. See What converted data can’t tell Rearview.

Which stocks exist on a day

With index membership by date, Rearview only trades stocks that were members then. A position in a stock that delists is closed at its last close, less a haircut that depends on why it delisted: none after an acquisition, and by default 30% on NYSE and 55% on Nasdaq after a delisting for poor performance. A tool given today’s members, or files that leave out delisted companies, trades a different universe. The haircuts are in the run settings, under Delistings.

How much it buys

size 10% of equity is 10% of equity at the signal day’s close, in whole shares unless the run’s share step is finer. Sells fill first, then buys in rank order. If there isn’t enough cash after a gap, the share count shrinks rather than the trade being skipped. A tool that sizes from another day’s equity, or skips a trade it can’t afford, buys different share counts.

Ties in rank

When more candidates qualify than there are free slots, rank by orders them, highest first. When candidates rank exactly the same, the one with the lower security id goes first. A tool that breaks ties another way can give the last slot to a different stock, and every trade after it can differ.

Stops

A stop is live from the entry day, and a day that opens beyond it fills at the open.

Costs and the account

The run settings start with no commission and no slippage, no interest on cash, and a cash account of $100,000. Set them as the other tool has them, under Commission and slippage and Account.

The first day

A run starts on the first day a stock or ETF in your data has a bar, or on the start date you choose if that is later. Indicators still need their lookback after the start: when a run starts on a stock’s first bar, sma(close, 200) is unknown for its first 199 bars. When you choose a later start, the bars before it count toward the lookback. See When a run starts.

When none of these explain it

Choose Help ▸ Report a Wrong Result… on the run and email the file it makes to support, with one trade from the other tool that differs: its dates and prices. Support replays it exactly and tells you which rule causes the difference, or fixes it if it’s Rearview’s. Fixes to wrong results are listed in Changes to results.