For the volatility
value you can use the Historical_Volatility
field from the underlying asset's fundamental data. DTN's official description of this field is: “30-trading day volatility, calculated using Black-Scholes
”. Apparently, the actual calculation (which is updated once a day, after midnight) for options computes the volatility of day-to-day price change values of the last 30 trading days, using the last 31 daily close prices, as follows:
, rounded to the nearest 0.01. For futures, the calculation is similar but apparently based on 90 (not 30) values. When a contract is newly-listed, fewer values are used, with a minimum of 4 values.
You can also calculate the historic volatility yourself, using historic prices of the underlying asset (use IQFeed's historic bars query for this). In this case, you can use a different number of historic prices for the calculation, ignore outlier values etc., without relying on DTN's built-in opaque calculation.
As an alternative to using the historic volatility, you can also calculate the implied volatility
using Black-Scholes. This will typically be easier for European derivatives than for American/Asian/exotic ones.
In my IQML connector I enable the user to choose whether to use IQFeed's built-in Historical_Volatility
field, or a calculated Implied Volatility, or a fixed value.
For the risk-free rate
, you can either set a fixed rate (in the current financial situation, a simple value of 0 may be close enough for practical purposes), or use the current value of assets such as LIBOR/IRX.XO.
for some detailed discussion of these matters.
IQML - IQFeed-MATLAB connector
I am not a DTN employee; my post reflects my personal opinionEdited by altmany on Feb 21, 2021 at 02:58 AM