cogitolearning
October 10, 2012
Manuals, QuantLib
c++, cashflow, Manual, quantlib
CashFlow is an abstract base class for cash flows. The cash flow interface is implemented by many classes such as SimpleCashFlow, Coupon and many more. The multitude of different cash flows will be handled in another post. Here we will…
Read more
cogitolearning
October 4, 2012
Manuals, QuantLib
c++, dates, events, Manual, quantlib
QuantLib implements a mechanism for handling events which occur on specific dates. Examples of events could be cash flows or … The class Event represents a real life event is defined as an abstract base class from which a specific…
Read more
cogitolearning
October 2, 2012
Manuals, QuantLib
c++, dates, Manual, periods, quantlib
In order to handle date intervals, QuantLib defines the Period class. This class stores an arbitrary time period corresponding to a full number of days. Periods can be constructed using an integer number and a time unit, or using a…
Read more
cogitolearning
September 27, 2012
Manuals, QuantLib
c++, dates, Manual, quantlib
In order to process financial data, we need to have an efficient way of dealing with dates, time periods and calendars. QuantLib provides a range of classes in order to help in this task. The most fundamental class is the…
Read more
cogitolearning
September 14, 2012
Manuals, QuantLib
c++, currencies, exchange rates, Manual, money, quantlib
In earlier posts I have talked about the Money class and ExchangeRates. Exchange rates allow you to exchange money between two currencies. They are also involved in calculations involving money of different currencies. Consider the following code. Money::conversionType = Money::AutomatedConversion;…
Read more
cogitolearning
September 4, 2012
Manuals, QuantLib
c++, currencies, exchange rates, Manual, money, quantlib
In the previous article I spoke about Money. QuantLib supports calculations with Money of different currencies. In order to compute an expression with different currencies, exchange rates have to be defined. This is handled by the ExchangeRate class. This class…
Read more
cogitolearning
September 4, 2012
Manuals, QuantLib
c++, currencies, Manual, money, quantlib
In the previous article the Currency class was introduced, which defines all the relevant information associated with a currency. The Money class packs a Currency object together with a Decimal to define an amount of money in a specific currency….
Read more
cogitolearning
August 21, 2012
Manuals, QuantLib
c++, currencies, Manual, quantlib
Currency Basics In order to represent an amount of money one could, in principle, just store the amount in a variable of type Real. This is OK as long as you are dealing with just a single currency and you…
Read more
cogitolearning
August 8, 2012
Manuals, QuantLib
c++, Manual, quantlib, typedefs
The file types.hpp defines a number of numeric types. These are typedef QL_INTEGER Integer; typedef QL_BIG_INTEGER BigInteger; typedef unsigned QL_INTEGER Natural; typedef unsigned QL_BIG_INTEGER BigNatural; typedef QL_REAL Real; typedef Real Decimal; typedef std::size_t Size; typedef Real Time; typedef Real DiscountFactor;…
Read more
cogitolearning
July 31, 2012
Manuals, QuantLib
c++, macros, quantlib, tracing
In the previous QuantLib post I talked about the error handling macros. QuantLib also provides a number of macros that facilitate tracing of code execution. Tracing essentially means writing lots of output to the screen or some file that tells…
Read more