主要内容

The Black–Scholes Formula for Call Option Price

This example shows how to calculate the call option price using the Black–Scholes formula. This example usesvpasolveto numerically solve the problems of finding the spot price and implied volatility from the Black–Scholes formula.

查找电话期权价格

The Black–Scholes formula models the price of European call options [1]. For a non-dividend-paying underlying stock, the parameters of the formula are defined as:

  • S 是坏蛋rent stock price or spot price.

  • K is the exercise or strike price.

  • σ 是股票连续复合年收益的标准偏差,称为波动率。

  • T 是时候可以在多年期间过期的期限到期。

  • r is the annualized risk-free interest rate.

The price of a call option C 在黑色 - choles参数方面是

C = N ( d 1 ) × S - N ( d 2 ) × P V ( K ) ,

where:

  • d 1 = 1 σ T [ 日志 ( S K ) + ( r + σ 2 2 ) T ]

  • d 2 = d 1 - σ T

  • P V ( K ) = K exp ( - r T )

  • N ( d ) 是标准的正常累积分布函数, N ( d ) = 1 2 π - d exp ( - t 2 / 2 ) d t

找到欧洲股票期权的价格,该价格在三个月内以95美元的行使价格到期。假设基本股票不付股息,以100美元的价格交易,每年50%的波动性。无风险率为每年1%。

利用symto create symbolic numbers that represent the values of the Black–Scholes parameters.

symstds = sym(100);%当前股票价格(现货价格)K = sym(95);% exercise price (strike price)sigma = sym(0.50);% volatility of stockT = sym(3/12);% expiry time in yearsr = sym(0.01);% annualized risk-free interest rate

计算期权价格而无需近似。创建符号功能n(d)that represents the standard normal cumulative distribution function.

pv_k = k*exp(-r*t);d1 =(log(s/k) +(r + sigma^2/2)*t)/(sigma*sqrt(t));d2 = d1 -sigma*sqrt(t);n(d)= int(exp( - ((t)^2)/2),t,-inf,d)*1/sqrt(2*sym(pi))
n(d)=

ERF ( 2 d 2 ) 2 + 1 2

Csym = N(d1)*S - N(d2)*PV_K
Csym =

50 ERF ( 2 4 日志 ( 20 19 ) + 27 200 2 ) - 95 e - 1 400 ERF ( 2 4 日志 ( 20 19 ) - 23 200 2 ) 2 + 1 2 + 50

To obtain the numeric result with variable precision, usevpa。By default,vpareturns a number with 32 significant digits.

CVPA = VPA(CSYM)
CVPA =
                  
                   
                    
                     12.52792339252145394554497137187
                   
                  

要更改精度,请使用digits。The price of the option to 6 significant digits is $12.5279.

digits(6) Cvpa = vpa(Csym)
CVPA =
                  
                   
                    
                     12.5279
                   
                  

Plot Call Option Price

接下来,假设对于同一股票期权,有时间变化,日常股票价格尚不清楚。查找到期时间的此通话选项的价格 T that varies from 0 to 0.25 years, and spot price S that varies from $50 to $140. Use the values for exercise rate (K),波动性(sigma), and interest rate (r)来自上一个示例。在这种情况下,用时间到期T和日常股票价格S作为可变数量。

Define the symbolic expressionCto represent the call option price withTSas the unknown variables.

symsTSpv_k = k*exp(-r*t);d1 =(log(s/k) +(r + sigma^2/2)*t)/(sigma*sqrt(t));d2 = d1 -sigma*sqrt(t);nd1 = int(exp( - ((t)^2)/2), -  inf,d1)*1/sqrt(2*pi);nd2 = int(exp( - ((t)^2)/2), -  inf,d2)*1/sqrt(2*pi);c = nd1*s -nd2*pv_k;

Plot the call option price as a function of spot price and expiry time.

fsurf(C,[50 140 0 0.25]) xlabel('Spot price')ylabel('Expiry time') zlabel('Call option price')

图包含一个轴对象。轴对象包含一个functionsUrface的对象。

计算呼叫期权价格的到期时间为0.1年,现货价格$ 105。利用潜艇to substitute the values ofTSto the expressionC。将价格作为数字结果返回vpa

csym = subs(c,[t s],[0.1 105]);CVPA = VPA(CSYM)
CVPA =
                  
                   
                    
                     12.5868
                   
                  

找到现货价格

Consider the case where the option price is changing, and you want to know how this affects the underlying stock price. This is a problem of finding S from the Black–Scholes formula given the known parameters K , σ , T , r , 和 C

例如,一个月后,同一电话期权的价格现在为15.04美元,到期时间为两个月。查找基础股票的现货价格。创建符号功能C(S)that represents the Black–Scholes formula with the unknown parameterS

symsC(S)D1d2(S)ND1(S)ND2(S)k = 95;% exercise price (strike price)Sigma = 0.50;% volatility of stockt = 2/12;% expiry time in yearsr = 0.01;% annualized risk-free interest ratepv_k = k*exp(-r*t);d1(s)=(log(s/k) +(r + sigma^2/2)*t)/(sigma*sqrt(t));d2(s)= d1 -sigma*sqrt(t);nd1(s)= int(exp( - ((t)^2)/2), -  inf,d1)*1/sqrt(2*pi);nd2(s)= int(exp( - ((t)^2)/2), -  inf,d2)*1/sqrt(2*pi);c(s)= nd1*s -nd2*pv_k;

利用vpasolveto numerically solve for the spot price of the underlying stock. Search for solutions only in the positive numbers. The spot price of the underlying stock is $106.162.

S_Sol = vpasolve(C(S) == 15.04,S,[0 Inf])
S_Sol =
                  
                   
                    
                     106.162
                   
                  

找到隐含的波动性

考虑期权价格正在改变的情况,您想知道什么是隐含的波动性。这是找到价值的问题 σ from the Black–Scholes formula given the known parameters S , K , T , r , 和 C

Consider the same stock option that expires in three months with an exercise price of $95. Assume that the underlying stock trades at $100, and the risk-free rate is 1% per annum. Find the implied volatility as a function of option price that ranges from $6 to $25. Create a vector for the range of the option price. Create a symbolic functionC(sigma)that represents the Black–Scholes formula with the unknown parametersigma。利用vpasolveto numerically solve for the implied volatility.

symsC(sigma)d1(sigma)d2(sigma)Nd1(sigma)ND2(Sigma)S = 100;%当前股票价格(现货价格)k = 95;% exercise price (strike price)T = 3/12;% expiry time in yearsr = 0.01;% annualized risk-free interest ratec_range = 6:25;% range of option pricesigma_Sol = zeros(size(C_Range)); PV_K = K*exp(-r*T); d1(sigma) = (log(S/K) + (r + sigma^2/2)*T)/(sigma*sqrt(T)); d2(sigma) = d1 - sigma*sqrt(T); Nd1(sigma) = int(exp(-((t)^2)/2),-Inf,d1)*1/sqrt(2*pi); Nd2(sigma) = int(exp(-((t)^2)/2),-Inf,d2)*1/sqrt(2*pi); C(sigma) = Nd1*S - Nd2*PV_K;fori = 1:长度(c_range)sigma_sol(i)= vpasolve(c(sigma)== c_range(i),sigma,[0 inf]);end

将隐含波动率绘制为期权价格的函数。

plot(C_Range,sigma_Sol) xlabel('Option price')ylabel(“隐含波动”)

图包含一个轴对象。The axes object contains an object of type line.

参考

[1]https://en.wikipedia.org/wiki/black-scholes_model