Analytics with DataVoyager
The Analytics tab in MesoSim turns backtest events and recorded variables into interactive charts using DataVoyager. Drag fields onto chart axes, filter the events you want to study, and explore relationships between a strategy's starting conditions and its outcomes.
This guide walks through a useful question: does a position's delta or vega at entry help explain its final PnL? A repeatable relationship can suggest a trade filter worth testing.
Open Analytics
Open a completed run from MesoSim Backtests, then select Analytics on its results page. The run's events load automatically.
The main areas are Fields, Encoding, Filter, Specified View, and Related Views. Start with a specific question and a few fields; related charts can help you decide what to examine next. See Deltaray's DataVoyager introduction for background.
Compare entry Greeks with final PnL
1. Capture the entry variables
Add the variables you want to investigate to Entry.VarDefines. This strategy fragment captures the position's delta and vega:
{
"Entry": {
"VarDefines": {
"entry_delta": "pos_delta",
"entry_vega": "pos_vega"
}
}
}
Merge these definitions into your existing Entry section, keeping its other settings. entry_delta and entry_vega are custom names; their expressions read the built-in position Greeks. See the Script Engine variable reference for their units and quantity scaling.
Use Clone to add the capture and run a new backtest. An older run cannot acquire variables added afterward. Keep these entry variables unchanged in Adjustment and Exit definitions so they remain snapshots of the position's starting state.
Record only the variables needed for your question. Unnecessary capture increases simulation time and adds data to sift through. Start with one candidate variable, then expand the analysis if the results justify it.
2. Select position-closing events
In Analytics, find event_type in Fields. Click its funnel icon or drag it to Filter. Choose Clear All, then select only ExitPosition.
Each event is a separate record. Filtering to ExitPosition pairs the saved entry variables with the final pos_pnl of that position. Without this filter, entry, adjustment, and daily snapshots can appear alongside closing records, giving some positions many observations and mixing interim PnL with final outcomes.
Use pos_pnl for this comparison. The separate field pnl records account-level running PnL. Filtering to ExitTrade would select individual closing trades instead of the position-closing record. See Events Viewer for event context and Voyager's filter guide for its controls.
3. Build the scatter chart
- Drag
entry_deltafrom Fields to x in the Encoding panel. - Drag
pos_pnlto y. - Keep both fields quantitative and use their raw values, with no BIN, MEAN, or SUM transformation.
- DataVoyager selects a point chart automatically. If needed, choose point in the Mark selector.
The Specified View now shows entry delta horizontally and final position PnL vertically. Each plotted observation comes from a position-closing record; identical coordinates can overlap. Positive PnL is above zero and negative PnL below it.
To investigate vega, replace the x field with entry_vega, keeping y and the event filter unchanged. Change one variable at a time so comparisons remain clear. Voyager's visual encoding guide explains the field menus and mark choices.
Read the relationship
Look for changes in the typical outcome, the spread of outcomes, and the size of losses as x changes. A scatter chart reveals associations; it does not establish causation or prove that a rule will predict future trades. The NIST scatter-plot guide illustrates these distinctions.
The following plots use synthetic data to illustrate patterns. They are not MesoSim backtest results or evidence that delta predicts PnL.



Linear patterns
An upward or downward band suggests that typical PnL changes with the entry variable. A tighter band makes the association easier to see; a wide band means individual outcomes remain uncertain. Check that the pattern spans many observations and is not driven by a few extreme trades.
Nonlinear patterns
A curve, threshold, or distinct favorable range can also be informative. For example, intermediate values might perform differently from both extremes. A single straight-line correlation can miss such a relationship, so inspect the full shape before choosing a filter.
Also examine changing dispersion: similar average PnL with much larger losses in one region could matter for risk filtering even without a clear trend in the average.
Noise and weak evidence
A shapeless cloud with similar outcomes across x provides little visible evidence that this variable distinguishes trades in this sample. Sparse clusters, isolated winners, and patterns that disappear in another period are weak evidence. If almost every trade has the same entry delta, the run contains too little variation to assess its effect.
Potential predictive power means the entry variable helps distinguish future outcomes on data that was not used to choose the relationship or threshold. An attractive pattern in the discovery run is a hypothesis to validate.
Explore with DataVoyager
Keep event_type = ExitPosition while exploring final trade outcomes. Fields retain their strategy names, such as entry_delta; event metadata uses names such as event_type, sim_time, and position_id.
| What you want to see | How to build the view | What to check |
|---|---|---|
| Distribution of trade outcomes | Put pos_pnl on x, choose BIN in its field menu, put COUNT on y, and use bar marks. | Frequency of gains, losses, and unusually large outcomes. |
| Typical PnL across entry ranges | Put entry_delta on x with BIN, and pos_pnl on y with MEAN. Use bar or point marks. | Whether adjacent ranges show a consistent pattern. Keep the raw scatter for context. |
| Number of observations behind each range | Keep the same binned x field and replace y with COUNT. | A high mean based on two trades carries less evidence than one supported by many observations. |
| Whether a pattern persists across periods | Add sim_time to Filter and compare date ranges. Alternatively, use its YEAR time unit on column to create separate panels. | On ExitPosition records, sim_time is the closure time. These are exit-period comparisons. |
| An additional captured condition | Add an entry variable to color, or put a categorical/binned field on row or column for separate panels. | Whether the relationship changes within groups. Keep the number of groups manageable. |
Click the arrow beside a field on an encoding shelf to open its Function menu. Choose – for raw values, BIN for ranges, or an aggregation such as MEAN. A temporal field offers time-unit functions. Check the field labels after each change: MEAN(pos_pnl) answers a different question from individual pos_pnl values.
Related Views suggests additional fields and summaries for the current chart. Use Wildcard Fields or the any shelf when you want alternative encodings suggested. These are chart suggestions, not statistical tests of predictive value. Start with the captured entry variables relevant to your hypothesis; scanning many charts increases the opportunity to find chance patterns. See Voyager's interface overview and wildcards guides.
Turn a finding into a trade-filter experiment
- Choose a simple hypothesis. State the variable, the range to test, and why it might matter. Check sample counts, outliers, and comparable position sizes: larger positions can increase both Greek exposure and dollar PnL.
- Reserve a later period. Choose the rule on an earlier discovery period and assess it on a later period that you have not used to tune the rule. When trades overlap, separate the periods so the same positions do not straddle the split.
- Clone and add one filter. Keep sizing, costs, entry timing, exits, and adjustments the same so you can assess the filter's effect.
- Compare the full backtests. Review trade counts, returns, drawdowns, and consistency across periods using Tearsheets and Quantitative Metrics. Repeat with nearby thresholds to check that the result does not depend on one exact cutoff.
Put the filter at the right entry stage
For a condition based on the selected position's delta or vega, use Entry.AbortConditions. These run after leg selection, sizing, and entry variable definitions. Any true abort condition prevents entry.
For illustration, this fragment rejects a selected position when its entry delta is outside -10 to 10. The bounds illustrate syntax; choose and validate bounds for your strategy.
{
"Entry": {
"VarDefines": {
"entry_delta": "pos_delta"
},
"AbortConditions": [
"entry_delta < -10 or entry_delta > 10"
]
}
}
Merge the fragment with your existing definitions and abort conditions. Entry definitions are evaluated before abort checks and again after entry fills; the retained entry snapshot reflects the filled position. Use Entry.Conditions for filters based on values already available before leg selection, such as Implied Volatility measures. Position Greeks and variables first defined in Entry.VarDefines are not available at that earlier stage.
Filtering points in DataVoyager changes the chart only. Rerun the strategy to measure the effect of a trade filter: removing entries can change later entry opportunities, capital availability, and concurrent positions.
Check unexpected charts
- The entry field is missing or empty: check that the run includes your
Entry.VarDefines, that the name matches, and that the selected events carry it. Inspect a position's records in Events Viewer. Missing values are not zero. - The chart contains many observations per position: check the
event_typefilter and useposition_idto inspect an individual position's lifecycle. Daily and adjustment records are repeated observations, not independent completed trades. - Only a few points or bars appear: check for aggregation, binning, overlapping points, and active filters. Numeric entry fields and
pos_pnlshould be quantitative for the raw scatter. - A favorable group has very few trades: show its count and inspect the raw outcomes before drawing conclusions. Do not filter out losses just to make a relationship clearer.
For statistical modeling, uncertainty estimates, or comparisons beyond the chart controls, use Events export with Python or Excel. Its capture guidance also covers recording values at adjustments and exits. For more research examples, visit the Deltaray blog and Deltaray.