C++ in Finance

C++ in Finance I have made some programs for common uses in
finance. They may be of interest to others, so I have made them public under
the GNU Public Licence .

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.

  • PDF (Adobe PDF format) (for viewing)


  • zip file with C++ code.
  • gzipped tar file with C++ code.

Last update: Jun 2014.

Current pagecount: 250+.

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.
  • Stock Price History : A specialization of the above to stocks. The difference is the need to keep track of dividends and
    price adjustments.

Last updated: Apr 2007,

Links

  • newmat a matrix class used in the above.

Source Article

Next Post

Microsoft Business - Small Business Software, Computers, Laptops and More

Mon Apr 10 , 2023
“Microsoft Business Computers and Software At Microsoft we take your business needs as seriously as you do. We know that the modern workplace is fast moving, complex, and requires ever more innovative solutions to keep your team in top form. You’ll find everything you need to gain that competitive edge […]

You May Like