Lecture 1. A  simple procedural Monte Carlo

This module takes as its starting point the construction a simple monolithic procedural implementation of a basic time-stepping Monte Carlo method of option valuation.

Topics:  file layout and coding standards;  encapsulation into functions;  separation in translation units;  the (mis)use of static variables;  syntactic speed-ups and pre-computing;  the cost of exp().

Lecture 2. 
Introducing objects:  basic syntax and design

The procedural application of module 1 is converted into an application with functionality split between objects.  Constructs option,  process and accumulator objects.

Topics:  Class declaration and definition;  constructors/destructors; public and private functions and data;  forward declarations and decoupling; initializer lists;  identifying objects in the Monte Carlo application; encapsulation and decoupling in the MC application;  telepathy and avoiding it;  pointers to objects;  memory handling.

Lecture 3. 
Developing the basic structure

The basic objects in the module 2 are refined and developed by introducing I/O objects,  a stopwatch, an application wrapper object,  and a valuation object.  A path,  coded as a std∷vector,  is introduced.

Topics:  std∷vector;  object interaction (dispatching);  exception handling.

Lecture 4. 
Introducing polymorphism:  basic syntax

In the application developed in module 2 it is awkward to value different options.  Module 3 introduces and implements polymorphism.  It constructs polymorphic option,  process and application objects.  The concept of a pseudo-factory,  encapsulating object creation,  is introduced and implemented.

Topics: polymorphism and base classes;  pure virtual functions,  inheritance,  and interfaces;  the this pointer;  double dispatching;  output registration with std∷map;  the decorator pattern with Monte Carlo.

Lecture 5. A lattice application

A basic procedural lattice method is constructed.  The objects that support it are identified and integrated into the application developed in module 4.  The module 5 application can value American and Bermudan style options,  with the lattice,  and European style options,  with simulation.

Topics:  slices and extending the design of the option,  process and valuation objects;  whether to use composition or inheritance;  the pimple pattern.

Lecture 6. 
Advanced topics in class design

Motivated by the inconvenience of zero-based arrays and vectors in the lattice application this module develops a vector class that illustrates a number of advanced features of C++ object design.  In the module 6 application std∷vector is replaced by the new vector class.

Topics: deep and shallow copy;  the copy constructor and copy-assignment;  the  rule of three;  exception safety;  clone() and swap(); operator overloading;  friend methods.

Lecture 7. Polymorphic I/O

So far I/O has been comparatively crude.  Module 7 now addresses polymorphic I/O including I/O to and from file.  Objects request input using parameter classes.  A singleton IO object is introduced.  An environment object is created to manage I/O choice.

Topics:  streams;  opening modes;  methods and manipulators;  I/O to file;  random access files;  designing polymorphic input and output;   the singleton pattern.

Lecture 8. 
Generic programming and templates

This module provides background material required for the template factory described in module 10.  Template inputter functions are added to the model 7 application.

Topics:  templates,  declaration and definition;  the typename keyword; the inclusion model;  template member functions;  class templates;  non-member function templates;  full and partial specialization.

Lecture 9. Design patterns with objects

This module develops a non-template polymorphic application factory,  a precursor to the template factory developed in module 10.

Topics:  registration and call-back;  the factory pattern.

Lecture 10. 
A template factory

The non-template application factory of module 9 is converted in a full template factory.  Separate IO and environment factories are added.  The progress made since module 1 is assessed.

Topics:  mix-in classes;  traits;  printable objects;  the configuration object

Final Practical Project.