Submitted by: Submitted by not2bad
Views: 10
Words: 1545
Pages: 7
Category: Business and Industry
Date Submitted: 02/01/2016 08:09 AM
Q1: Please select appropriate answers from choices (a) to (x) to fill in 5 blank lines to finish the VBA code for binomial pricing
(Note: Style = “euro” or “amer”, C_P = 1 for call and -1 for put, n as the number of steps, dt is the time length of each step, u is up movement multiplier, Pu is the probability of going up)
===================================================================================
Function binomial_all2(Style As String, C_P As Double, spot As Double, strike As Double, _
timetomaturity As Double, risk_free As Double, div As Double, _
vol As Double, n As Integer) As Double
Dim price(), S() As Double
Dim dt, u, Pu, discount As Double
Dim I, j, Arraysize As Integer
dt = timetomaturity / n
discount = Exp(-risk_free * dt)
Arraysize = ____(1)________
u = Exp(vol * dt ^ (1 / 2))
d = 1 / u
Pu = (Exp((risk_free - div) * dt) - d) / (u - d)
ReDim price(Arraysize)
ReDim S(Arraysize)
S(0) = spot * (u ^ n)
For I = 1 To n
S(I) = S(I - 1) * ___(2)____
Next I
For I = 0 To n
price(I) = Application.WorksheetFunction.Max(0#, C_P * (S(I) - strike))
Next I
For j = n - 1 To ___(3)____
For I = 0 To j
If Style = "euro" Then
price(I) = discount * (Pu * price(I) + (1 - Pu) * price(I + 1))
ElseIf Style = "amer" Then
price(I) = discount * (Pu * price(I) + (1 - Pu) * price(I + 1))
S(I) = ___(4)________
price(I) = WorksheetFunction.Max(__(5)____, C_P * (S(I) - strike))
End If
Next I
Next j
binomial_all2 = price(0)
End Function
=====================================================================================
Choices for Q1:
(a) S(I) | (b) S(0) | (c) price(0) |
(d) u | (e)...