Example 2
The below scripts use the functions getFeasibleOptionFlags
and getMidPriceQReg
to clean the list of options given in spoptions.txt and return the Q distribution.
In the following script:
sp_np
represents the spot prices in 4 different states of the worldbid_np
represents the bid prices of different optionsask_np
represents the ask prices of different optionsstrike_np
represents the strike prices of different optionspFlag_np
indicates whether an option si a call or a put optionfw
is the forward price
Last updated