1. 期权的Delta
期权的Delta:期权价格变动与标的物价格变动的比率,即期权价格与标的物价格之间关系曲线的切线斜率,公式如下:
表示期权价格,S 表示标的物价格。
Delta = 0.6 表示:当标的物价格变化一个很小的金额时,相应的期权价格变化约为标的物价格变化的60%。
利用BSM模型的期权定价公式,欧式看涨、看跌的分布如下,具体的过程可以参照:金融分析与风险管理——期权BSM模型。
欧式看涨期权的定价公式:
欧式看跌期权的定价公式:
其中,T 是期权的有效期限,t 是流失的时间。
接下来以欧式看涨期权的多头为例对其进行推导:
其Delta的具体表达式如下:
利用Python构建欧式看涨、看跌期权 Delta 的函数:
#期权的Delta
def delta_option(S,K,sigma,r,T,optype,positype):
'''
T:期权的剩余期限
optype:表示期权类型,call看涨、put看跌
positype:表示期权头寸,long多头、short空头
'''
import numpy as np
from scipy.stats import norm
d1 = (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) - 1
else:
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是期权价格关于标的物价格的二阶偏导,公式如下:
欧式看涨期权的表达式推导如下:
欧式看跌期权的表达式推导如下:
利用Python构建欧式看涨、看跌期权Gamma的函数:
#期权的Gamma
def gamma_option(S,K,sigma,r,T):
import numpy as np
# from scipy.stats import norm
d1 = (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:期权价格变化与时间变化(期权剩余有效期)的比率,公式如下:
欧式看涨期权的表达式推导如下:
欧式看跌期权的表达式推导如下:
在日常的使用中,时间是以天为单位,但是在 BSM 模型中,时间则是以年为单位的,使用该模型计算时,需要把天转化成年,其中“每日历天”是按365天计算的;“每交易日”是按252天计算的。
利用Python构建欧式看涨、看跌期权Theta的函数:
#期权的Theta
def theta_option(S,K,sigma,r,T,optype):
import numpy as np
from scipy.stats import norm
d1 = (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_call
else:
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:期权价格变化与标的波动率变化的比率,公式如下:
欧式看涨的表达式推导如下:
欧式看跌的表达式推导如下:
利用Python构建欧式看涨Vega的函数:
#期权的Vega
def vega_option(S,K,sigma,r,T):
import numpy as np
# from scipy.stats import norm
d1 = (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:期权价格变化与无风险收益率变化的比率,公式如下:
欧式看涨的表达式推导如下:
欧式看跌期权的表达式推导如下:
利用Python构建欧式看涨期权 Rho 的函数:
#期权的Rho
def rho_option(S,K,sigma,r,T,optype):
import numpy as np
from scipy.stats import norm
d1 = (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')
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站不拥有所有权,不承担相关法律责任。如发现有侵权/违规的内容, 联系QQ15101117,本站将立刻清除。