Article Menu |
Digital Spread Optionsby M.A. (Thijs) van den Berg
[edit] The Digital Spread optionDigital spread options have a payoff that depends on the difference -spread- between two underlying S1,S2. The payoff is 1 unit (Dollar, Euro) if the spread S1-S2 is greater that a strike K, and zero otherwise. An example contract would be: you get 1 dollar is the price of Apple stocks is more than 50 dollars higher than that of IBM exactly one year from now. [edit] PricingThere is no analytical simple formula for the price of digital spread options. High accurate (arbitrary precision) approximations can however be calculating using the formula's below. The pricing formulas for the digital spread call and put option are given by:
The table below gives the numbers for the 16 point Gauss Legendre quadrature scales to the range [-4 to 4]
[edit] ExampleWhat is the value of the following digital spread call? The contract pays 1 dollar is the price of Apple stock is at least 40 dollar higher than that of IBM in one year time. The current market prices for Apple stock is 146, and for IBM 116. The risk free interest rate is 5%. The stocks have a correlation of 0.55, and both Apple and IBM stock have a volatility of 0.25
For i=1 we get:
repeating this for i=2 to 16, summing the results and multiplying with e − rt we finally get a value of 0.3588 [edit] VBA (Visual Basic for Applications) code
Function DigitalSpreadOption( _ S1 As Double, _ S2 As Double, _ v1 As Double, _ v2 As Double, _ Y1 As Double, _ Y2 As Double, _ c As Double, _ r As Double, _ t As Double, _ K As Double, _ IsCall As Boolean) As Double 'The Digital Spread call has a payoff of 1 if S1-S2>K and else zero. 'The Digital Spread put has a payoff of 1 if S1-S2<K and else zero. ' PARAMETERS: ' - S1,S2 are the present values of the underlyings. ' - v1,v2 the volatilities of the underlyings ' - Y1,Y2 the yields: Use zero yield for futures, ' set the yield to the interest rate for stocks ' - c the correlation between S1,S2 ' - r the interest rate (continuously compounded) ' - t time till expiration in years ' - K Strike ' NOTES: ' This function uses two non standard functions: '- NormDens, the density function of the standard normal distribution '- NormProb, the cumulative standard normal function 'Gauss Legendre Quadrature on the interval -5 to 5 Dim x_i As Variant Dim w_i As Variant x_i = Array( _ -4.98631930924741, -4.92805755772634, -4.82381127793753, -4.6745303796887, _ -4.48160577883026, -4.24683806866285, -3.97241897983971, -3.66091059370145, _ -3.31522133465108, -2.93857878620381, -2.53449954466115, -2.10675638065318, _ -1.65934301141064, -1.19643681126069, -0.722359807913982, -0.241538328438692, _ 0.241538328438692, 0.722359807913982, 1.19643681126069, 1.65934301141064, _ 2.10675638065318, 2.53449954466115, 2.93857878620381, 3.31522133465108, _ 3.66091059370145, 3.97241897983971, 4.24683806866285, 4.48160577883026, _ 4.6745303796887, 4.82381127793753, 4.92805755772634, 4.98631930924741) w_i = Array( _ 0.035093050047348, 8.13719736545292E-02, 0.126960326546311, 0.171369314565107, _ 0.214179490111091, 0.254990296311873, 0.293420467392676, 0.329111113881808, _ 0.361728970544243, 0.390969478935351, 0.416559621134734, 0.438260465022019, _ 0.455869393478819, 0.469221995404022, 0.478193600396374, 0.482700442573639, _ 0.482700442573639, 0.478193600396374, 0.469221995404022, 0.455869393478819, _ 0.438260465022019, 0.416559621134734, 0.390969478935351, 0.361728970544243, _ 0.329111113881808, 0.293420467392676, 0.254990296311873, 0.214179490111091, _ 0.171369314565107, 0.126960326546311, 8.13719736545292E-02, 0.035093050047348) Dim E1 As Double Dim E2 As Double Dim m_i As Double Dim Prob As Double E1 = S1 * Exp((Y1 - 0.5 * v1 * v1) * t) E2 = S2 * Exp((Y2 - 0.5 * v2 * v2) * t) Prob = 0 For i = LBound(x_i) To UBound(x_i) m_i = Log((E1 * Exp(x_i(i) * v1 * Sqr(t)) - K) / E2) _ / (v2 * Sqr(t)) Prob = Prob + w_i(i) * NormDens(x_i(i)) _ * NormProb((m_i - c * x_i(i)) / Sqr(1 - c * c)) Next If IsCall Then DigitalSpreadOption = Prob * Exp(-r * t) Else DigitalSpreadOption = (1# - Prob) * Exp(-r * t) End If End Function
Public Function NormProb(ByVal x As Double) As Double Dim t As Double Const b1 = 0.31938153 Const b2 = -0.356563782 Const b3 = 1.781477937 Const b4 = -1.821255978 Const b5 = 1.330274429 Const p = 0.2316419 Const c = 0.39894228 If x >= 0 Then t = 1# / (1# + p * x) NormProb = (1# - c * Exp(-x * x / 2#) * t * _ (t * (t * (t * (t * b5 + b4) + b3) + b2) + b1)) Else t = 1# / (1# - p * x) NormProb = (c * Exp(-x * x / 2#) * t * _ (t * (t * (t * (t * b5 + b4) + b3) + b2) + b1)) End If End Function
Public Function NormDens(ByVal x As Double) As Double NormDens = Exp(-0.5 * x * x) / 2.506628274631 End Function
[edit] Comments
[edit] Henk Koppelaar said ...[edit] Sitmo said ...Thanks you! That was a typo, it should have been sigma_2 (I've updated the equation) --Admin 13:38, 30 July 2007 (CEST) |








are the abscesses and weights of Gauss Legendre quadrature scaled to a region in which the standard normal density function is significantly positive.
= 148.7633252
= 118.1955187
= -3.957604
= 0.108610
= -8.175308
= 3.4207E-13
= 1.5842E-04
= 5.88577E-18
I don't understand the nariable named v[2] in the denumerator of m[i].
What is it?
--Henk Koppelaar 13:29, 29 July 2007 (CEST)