Variables
MesoSim exposes the following Variables, which can be used in expressions.
You can find the list of available variables in the Job Editor.
The range of available Variables was significantly updated with MesoSim 2.0; if you want to know more about the specific changes, please read the Backward Incompatible Changes section of our Release Notes.
List of available variables
Note that you can see the available constants and their values in a backtest under the Events tab by opening up row details using the arrow on the left-hand side:
Available Constants and their Values
Expiration related variables
expiration_<expiration_name>_dte
Leg related variables
leg_<leg name>_delta
leg_<leg name>_gamma
leg_<leg name>_theta
leg_<leg name>_vega
leg_<leg name>_wvega
leg_<leg name>_rho
leg_<leg name>_pnl
leg_<leg name>_qty
leg_<leg name>_dit
leg_<leg name>_price
leg_<leg name>_strike
leg_<leg name>_iv
Where <leg name>
should be replaced with the respective leg’s name.
Position variables
days_in_trade
profit_target
stop_loss
pos_pnl
pos_delta
pos_gamma
pos_theta
pos_vega
pos_wvega
pos_rho
Account variables
nav
pos_in_flight
acc_delta
acc_gamma
acc_theta
acc_vega
acc_wvega
acc_rho
Underlying variables
underlying_price
underlying_today_open
underlying_prevday_close
underlying_iv
underlying_iv_rank
underlying_iv_pct
underlying_hv