TipsVal
Valuation library for inflation-indexed bonds
Getting Started

Version: 2.2.4
Date: 20201123
Copyright (c) 2020, Andrew Kalotay Associates. All rights reserved.

Building in C++

  • Header files are in include directory
  • Requires C++ 98 or newer compiler and standard C++ library
  • Link to shared library:
    • Windows:
      • WIN64/aka_tipsval.lib (stub)
      • WIN64/aka_tipsval.dll
    • Linux
      • LINUX64/libaka_tipsval.so
    • OS X
      • MACOSX64/libaka_tipsval.dylib
  • Running client app
    • Windows: Do one of the following:
      • Put aka_tipsval.dll in same directory as app
      • Put aka_tipsval.dll in a directory listed in the environment variable PATH
    • Linux: Put libaka_tipsval.so into a directory listed in the environment variable LD_LIBRARY_PATH
    • OS X: Put libaka_tipsval.dylib into a directory listed in the environment variable DYLD_LIBRARY_PATH

Building in Java

  • Compiling client app
    • java/aka_tipsval.jar must be in classpath
  • Running Java client app
    • java/aka_tipsval.jar must be in classpath
    • Directory containing native C++ library must be listed in java.library.path

Writing Code

Important

All input values are in absolute decimals. For example, 10% is entered as 0.10

Preliminaries for Java only

Namespaces

  • All classes and structs are in the namespace AndrewKalotayAssociates::TipsVal
  • Data structs declared in the namespace AndrewKalotayAssociates::Common are all pulled into the namespace AndrewKalotayAssociates::TipsVal
  • Input data structs are in subnamespace Input.
  • Output data structs are in subnamespace Output.

C++, C#, Java

  1. Use static methods in the class Setup to initialize library using userid and license
  2. There are two different types of classes:
    1. Data structs that have no functionality but provide inputs to the classes and functions that actually do something
    2. Classes that do the calculations and generate the output reports
  3. Sequence of steps (after library has been initialized)
    1. Set up input data structs needed for class constructors and methods
    2. Construct an InterestRateModel object
    3. Construct an InflationModel object
    4. For each bond to be analyzed, construct a Bond object
    5. Call Bond class methods to generate output reports
  4. The InterestRateModel object can be reused for analyzing a set of bonds, if you are using the same interest rate environment for all of them. Since the construction InterestRateModel is relatively expensive in CPU time, you should always do this if possible.
  5. The InflationModel object can be reused for analyzing a set of bonds, if you are using the same interest rate environment for all of them. The construction of an InflationModel object is negligible in both space and time, so it is not necessary.