希腊期权vega
前言
前三篇文章介绍了期权希腊值delta,theta,gamma。在本文中,我们将选择期权vega进行介绍。
一、期权的vega
在计算希腊值时,波动率通常被视为隐含波动率BS模型中的常数波动率不同。在实际市场中,波动性往往随时间而变化,这意味着期权价格会随波动性而变化。
期权的vega描述期权价值变化与标的资产价格变化的比例。
若交易组合vega绝对值很大,这种交易组合的价值对波动性的细微变化非常敏感,当一个交易组合vega当价值为0时,资产价格波动率的变化对交易组合价值的影响很小。
二、vega与标的资产价格的关系
1.例子
考虑到无股息看涨期权合约,股价为49元,执行价为50元,无风险利率为5%,期限为20周,隐含波动率为20%,期权为Vega为12.1
from matplotlib import cm import math import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3
# 定义标准正态分布的概率密度函数 def dN(x): ''概率密度函数公式的标准正态分布''' return math.exp(-0.5*x**2)/math.sqrt(2*math.pi) def N(d): ''计算概率密度函数''' return quad(lambda x:dN(x),-20,d,limit=50)[0] def d1f(St, K, t, T, r, sigma): '''BS模型中的d1''' d1=(math.log(St/K) (r 0.5*sigma**2)*(T-t))/(sigma*math.sqrt(T-t)) return d1
# 定义看涨期权和看跌期权vega def BSM_vega(St, K, t, T, r, sigma): ''' Black-Scholes-Merton GAMMA of European call/put option. Parameters ========== St : float stock/index level at time t K : float strike price t : float valuation date T : float date of maturity/time-to-maturity if t = 0; T > t r : float constant, risk-less short rate sigma : float volatility Returns ======= vega : float
European call option GAMM
'''
d1 = d1f(St, K, t, T, r, sigma)
vega=St*math.sqrt((T-t))*dN(d1)
return vega
St=49
K=50
r=5/100
T=0.3846
t=0
sigma=0.2
vega=BSM_vega(St, K, t, T, r, sigma)
print('看涨期权的Vega值为:',round(vega,2))
看涨期权的Vega值为: 12.11
2.vega与St之间的关系
price=np.linspace(1.2,5.6,50)
K1=2.6
K2=2.7
K3=2.8
K4=2.9
r=5/100
T=1
t=0
sigma=0.2
vega_0=[BSM_vega(St, K1, t, T, r, sigma) for St in price]
vega_1=[BSM_vega(St, K2, t, T, r, sigma) for St in price]
vega_2=[BSM_vega(St, K3, t, T, r, sigma) for St in price]
vega_3=[BSM_vega(St, K4, t, T, r, sigma) for St in price]
plt.figure(figsize=(12,10))
plt.plot(price,vega_0,label='k=2.6')
plt.plot(price,vega_1,label='k=2.7')
plt.plot(price,vega_2,label='k=2.8')
plt.plot(price,vega_3,label='k=2.9')
plt.xlabel('stock price')
plt.ylabel('option vage value')
plt.legend()
plt.show()
从图中可以看出,vega>0,平价期权的 Vega 较大。
在其他情况相同时,平价期权的vega大于实值或者虚值期权的Vega。
随着行权价的增加,vega逐渐向右移动,宽幅越大且峰值越高。当期权价格与行权价趋近时,Vega趋于峰值。
三、vega与到期期限之间的关系
St=2.7
K1=2.6
K2=2.7
K3=2.8
K4=2.9
r=5/100
T=np.linspace(0.1,1,100)
t=0
sigma=0.2
vega_0=[BSM_vega(St, K1, t, T, r, sigma) for T in T]
vega_1=[BSM_vega(St, K2, t, T, r, sigma) for T in T]
vega_2=[BSM_vega(St, K3, t, T, r, sigma) for T in T]
plt.figure(figsize=(12,10))
plt.plot(T,vega_0,label='k=2.6')
plt.plot(T,vega_1,label='k=2.7')
plt.plot(T,vega_2,label='k=2.8')
plt.xlabel('T')
plt.ylabel('option vage value')
plt.legend()
plt.show()
从图中可以看出,其他参数相同时,剩余期限越长,Vega 越大。
四、vega与标的资产价格、到期期限之间的关系
def plot_greeks(function, greek):
# Model Parameters
St =2.7 # 50ETF value
t = 0.0 # valuation date
r = 0.015 # risk-less short rate
sigma = 0.2 # volatility
# Greek Calculations
tlist = np.linspace(0.01, 1, 50)
klist = np.linspace(2.1, 3.6, 50)
V = np.zeros((len(tlist), len(klist)), dtype=np.float)
for j in range(len(klist)):
for i in range(len(tlist)):
V[i, j] = function(St, klist[j], t, tlist[i], r, sigma)
# 3D Plotting
x, y = np.meshgrid(klist, tlist)
fig = plt.figure(figsize=(9, 5))
plot = p3.Axes3D(fig)
plot.plot_surface(x, y, V,cmap='rainbow')
plot.set_xlabel('strike $K$')
plot.set_ylabel('maturity $T$')
plot.set_zlabel('%s(K, T)' % greek)
plot_greeks(BSM_vega, vega)
从图中可以看出,vega数值随着到期期限的增加而增加,但是vega的数值会随着标的资产价格从平价变为价内或者价外而减小。
总结
本章介绍了期权希腊值的Vega,并且应用python进行了量化。