11. (Two-Dimensional Binomial Method, Small Project) The goal of this exercise is to implement the algorithm for...
Question:
11. (Two-Dimensional Binomial Method, Small Project)
The goal of this exercise is to implement the algorithm for the two-dimensional binomial method as discussed in Section 12.8. In particular, we wish to write code for the different use cases and we then integrate the code into the software framework that we introduced in Chapter 11. Alternatively, you could design a new software framework for two-dimensional problems.
Answer the following questions:
a) Make an inventory of the entities and modules that the algorithm will need. We note that the core process is to price a range of two-factor European and American options using the two-factor binomial method. Describe the steps (activities) that map the core process’s input to its output.
b) Determine how to design and implement two-factor option payoffs and data (for a list, see Haug, 2007):
Spread Call: max (0,Q1S1 + Q2S2 − K)
Spread Put: max (0,K + Q2S2 − Q1S1)
Call option on maximum: max (0, max(Q1S1,Q2S2) − K)
Put option on maximum: max (0,K −max(Q1S1,Q2S2))
Exchange option: max (0,Q2S2 − Q1S1)
(12.45)
where Q1, Q2 are the fixed quantities of the two assets, respectively, and K is the strike price. Furthermore, S1 and S2 are the underlying assets.
The design must be so reusable and flexible that it can be used in the current binomial pricer as well as playing the role of the initial condition in PDE/finite difference methods. Furthermore, the code will be used in Monte Carlo option pricers. A requirement is that the interface to the payoff code should be standardised (for example, using function objects or lambda functions) and it should be extendible without having to modify client code. You can choose between polymorphic class hierarchies, the CRTP pattern, function objects and free functions to implement your solutions.
c) Design the ADT that models the parameters of the two-factor SDE that describes the behaviour of the underlying stocks.
d) Decide how to implement the nodes of the underlying lattice ADT (recall that we used up and down parameters in Chapter 11). For example, we could use the explicit formulae:
Sn
(1)j, k = S1 exp(jΔx1) (first stock)
Sn
(2)j, k = S2 exp(kΔx2) (second stock)
where Δx1 and Δx2 are defined in equation (12.25). S1 and S2 are the stock prices at t = T and Sn (i)j, k are the stock prices at node (j, k), i =1, 2. Alternatively, you can use the formulae for the up and down parameters as discussed in Haug (2007). Specify the interface of the two-dimensional lattice ADT.
e) Create the mechanism functions to price European and American options (note how we created the Level 2 functionality in Chapter 11 in the case of one-factor models).
f) Create the Level 3 functionality to configure and initialise the application. Test your application on a range of two-factor option pricing problems by comparing the solution with the exact solution (or an accurate approximate solution), the Monte Carlo solution and the solution from the PDE/finite difference approach.
Step by Step Answer: