同じ場所への2つの道
2つのポートフォリオを作ります。A:コールを買い、行使価格の現在価値 K * exp(-rT) を銀行(または無リスク債)に預けます。B:プットを買い、株を買います。満期に株が K より上で終われば、Aはコールの S - K と銀行の K で S、Bは株 S と価値のないプットで S です。K より下で終われば、コールは無価値で失効するのでAは銀行の K だけ、Bはプットの K - S と株 S で K です。どちらの場合も満期に2つのポートフォリオの価値は等しいので、今日の費用も等しくなければなりません。
C + K * exp(-r*T) = P + S so P = C - S + K * exp(-r*T)
import math
spot, strike, rate, t = 100, 100, 0.05, 1
pv_strike = strike * math.exp(-rate * t) # what must be put in the bank today to own K at expiry
print(round(pv_strike, 4)) # 95.1229
call = 10.4506 # a call price we observe
put = call - spot + pv_strike # the parity relation
print(round(put, 4)) # 5.5735
print(round(put + spot - pv_strike, 4)) # 10.4506 and back to the callパリティが崩れるとき:裁定
市場の気配がこの関係を満たさなければ、リスクのない利益が存在します。乖離 (C - P) - (S - K e^(-rT)) を定義します。乖離が正なら、プットに比べてコールが高すぎます。コールを売り、プットを買い、株を買い、行使価格の現在価値を借ります。このポートフォリオは開始時にコストがかからず、株がどう動いても満期に支払いがなく、乖離分を今日手にします。乖離が負ならすべてのレッグを逆にします。実際の市場にはコストやビッド・アスク・スプレッドがあるので小さな乖離は取引できず、それが許容誤差の意味です。
def parity_gap(call, put, spot, strike, rate, t):
return (call - put) - (spot - strike * math.exp(-rate * t))
print(round(parity_gap(11.0, put, 100, 100, 0.05, 1), 4)) # 0.5494 the call at 11.00 is too expensive: sell it
print(round(parity_gap(call, put, 100, 100, 0.05, 1), 4)) # 0.0 consistent prices: nothing to do
def arbitrage_action(call, put, spot, strike, rate, t, tolerance=0.01):
gap = parity_gap(call, put, spot, strike, rate, t)
if gap > tolerance:
return "sell call, buy put, buy stock"
if gap < -tolerance:
return "buy call, sell put, sell stock"
return "none"
print(arbitrage_action(11.0, put, 100, 100, 0.05, 1)) # sell call, buy put, buy stock# The package of the arbitrage, at today's prices: sell the call at 11, buy the put, buy the stock, borrow the strike's present value
cash_today = 11.0 - put - 100 + 100 * math.exp(-0.05 * 1)
print(round(cash_today, 4)) # 0.5494 you are paid the gap now and owe nothing at expiry# A call minus a put is a synthetic forward: it behaves like the stock bought with borrowed money
print(round(10.4506 - put, 4), round(100 - pv_strike, 4)) # 4.8771 4.8771パリティはモデルに依存しないプット・コール・パリティは、株価の動きやボラティリティについての仮定を必要とせず、裁定がないことと、ヨーロピアン(期限前行使なし)であることだけが条件です。だから強力な検証になり、パリティを破る価格モデルは間違いです。アメリカン・オプションや配当があると関係は不等式でしか成り立たなくなるので、使う前に現物価格から配当の現在価値を引きましょう。
C + K * exp(-rT) = P + S:コール+債券はプット+株に等しく、P = C - S + K * exp(-rT)- 乖離
(C - P) - (S - K e^(-rT))が正ならコールを売りプットと株を買う。負なら逆 - パリティはモデルに依存しないので、あらゆる価格モデルの検証に使う。配当や期限前行使があると不等式になる
次はブラック=ショールズの式です。コールとプットの閉じた形の価格式です。
ラボ:採点される内容
parity_put_priceでコールからプットを導く25点parity_call_priceでプットからコールを導く25点parity_gapで価格がパリティからどれだけ離れているかを測る25点arbitrage_actionでリスクのない取引を示す25点