金融分析与风险管理——期权中的希腊字母
金融分析与风险管理——期权中的希腊字母(Greeks)
- 1. 期权的Delta
- 2. 期权的Gamma
- 3. 期权的Theta
- 4. 期权的Vega
- 5. 期权的Rho
1. 期权的Delta
期权的Delta:期权价格变动与标的物价格变动的比率,即期权价格与标的物价格之间关系曲线的切线斜率,公式如下:
Δ = ∂ ∏ ∂ S \Delta = \frac{\partial \prod}{\partial S} Δ=∂S∂∏
∏ \prod ∏ 表示期权价格,S 表示标的物价格。
Delta = 0.6 表示:当标的物价格变化一个很小的金额时,相应的期权价格变化约为标的物价格变化的60%。
利用BSM模型的期权定价公式,欧式看涨、看跌的分布如下,具体的过程可以参照:金融分析与风险管理——期权BSM模型。
欧式看涨期权的定价公式:
c = S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) c = SN(d_1) - Ke^{-r(T-t)}N(d_2) c=SN(d1)−Ke−r(T−t)N(d2)
欧式看跌期权的定价公式:
p = K e − r ( T − t ) N ( − d 2 ) − S N ( − d 1 ) p = Ke^{-r(T-t)}N(-d_2) - SN(-d_1) p=Ke−r(T−t)N(−d2)−SN(−d1)
其中, T T T 是期权的有效期限, t t t 是流失的时间。
N ( x ) = ∫ 1 2 π e − x 2 / 2 d x N(x) = \int\limits \frac{1}{\sqrt{2 \pi}}e^{-x^2/2}\mathrm{d}x N(x)=∫2π 1e−x2/2dx
d 1 = l n ( S K ) + ( r + σ 2 / 2 ) ( T − t ) σ T − t d_1 = \frac{ln(\frac{S}{K}) + (r+\sigma^2/2)(T-t)}{\sigma \sqrt{T-t}} d1=σT−t ln(KS)+(r+σ2/2)(T−t)
d 2 = l n ( S K ) + ( r − σ 2 / 2 ) ( T − t ) σ T − t = d 1 − σ T − t d_2 = \frac{ln(\frac{S}{K}) + (r-\sigma^2/2)(T-t)}{\sigma \sqrt{T-t}} = d_1 - \sigma \sqrt{T-t} d2=σT−t ln(KS)+(r−σ2/2)(T−t)=d1−σT−t
接下来以欧式看涨期权的多头为例对其进行推导:
N ′ ( x ) = 1 2 π e − x 2 / 2 N^{'}(x) = \frac{1}{\sqrt{2 \pi}}e^{-x^2/2} N′(x)=2π 1e−x2/2
d 2 = l n ( S K ) + ( r − σ 2 / 2 ) ( T − t ) σ T − t = = > d 2 σ T − t + σ 2 ( T − t ) / 2 = l n ( S K ∗ e r ( T − t ) ) d_2 = \frac{ln(\frac{S}{K}) + (r-\sigma^2/2)(T-t)}{\sigma \sqrt{T-t}} ==> d_2\sigma \sqrt{T-t} + \sigma^2(T-t)/2 = ln(\frac{S}{K}*e^{r(T-t)}) d2=σT−t ln(KS)+(r−σ2/2)(T−t)==>d2σT−t +σ2(T−t)/2=ln(KS∗er(T−t))
N ′ ( d 1 ) = N ′ ( d 2 + σ T − t ) = 1 2 π e − ( d 2 + σ T − t ) 2 / 2 = 1 2 π e − d 2 2 / 2 − d 2 σ T − t − σ 2 ( T − t ) / 2 = 1 2 π e − d 2 2 / 2 ∗ e − d 2 σ T − t − σ 2 ( T − t ) / 2 = N ′ ( d 2 ) e − d 2 σ T − t − σ 2 ( T − t ) / 2 = N ′ ( d 2 ) ∗ K S e − r ( T − t ) = = > S N ′ ( d 1 ) = K e − r ( T − t ) N ′ ( d 2 ) − − − − > ( 1 ) N^{'}(d_1) = N^{'}(d_2 + \sigma \sqrt{T-t}) = \\[10pt] \frac{1}{\sqrt{2 \pi}}e^{-(d_2 + \sigma \sqrt{T-t})^2/2} = \\[10pt] \frac{1}{\sqrt{2 \pi}}e^{-d_2^2/2 - d_2 \sigma \sqrt{T-t}-\sigma^2(T-t)/2} = \\[10pt] \frac{1}{\sqrt{2 \pi}}e^{-d_2^2/2}* e^{- d_2 \sigma \sqrt{T-t}-\sigma^2(T-t)/2} = \\[10pt] N^{'}(d_2)e^{- d_2 \sigma \sqrt{T-t}-\sigma^2(T-t)/2} = \\[10pt] N^{'}(d_2)*\frac{K}{S}e^{-r(T-t)} ==> SN^{'}(d_1) = Ke^{-r(T-t)}N^{'}(d_2) ---->(1) N′(d1)=N′(d2+σT−t )=2π 1e−(d2+σT−t )2/2=2π 1e−d22/2−d2σT−t −σ2(T−t)/2=2π 1e−d22/2∗e−d2σT−t −σ2(T−t)/2=N′(d2)e−d2σT−t −σ2(T−t)/2=N′(d2)∗SKe−r(T−t)==>SN′(d1)=Ke−r(T−t)N′(d2)−−−−>(1)
∂ d 1 ∂ S = ∂ l n ( S K ) + ( r + σ 2 / 2 ) ( T − t ) σ T − t ∂ S = 1 S σ T − t \frac{\partial d_1}{\partial S} = \frac{\partial \frac{ln(\frac{S}{K}) + (r+\sigma^2/2)(T-t)}{\sigma \sqrt{T-t}}}{\partial S} = \frac{1}{S \sigma \sqrt{T-t}} ∂S∂d1=∂S∂σT−t ln(KS)+(r+σ2/2)(T−t)=SσT−t 1
∂ d 2 ∂ S = ∂ l n ( S K ) + ( r − σ 2 / 2 ) ( T − t ) σ T − t ∂ S = 1 S σ T − t = = > ∂ d 1 ∂ S = ∂ d 2 ∂ S − − − − > ( 2 ) \frac{\partial d_2}{\partial S} = \frac{\partial \frac{ln(\frac{S}{K}) + (r-\sigma^2/2)(T-t)}{\sigma \sqrt{T-t}}}{\partial S} = \frac{1}{S \sigma \sqrt{T-t}} ==>\frac{\partial d_1}{\partial S} = \frac{\partial d_2}{\partial S} ---->(2) ∂S∂d2=∂S∂σT−t ln(KS)+(r−σ2/2)(T−t)=SσT−t 1==>∂S∂d1=∂S∂d2−−−−>(2)
Δ = ∂ c ∂ S = ∂ ( S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) ) ∂ S = N ( d 1 ) + S N ′ ( d 1 ) ∂ d 1 ∂ S − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ S 由 ( 1 ) 与 ( 2 ) 可 推 出 = = > Δ = ∂ c ∂ S = N ( d 1 ) \Delta = \frac{\partial c}{\partial S} = \frac{\partial (SN(d_1) - Ke^{-r(T-t)}N(d_2))}{\partial S} = \\[10pt] N(d_1) + SN^{'}(d_1)\frac{\partial d_1}{\partial S} - Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial S} \\[10pt] 由(1)与(2)可推出==>\Delta = \frac{\partial c}{\partial S} = N(d_1) Δ=∂S∂c=∂S∂(SN(d1)−Ke−r(T−t)N(d2))=N(d1)+SN′(d1)∂S∂d1−Ke−r(T−t)N′(d2)∂S∂d2由(1)与(2)可推出==>Δ=∂S∂c=N(d1)
其Delta的具体表达式如下:
期权类型 | 方向 | Delta表达式 |
---|---|---|
欧式看涨期权 | 多头 | Δ = N ( d 1 ) \Delta = N(d_1) Δ=N(d1) |
欧式看涨期权 | 空头 | Δ = − N ( d 1 ) \Delta = -N(d_1) Δ=−N(d1) |
欧式看跌期权 | 多头 | Δ = N ( d 1 ) − 1 \Delta = N(d_1) - 1 Δ=N(d1)−1 |
欧式看跌期权 | 空头 | Δ = 1 − N ( d 1 ) \Delta = 1 - N(d_1) Δ=1−N(d1) |
利用Python构建欧式看涨、看跌期权 Delta 的函数:
#期权的Delta
def delta_option(S,K,sigma,r,T,optype,positype):'''T:期权的剩余期限optype:表示期权类型,call看涨、put看跌positype:表示期权头寸,long多头、short空头'''import numpy as npfrom scipy.stats import normd1 = (np.log(S/K)+(r+sigma**2/2)*T)/(sigma*np.sqrt(T))if optype == 'call':if positype == 'long':delta = norm.cdf(d1)else:delta = -norm.cdf(d1)else:if positype == 'long':delta = norm.cdf(d1) - 1else:delta = 1 - norm.cdf(d1)return delta#标的价格与delta的关系
S_list = np.linspace(4,8,100)
Delta_call = delta_option(S = S_list,K=6,sigma=0.24,r=0.04,T=0.5,optype='call',positype='long')
Delta_put = delta_option(S = S_list,K=6,sigma=0.24,r=0.04,T=0.5,optype='put',positype='long')plt.figure(figsize=(12,6))
plt.subplot(1,2,1)
plt.plot(S_list,Delta_call,label='看涨期权多头')
plt.plot(S_list,Delta_put,label='看跌期权多头')
plt.legend()
plt.grid('True')#期权期限与delta的关系
T_list = np.linspace(0.1,5,100)
Delta_call1 = delta_option(S = 7,K=6,sigma=0.24,r=0.04,T=T_list,optype='call',positype='long')
Delta_call2 = delta_option(S = 6,K=6,sigma=0.24,r=0.04,T=T_list,optype='call',positype='long')
Delta_call3 = delta_option(S = 5,K=6,sigma=0.24,r=0.04,T=T_list,optype='call',positype='long')plt.subplot(1,2,2)
plt.plot(T_list,Delta_call1,label='实值看涨期权多头')
plt.plot(T_list,Delta_call2,label='平价看涨期权多头')
plt.plot(T_list,Delta_call3,label='虚值看涨期权多头')
plt.legend()
plt.grid('True')
2. 期权的Gamma
期权的Gamma:期权Delta变动与标的物价格变动的比率,即Gamma是期权价格关于标的物价格的二阶偏导,公式如下:
Γ = ∂ 2 ∏ ∂ S 2 \Gamma = \frac{\partial^2 \prod}{\partial S^2} Γ=∂S2∂2∏
欧式看涨期权的表达式推导如下:
Γ = ∂ 2 c ∂ S 2 = N ′ ( d 1 ) ∂ d 1 ∂ S = N ′ ( d 1 ) S σ T − t \Gamma = \frac{\partial^2 c}{\partial S^2} = N^{'}(d_1) \frac{\partial d_1}{\partial S} = \frac{N^{'}(d_1)}{S \sigma \sqrt{T-t}} Γ=∂S2∂2c=N′(d1)∂S∂d1=SσT−t N′(d1)
欧式看跌期权的表达式推导如下:
Γ = ∂ 2 p ∂ S 2 = ∂ ( N ( d 1 ) − 1 ) ∂ S = N ′ ( d 1 ) ∂ d 1 ∂ S = N ′ ( d 1 ) S σ T − t \Gamma = \frac{\partial^2 p}{\partial S^2} = \frac{\partial (N(d_1) - 1)}{\partial S} = N^{'}(d_1) \frac{\partial d_1}{\partial S} = \frac{N^{'}(d_1)}{S \sigma \sqrt{T-t}} Γ=∂S2∂2p=∂S∂(N(d1)−1)=N′(d1)∂S∂d1=SσT−t N′(d1)
利用Python构建欧式看涨、看跌期权Gamma的函数:
#期权的Gamma
def gamma_option(S,K,sigma,r,T):import numpy as np
# from scipy.stats import normd1 = (np.log(S/K)+(r+sigma**2/2)*T)/(sigma*np.sqrt(T))return np.exp(-d1**2/2)/(S*sigma*np.sqrt(2*np.pi*T))#标的价格与Gamma的关系
S_list = np.linspace(4,8,100)
gamma_list = gamma_option(S=S_list, K=6, sigma=0.24, r=0.04, T=0.5) plt.figure(figsize=(12,6))
plt.subplot(1,2,1)
plt.plot(S_list,gamma_list)
plt.grid('True')#期限与Gamma的关系
T_list = np.linspace(0.1,5,100)
gamma1 = gamma_option(S=7, K=6, sigma=0.24, r=0.04, T=T_list)
gamma2 = gamma_option(S=6, K=6, sigma=0.24, r=0.04, T=T_list)
gamma3 = gamma_option(S=5, K=6, sigma=0.24, r=0.04, T=T_list)plt.subplot(1,2,2)
plt.plot(T_list,gamma1,label='实值看涨期权')
plt.plot(T_list,gamma2,label='平价看涨期权')
plt.plot(T_list,gamma3,label='虚值看涨期权')
plt.legend()
plt.grid('True')
3. 期权的Theta
期权的Theta:期权价格变化与时间变化(期权剩余有效期)的比率,公式如下:
Θ = ∂ ∏ ∂ T \Theta = \frac{\partial \prod}{\partial T} Θ=∂T∂∏
欧式看涨期权的表达式推导如下:
d 1 − d 2 = σ T − t = = = > ( d 1 − d 2 ) ′ = ∂ σ T − t ∂ t = − σ 2 T − t − − − − − > ( 3 ) ∂ c ∂ t = ∂ ( S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) ) ∂ t = S N ′ ( d 1 ) ∂ d 1 ∂ t − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ t − r K e − r ( T − t ) N ( d 2 ) 由 ( 1 ) 与 ( 3 ) 可 推 出 = = > Θ c a l l = ∂ c ∂ t = S N ′ ( d 1 ) ( ∂ d 1 ∂ t − ∂ d 2 ∂ t ) − r K e − r ( T − t ) N ( d 2 ) = − S N ′ ( d 1 ) σ 2 T − t − r K e − r ( T − t ) N ( d 2 ) = − S σ e − d 1 2 / 2 2 2 π ( T − t ) − r K e − r ( T − t ) N ( d 2 ) d_1 - d_2 = \sigma \sqrt{T - t} ===> (d_1 - d_2)^{'} = \frac {\partial \sigma \sqrt{T - t}}{\partial t} = - \frac{\sigma}{2 \sqrt {T-t}} ----->(3) \\[10pt] \frac{\partial c}{\partial t} = \frac{\partial (SN(d_1) - Ke^{-r(T-t)}N(d_2))}{\partial t} = \\[10pt] SN^{'}(d_1)\frac{\partial d_1}{\partial t} - Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial t} - rKe^{-r(T-t)}N(d_2) \\[10pt] 由(1)与(3)可推出==> \\[10pt] \Theta_{call} = \frac{\partial c}{\partial t} = SN^{'}(d_1)(\frac{\partial d_1}{\partial t} - \frac{\partial d_2}{\partial t}) - rKe^{-r(T-t)}N(d_2) = \\[10pt] -\frac{SN^{'}(d_1) \sigma}{2 \sqrt {T-t}} - rKe^{-r(T-t)}N(d_2) = \\[10pt] -\frac{S \sigma e^{-d_1^2/2}}{2 \sqrt {2 \pi (T-t)}} - rKe^{-r(T-t)}N(d_2) d1−d2=σT−t ===>(d1−d2)′=∂t∂σT−t =−2T−t σ−−−−−>(3)∂t∂c=∂t∂(SN(d1)−Ke−r(T−t)N(d2))=SN′(d1)∂t∂d1−Ke−r(T−t)N′(d2)∂t∂d2−rKe−r(T−t)N(d2)由(1)与(3)可推出==>Θcall=∂t∂c=SN′(d1)(∂t∂d1−∂t∂d2)−rKe−r(T−t)N(d2)=−2T−t SN′(d1)σ−rKe−r(T−t)N(d2)=−22π(T−t) Sσe−d12/2−rKe−r(T−t)N(d2)
欧式看跌期权的表达式推导如下:
Θ p u t = ∂ p ∂ t = ∂ ( K e − r ( T − t ) N ( − d 2 ) − S N ( − d 1 ) ) ∂ t = ∂ [ K e − r ( T − t ) ( 1 − N ( d 2 ) ) − S ( 1 − N ( d 1 ) ) ] ∂ t = r K e − r ( T − t ) ( 1 − N ( d 2 ) ) − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ t + S N ′ ( d 1 ) ∂ d 1 ∂ t = S N ′ ( d 1 ) ( ∂ d 1 ∂ t − ∂ d 2 ∂ t ) + r K e − r ( T − t ) ( 1 − N ( d 2 ) ) = − S N ′ ( d 1 ) σ 2 T − t + r K e − r ( T − t ) N ( − d 2 ) = Θ c a l l + r K e − r ( T − t ) \Theta_{put} = \frac{\partial p}{\partial t} = \frac{\partial (Ke^{-r(T-t)}N(-d_2) - SN(-d_1))}{\partial t} = \\[10pt] \frac{\partial [Ke^{-r(T-t)}(1-N(d_2)) - S(1-N(d_1))]}{\partial t} = \\[10pt] rKe^{-r(T-t)}(1-N(d_2)) - Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial t} + SN^{'}(d_1)\frac{\partial d_1}{\partial t} = \\[10pt] SN^{'}(d_1)(\frac{\partial d_1}{\partial t} - \frac{\partial d_2}{\partial t}) + rKe^{-r(T-t)}(1-N(d_2)) = \\[10pt] -\frac{SN^{'}(d_1) \sigma}{2 \sqrt {T-t}} + rKe^{-r(T-t)}N(-d_2) = \\[10pt] \Theta_{call} + rKe^{-r(T-t)} Θput=∂t∂p=∂t∂(Ke−r(T−t)N(−d2)−SN(−d1))=∂t∂[Ke−r(T−t)(1−N(d2))−S(1−N(d1))]=rKe−r(T−t)(1−N(d2))−Ke−r(T−t)N′(d2)∂t∂d2+SN′(d1)∂t∂d1=SN′(d1)(∂t∂d1−∂t∂d2)+rKe−r(T−t)(1−N(d2))=−2T−t SN′(d1)σ+rKe−r(T−t)N(−d2)=Θcall+rKe−r(T−t)
在日常的使用中,时间是以天为单位,但是在 BSM 模型中,时间则是以年为单位的,使用该模型计算时,需要把天转化成年,其中“每日历天”是按365天计算的;“每交易日”是按252天计算的。
利用Python构建欧式看涨、看跌期权Theta的函数:
#期权的Theta
def theta_option(S,K,sigma,r,T,optype):import numpy as npfrom scipy.stats import normd1 = (np.log(S/K)+(r+sigma**2/2)*T)/(sigma*np.sqrt(T))d2 = d1 - sigma*np.sqrt(T)theta_call = -(S*sigma*np.exp(-d1**2/2))/(2*np.sqrt(2*np.pi*T)) - r*K*np.exp(-r*T)*norm.cdf(d2)if optype == 'call':theta = theta_callelse:theta = theta_call + r*K*np.exp(-r*T)return theta#标的价格与Theta的关系
S_list = np.linspace(1,11,100)
theta_list1 = theta_option(S=S_list,K=6, sigma=0.24, r=0.04, T=0.5,optype='call')
theta_list2 = theta_option(S=S_list,K=6, sigma=0.24, r=0.04, T=0.5,optype='put') plt.figure(figsize=(12,6))
plt.subplot(1,2,1)
plt.plot(S_list,theta_list1,label='看涨期权')
plt.plot(S_list,theta_list2,label='看跌期权')
plt.legend()
plt.grid('True')#期限与Theta的关系
T_list = np.linspace(0.1,5,100)
theta1 = theta_option(S=7, K=6, sigma=0.24, r=0.04, T=T_list,optype='call')
theta2 = theta_option(S=6, K=6, sigma=0.24, r=0.04, T=T_list,optype='call')
theta3 = theta_option(S=5, K=6, sigma=0.24, r=0.04, T=T_list,optype='call') plt.subplot(1,2,2)
plt.plot(T_list,theta1,label='实值看涨期权')
plt.plot(T_list,theta2,label='平价看涨期权')
plt.plot(T_list,theta3,label='虚值看涨期权')
plt.legend()
plt.grid('True')
4. 期权的Vega
期权的Vega:期权价格变化与标的波动率变化的比率,公式如下:
V = ∂ ∏ ∂ σ V = \frac{\partial \prod}{\partial \sigma} V=∂σ∂∏
欧式看涨的表达式推导如下:
d 1 − d 2 = σ T − t = = = > ( d 1 − d 2 ) ′ = ∂ σ T − t ∂ σ = T − t − − − − > ( 4 ) ∂ c ∂ σ = ∂ ( S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) ) ∂ σ = S N ′ ( d 1 ) ∂ d 1 ∂ σ − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ σ 由 ( 1 ) 与 ( 4 ) 可 推 出 = = > V = ∂ c ∂ σ = S T − t N ′ ( d 1 ) = S T − t e − d 1 2 / 2 2 π d_1 - d_2 = \sigma \sqrt{T - t} ===> (d_1 - d_2)^{'} = \frac {\partial \sigma \sqrt{T - t}}{\partial \sigma} = \sqrt {T-t} ---->(4) \\[10pt] \frac{\partial c}{\partial \sigma} = \frac{\partial (SN(d_1) - Ke^{-r(T-t)}N(d_2))}{\partial \sigma} = \\[10pt] SN^{'}(d_1)\frac{\partial d_1}{\partial \sigma} - Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial \sigma} \\[10pt] 由(1)与(4)可推出==>V = \frac{\partial c}{\partial \sigma} = S\sqrt{T-t}N^{'}(d_1) = \frac{S\sqrt{T-t}e^{-d_1^2/2}}{\sqrt{2\pi}} d1−d2=σT−t ===>(d1−d2)′=∂σ∂σT−t =T−t −−−−>(4)∂σ∂c=∂σ∂(SN(d1)−Ke−r(T−t)N(d2))=SN′(d1)∂σ∂d1−Ke−r(T−t)N′(d2)∂σ∂d2由(1)与(4)可推出==>V=∂σ∂c=ST−t N′(d1)=2π ST−t e−d12/2
欧式看跌的表达式推导如下:
∂ p ∂ σ = ∂ ( K e − r ( T − t ) N ( − d 2 ) − S N ( − d 1 ) ) ∂ σ = ∂ [ K e − r ( T − t ) ( 1 − N ( d 2 ) ) − S ( 1 − N ( d 1 ) ) ] ∂ σ = − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ σ + S N ′ ( d 1 ) ∂ d 1 ∂ σ = ∂ c ∂ σ \frac{\partial p}{\partial \sigma} = \frac{\partial (Ke^{-r(T-t)}N(-d_2) - SN(-d_1))}{\partial \sigma} = \\[10pt] \frac{\partial [Ke^{-r(T-t)}(1-N(d_2)) - S(1-N(d_1))]}{\partial \sigma} = \\[10pt] -Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial \sigma} + SN^{'}(d_1)\frac{\partial d_1}{\partial \sigma} = \\[10pt] \frac{\partial c}{\partial \sigma} ∂σ∂p=∂σ∂(Ke−r(T−t)N(−d2)−SN(−d1))=∂σ∂[Ke−r(T−t)(1−N(d2))−S(1−N(d1))]=−Ke−r(T−t)N′(d2)∂σ∂d2+SN′(d1)∂σ∂d1=∂σ∂c
利用Python构建欧式看涨Vega的函数:
#期权的Vega
def vega_option(S,K,sigma,r,T):import numpy as np# from scipy.stats import normd1 = (np.log(S/K)+(r+sigma**2/2)*T)/(sigma*np.sqrt(T))return S*np.sqrt(T)*np.exp(-d1**2/2)/np.sqrt(2*np.pi)vega = vega_option(S=5.8, K=6, sigma=0.24, r=0.04, T=0.5)#标的价格与Vega
S_list = np.linspace(3,10,100)
vega_list = vega_option(S=S_list, K=6, sigma=0.24, r=0.04, T=0.5)plt.figure(figsize=(12,6))
plt.subplot(1,2,1)
plt.plot(S_list,vega_list)
plt.grid('True')#期限与Vega
T_list = np.linspace(0.1,5,100)
vega1 = vega_option(S=8, K=6, sigma=0.24, r=0.04, T=T_list)
vega2 = vega_option(S=6, K=6, sigma=0.24, r=0.04, T=T_list)
vega3 = vega_option(S=4, K=6, sigma=0.24, r=0.04, T=T_list)plt.subplot(1,2,2)
plt.plot(T_list,vega1,label='实值看涨期权')
plt.plot(T_list,vega2,label='平价看涨期权')
plt.plot(T_list,vega3,label='虚值看涨期权')
plt.legend()
plt.grid('True')
5. 期权的Rho
期权的Rho:期权价格变化与无风险收益率变化的比率,公式如下:
R h o = ∂ ∏ ∂ r Rho = \frac{\partial \prod}{\partial r} Rho=∂r∂∏
欧式看涨的表达式推导如下:
d 1 − d 2 = σ T − t = = = > ( d 1 − d 2 ) ′ = ∂ σ T − t ∂ r = 0 − − − − > ( 5 ) ∂ c ∂ r = ∂ ( S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) ) ∂ r = S N ′ ( d 1 ) ∂ d 1 ∂ r + ( T − t ) K e − r ( T − t ) N ( d 2 ) − K e − r ( T − t ) N ′ ( d 2 ) ∂ d 2 ∂ r = S N ′ ( d 1 ) ( ∂ d 1 ∂ t − ∂ d 2 ∂ t ) + ( T − t ) K e − r ( T − t ) N ( d 2 ) 由 ( 1 ) 与 ( 5 ) 可 推 出 = = > R h o = ( T − t ) K e − r ( T − t ) N ( d 2 ) > = 0 d_1 - d_2 = \sigma \sqrt{T - t} ===> (d_1 - d_2)^{'} = \frac {\partial \sigma \sqrt{T - t}}{\partial r} = 0 ---->(5) \\[10pt] \frac{\partial c}{\partial r} = \frac{\partial (SN(d_1) - Ke^{-r(T-t)}N(d_2))}{\partial r} = \\[10pt] SN^{'}(d_1)\frac{\partial d_1}{\partial r} + (T-t)Ke^{-r(T-t)}N(d_2) - Ke^{-r(T-t)}N^{'}(d_2)\frac{\partial d_2}{\partial r} = \\[10pt] SN^{'}(d_1)(\frac{\partial d_1}{\partial t} - \frac{\partial d_2}{\partial t}) + (T-t)Ke^{-r(T-t)}N(d_2) \\[10pt] 由(1)与(5)可推出==> Rho = (T-t)Ke^{-r(T-t)}N(d_2)>=0 d1−d2=σT−t ===>(d1−d2)′=∂r∂σT−t =0−−−−>(5)∂r∂c=∂r∂(SN(d1)−Ke−r(T−t)N(d2))=SN′(d1)∂r∂d1+(T−t)Ke−r(T−t)N(d2)−Ke−r(T−t)N′(d2)∂r∂d2=SN′(d1)(∂t∂d1−∂t∂d2)+(T−t)Ke−r(T−t)N(d2)由(1)与(5)可推出==>Rho=(T−t)Ke−r(T−t)N(d2)>=0
欧式看跌期权的表达式推导如下:
∂ p ∂ r = ∂ ( K e − r ( T − t ) N ( − d 2 ) − S N ( − d 1 ) ) ∂ r = ∂ [ K e − r ( T − t ) ( 1 − N ( d 2 ) ) − S ( 1 − N ( d 1 ) ) ] ∂ r = − ( T − t ) K e − r ( T − t ) ( 1 − N ( d 2 ) ) − K e − r ( T − t ) ( N ′ ( d 2 ) ∂ d 2 ∂ r + S N ′ ( d 1 ) ∂ d 1 ∂ r = S N ′ ( d 1 ) ( ∂ d 1 ∂ t − ∂ d 2 ∂ t ) − ( T − t ) K e − r ( T − t ) ( 1 − N ( d 2 ) ) = − ( T − t ) K e − r ( T − t ) ( 1 − N ( d 2 ) ) = − ( T − t ) K e − r ( T − t ) N ( − d 2 ) < = 0 \frac{\partial p}{\partial r} = \frac{\partial (Ke^{-r(T-t)}N(-d_2) - SN(-d_1))}{\partial r} = \\[10pt] \frac{\partial [Ke^{-r(T-t)}(1-N(d_2)) - S(1-N(d_1))]}{\partial r} = \\[10pt] -(T-t)Ke^{-r(T-t)}(1-N(d_2)) - Ke^{-r(T-t)}(N^{'}(d_2)\frac{\partial d_2}{\partial r} + SN^{'}(d_1)\frac{\partial d_1}{\partial r} = \\[10pt] SN^{'}(d_1)(\frac{\partial d_1}{\partial t} - \frac{\partial d_2}{\partial t}) - (T-t)Ke^{-r(T-t)}(1-N(d_2)) =\\[10pt] -(T-t)Ke^{-r(T-t)}(1-N(d_2)) = -(T-t)Ke^{-r(T-t)}N(-d_2) <= 0 ∂r∂p=∂r∂(Ke−r(T−t)N(−d2)−SN(−d1))=∂r∂[Ke−r(T−t)(1−N(d2))−S(1−N(d1))]=−(T−t)Ke−r(T−t)(1−N(d2))−Ke−r(T−t)(N′(d2)∂r∂d2+SN′(d1)∂r∂d1=SN′(d1)(∂t∂d1−∂t∂d2)−(T−t)Ke−r(T−t)(1−N(d2))=−(T−t)Ke−r(T−t)(1−N(d2))=−(T−t)Ke−r(T−t)N(−d2)<=0
利用Python构建欧式看涨期权 Rho 的函数:
#期权的Rho
def rho_option(S,K,sigma,r,T,optype):import numpy as npfrom scipy.stats import normd1 = (np.log(S/K)+(r+sigma**2/2)*T)/(sigma*np.sqrt(T))d2 = d1 - sigma*np.sqrt(T)if optype == 'call':rho = K*T*np.exp(-r*T)*norm.cdf(d2)else:rho = -K*T*np.exp(-r*T)*norm.cdf(-d2)return rho#标的价格与rho
S_list = np.linspace(3,10,100)
rho_list1 = rho_option(S=S_list, K=6, sigma=0.24, r=0.04, T=0.5,optype='call')
rho_list2 = rho_option(S=S_list, K=6, sigma=0.24, r=0.04, T=0.5,optype='put')plt.figure(figsize=(12,6))
plt.subplot(1,2,1)
plt.plot(S_list,rho_list1,label='看涨期权')
plt.plot(S_list,rho_list2,label='看跌期权')
plt.legend()
plt.grid('True')#期限与rho
T_list = np.linspace(0.1,5,100)
rho1 = rho_option(S=8, K=6, sigma=0.24, r=0.04, T=T_list,optype='call')
rho2 = rho_option(S=6, K=6, sigma=0.24, r=0.04, T=T_list,optype='call')
rho3 = rho_option(S=4, K=6, sigma=0.24, r=0.04, T=T_list,optype='call')plt.subplot(1,2,2)
plt.plot(T_list,rho1,label='实值看涨期权')
plt.plot(T_list,rho2,label='平价看涨期权')
plt.plot(T_list,rho3,label='虚值看涨期权')
plt.legend()
plt.grid('True')
金融分析与风险管理——期权中的希腊字母相关推荐
- 金融与python-基于Python的金融分析与风险管理
金融科技时代已经到来,善于将金融理论与IT技术进行深度融合的人,将成为新时代独具竞争力的金融科技类人才.无论是打算在金融领域求职的新人,还是希望进一步提升个人能力的"职场老手",本 ...
- 金融分析与风险管理——期权类型及到期时的盈亏
金融分析与风险管理--期权类型及到期时的盈亏 1. 期权简述 2. 看涨期权到期时的盈亏 3. 看跌期权到期时的盈亏 4.期权涨跌平价关系式 1. 期权简述 期权(option) 是一种金融合约,该合 ...
- 金融分析与风险管理——资本资产定价模型
金融分析与风险管理--资本资产定价模型 1 系统性风险与非系统性风险 2 资本资产定价模型 1 系统性风险与非系统性风险 在理论上,股票面临的风险可以抽象的划分为系统性风险与非系统性风险.系统性风险( ...
- 《基于Python的金融分析与风险管理》学习笔记
目录 第1部分 入门篇 第1章 Python概览 1.1 Python的定义与比较优势 1.1.1 Python简介 1.1.2 Python的比较优势 1.2 Python之父-吉多·范 ...
- python金融分析-基于Python的金融分析与风险管理
第 1部分 入门篇 第 1章 Python概览 2 1.1 Python的定义与比较优势 3 1.1.1 Python简介 3 1.1.2 Python的比较优势 4 1.2 Python之父-吉多· ...
- 金融分析与风险管理——风险价值(VaR)
金融分析与风险管理--风险价值(VaR) 1. 风险价值(VaR)简述 1.1 Python可视化风险价值 2. VaR值的测度方法 2.1 方差-协方差法 2.2 历史模拟法 2.3 蒙特卡洛模拟法 ...
- 金融分析与风险管理——投资组合的有效前沿及资本市场线
金融分析与风险管理--投资组合的有效前沿及资本市场线 1 投资组合的可行集 2 投资组合的有效前沿 3 资本市场线 1 投资组合的可行集 投资组合中的权重变量可以实现投资组合的预期收益率与收益波动率之 ...
- R语言ggplot2可视化添加希腊字母标签:图表题(title)中加入希腊字母、图中加入希腊字母标签
R语言ggplot2可视化添加希腊字母标签:图表题(title)中加入希腊字母.图中加入希腊字母标签 目录
- R语言ggplot2可视化图中添加希腊字母实战
R语言ggplot2可视化图中添加希腊字母实战 目录 R语言ggplot2可视化图中添加希腊字母实战 #ggplot2可视化图中添加希腊字母1
最新文章
- List集合的去除重复性练习
- cartograhper--X1_lidar
- Python编程系列教程第12讲——属性和方法
- LeakDiag 微软一款检测memory leak的工具
- Linux关闭防火墙、SELinux
- Linux命令大全(Ubuntu18系统)
- MFC非模态对话框实例
- config设置源 使用pip_python pip源配置
- UI 假死的可能性和处理方法总结
- 自动驾驶 8-3: 递归最小二乘法Recursive Least Squares
- 通达OA2017按部门创建公共文件柜
- java写一个泡泡龙小游戏
- Kubernetes 外部 IP Service 类型
- Android 常用颜色列表
- 无法打开登录所请求的数据库 xxx。登录失败。用户 'AAA' 登录失败。
- 快速去除照片的背景颜色和修改照片的背景颜色
- Ubunu安装一个更新版本的gda(2.3.2到 3.0.4)
- 学习方法推荐——快速阅读
- android之NFC基础技术分享
- C#鼠标键盘操作用于桌面脚本
热门文章
- python输出列表中的第二个元素_python – 替换列表中的每个第二个元素
- linux在root下不能用gedit,root不能运行gedit
- 打起性价比攻防战,蔚来ET5破圈有望,却难掀起蝴蝶效应
- AutoCAD消息:无写入权限。无法创建 acad.cuix(南方测绘CASS11.0)
- KEIL各版本镜像和STM的KeilPACK包下载
- android防止快速点击
- pdu串短信格式说明
- 中软python机试_中软国际python机试题_中软国际笔试试题
- Unity3D游戏接入小米广告SDK
- 嵌入式设计与开发项目-液位检测告警系统