"""
Term Structure Lattice Models

Source: Term Structure Lattice Models by Martin Haugh

Discussion:  This is a little detour from our current project. We are going
to use some of the models built in this exercise to explain swaption pricing
in another project.  However, this is going to be a rather lengthy detour (maybe not).
Once we finish the term structure of zero-coupon bonds, we will pause briefly
and finish the Binomial Application models wwe are working on.  The two projects are
eerily similar but there are subtle differences.  I did a class by this author on 
Coursera about two years ago and the materials in this article are very close to the 
ones used in the class.  Eventually we will start building the models on CVA.
Lets get started:
    
TO DOs:
(1) Computing the Term Struture from the Lattice
(2) Pricing Interest Rate Derivatives
(a) Pricing a European Call Option on a Zero-Coupon Bond
(b) Pricing an American Put Option on a Zero-Coupon Bond
(c) Pricing a Forward Contract on a Coupon-Bearing Bond
(d) Pricing a Futures Contract on a Coupon-Bearing Bond
(e) Pricing a Swap
(f) Pricing a Caplet
(g) Pricing a Payer Swaption in a BDT Model
"""
