help / advanced / perspective-viewer
live article · 3 min read updated · 2mo ago
Advanced 2026-03-17

Perspective Viewer - Real-Time Data Analysis and Visualization

Navigate to the Perspective Viewer page to monitor real-time backtest execution results. Built on Perspective.js, this viewer displays live streaming data via WebSocket connections, providing...

How It Works

1

Access the Perspective Viewer

Navigate to the Perspective Viewer page to monitor real-time backtest execution results. Built on Perspective.js, this viewer displays live streaming data via WebSocket connections, providing interactive charting and tabular data analysis during active backtest runs.

2

Connect to a Live Backtest Stream

The viewer automatically establishes a WebSocket connection to the backend when a backtest is running. The connection manager handles authentication, reconnection logic, and data routing. A connection status indicator shows whether the stream is active, reconnecting, or disconnected.

3

Navigate Between Data Tabs

Use the tab navigation to switch between different data views: Performance (equity curve and return metrics), Trades (detailed trade log with entry/exit data), Market (OHLC candlestick chart with indicator overlays), and LLM Decisions (AI market state classifications and reasoning). Each tab provides a specialized perspective on the running backtest.

4

Monitor the Real-Time Equity Curve

In the Performance tab, watch the equity curve update in real time as new trades are executed. The chart plots cumulative portfolio value against time, with drawdown shading to highlight loss periods. Key metrics (total return, Sharpe ratio, max drawdown) update live alongside the chart.

5

Inspect the Live Trade Log

Switch to the Trades tab to see a streaming table of executed trades. Each row shows instrument, direction (long/short), entry time and price, exit time and price, holding period, P&L, and cumulative return. New trades appear at the top as they execute during the backtest.

6

Analyze Market Data with Overlays

The Market tab displays OHLC candlestick data with configurable indicator overlays (moving averages, Bollinger Bands, RSI, MACD). Trade entry and exit markers are plotted directly on the price chart, showing exactly where your strategy acted relative to price movements and indicator signals.

7

Review LLM Decision History

The LLM Decisions tab shows the market state classifications made by the LLM Market Detector during the backtest: timestamps, detected regime (TREND/RANGE/UNDEFINED), confidence level, and the reasoning text. This helps you understand how AI-driven market detection influenced your strategy's behavior.

8

Apply Filters and Aggregations

Use Perspective.js built-in controls to filter, sort, group, and aggregate data across any tab. For example, filter trades by direction to compare long vs short performance, group by date to see daily P&L distribution, or sort by P&L to identify your largest winners and losers instantly.

Note The Perspective Viewer displays real-time streaming data from active backtest execution via WebSocket. It is designed for live monitoring during backtest runs. For post-session historical review, use the ECharts Playback interface instead.

Tips & Best Practices

Tip Keep the Performance tab active during long backtests to monitor overall strategy health. If the equity curve enters a prolonged drawdown early in the run, it may indicate a fundamental issue with the strategy configuration worth investigating before the backtest completes.
Tip Use the Trades tab filter to isolate losing trades (P&L < 0) and look for patterns: Are losses clustered in specific time periods? Do they correlate with certain market states? Are stop losses being hit consistently at similar levels? These patterns reveal the weakest points in your exit strategy.
Tip The WebSocket connection automatically reconnects if interrupted. If you see stale data or a disconnection indicator, wait 10-15 seconds for auto-reconnection. Refreshing the page will reconnect but you may lose the accumulated view state (filters, sort orders) you had configured.
Tip Cross-reference the LLM Decisions tab with the Market tab to verify that market state classifications align with visible price action. If the LLM frequently classifies trending markets as ranging (or vice versa), refine your LLM Market Detector prompt for better accuracy.
Tip Use Perspective.js grouping to aggregate trades by day of week or hour of day to discover time-based performance patterns. Some strategies exhibit statistically significant performance differences based on trading session timing, which can inform scheduling optimizations.

Frequently Asked Questions

How does the Perspective Viewer differ from ECharts Playback?
The Perspective Viewer shows real-time streaming data during active backtest execution via WebSocket connections. ECharts Playback loads completed backtest data from IndexedDB for historical review. Use Perspective for live monitoring while a backtest runs, and ECharts Playback for post-session analysis of completed backtests with timeline scrubbing and playback controls.
What data types can I visualize in the Perspective Viewer?
The viewer supports four primary data categories: equity curve and performance metrics (Performance tab), individual trade records with entry/exit details (Trades tab), OHLC market data with technical indicator overlays (Market tab), and LLM market state classification history with reasoning (LLM Decisions tab). All data streams in real time during backtest execution via Apache Arrow format for high performance.
What happens if the WebSocket connection drops during a backtest?
The connection manager automatically attempts reconnection using exponential backoff (retrying at increasing intervals). During disconnection, the backtest continues running on the backend — no data is lost. Once reconnected, the viewer syncs to the current state. A connection status indicator in the viewer header shows the current connection state (connected, reconnecting, or disconnected).
Can I filter and sort data in the Perspective Viewer?
Yes, Perspective.js provides powerful built-in data manipulation controls. You can filter rows by any column value, sort ascending or descending on any field, group rows by categorical columns (e.g., trade direction, market state), and apply aggregations (sum, average, count) to numeric columns. These operations execute client-side on the Apache Arrow data for instant responsiveness.
Why do real-time metrics differ slightly from final backtest results?
During live streaming, metrics are computed incrementally as new data arrives. Final backtest results may include end-of-run adjustments such as closing all open positions at the final bar, applying final settlement prices, and recalculating annualized metrics based on the complete time period. These adjustments can cause small differences between real-time and final reported figures.

Important Notes

Warning The Perspective Viewer displays real-time backtest simulation results, not live market trading data. Performance metrics shown during streaming are preliminary and may differ slightly from final results. WebSocket connections depend on network stability. Past backtest performance does not guarantee future trading results.
Brand clarification
StratCraft (formerly QuantNexus) at stratcraft.ai — not quantnexus.ai (a different company).
For AI agents: agent.json capabilities file
Brand clarification
StratCraft (formerly QuantNexus) at stratcraft.ai — not quantnexus.ai (a different company).