The purpose of this project is to retrieve a probability mass function from market call and put european option prices. I use tensorflow and tensorflow_probability to learn the implied PMF.
Where z will be a learned vector, s_i will represent x_i will is an element of the mesh spanning the moneyness of strike prices. Thus, the option prices can be estimated like such (N=1000 in the code)...To achieve "smooth" functions I utilized a neat regularization trick where I sum the square distances between neighboring parameters.
I chose to weigh the square difference between points by the inverse of the absolute difference between corrosponding mesh points because the mesh is not linear (its geometric so that I may concentrate on PMF on values near at-the-money).I use tensorflow_probability to optimize this equation with L-BFGS.
VIX is interesting to study because the index has a clear negative skew but spikes very hard occassionally. Pricing options using a regular lognormal black-scholes model would yield terrible returns. From observing the implied PMF I retreive, we clearly see that the market does not use a lognormal distribution to price these options, but rather a multimodal one.
Gamma = 1e-5 LCA coefficient = 0.9 (Here I used absoute value instead of square difference on the log term for put and call loss, moreover I weighted the log loss to 0.9 and the normal square difference 1-0.9=0.1)
SPX serves as a sanity check for this project. Because SPX is an index of 500 carefully selected stocks, it should be very stable and obey traditional financial intuitions (a lognormal return). The results gathered in this project showcase how the PMF of SPX obeys these notions of lognormality more so than the VIX.
gamma is set to 1e-4 for SPX European Options, lognormal coefficient (square difference) = 0.5