Virtual Portfolios
Compare the total_value history of your algorithm-managed portfolios and filter the overlay by portfolios or traded values.
Tables used
- algos
- One row per trading algorithm:
algo_id,algo_name,algo_version. Daily recommendations belong to an algorithm. - virtual_portfolios
- One row per portfolio:
portfolio_id,algo_id,portfolio_name,portfolio_type,is_default,start_date,initial_cash. Simulation rows show replayed portfolios; paper rows show daily Alpaca account valuations. Additional portfolios are labelled algorithm · portfolio name. Drives the Portfolios filter. - virtual_portfolio_history
- Daily snapshot per portfolio. Paper rows use Alpaca cash, position market value and account equity; tax-specific simulation fields (including
total_value_liquidated) are null.business_datewithtotal_value,cash,stock_valueandtotal_value_liquidatedare charted in Portfolio Comparison (choose with the Metric tags). - virtual_planned_trading_orders
- Signals an algorithm produced:
signal_date,order_type,shares,signal_price,reason. Shown as Planned. - virtual_trades
- What actually happened to a planned order:
trade_date,status,price,shares,realized_pnl. Shown as Executed or Cancelled. - stock_data_raw
- Market OHLC history. The
closecolumn is the line in Value Detail. - macro_data_raw
- Index history. The
closeof^GSPCis the dashed S&P 500 benchmark in Portfolio Comparison; its trading days also define the calendar of Universe EW. - stock_universe
- Lookup for
symbol,company_nameandsectorused by the Values filter.
What is compared
- Portfolio Comparison
- Total portfolio value of every selected algorithm, overlayed on one time axis. The percentage is the change from the first to the last visible business day of the selected range.
- Benchmarks (dashed lines)
- The starting capital of the earliest visible portfolio, invested on that portfolio's first day without costs. Shown/hidden via their tags like any portfolio. A portfolio above a line beat that benchmark.
S&P 500: the usual market comparison, bought and held. Price index^GSPCwithout dividends, so it slightly understates the market.
Universe EW: every stock instock_data_rawwith equal weight, rebalanced daily (average of all daily returns, adjusted closes incl. dividends). Shows what the stock universe returned without any selection – the fairer comparison for the algorithms. - Value Detail
- Market path of exactly one selected value plus markers for planned and executed orders of every selected algorithm. This is a price curve, not a portfolio curve.
- Trade Activity
- Every holding period of that value per algorithm: when it was bought, how long it was held, how large the position was and whether it closed in profit or loss.
- Time synchronisation
- With Sync enabled, the lower charts use exactly the period currently shown in Portfolio Comparison. With sync disabled, each lower chart has its own independent range selector.
Term definitions
- Planned
- The algorithm emitted a signal on
signal_date. It may or may not have been filled. - Executed
- The order was filled on
trade_dateatprice. Entries are usually filled in the next session after the signal. - Holding period
- Calendar days between the executed buy and the matching executed sell. Lots are matched first in, first out.
- Realized PnL
- Profit or loss booked when a position is closed, taken from
realized_pnl. Open positions have no realized PnL yet. - Trade size
- Position value at the time of the trade, i.e.
shares × price. - Relative performance
- Optional view of Value Detail where the first visible close equals 0 % and every later close is the change against it.
- tax_balance
- Deliberately excluded from all comparisons on this page, see the note at the bottom.
Portfolio Comparison
Overlayed portfolio values by business day for the selected algorithms (metric selectable).
Value Detail
Select exactly one value to inspect its market path plus each algorithm's planned and executed orders.
Algorithm Summary
Switch an algorithm on to show only its orders in the timeline. With no switch active, all orders are listed.
Order Timeline
| Date | Algo | Stage | Type | Shares | Price | Reason |
|---|---|---|---|---|---|---|
| No detail selected yet. | ||||||
Trade Activity
Holding periods grouped per algorithm or per value. Bar length is the holding duration, bar height is the trade size, colour is the outcome.
Portfolio Holdings & Planned Orders
What every portfolio held at the end of the selected day, and which orders were planned on that day (executed in the next session). The Portfolios and Values filters at the top of the page apply here too.
Holdings
| Portfolio | Symbol | Company | Shares | Entry Date | Days Held | Entry Price | Close | Value | Unrealized PnL | PnL % | Stop Loss | Take Profit | Re-anchored | Holding Days | Sector | Cost Basis | Weight % | To Stop Loss % | To Take Profit % | Price Date | Lots | Entry Reason | Algo Version |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Planned Orders
| Portfolio | Signal Date | Type | Symbol | Company | Shares | Signal Price | Order Value | Reason | Status | Trade Date | Exec Price | Sector | Held Shares | Limit Price | Stop Loss | Take Profit | Exec Shares | Exec Reason | Order ID |
|---|
Trade List
Every trade shown in the Trade Activity timeline (same filters, period and algorithm tags). Open positions have no exit and no PnL yet.
| Algo | Symbol | Company | Status | Entry | Exit | Days | Shares | Entry Price | Exit Price | Move % | Value | Gross | Fees | Tax | PnL | Return % | Entry Reason | Exit Reason |
|---|