Class MultilateralBasisCurve

java.lang.Object
org.drip.state.csa.MultilateralBasisCurve
All Implemented Interfaces:
CashFlowEstimator, DiscountFactorEstimator

public class MultilateralBasisCurve
extends java.lang.Object
implements CashFlowEstimator
MultilateralBasisCurve implements the CSA Cash Rate Curve as a Basis over an Overnight Curve. It exports the following Functionality:
  • Retrieve the Overnight Curve
  • Retrieve the Basis to the Overnight Curve

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Credit Support Annex Latent State
Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    MultilateralBasisCurve()  
  • Method Summary

    Modifier and Type Method Description
    double basis()
    Retrieve the Basis to the Overnight Curve
    double df​(int date)
    Calculate the Discount Factor to the given Date
    double df​(java.lang.String tenor)
    Calculate the Discount Factor to the given Tenor
    double df​(JulianDate date)
    Calculate the discount factor to the given date
    double effectiveDF​(int date1, int date2)
    Compute the time-weighted discount factor between 2 dates
    double effectiveDF​(java.lang.String tenor1, java.lang.String tenor2)
    Compute the time-weighted discount factor between 2 tenors
    double effectiveDF​(JulianDate date1, JulianDate date2)
    Compute the time-weighted discount factor between 2 dates
    JulianDate epoch()
    Retrieve the Starting (Epoch) Date
    MergedDiscountForwardCurve overnightCurve()
    Retrieve the Overnight Curve
    double rate​(int date)
    Calculate the Cash Flow Rate Effective to the given Date
    double rate​(int date1, int date2)
    Calculate the Cash Flow Rate Effective between the Dates
    double rate​(java.lang.String tenor)
    Calculate the Cash Flow Rate Effective to the given Tenor
    double rate​(java.lang.String tenor1, java.lang.String tenor2)
    Calculate the Cash Flow Rate Effective between the Tenors
    double rate​(JulianDate date)
    Calculate the Cash Flow Rate Effective to the given date
    double rate​(JulianDate date1, JulianDate date2)
    Calculate the Cash Flow Rate Effective between the Dates

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MultilateralBasisCurve

      public MultilateralBasisCurve()
  • Method Details

    • overnightCurve

      public MergedDiscountForwardCurve overnightCurve()
      Retrieve the Overnight Curve
      Returns:
      The Overnight Curve
    • basis

      public double basis()
      Retrieve the Basis to the Overnight Curve
      Returns:
      The Basis to the Overnight Curve
    • epoch

      public JulianDate epoch()
      Description copied from interface: DiscountFactorEstimator
      Retrieve the Starting (Epoch) Date
      Specified by:
      epoch in interface DiscountFactorEstimator
      Returns:
      The Starting Date
    • df

      public double df​(int date) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Calculate the Discount Factor to the given Date
      Specified by:
      df in interface DiscountFactorEstimator
      Parameters:
      date - Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the Discount Factor cannot be calculated
    • df

      public double df​(JulianDate date) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Calculate the discount factor to the given date
      Specified by:
      df in interface DiscountFactorEstimator
      Parameters:
      date - Date
      Returns:
      Discount factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • df

      public double df​(java.lang.String tenor) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Calculate the Discount Factor to the given Tenor
      Specified by:
      df in interface DiscountFactorEstimator
      Parameters:
      tenor - Tenor
      Returns:
      Discount factor
      Throws:
      java.lang.Exception - Thrown if the Discount Factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(int date1, int date2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 dates
      Specified by:
      effectiveDF in interface DiscountFactorEstimator
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(JulianDate date1, JulianDate date2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 dates
      Specified by:
      effectiveDF in interface DiscountFactorEstimator
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(java.lang.String tenor1, java.lang.String tenor2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 tenors
      Specified by:
      effectiveDF in interface DiscountFactorEstimator
      Parameters:
      tenor1 - First Date
      tenor2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • rate

      public double rate​(int date) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective to the given Date
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      date - Date
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be calculated
    • rate

      public double rate​(JulianDate date) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective to the given date
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      date - Date
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be Calculated
    • rate

      public double rate​(java.lang.String tenor) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective to the given Tenor
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      tenor - Tenor
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be calculated
    • rate

      public double rate​(int date1, int date2) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective between the Dates
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      date1 - Date #1
      date2 - Date #2
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be calculated
    • rate

      public double rate​(JulianDate date1, JulianDate date2) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective between the Dates
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      date1 - Date #1
      date2 - Date #2
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be calculated
    • rate

      public double rate​(java.lang.String tenor1, java.lang.String tenor2) throws java.lang.Exception
      Description copied from interface: CashFlowEstimator
      Calculate the Cash Flow Rate Effective between the Tenors
      Specified by:
      rate in interface CashFlowEstimator
      Parameters:
      tenor1 - Tenor #1
      tenor2 - Tenor #2
      Returns:
      The Cash Flow Rate
      Throws:
      java.lang.Exception - Thrown if the Cash Flow Rate cannot be calculated