# 期权探秘2

• 期权 + 零息债券
• 期权 + 标的资产
• 同一标的资产上的多个期权

``````import numpy as np
from matplotlib import pylab
``````

## 1. 期权 + 零息债券 = 保本债券

• 面值为1000元的三年期零息债券
• 标的为股票组合的三年期欧式平值看涨期权

``````price = BSMPrice(Option.Call, 1000, 1000, 0.05, 0.015, 0.1, 3)['price']
print "看涨期权价格:  ", price[1]

``````

• 普通投资者入市期权门槛太高，也会面临更大的买入卖出差价
• 剩余本金的投资利息比银行要低

``````price = BSMPrice(Option.Call, 1000, 1000, 0.05, 0.015, 0.2, 3)['price']
print "波动率为20%时看涨期权价格:  ", price[1]

``````

``````price = BSMPrice(Option.Call, 1100, 1000, 0.05, 0.015, 0.2, 3)['price']
print "波动率为20%、行权价为1100时的看涨期权价格:  ", price[1]

``````

## 2. 股票与单一期权相组合的策略

``````# 定义看涨看跌期权到期收益函数
def call(S):
return max(S - 100.0,0.0) - 40.0

def put(S):
return max(100.0 - S,0.0) - 40.0

callfunc = np.frompyfunc(call, 1, 1)
putfunc = np.frompyfunc(put, 1, 1)
``````

2.1 备保看涨期权承约（writing covered call）

• 卖出以股票为标的的看涨期权
• 持有相应于期权空头的该标的股票

``````spots = np.linspace(0,200,21)

pylab.figure(figsize=(10,7))
pylab.plot(spots, -callfunc(spots), 'b-.',linewidth = 2)
pylab.plot(spots, spots, 'r--',linewidth = 2)
pylab.plot(spots, -callfunc(spots) + spots, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权空头',u'股票多头',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'备保看涨期权承约', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 持有以股票为标的的看涨期权
• 卖空相应份额的该股票

``````spots = np.linspace(0,200,21)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots), 'b-.',linewidth = 2)
pylab.plot(spots, -spots, 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots) - spots, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头',u'股票空头',u'策略组合收益'], prop = font, loc = 'best')
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

## 2.2 保护性看跌期权策略（Protective Put）

• 持有以某股票为标的的看跌期权
• 买入相应于看跌期权份额的该股票

``````spots = np.linspace(0,200,21)

pylab.figure(figsize=(10,7))
pylab.plot(spots, putfunc(spots), 'b-.',linewidth = 2)
pylab.plot(spots, spots, 'r--',linewidth = 2)
pylab.plot(spots, putfunc(spots) + spots, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权多头',u'股票多头',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'受保护看跌期权策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 卖出以某股票为标的的看跌期权
• 卖空相应于看跌期权份额的该股票

``````spots = np.linspace(0,200,21)

pylab.figure(figsize=(10,7))
pylab.plot(spots, -putfunc(spots), 'b-.',linewidth = 2)
pylab.plot(spots, -spots, 'r--',linewidth = 2)
pylab.plot(spots, -putfunc(spots) - spots, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权空头',u'股票空头',u'策略组合收益'], prop = font, loc = 'best')
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

``````def call(S, K, c):
return max(S - K,0.0) - c

def put(S, K, p):
return max(K - S,0.0) - p

callfunc = np.frompyfunc(call, 3, 1)
putfunc = np.frompyfunc(put, 3, 1)
``````

• 买入一份股票标的看涨期权
• 卖出同一股票标的、期权期限相同，但执行价格较高的看涨期权（对于看涨期权来说，执行价格高意味着期权费用较低）

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 75, 40), 'b-.',linewidth = 2)
pylab.plot(spots, -callfunc(spots, 125, 20), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 75, 40) -  callfunc(spots, 125, 20), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，执行价格75',u'看涨期权空头，执行价格125',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'看涨期权构造的牛市差价策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 两个看涨期权均为虚值期权
• 持有的看涨期权为实值期权，卖出的期权为虚值期权
• 两个看涨期权均为实值期权

• 买入一份股票标的看跌期权
• 卖出同一股票标的、期权期限相同，但执行价格较高的看跌期权（对于看跌期权来说，执行价格高意味着期权费用较高）

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, putfunc(spots, 75, 20), 'b-.',linewidth = 2)
pylab.plot(spots, -putfunc(spots, 125, 40), 'r--',linewidth = 2)
pylab.plot(spots, putfunc(spots, 75, 20) - putfunc(spots, 125, 40), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权多头，执行价格75',u'看跌期权空头，执行价格125',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'看跌期权构造的牛市差价策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 买入一份股票标的看跌期权
• 卖出同一股票标的、期权期限相同，但执行价格较低的看跌期权（对于看跌期权来说，执行价格低意味着期权费用较低）

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, putfunc(spots, 125, 40), 'b-.',linewidth = 2)
pylab.plot(spots, -putfunc(spots, 75, 20), 'r--',linewidth = 2)
pylab.plot(spots, putfunc(spots, 125, 40) - putfunc(spots, 75, 20), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权多头，执行价格125',u'看跌期权空头，执行价格75',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'看跌期权构造的熊市差价策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 买入一份股票标的看涨期权
• 卖出同一股票标的、期权期限相同，但执行价格较低的看涨期权（对于看涨期权来说，执行价格低意味着期权费用较高）

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 125, 20), 'b-.',linewidth = 2)
pylab.plot(spots, -callfunc(spots, 75, 40), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 125, 20) -  callfunc(spots, 75, 40), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，执行价格125',u'看涨期权空头，执行价格75',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'看涨期权构造的熊市差价策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 牛市差价：价格`c1`买入执行价格为K1的看涨期权，同时卖出执行价格为`K2`的看涨期权并获得期权费用c2
• 熊市差价：价格`p1`买入执行价格为K1的看跌期权，同时卖出执行价格为`K2`的看跌期权并获得期权费用p2

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 75, 40) -  callfunc(spots, 125, 20), 'b-.',linewidth = 2)
pylab.plot(spots, putfunc(spots, 125, 45) - putfunc(spots, 75, 20), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 75, 40) -  callfunc(spots, 125, 20) + putfunc(spots, 125, 45) - putfunc(spots, 75, 20), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权构造的牛市差价',u'看跌期权构造的熊市差价',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'盒式差价', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.ylim(-50,50)
pylab.grid()
``````

• 买入一个具有较低执行价格`K1`的欧式看涨期权
• 买入一个具有较高执行价格`K3`的欧式看涨期权
• 卖出两个具有中间执行价格K2的欧式看涨期权，其中`K1<K2<K3`，一般来讲，K2接近于当前标的股票价格

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 75, 40), 'b-.',linewidth = 2)
pylab.plot(spots, callfunc(spots, 125, 20), 'g.',linewidth = 2)
pylab.plot(spots, -2*callfunc(spots, 100, 25), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 75, 40) + callfunc(spots, 125, 20) - 2*callfunc(spots, 100, 25), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，行权价75',u'看涨期权多头，行权价125',u'2个看涨期权空头，行权价100', u'蝶式差价组合'], prop = font, loc = 'best')
pylab.title(u'蝶式差价', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.ylim(-75,75)
pylab.grid()
``````

• 买入一个具有较低执行价格`K1`的欧式看跌期权
• 买入一个具有较高执行价格`K3`的欧式看跌期权
• 卖出两个具有中间执行价格`K2`的欧式看跌期权，其中`K1<K2<K3`，一般来讲，`K2`接近于当前标的股票价格

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, putfunc(spots, 75, 20), 'b-.',linewidth = 2)
pylab.plot(spots, putfunc(spots, 125, 40), 'g.',linewidth = 2)
pylab.plot(spots, -2*putfunc(spots, 100, 25), 'r--',linewidth = 2)
pylab.plot(spots, putfunc(spots, 75, 20) + putfunc(spots, 125, 40) - 2*putfunc(spots, 100, 25), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权多头，行权价75',u'看跌期权多头，行权价125',u'2个看跌期权空头，行权价100', u'蝶式差价组合'], prop = font, loc = 'best')
pylab.title(u'蝶式差价', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.ylim(-75,75)
pylab.grid()
``````

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, -callfunc(spots, 75, 40), 'b-.',linewidth = 2)
pylab.plot(spots, -callfunc(spots, 125, 20), 'g.',linewidth = 2)
pylab.plot(spots, 2*callfunc(spots, 100, 25), 'r--',linewidth = 2)
pylab.plot(spots, - callfunc(spots, 75, 40) - callfunc(spots, 125, 20) + 2*callfunc(spots, 100, 25), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权空头，行权价75',u'看涨期权空头，行权价125',u'2个看涨期权多头，行权价100', u'卖空蝶式差价组合'], prop = font, loc = 'best')
pylab.title(u'卖空蝶式差价', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.ylim(-75,75)
pylab.grid()
``````

• 卖出一个具有较短期限的欧式看涨期权
• 买入一个具有较长期限，且行权价和上一个期权相同的看涨期权

``````spots = np.linspace(0,200,41)

longCall = np.zeros(spots.size)
for i in range (1, spots.size):
longCall[i] = BSMPrice(Option.Call, 100, spots[i], 0.05, 0.04, 0.2, 1.5)['price'][1]

pylab.figure(figsize=(10,7))
pylab.plot(spots, - callfunc(spots, 100, 27.5), 'b-.',linewidth = 2)
pylab.plot(spots, longCall - 30, 'r--',linewidth = 2)
pylab.plot(spots, - callfunc(spots, 100, 27.5) + longCall - 30, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权空头，执行价格100',u'看涨期权多头，执行价格100，提前出售',u'日历差价策略组合收益'], prop = font, loc = 'best')
pylab.title(u'日历差价在短期限期权到期日收益示意图', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 股票价格较低时，两个期权都是看涨期权，故其价值均接近于0；投资者损失了构造组合的初始投资费用
• 股票价格很高时，短期限期权空头带来损失`S−K`（其中`S`为股票价格，`K`为行权价）；长期限期权价格接近于`S−K`；总体上，投资者也会损失构造组合的初始投资
• 股票价格接近行权价时，短期限期权带来损益接近于0；长期限期权因为未到期，仍具有潜在价值；投资者会获得一定收入

• 卖出一个具有较短期限的欧式看跌期权
• 买入一个具有较长期限，且行权价和上一个期权相同的看跌期权

``````spots = np.linspace(5,200,40)

longPut = np.zeros(spots.size)
for i in range (0, spots.size):
longPut[i] = BSMPrice(Option.Put, 100, spots[i], 0.05, 0.04, 0.2, 1.5)['price'][1]

pylab.figure(figsize=(10,7))
pylab.plot(spots, - putfunc(spots, 100, 27.5), 'b-.',linewidth = 2)
pylab.plot(spots, longPut - 30, 'r--',linewidth = 2)
pylab.plot(spots, - putfunc(spots, 100, 27.5) + longPut - 30, 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看跌期权空头，执行价格100',u'看跌期权多头，执行价格100，提前出售',u'日历差价策略组合收益'], prop = font, loc = 'best')
pylab.title(u'日历差价在短期限期权到期日收益示意图', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 中性日历差价： 执行价接近于股票当前价
• 牛市日历差价： 执行价高于股票当前价
• 熊市日历差价： 执行价低于股票当前价

## 4. 组合策略（combination）

• 买入一个看涨期权
• 买入一个标的相同、期限相同、行权价相同的看跌期权

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 100, 20), 'b-.',linewidth = 2)
pylab.plot(spots, putfunc(spots, 100, 30), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 100, 20) + putfunc(spots, 100, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，行权价100',u'看跌期权多头，行权价100',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'跨式组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 卖出一个看涨期权
• 卖出一个标的相同、期限相同、行权价相同的看跌期权

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, -callfunc(spots, 100, 20), 'b-.',linewidth = 2)
pylab.plot(spots, -putfunc(spots, 100, 30), 'r--',linewidth = 2)
pylab.plot(spots, -callfunc(spots, 100, 20) - putfunc(spots, 100, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权空头，行权价100',u'看跌期权空头，行权价100',u'策略组合收益'], prop = font, loc = 'best')
pylab.title(u'顶部跨式组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

## 4.2 序列组合（strip）和带式组合（strap）

• 买入一个欧式看涨期权
• 买入两个标的相同、期限相同、行权价相同的看跌期权

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 100, 20), 'b-.',linewidth = 2)
pylab.plot(spots, 2*putfunc(spots, 100, 30), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 100, 20) + 2*putfunc(spots, 100, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，行权价100',u'两个看跌期权多头，行权价100',u'序列组合收益'], prop = font, loc = 'best')
pylab.title(u'序列组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 买入两个个欧式看涨期权
• 买入一个标的相同、期限相同、行权价相同的看跌期权

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, 2*callfunc(spots, 100, 20), 'b-.',linewidth = 2)
pylab.plot(spots, putfunc(spots, 100, 30), 'r--',linewidth = 2)
pylab.plot(spots, 2*callfunc(spots, 100, 20) + putfunc(spots, 100, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'两个看涨期权多头，行权价100',u'一个看跌期权多头，行权价100',u'带式组合收益'], prop = font, loc = 'best')
pylab.title(u'带式组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 序列组合中，投资者认为股价下降的可能性较大
• 带式组合中，投资者认为股价上涨的可能性较大

## 4.3 异价跨式组合（strangle combination）

• 买入一个看涨期权，行权价较高
• 买入一个标的相同、期限相同的看跌期权，行权价较低

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 135, 20), 'b-.',linewidth = 2)
pylab.plot(spots, putfunc(spots, 65, 30), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 135, 20) + putfunc(spots, 65, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，行权价135',u'看跌期权多头，行权价65',u'异价跨式组合收益'], prop = font, loc = 'best')
pylab.title(u'异价跨式组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

• 底部垂直组合需要股价变动更大才能盈利
• 同时，底部垂直组合当股价比较稳定时的损失却也比较小

• 卖出一个看涨期权，行权价较高
• 卖出一个标的相同、期限相同的看跌期权，行权价较低

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, -callfunc(spots, 135, 20), 'b-.',linewidth = 2)
pylab.plot(spots, -putfunc(spots, 65, 30), 'r--',linewidth = 2)
pylab.plot(spots, -callfunc(spots, 135, 20) - putfunc(spots, 65, 30), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权空头，行权价135',u'看跌期权空头，行权价65',u'顶部垂直组合收益'], prop = font, loc = 'best')
pylab.title(u'顶部垂直组合策略', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.grid()
``````

## 5. 具有任意收益形式的组合

• 对于到期日`T`，任意行权价的欧式期权均可以交易

``````spots = np.linspace(0,200,41)

pylab.figure(figsize=(10,7))
pylab.plot(spots, callfunc(spots, 95, 5), 'b-.',linewidth = 2)
pylab.plot(spots, callfunc(spots, 105, 3), 'g.',linewidth = 2)
pylab.plot(spots, -2*callfunc(spots, 100, 4), 'r--',linewidth = 2)
pylab.plot(spots, callfunc(spots, 95, 5) + callfunc(spots, 105, 3) - 2*callfunc(spots, 100, 4), 'k-',linewidth = 2)
font.set_size(15)
pylab.legend([u'看涨期权多头，行权价95',u'看涨期权多头，行权价105',u'2个看涨期权空头，行权价100', u'蝶式差价组合'], prop = font, loc = 'best')
pylab.title(u'蝶式差价', fontproperties = font)
pylab.xlabel(u'标的价格', fontproperties = font)
pylab.ylabel(u'偿付', fontproperties = font)
pylab.ylim(-50,50)
pylab.grid()
``````