外匯下跌和回調的奇怪三角洲,罷工低於障礙
根據第 139、141 和 145 頁上有關外匯期權的文本,我正在嘗試計算在阻力位下方的行權價的下跌和賣出看漲期權的增量。這是一個快速而骯髒的 Python 程式碼(為簡單起見,我假設利率為 0 並忽略回扣):
from scipy.stats import norm from math import log, sqrt def delta(ttm,S,K,H,sig): x1 = ((sig*sqrt(ttm))**-1) * (log(S/H)+(0.5*sig**2)*ttm) y1 = ((sig*sqrt(ttm))**-1) * (log(H/S)+(0.5*sig**2)*ttm) mu = -0.5*sig**2 lam = 1+(mu*sig**-2) E = S*((H/S)**(2*lam))*norm.cdf(y1)-K*((H/S)**(2*lam-2))*norm.cdf(y1-sig*sqrt(ttm)) dDdS = norm.cdf(x1)-K*(norm.pdf(x1)/(sig*sqrt(ttm)))*(1-(K/H)) dEdS = (2/S)*(1-lam)*E-((H/S)**(2*lam))*norm.cdf(y1) \ - ((H/S)**(2*lam))*(norm.pdf(y1)/(sig*sqrt(ttm)))*((K/H)-1) return dDdS -dEdS #args: ttm,spot,strike,barrier,vol delta(0.2,1400,1300,1350,0.2) >> -193.12173389762643 #this looks bad delta(0.2,1.400,1.300,1.350,0.2) >> 0.6447696223910977
http://www.quantonline.co.za/documents/FxDerivativesAdvFinT1.pdf
我的問題與程式碼無關。我很確定這是正確的,但真的很想知道為什麼結果如此奇怪?這個增量真的會變成負數(我認為不會),還是公式錯誤?也許其他人已經閱讀了提到的文字並可以發表評論?
價錢
為了回答您有關 delta 計算的問題,我需要先簡要介紹一下定價。當標的資產遵循幾何布朗運動時,障礙期權可以很容易地使用圖像方法進行定價;參見例如 Buchen (2001)。我使用的符號與我的論文 Zhang 和 Thul(2017 年)中的符號非常相似,我參考了它的附錄 A 和 B 了解詳細資訊(抱歉插入)。
使用這種方法,我們可以證明,在行使價上方有一個障礙的下跌看漲期權的價格由下式給出
$$ \begin{equation} \tilde{V}(S, \tau) = \mathcal{A}_B^+(S, \tau) - K \mathcal{B}_B^+(S, \tau) - \stackrel{B}{\mathcal{I}} \left{ \mathcal{A}_B^+(S, \tau) - K \mathcal{B}_B^+(S, \tau) \right}, \end{equation} $$ 在哪裡
$$ \begin{eqnarray} \mathcal{A}\xi^s (S, \tau) & = & S e^{-\delta \tau} \mathcal{N} \left( s d_1 \right),\ \mathcal{B}\xi^s (S, \tau) & = & e^{-r \tau} \mathcal{N} \left( s d_0 \right),\ d_\eta & = & \frac{1}{\sigma \sqrt{\tau}} \left( \ln \left( \frac{S}{\xi} \right) + \left( r - \delta + \left( \eta - \frac{1}{2} \right) \sigma^2 \right) \tau \right),\ \stackrel{B}{\mathcal{I}} \left{ \tilde{V}(S, \tau) \right} & = & \left( \frac{S}{B} \right)^{2 \alpha} \tilde{V} \left( \frac{B^2}{S}, \tau \right),\ \alpha & = & \frac{1}{2} - \frac{r - \delta}{\sigma^2}. \end{eqnarray} $$ 這裡, $ \mathcal{A}\xi^s(S, \tau) $ 如果一個資產二元期權的估值函式支付一個單位的標的資產如果 $ s S_T > s \xi $ 在哪裡 $ s \in { -1, +1 } $ 表示看跌或看漲。相似地, $ \mathcal{B}\xi^s(S, \tau) $ 是償還一個貨幣單位的債券二元期權的估值函式。 $ \stackrel{B}{\mathcal{I}} $ 稱為圖像運算元。
為了得到導數,我們使用
$$ \begin{eqnarray} \frac{\partial}{\partial S} \mathcal{A}\xi^s(S, \tau) & = & e^{-\delta \tau} \mathcal{N} \left( s d_1 \right) + s S e^{-\delta \tau} \mathcal{N}’ \left( s d_1 \right) \frac{\partial d_1}{\partial S},\ \frac{\partial}{\partial S} \mathcal{B}\xi^s(S, \tau) & = & s e^{-r \tau} \mathcal{N}’ \left( s d_0 \right) \frac{\partial d_0}{\partial S},\ \frac{\partial}{\partial S} d_\eta & = & \frac{1}{S \sigma \sqrt{\tau}},\ \frac{\partial}{\partial S} \stackrel{B}{\mathcal{I}} \left{ \tilde{V}(S, \tau) \right} & = & \left( \frac{S}{B} \right)^{2 \alpha} \left( \frac{2 \alpha}{S} \tilde{V} \left( \frac{B^2}{S}, \tau \right) - \frac{B^2}{S^2} \frac{\partial \tilde{V}}{\partial S} \left( \frac{B^2}{S}, \tau \right) \right). \end{eqnarray} $$ 我沒有完成檢查這是否真的與您引用的公式一致的繁瑣任務。
程式碼
import numpy import scipy.stats as stats def assetBinary1D(maturity, xi, phi, spot, rate, dividend, volatility): totalVolatility = volatility * numpy.sqrt(maturity) dPlus = (numpy.log(spot / xi) + (rate - dividend + 0.5 * volatility**2) * maturity) / totalVolatility dPlusCDF = stats.norm.cdf(phi * dPlus) discountFactorDividend = numpy.exp(-dividend * maturity) value = spot * discountFactorDividend * dPlusCDF derivative = discountFactorDividend * (dPlusCDF + phi * spot * stats.norm.pdf(phi * dPlus) / (spot * totalVolatility)) return (value, derivative) def bondBinary1D(maturity, xi, phi, spot, rate, dividend, volatility): totalVolatility = volatility * numpy.sqrt(maturity) dMinus = (numpy.log(spot / xi) + (rate - dividend - 0.5 * volatility**2) * maturity) / totalVolatility discountFactorRate = numpy.exp(-rate * maturity) value = discountFactorRate * stats.norm.cdf(phi * dMinus) derivative = phi * discountFactorRate * stats.norm.pdf(phi * dMinus) / (spot * totalVolatility) return (value, derivative); def imageOperator(valueFunction, barrier, spot, rate, dividend, volatility): alpha = 0.5 - (rate - dividend) / volatility**2 imageFactor = (spot / barrier)**(2.0 * alpha) value, derivative = valueFunction(barrier**2 / spot) value2 = imageFactor * value derivative2 = imageFactor * (2.0 * alpha / spot * value - (barrier / spot)**2 * derivative) return (value2, derivative2) # attention: only for barriers above the strike! def downAndOutCall(maturity, strike, barrier, spot, rate, dividend, volatility): def valueFunction(spot): value, derivative = assetBinary1D(maturity, barrier, 1.0, spot, rate, dividend, volatility) value2, derivative2 = bondBinary1D(maturity, barrier, 1.0, spot, rate, dividend, volatility) return (value - strike * value2, derivative - strike * derivative2) value, derivative = valueFunction(spot) value2, derivative2 = imageOperator(valueFunction, barrier, spot, rate, dividend, volatility) return (value - value2, derivative - derivative2)
這產生
downAndOutCall(0.2, 1300.0, 1350.0, 1400.0, 0.0, 0.0, 0.2) >> (65.16660154600855, 1.2863311571074099)
三角洲
就像收益函式的斜率一樣,delta 在任何地方都是非負的。
編輯
完整的原始碼可以在GitHub上找到。
參考
Buchen, Peter W. (2001) “形象選擇和障礙之路”,風險雜誌,卷。14,第 9 期,第 127-130 頁
Zhang、Ally Quan 和 Matthias Thul(2017 年)“How much is the Gap? Efficient Jump-Risk Adjusted Valage of Leverage Certificates”,Quantitative Finance,即將出版,可在 SSRN 上獲得