How to find implied volatility using "solve"?

13 ビュー (過去 30 日間)
Tiancong
Tiancong 2014 年 1 月 21 日
コメント済み: Tiancong 2014 年 1 月 21 日
my Black-Scholes Function:
-----------------
function C = bs ( Interest, Volatility, Stock, StrikePrice, TimeToMaturity )
d1 = (log(Stock ./ StrikePrice) + (Interest + (Volatility .^ 2) ./ 2) .* TimeToMaturity) ./ (Volatility .* sqrt(TimeToMaturity));
d2 = (log(Stock ./ StrikePrice) + (Interest - (Volatility .^ 2) ./ 2) .* TimeToMaturity) ./ (Volatility .* sqrt(TimeToMaturity));
C = normcdf(d1) .* Stock - normcdf(d2) .* StrikePrice .* exp(-Interest .* TimeToMaturity);
end
------------------
Now given that
bs ( 0.05, Volatility, 1033.56, 775, 1/52) = 261
How do we use "solve" function to find out what the Volatility is?

採用された回答

Amit
Amit 2014 年 1 月 21 日
You create a new function:
function F = myfunc(vol,C,Interest, Stock, StrikePrice, TimeToMaturity)
F = C - bs(Interest,vol,Stock,StrikePrice,TimeToMaturity);
and then solve it using fsolve
iniGuess = 10;
volatility = fsolve(@(x) myfunc(x,261,0.05,1033.56, 775, 1/52),iniGuess);
  1 件のコメント
Tiancong
Tiancong 2014 年 1 月 21 日
Thank you very much! However, the I still can't get the right result, could you help me again please! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFinancial Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by