In finance, there are areas where formulas tend to get involved. Sometimes it may be easier to follow an
exact computer routine. I have made some C++ subroutines that implements common algoritms in finance.
Typical examples are option/derivatives pricing, term structure calculations, mean variance analysis.
These routines are presented together with a good deal of explanations and examples of use, but it is by
no means a complete "book" with all the answers and explanations. I'm hoping to turn it into a book, but
even in its incomplete state is should provide a good deal of useful algorithms for people working within
the field of finance. The manuscript and codes will be added to as I get the time. All the code should
conform to the current ANSI C++ standard.
I am using C++ for most of my econometric work, and have made a number of general utilities for that purpose, mainly for dealing with time
series observations. The classes for empirical financial data is documented and collected in this
The classes for financial data contains the following components:
Date class: Useful in a number of contexts to abstractly define a
date as an object. This is a very crude date class, and is by no means
general. I use it for empirical financial data, and it works fine for that
purpose. Other purposes needs some work. There are some more general date
classes in public domain which I would recommend if your purpose is anything
else than keeping track of dated observations.
Dated observations class: Work with time series data in a general
way. Link a date with an observation, and then write general
routines that work on this. This is a fully templated version
Dated observations: spesifically for financial time series.
A specialization of the previous, where we use the particular example of dated
observations of double (dated), with additional
functions related to this. I use it for empirical financial data.
Security Price History :
Similar to the dated observations class, but now the data is assumed to be histories of security prices, where the data can be all of
bid/trade/ask.