上传者: 38577378
|
上传时间: 2022-03-18 18:58:24
|
文件大小: 36KB
|
文件类型: -
早期写的python障碍式期权的定价脚本,供大家参考,具体内容如下
#coding:utf-8
'''
障碍期权
q=x/s
H = h/x H 障碍价格
[1] Down-and-in call cdi
[2] Up-and-in call cui
[3] Down-and-in put pdi
[4] Up-and-in put pui
[5] Down-and-out call cdo
[6] Up-and-out call cuo
[7] Down-and-out put pdo
[8] Up-and-out put puo
'''
from math import log,sqrt