Valuation library for floating rate securities
Getting Started

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

Sample Code

C++: examples/FloatValExample.cpp
Java: examples/FloatValExample.java
C#: examples/FloatValExample.cs

Building in C++

  • Header files are in include directory
    • If you want to move the header files, you must preserve directory hierachy
    • It suffices to include the single header file andrew_kalotay_associates/tipsval/floatval.h
  • Requires C++ 98 or newer compiler and standard C++ library
  • Link to shared library:
    • Windows:
      • WIN64/aka_floatval.lib (stub)
      • WIN64/aka_floatval.dll
    • Linux
      • LINUX64/libaka_floatval.so
    • OS X
      • MACOSX64/libaka_floatval.dylib
  • Running client app
    • Windows: Do one of the following:
      • Put aka_floatval.dll in same directory as app
      • Put aka_floatval.dll in a directory listed in the environment variable PATH
    • Linux: Put libaka_floatval.so into a directory listed in the environment variable LD_LIBRARY_PATH
    • OS X: Put libaka_floatval.dylib into a directory listed in the environment variable DYLD_LIBRARY_PATH

Building in Java

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

Writing Code

Preliminaries for Java only

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. For each security to be analyzed, construct a Security object
    4. Call Security 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.