Why the three differ

A backtest replays a strategy over settled history you chose with its rules in mind, in a simulated account. A forward test runs the same frozen version through each session that settles after you start it: data the rules had never seen. Paper trading is a deployment through the Trade app, whose orders Alpaca's paper simulator fills. It tests execution as well as the rules.

None of the three risks money. A deployment to a live account is refused.

What is not modelled

A backtest and a forward test share one simulation. It reads price bars, not quotes, and charges three costs: the commission its cost profile names, the run's slippage, and a borrow fee on shorts when Margin account is on. Run properties, on the Report, states them under Costs modelled. The simulation leaves out:

  • Bid-ask spread. No spread is ever crossed. The slippage figure is a stand-in you chose, not a measurement.
  • Market impact. A fill never moves the price, whatever its size. Measured one-way impact runs 8 to 13 bps, often more than the whole slippage allowance.
  • Queue position. A limit filled when the bar touches your price assumes nobody was ahead of you. The recommended rule waits for the bar to trade through it.
  • Partial fills. Every fill is whole: an order the account cannot cover is rejected, never trimmed. Only Limit entry allocations, when on, reduces an entry's share count at the fill.
  • Regulatory fees. SEC Section 31 and the FINRA TAF on a sale, roughly 0.2 bps of the proceeds, are charged under no profile.
  • Extended hours. Only regular hours, 09:30 to 16:00 ET, are simulated.

Alpaca charges no commission on US equities, and its paper account charges no borrow fee, so a short strategy scores worse in a backtest than on paper. Alpaca paper also pays dividends on the pay date, while the backtest books them on the ex-date. Run properties lists both under Where this differs from paper trading.

Side by side

FeatureBacktestForward testPaper
DataSettled sessions: daily bars from 2016, minute bars from 2023-09-05New sessions, each added after it settlesOrbital's live minute bars, or the previous session's final prices for a daily strategy
FillsSimulated: the next bar's open, with slippage against you, unless you pick another policyThe same simulationThe broker's fills
VersionThe one the Run dialog namesFrozen at the start; a new version needs a new testThe one you deployed; to run another, stop and deploy that
NeedsA saved strategyA completed run of a Rules or Program strategyA completed backtest, the Trade app on in the project, and a connected Alpaca paper account

Rules and assumptions

Fills at the next bar's open

A strategy decides at a bar's close, and a market order fills at the next bar's open plus slippage, as the Report's Fills row states. See One bar of delay.

Day market orders on paper

A Rules or Program deployment sends day market orders in whole shares that Alpaca's paper simulator fills, so a fill can land away from the backtest's price. See Orders on Alpaca paper and Why a deploy is refused.

Open positions at the end of a run

Every run keeps the positions it holds at the last close. They are marked at that close, with their entry costs charged but no exit slippage or commission. An exit decided at the last close does not fill; the position is reported open.

On the Report, the At the end row reads Positions kept open, marked at the last close. On the Trades tab they read Open under Closed by, with Marked on the exit leg. Net profit includes their open P&L, shown as Of which open. Closed-trade statistics such as win rate, profit factor and expectancy leave them out. End of run as an exit reason appears only on an older run that sold its positions at the last close.

A deployment never ends this way: Stop is final, sells nothing, and leaves what the strategy holds to its own exits. See Manage a deployment.

Margin defaults

A run uses a cash account unless Margin account is on. With margin on, the initial requirement is 50% and the maintenance requirement 25%. Shorts pay a borrow fee of 3% a year on their market value, accrued per calendar day. These figures are fixed; Margin account is the only margin setting a run takes.

A maintenance breach liquidates at the next open, deepest loss first, and each such exit reads Margin call. If equity reaches zero, the run liquidates everything and stops trading; those exits read Account blown, and ratio metrics are suppressed.

A Rules strategy that sells short is refused without margin on. A Program's short orders on a cash account are rejected during the run instead. On paper, a short is placed like any other entry under Always-approve, within the deployment's limits.

Benchmark

Every run names a benchmark, SPY unless you change it. Another benchmark makes a new configuration of the same version, with its own trial count; see Versions and configurations.

From Claude or ChatGPT