The next two chapters are concerned with developing numerical methods and code to price options using lattice methods, in particular the binomial and trinomial methods. We first discuss the underlying data structures that are used in the pricing models. We then describe the pricing of one-factor European and American options using the binomial and trinomial methods.
In this chapter we concentrate on software design issues. It is important to decide how to design lattice data structures and to determine which C++ features to use in order to promote code reusability and maintainability, for example:
std::function<>and new data structures such as
std::tuple<>) to promote code reusability. Furthermore, we can use lambda functions to configure applications.