【FinE】期权定价理论(2) Black-Scholes模型

BS模型假设

  1. 股票价格遵循几何布朗运动
  2. 允许卖空衍生证券
  3. 无摩擦交易环境
  4. 行权期无红利支付
  5. 无套利机会
  6. 证券交易是连续的
  7. 无风险利率是常数

BS模型推导

由假设(1)可以知道,股价 S S S满足GBM方程
d S = μ S d t + σ S d z dS=\mu Sdt+\sigma Sdz dS=μSdt+σSdz
衍生证券价格 f f f依赖于标的资产价格 S S S和时间 t t t,由伊藤引理得到
d f = ( ∂ f ∂ S μ S + ∂ f ∂ t + 1 2 ∂ 2 f ∂ S 2 ) d t + ( ∂ f ∂ S ) d z df=(\frac{\partial f}{\partial S}\mu S+\frac{\partial f}{\partial t}+\frac{1}{2}\frac{\partial^2 f}{\partial S^2})dt+(\frac{\partial f}{\partial S})dz df=(SfμS+tf+21S22f)dt+(Sf)dz
联立离散形式的股价和衍生品的价格
{ Δ S = μ S Δ t + σ S Δ z Δ f = ( ∂ f ∂ S μ S + ∂ f ∂ t + 1 2 ∂ 2 f ∂ S 2 ) Δ t + ( ∂ f ∂ S ) Δ z \left\{ \begin{aligned} &\Delta S=\mu S\Delta t+\sigma S\Delta z\\ &\Delta f=(\frac{\partial f}{\partial S}\mu S+\frac{\partial f}{\partial t}+\frac{1}{2}\frac{\partial^2 f}{\partial S^2})\Delta t+(\frac{\partial f}{\partial S})\Delta z \end{aligned} \right. ΔS=μSΔt+σSΔzΔf=(SfμS+tf+21S22f)Δt+(Sf)Δz
通过构造组合消除方程组中的波动项,构造1单位的衍生证券空头和 ∂ f ∂ S \frac{\partial f}{\partial S} Sf单位的股票多头,令 Π \Pi Π表示组合价值
Π = − f + ∂ f ∂ S S \Pi=-f+\frac{\partial f}{\partial S}S Π=f+SfS
Δ t \Delta t Δt时间的变化为
Δ Π = − Δ f + ∂ f ∂ S Δ S Δ Π = ( − ∂ f ∂ t − 1 2 ∂ 2 f ∂ S 2 σ 2 S 2 ) Δ t \begin{aligned} &\Delta\Pi=-\Delta f+\frac{\partial f}{\partial S}\Delta S\\ &\Delta\Pi=(-\frac{\partial f}{\partial t}-\frac{1}{2}\frac{\partial^2f}{\partial S^2}\sigma^2S^2)\Delta t \end{aligned} ΔΠ=Δf+SfΔSΔΠ=(tf21S22fσ2S2)Δt
根据价值取决于标的所承担的风险关系, Δ Π / Π = r Δ t \Delta\Pi/\Pi=r\Delta t ΔΠ/Π=rΔt
( ∂ f ∂ t + 1 2 ∂ 2 f ∂ S 2 σ 2 S 2 ) Δ t = r ( f − ∂ f ∂ S ) Δ t (\frac{\partial f}{\partial t}+\frac{1}{2}\frac{\partial^2f}{\partial S^2}\sigma^2S^2)\Delta t=r(f-\frac{\partial f}{\partial S})\Delta t (tf+21S22fσ2S2)Δt=r(fSf)Δt
移项得到
∂ f ∂ t + 1 2 ∂ 2 f ∂ S 2 σ 2 S 2 + r S ∂ f ∂ S = r f \frac{\partial f}{\partial t}+\frac{1}{2}\frac{\partial^2f}{\partial S^2}\sigma^2S^2+rS\frac{\partial f}{\partial S}=rf tf+21S22fσ2S2+rSSf=rf

边界条件

对于欧式看涨期权,边界条件为
c ( S , t ) = max ⁡ { S − K , 0 } , t = T c(S, t)=\max\{S-K, 0\}, t=T c(S,t)=max{SK,0},t=T
S ( t ) = 0 S(t)=0 S(t)=0时,期权没有价值,边界条件为
c ( 0 , t ) = 0 c(0, t)=0 c(0,t)=0
S ( t ) → ∞ S(t)\to\infty S(t)时, c ( S , t ) → ∞ c(S, t)\to\infty c(S,t),期权的价值等于股票的价值
c ( S , t ) ∼ S , S → ∞ c(S, t)\sim S, S\to \infty c(S,t)S,S

BS期权定价公式

综合BS模型和约束条件可以得到
∂ f ∂ t + r S ∂ f ∂ S + 1 2 σ 2 S 2 ∂ 2 f ∂ S 2 = r f s . t . { c ( 0 , t ) = 0 S ( t ) = 0 c ( S , t ) ≈ S , S → ∞ c ( S , T ) = max ⁡ { S − K , 0 } , t = T \frac{\partial f}{\partial t}+rS\frac{\partial f}{\partial S}+\frac{1}{2}\sigma^2S^2\frac{\partial^2f}{\partial S^2}=rf\\ s.t.\begin{cases} c(0, t)=0\\ S(t)=0\\ c(S, t)\approx S, S\to \infty \\ c(S, T)=\max\{S-K, 0\}, t=T \end{cases} tf+rSSf+21σ2S2S22f=rfs.t.c(0,t)=0S(t)=0c(S,t)S,Sc(S,T)=max{SK,0},t=T
解出欧式期权定价公式,在到期时刻为 T T T,行权价格为 K K K,标的资产价格 S S S服从几何布朗运动的欧式看涨期权价格为
c = S N ( d 1 ) − K e − r ( T − t ) N ( d 2 ) d 1 = ln ⁡ ( S / K ) + ( r + σ 2 / 2 ) ( T − t ) σ T − t d 2 = ln ⁡ ( S / K ) + ( r − σ 2 / 2 ) ( T − t ) σ T − t \begin{aligned} &c=SN(d_1)-Ke^{-r(T-t)}N(d_2)\\ &d_1=\frac{\ln(S/K)+(r+\sigma^2/2)(T-t)}{\sigma\sqrt{T-t}}\\ &d_2=\frac{\ln(S/K)+(r-\sigma^2/2)(T-t)}{\sigma\sqrt{T-t}} \end{aligned} c=SN(d1)Ker(Tt)N(d2)d1=σTt ln(S/K)+(r+σ2/2)(Tt)d2=σTt ln(S/K)+(rσ2/2)(Tt)
根据平价关系可以推出欧式看跌期权的价格
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=Ker(Tt)N(d2)SN(d1)

案例

N ( x ) N(x) N(x)是标准正态分布的累积分布函数,可以由以下公式近似计算
N ( x ) = { 1 − n ( x ) ( a 1 k + a 2 k 2 + a 3 k 3 + a 4 k 4 + a 5 k 5 ) , x ≥ 0 1 − N ( − x ) n ( x ) = 1 2 π e − x 2 / 2 k = 1 1 + γ x γ = 0.2316419 a 1 = 0.319381530 a 2 = − 0.356563782 a 3 = 1.781477937 a 4 = − 1.821255978 a 5 = 1.330274429 N(x)= \begin{cases} 1-n(x)(a_1k+a_2k^2+a_3k^3+a_4k^4+a_5k^5), x\geq 0 \\ 1-N(-x)\\ n(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}\\ k=\frac{1}{1+\gamma x}\\ \gamma=0.2316419\\ a_1=0.319381530\\ a_2=-0.356563782\\ a_3=1.781477937\\ a_4=-1.821255978\\ a_5=1.330274429 \end{cases} N(x)=1n(x)(a1k+a2k2+a3k3+a4k4+a5k5),x01N(x)n(x)=2π 1ex2/2k=1+γx1γ=0.2316419a1=0.319381530a2=0.356563782a3=1.781477937a4=1.821255978a5=1.330274429
例 1:计算符合标准正态分布变量 x x x满足 x < 1 x<1 x<1的概率
解析
根据近似公式计算

#include<iostream>
#include<vector>
#include<cmath>
#include<cstring>
#include<cassert>
#include<iomanip>
#include<random>
#include<map>
using namespace std;

const double pi=3.1415926;

double N(const double &x){
    if(x>6.0) return 1.0;
    if(x<-6.0) return 0.0;
    double b1=0.31938153;
    double b2=-0.356563782;
    double b3=1.781477937;
    double b4=-1.821255978;
    double b5=1.330274429;
    double p=0.2316419;
    double c=1.0/sqrt(2*pi);
    double a=fabs(x);
    double k=1.0/(1+a*p);
    double b=c*exp(-pow(x, 2)/2.0);
    double n=((((b5*k+b4)*k+b3)*k+b2)*k+b1)*k;
    n=1.0-b*n;
    if(x<0.0) n=1.0-n;
    return n;
}

int main(){
    cout<<"N(1)="<<fixed<<setprecision(4)<<N(1)<<endl;
}

python可使用scipy.stats.norm中的库函数计算

from scipy.stats import norm
print(norm.cdf(1)) # 计算累积概率密度
print(norm.ppf(0.8413)) # 计算指定cdf的分位数

例 2:假设标的资产价格为 50 50 50,行权价格为 50 50 50,无风险年利率是 10 % 10\% 10%,年波动率是 30 % 30\% 30%,权利期为6个月,求对应欧式看涨和欧式看跌期权价格.
解析
计算参数
d 1 = ln ⁡ ( S / K ) + ( r + σ 2 / 2 ) ( T − t ) σ T − t = ( 0.1 + 0. 3 2 / 2 ) ∗ 0.5 0.3 ∗ 0.5 d 2 = ln ⁡ ( S / K ) + ( r − σ 2 / 2 ) ( T − t ) σ T − t = ( 0.1 − 0. 3 2 / 2 ) ∗ 0.5 0.3 ∗ 0.5 c = S N ( d 1 ) − K e r ( T − t ) N ( d 2 ) p = K e − r ( T − t ) N ( − d 2 ) − S N ( − d 1 ) \begin{aligned} &d_1=\frac{\ln(S/K)+(r+\sigma^2/2)(T-t)}{\sigma\sqrt{T-t}}=\frac{(0.1+0.3^2/2)*0.5}{0.3*\sqrt{0.5}}\\ &d_2=\frac{\ln(S/K)+(r-\sigma^2/2)(T-t)}{\sigma\sqrt{T-t}}=\frac{(0.1-0.3^2/2)*0.5}{0.3*\sqrt{0.5}}\\ &c=SN(d_1)-Ke^{r(T-t)}N(d_2) \\ &p=Ke^{-r(T-t)}N(-d_2)-SN(-d_1) \end{aligned} d1=σTt ln(S/K)+(r+σ2/2)(Tt)=0.30.5 (0.1+0.32/2)0.5d2=σTt ln(S/K)+(rσ2/2)(Tt)=0.30.5 (0.10.32/2)0.5c=SN(d1)Ker(Tt)N(d2)p=Ker(Tt)N(d2)SN(d1)

#include<iostream>
#include<vector>
#include<cmath>
#include<cstring>
#include<cassert>
#include<iomanip>
#include<random>
#include<map>
using namespace std;

const double pi=3.1415926;

double N(const double &x){
    if(x>6.0) return 1.0;
    if(x<-6.0) return 0.0;
    double b1=0.31938153;
    double b2=-0.356563782;
    double b3=1.781477937;
    double b4=-1.821255978;
    double b5=1.330274429;
    double p=0.2316419;
    double c=1.0/sqrt(2*pi);
    double a=fabs(x);
    double k=1.0/(1+a*p);
    double b=c*exp(-pow(x, 2)/2.0);
    double n=((((b5*k+b4)*k+b3)*k+b2)*k+b1)*k;
    n=1.0-b*n;
    if(x<0.0) n=1.0-n;
    return n;
}

void option_price(const double &S, const double &K, const double &r, const double &sigma, const double &tm){
    double d1=(log(S/K)+(r+pow(sigma, 2)/2)*tm)/(sigma*sqrt(tm));
    double d2=d1-sigma*sqrt(tm);
    // call option price
    double c=S*N(d1)-K*exp(-r*tm)*N(d2);
    // put option price
    double p=K*exp(-r*tm)*N(-d2)-S*N(-d1);
    cout<<"call option price: "<<c<<endl;
    cout<<"put option price: "<<p<<endl;
}


int main(){
    option_price(50, 50, 0.1, 0.3, 0.5);
    return 0;
}

python计算期权价格

from scipy.stats import norm
from math import log

def option_price(S, K, r, sigma, tm):
    d1=log(S/K)+(r+sigma**2/2)*tm/(sigma*sqrt(tm))
    d2=d1-sigma*sqrt(tm)
    c=S*norm.cdf(d1)-K*exp(-r*tm)*norm.cdf(d2)
    p=K*exp(-r*tm)*norm.cdf(-d2)-S*norm.cdf(-d1)
    print('call option price is {:.4f}'.format(c))
    print('put option price is {:.4f}'.format(p))
    
option_price(50, 50, 0.1, 0.3, 0.5)

参考资料

black-scholes model solution

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Quant0xff

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值