Estimating constant Parameters for function with known Output and two variable inputs

조회 수: 1 (최근 30일)
Hey,
i am currently working on the estimation of SVI(stochastic volatility implied) parameters for implied volatilites, which i got from a set of option prices from 1996-2020. I have filtered thus far, that i now have maturities from 8-120 days, for each time-to-maturity i have a log-moneyness roughly between -0.5 and 0.5 and for each combination of those two i have an implied volatility.
What i now need is an SVI paramertization, which gives me an implied volatility for continous log_moneyness and time-to-maturitities pairs.
The original SVI function looks like this:
total_implied_variance(log_moneyness, tau) = a + b ( rho(log_moneyness - m) + sqrt((log_moneyness - m)^2 + sigma^2));
but in order to be able to interpolate in time-to-maturity as well i need to define:
tau = unique(maturity);
a = a(0)+a(1)*tau;
b = b(0)+b(1)*tau;
rho = rho(0)+rho(1)*tau;
m = m(0)+m(1)*tau;
sigma = sigma(0)+sigma(1)*tau;
so that my paramaters have a linear function implemented to them.
I have attached a picture of what my data looks like. First column is tau(=time-to-maturity), Second column describes the log-moneyness and the third describes my obtained implied_volatilites.
So in the end i require a set of 10 parameters (a0,a1,b0,b1,rho0,rho1,m0,m1,sigma0,sigma1), which enable me to calculate every point on the surface with inputs log_moneyness and tau with the minimized error of estimation.
As i am fairly new to matlab, i was wondering if one of you might be able to help. I have tried to implement fmincon and others, but until now with no success. Please let me know, if there is any more information you need.
All the best, Kai.
  댓글 수: 1
Kai Koslowsky
Kai Koslowsky 2021년 10월 7일
편집: Kai Koslowsky 2021년 10월 7일
I wanted to share what i got so far and how i did it:
%generate matrix of log_moneyness and ttm
A = [log_moneyness maturity];
xdata = A;
ydata = implied_volatility;
%create function
fun = @(x,xdata) (x(1)+x(2).*xdata(:,2)) + (x(3)+x(4).*xdata(:,2)).*((x(5)+x(6).*xdata(:,2)).* (xdata(:,1) -(x(7)+x(8).*xdata(:,2))) + ... sqrt((xdata(:,1) - (x(7)+x(8).*xdata(:,2)).^2 + (x(9)+x(10).*xdata(:,2)).^2)));
%Fit the model using the starting point from former parameter estimation
%via SVI
x0 = [0.000202758890760171 0.000202758890760171 -0.249601998773279 -0.249601998773279 ...
0.5 0.5 0.0114 0.0114 1.73380716030294e-05 1.73380716030294e-05];
opt = optimoptions (@lsqcurvefit, 'StepTolerance', 1e-10);
x = lsqcurvefit (fun,x0,xdata,ydata,[],[],opt);
This gives me my 10 parameters. However, the estimates are not that close to what i hoped they would be. Is there a way of fitting them even closer to my observations? I would like to use a function like the 'Argmin' function, but have not had any luck yet. All the best to you.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interest-Rate Instruments에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by