In the previous two chapters, we described the key mathematical models used to simulate the behavior of the underlying assets of financial derivatives (Chapter 2, Mathematical Models) and the main numerical methods used to price them (Chapter 3, Numerical Methods).
In this chapter, we apply these ingredients to the pricing of equity derivatives. We consider two examples: the pricing of a plain vanilla European Call option (basic example) and the pricing of an equity basket on the maximum of two assets (advanced example). We provide the full working C++ implementation for both. Note that if you are new to OOP, it is suggested that you first study the implementation in C followed by the implementation in C++, available in the code bundle of the chapter.