Solve for 3 variables with a quite complex equation
Show older comments
syms omega j theta sigma
k=[90 94 98 102 106 110]; % Strike prices
putprices=[.1606 .2806 .9285 2.8801 6.1523 10.0147]; % Put prices at each strike
mustar = log(100)-sigma.^2/2-omega.*(exp(-theta)-1); % risk-neutral mean
Es1j=exp(mustar-theta.*j+sigma.^2./2); % Expected value of stock price at state j 1 period from now
x1=(log(k)-(mustar-theta.*j))./sigma; % the first normcdf value
x2=(log(k)-(mustar-theta.*j)-sigma.^2)./sigma; % the second normcdf value
qpkandj = k.*normcdf(x1)-Es1j.*normcdf(x2); % combination of normcdfs and strike prices and expected value of stock price 1 peroid from now
qpk=exp(-omega).*omega.^j./factorial(j).*qpkandj; % Poisson formula
eqns = symsum(qpk,j,0,inf)== putprices % Continuation of Poisson formula
assume(omega > 0)
assume(theta, 'real')
assume(sigma, 'real')
S = solve(eqns, [omega theta sigma], 'Real', true, 'ReturnConditions', true)
S.omega
S.theta
S.sigma
Trying to work on a Poisson mixture model to find the values of the three parameters (omega, theta, and sigma) that match the Poisson equation's outputs to the putprices in the third line. Whenever I run this, I get a very, very long conditions list and I tried to put it all into the assume condition and it made no difference. Anyone have any ideas what's going on or how I could manage to make this work?
Answers (0)
Categories
Find more on Financial Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!