ScriptEngine modules
MesoLive uses the same ScriptEngine module surface as MesoSim v3:
timing.*(market calendar / time helpers)options.*(options valuation helpers)
The key difference is that MesoLive runs these modules against live data (Agent market data + live positions), so results can be missing or change as quotes update.
Timing module
Source reference: Timing Module
| Function | MesoLive support | Notes |
|---|---|---|
timing.trading_days_until(...) | Supported | Uses MesoLive’s market calendar service and exchange-local time. |
timing.trading_days_after(...) | Supported | Same semantics as MesoSim (trading-day counting). |
timing.calendar_days_until(...) | Supported | Same semantics as MesoSim (calendar-day counting). |
timing.calendar_days_after(...) | Supported | Same semantics as MesoSim (calendar-day counting). |
timing.trading_days_in(...) | Supported | Same semantics as MesoSim. |
timing.calendar_days_in(...) | Supported | Same semantics as MesoSim. |
timing.minutes_after_open | Supported | Rounded down to 5-minute resolution (matches MesoSim). |
timing.minutes_before_close | Supported | Rounded down to 5-minute resolution (matches MesoSim). |
timing.day_of_week / year / month / day | Supported | Uses exchange-local time. |
timing.days_in_trade | Supported | Uses the tracked position’s creation time in MesoLive. |
Options Valuation module
Source reference (MesoSim): Options Valuation
note
options.* requires a position context (an open position, or a Build/Adjustment preview position). If evaluated without a position context, it returns null.
| Function | MesoLive support | Notes |
|---|---|---|
options.model(...) | Supported | Uses live option snapshots (bid/ask/greeks/IV) from the selected provider. Returns null without a position context or when required data is missing. |
options.model_solver(...) | Supported | Uses live option snapshots and scans the specified underlying range. Returns null without a position context or when required data is missing. |
Supported targets and keywords
- Targets:
positionleg_<LEGNAME>(dynamic leg keyword)
- Time anchors (same names as MesoSim):
- numeric DTE
now,at_exp,first_exp,last_exp
- Metrics:
pnl,delta,gamma,theta,vega,wvega,rho- Rho is currently always
0in MesoLive (rho is not supplied by live providers in the current implementation).
- Solver goal/result keywords:
minimize,maximize,zero(alias:root)return_value,return_price(alias:strike)
Live differences vs MesoSim
- MesoLive depends on your Agent’s current market data; missing quotes/greeks can cause
options.*calls to returnnull.