Rearview Join the waitlist

Trading it live

Once you trade a strategy, Rearview can follow your real account. A live account replays your broker's fills through the same accounting as a run. It makes each session's orders from what you actually hold, and shows how your trading tracks the backtest, fill by fill and month by month. It never places an order.

A live account's pages and files carry this line in place of the backtest warning: *Your fills, replayed with your data and Rearview's accounting. Your broker's statement is the record. Orders come from your script and your data. Verify before placing.*

Starting a live account

Select a run of the script you trade and choose Run ▸ Trade Live…. Give the account a name, its first session and your starting cash:

  • First session: by default the session after your data's last day, for a strategy you start trading tomorrow. If you already trade it, choose the day you started, then import every fill since then.
  • Starting cash: what you set aside for this strategy. The account starts flat, with this cash, the session before the first.

The account takes the run's script, params and run settings. The script is pinned: later edits in the editor don't change what the account trades. To trade a changed script, start a new live account; the old one stays as it was.

Only a script's run can be traded live. Portfolios can't, because a fill doesn't say which strategy it belongs to. Nor can signals runs or walk-forwards. A strategy that fills at the close of the day it signals can't either: it leaves nothing to place. Nor can a strategy that can hold futures yet: a broker reports each contract and each roll as trades of their own, which a live account doesn't read. Its next-day orders still name the contract to trade. Nor can a strategy that can hold forex pairs, or a security priced in another currency than the account's: a live account reads fills in the account's currency only. One on several exchanges in the account's currency can, each fill on its own exchange's sessions. Live accounts need your newest data, so they are unavailable while the project's lockbox is sealed.

Nor can a run on intraday data (INTRADAY_NOT_LIVE) or a strategy that's flat at close (FLAT_AT_CLOSE_NOT_LIVE): neither leaves orders for the next session to place.

The account appears under Live in the navigator. It is a folder in the project's live/ folder, holding live.json (the account), script.rvw, fills.csv and statement.csv (what you imported), and what Rearview makes from them: replay/, your account as a run; backtest/, the strategy from your first session with your cash; and tracking.json.

The daily routine

This is what the evening routine does for you.

  1. After the close, update your data (Update from Source, as Keeping your data up to date describes).
  2. Export the day's activity from your broker and import it: File ▸ Import Broker File… (⇧⌘I), the button on the account's page, or drop the file onto the page. Your broker's file says which files Rearview reads. Importing the same fills again adds nothing, so a month-to-date export each day is fine.
  3. The account updates itself after an import and after the data changes: it replays your fills, then makes the next session's orders. Update does it by hand.
  4. Open the Orders tab and export the orders, as Next-day orders describes.

The import sheet says what each file added, what was already there and what was skipped, and why: options, other currencies, coins in an Interactive Brokers file, and fills before your first session. A fill finer than its security's step in the account's run, such as 0.12345 shares at a step of 0.0001, isn't imported, and the sheet gives its line. A fill after your data's last day waits: update the data, then import the file again. A ticker your data doesn't hold isn't imported, and the sheet gives its line.

Updating replays your account, so it needs a licence or the trial, as a run does. Importing, viewing and exporting don't.

The evening routine

Run ▸ Evening Routine… does the daily routine for you. Set it up once:

  • Data: the folder your data updates from (the data's own, unless you choose another), and whether its files hold only the newest days.
  • Live accounts: which accounts to include, the folder each broker's file lands in, and a name pattern such as U1234567*.csv. The routine reads the newest file that matches.
  • Orders: where to write each account's next-session orders and in what form, a list or an Interactive Brokers basket.
  • Scans: which of the project's scans to run on the new day.

Run Now does, in order:

  1. Reads the data's source and puts the update in place only if nothing up to the data's last day changed. A changed history is never applied: the routine stops, and you update the data by hand from the data library.
  2. Reads each account's newest broker file.
  3. Replays the account, as Update does.
  4. Writes the account's orders.
  5. Runs each scan, with its saved params, on the data's last day, into evening/scans/<day>/<scan>.csv in the project.

It stops at the first thing that needs you: a history that changed, a missing broker file, a file that won't import, a sealed lockbox, orders that aren't due. The scans come last, so one that fails never keeps the orders from being written; it stops alone and the next scan still runs. What it did, step by step, is shown in the sheet and kept in evening/last.json in the project, with each scan's rows and file. It never places an order.

On a schedule. Switch on *Run on a schedule*, choose the days (weekdays, or every day for an account that trades coins) and the time, and choose Save. Rearview writes a job to ~/Library/LaunchAgents that, at that time, opens Rearview out of sight, runs the routine and quits. If the project is already open, the routine runs there and Rearview stays open. It runs while you are logged in, and when the Mac wakes if it was asleep. If the routine stopped, the project shows what happened the next time you open it. Switch the schedule off and Save to remove the job.

The settings are in routine.json in the project folder, a plain text file you can keep with the project's scripts.

What the replay does

Each day, Rearview does two things with your account:

  • The strategy's day. Starting from your positions and cash that morning, it fills the day's orders as a run would, with the run's costs, slippage and limits. These are the strategy's fills: what it would have done in your account that day.
  • Your day. Your fills then apply at their own price and commission, after the day's trading. Nothing about them is checked or changed: no funds, volume or buying-power limits.

The account then carries on from your positions, not the strategy's. Stops, targets and the rest are set from your own entry prices. Sizing, open slots, adds, scale-outs and rebalances all read your equity and holdings. So the orders for the next session come from the account you really have.

A sell you missed is carried. When the strategy wants out of a whole position (an exit signal, a time exit, a stop, a target, a rebalance) and you didn't sell, the sell stays on each day's orders, marked with the session it was first due, until your fills close the position. A stop that would have filled is carried as a market-on-open sell, so a price that recovers doesn't make the stop forget it was hit. A buy you missed is not carried, because each day's entries are a new decision on that day's close. Partial sells (a scale-out, a trim) aren't carried either.

Each of your fills is labelled with the reason the strategy had for it: an entry signal, a stop, a carried exit signal. A fill the strategy didn't call for is labelled Manual. Everything in the account counts as the strategy's: the strategy's exits apply to a manual position too. If a fill doesn't belong to this strategy, Control-click its row on the Fills tab and choose Remove Your Fill. It stays out when a broker file holding it is read again, and the import sheet says how many it left out. To put one back, choose it from the Removed menu on the Fills tab. A fill put back follows any others of its date and time.

The Fills tab

One row per day, security and side: what the strategy would have done, what you did, and how they compare.

StatusMeaning
MatchedYou traded the same number of shares or coins as the strategy.
SmallerYou traded fewer.
LargerYou traded more.
MissedThe strategy bought, added or trimmed, and you didn't. Not carried.
Sell carriedThe strategy sold a whole position and you didn't. It's on the next session's orders.
LateYou made a carried sell. The row says how many sessions late.
Not orderedYou traded and the strategy didn't.

The price gap is what your prices cost you, on the shares you and the strategy both traded. It is the difference between your average price and the strategy's, times those shares. A positive gap is worse for you: you paid more on a buy, or got less on a sell. For example, if the strategy bought 100 shares at $50.00 and you bought 80 at $50.10, the row says Smaller, with a price gap of 80 × $0.10 = $8.00. The 20 shares you didn't buy are missed value: 20 × $50.00 = $1,000. A late sell's gap is measured against the price the strategy got on the day it first called for the sell, so it shows what waiting cost.

The strategy's prices include the slippage in your run settings, so a price gap near zero means your settings model your fills well. A gap that is positive day after day means they are too kind.

How live tracks the backtest

The Tracking tab sets your account beside the backtest, the strategy run from your first session with your cash, your deposits and withdrawals, and its fills as Rearview models them.

  • The headline says how far ahead or behind the backtest you are, in dollars and percent: "Your account is $87 (0.17%) behind the backtest since Oct 1, 2025."
  • The chart shows both equity lines, the backtest dashed, and your drawdown under them.
  • Figures: equity, return, Sharpe, deepest fall and trades, yours beside the backtest's. Returns are time-weighted, so a deposit is not a gain.
  • Day by day: the correlation and beta of your daily returns against the backtest's, and the tracking error, how far they strayed, scaled to a year.
  • Execution: fills matched, the total price gap and commission gap, what you missed and traded without an order, and how late your carried sells were.

Your account falls behind the backtest for three kinds of reasons: worse prices than the model's (the price gap), orders you didn't place or placed differently, and things the model doesn't know about your account. The Fills tab shows the first two day by day.

The statement check

Add the cash sections to your broker's file and Rearview compares the model's interest, borrow fees and dividends with your statement's. The Statement tab lists them by category and month, with the totals over the months your statement covers:

  • Interest: the model's interest on cash and margin beside your broker's. Interactive Brokers posts a month's interest early in the next month, so posted interest is a month behind. With the Interest Accruals section in the file, both are compared by the month the interest accrued.
  • Borrow fees, by the day they are charged.
  • Dividends: the model credits a dividend on its ex-date, while your broker pays it on the pay date, often weeks later. Each payment on your statement is paired with the model's dividend on the same security with the latest ex-date before it, within 90 days.
  • Withholding tax and other fees are listed from your statement alone; the model has neither.

A large gap in interest usually means the run settings' rates differ from your broker's. To fix it, set the cash and margin rates in Run Settings to your broker's, run the script again, and start a new live account from that run.

What the replay can't know

  • Your broker's own handling of corporate actions. The replay applies splits, dividends and delistings from your data. A spinoff, merger or special payment your data doesn't record shows up as a difference against your statement.
  • When in the day you traded. Your fills apply after the day's trading, whatever time you made them. On a day the strategy's stop fills and you also sold, the two are compared by price, not by which came first.
  • Fills that look wrong. A price outside that day's low–high, a fill on a day your data has no bar for that security, a cash account below zero, or an account below its margin requirement shows as a warning on the Tracking tab. The replay never sells for you: a margin call's sells appear only as the strategy's orders.

From the command line

rvw live new <dir> --store <store> --run <run folder> [--first-session YYYY-MM-DD] [--cash <dollars>]
rvw live import <dir> --store <store> --file <broker file>
rvw live update <dir> --store <store>
rvw live show <dir>
rvw orders --run <dir>/replay --store <store> --template ibkr-basket --out basket.csv
rvw live report <dir> --out live.html

replay/ is a run folder, so rvw orders, rvw report, rvw export and rvw repro work on it as on any run: rvw repro <dir>/replay --store <store> --out <new folder> replays your fills again and compares every file. rvw live remove <dir> --fill <seq> removes a fill by its number in fills.csv, keeping it in removed.csv so a later import leaves it out; rvw live restore <dir> --removed <number> puts one back, by its number in rvw live show's removed list.