O'Reilly logo

Financial Instrument Pricing Using C++, 2nd Edition by Daniel J. Duffy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11Lattice Models Fundamental Data Structures and Algorithms

11.1 Introduction and Objectives

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:

  • Promoting code reusability and adaptability using the Layers system pattern (POSA, 1996).
  • Using functionality from STL (for example, algorithms and std::function<> and new data structures such as std::tuple<>) to promote code reusability. Furthermore, we can use lambda functions to configure applications.
  • Comparing the quality and accuracy of the solutions in this chapter with previous efforts to price options using the binomial method (for example, Clewlow and Strickland, 1998; Duffy, 2006; Hull, 2006). This can be seen as one step in a process of continuous improvement. It is easy to write software that produces a result, but it is more difficult to adapt that software to support new requirements.
  • Some initial examples of use. Many of the design principles presented here are applicable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required