• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Books/Materials about Term Structure Payoffs implementation

Joined
6/4/22
Messages
40
Points
118
Hi Community,

Many C++ quantitative books use relatively simple payoffs (e.g. European, America , Barrier options) as examples to illustrate the design of the pricing application. These products’ payoff are pretty easy to implement in MC’s terminal or PDE’s initial condition.

However, the OTC market trades more complex payoffs which involves term structure (e.g. cap/floor, IRS callable, Accumulator, Target forward resumption). And it is not straight-forward in terms of how to integrate their payoff into the pricing engine (MC or PDE).

In practice, I have some questions:
(1) how would you design the Payoff case to make it a term-structure like?
(2) how would you adapt the MC or PDE pricing engine’s input and conditions to be able to price term-structure-like products?
(3) is there any books/resources/code samples to give us an idea of the application design?
 
Well, first there are not many books in C++ for quant finance (most authors of finance books don't know/do C++). Second, PDE methods have traditionally been for equities although they can and have been applied to fixed income (CIR, Hull White), convertible bonds and such-like. Some chapters are in my 2022 PDE book.

No silver bullet. No quick fix.
Plan B Build your own software system. Need knowledge of finance, PDE, C++. And coaching.
 
Last edited:
Just out of curiosity, is your question from a personal (student) perspective or for production software?
 
Just out of curiosity, is your question from a personal (student) perspective or for production software?
Thanks Professor.
The question is more for production software.
I understand that for more complex payoffs we might need to use MC instead of PDE.

One specific example: if I need to price a Bermudian Swaption, whose payoff involves multiple exercise dates, with Monte Carlo.
We will expect to add the exercise dates into the MC’s diffusion time steps also.

But how would C++ quant practitioners design:
(1) the framework of the payoff class to be able to represent different kinds of term-structure payoffs (e.g. Berm Swaption, Cap/Floor and IRS Callable);
(2) the MC engine to be generalized enough to use any un-uniform time mesh and smart enough to check exercise on exercise dates.
 
What research have you done into this? Or is it brainstorming at this stage? Your question is kinda general.

Why not purchase a commercial package?

edit:
for swaptions, see "C# in Financial Markets" by Duffy and Germani (Wiley, 2013)
 
Last edited:
We are using a valuation engine from FinPricing via API. It covers a very broad range of Vanilla and exotic derivatives. There are a generic PDE engine and a generic MC engine inside. One can attach the engines by adding some events for payoffs or early termination boundary conditions. Then the engines will calculate the value via generic backward induction or regression. Hopefully that will give you some ideas on how to design a pricing framework.

You can find more info at Barrier Option Pricing Guide & Excel Add-in | FinPricing
 
Back
Top