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.
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:
Expiration related variables
expiration_<expiration_name>_dte
Leg related variables
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>_
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
leg_<leg name>
Where <leg 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