QuantLib: Net Present Value Calculation
When you have a series of cash flows you will normally want to know the net present value of those cash flows. The net present value (NPV) of a series of cash flows is calculated as the sum of all…
Read more
When you have a series of cash flows you will normally want to know the net present value of those cash flows. The net present value (NPV) of a series of cash flows is calculated as the sum of all…
Read more
In addition to the CashFlow class, QuanLib defines a number of helper functions that analyse cash flows. These function operate on sequences arrays of cash flows which, in QuantLib, are termed legs. typedef std::vector< boost::shared_ptr<CashFlow> > Leg; The functions for…
Read more
In a previous post I discussed the abstract class TermStructure that defines methods common to any kind of term structure. It was pointed out that many classes inherit from the TermStructure class, including a class called YieldTermStructure. This class is, again,…
Read more
The LastFixingQuote is an implementation of the abstract Quote class. LastFixingQuote represents a quote for the last available fixing of an index. Essentially it is a simple wrapper around the Index class to allow indices to be used as Quotes. class…
Read more
Quotes are one of the most basic pieces of financial information. A quote is a value of any market observable. Quotes come in many shapes and forms and usually reflect the price at which a commodity traded. The Quote class in…
Read more
Financial instruments are assets that can be traded and thus have a financial value attached to them. The value is usually expressed by the net present value (NPV) which is the financial value of the instrument at a given date….
Read more
Previously, I have talked about indices and have looked at the Index class in QuantLib. In this article I will talk about a specialization of the Index class, the InterestRateIndex class. This class extends the basic Index with functionality that…
Read more
Sometimes objects can act as intermediaries in a calculation. This means they receive data from one object, perform some operation on the data and provide the results to a third object. Such objects act as both observer and observable objects….
Read more
The observer design pattern is a classic design pattern that lets objects, called observables, notify a number of dependant objects, called observers, when a change of the observable’s state occurs. This is often used in distributed event handling systems and…
Read more
Dividends are a simple form of cash flows in which a predetermined amount of money is paid out at a specified date. There are two types of dividends, the fixed divided and the fractional dividend. The fixed dividend pairs out…
Read more