Class BondProductBuilder

java.lang.Object
org.drip.product.creator.BondProductBuilder

public class BondProductBuilder
extends java.lang.Object
BondProductBuilder holds the static parameters of the bond product needed for the full bond valuation. It contains the bond identifier parameters (ISIN, CUSIP), the issuer level parameters (Ticker, SPN or the credit curve string), coupon parameters (coupon rate, coupon frequency, coupon type, day count), maturity parameters (maturity date, maturity type, final maturity, redemption value), date parameters (announce, first settle, first coupon, interest accrual start, and issue dates), embedded option parameters (callable, putable, has been exercised), currency parameters (trade, coupon, and redemption currencies), floater parameters (floater flag, floating coupon convention, current coupon, rate index, spread), and whether the bond is perpetual or has defaulted.



Author:
Lakshmi Krishnamurthy
  • Field Details

    • _strISIN

      public java.lang.String _strISIN
      ISIN
    • _strCUSIP

      public java.lang.String _strCUSIP
      CUSIP
    • _strTicker

      public java.lang.String _strTicker
      Ticker
    • _dblCoupon

      public double _dblCoupon
      Coupon
    • _dtMaturity

      public JulianDate _dtMaturity
      Maturity
    • _iCouponFreq

      public int _iCouponFreq
      Coupon Frequency
    • _strCouponType

      public java.lang.String _strCouponType
      Coupon Type
    • _strMaturityType

      public java.lang.String _strMaturityType
      Maturity Type
    • _strCalculationType

      public java.lang.String _strCalculationType
      Calculation Type
    • _strDayCountCode

      public java.lang.String _strDayCountCode
      Day count Code
    • _dblRedemptionValue

      public double _dblRedemptionValue
      Redemption Value
    • _dtAnnounce

      public JulianDate _dtAnnounce
      Announce Date
    • _dtFirstSettle

      public JulianDate _dtFirstSettle
      First Settle Date
    • _dtFirstCoupon

      public JulianDate _dtFirstCoupon
      First Coupon Date
    • _dtInterestAccrualStart

      public JulianDate _dtInterestAccrualStart
      Interest Accrual Start Date
    • _dtIssue

      public JulianDate _dtIssue
      Issue Date
    • _bIsCallable

      public boolean _bIsCallable
      Callable flag
    • _bIsPutable

      public boolean _bIsPutable
      Putable flag
    • _bIsSinkable

      public boolean _bIsSinkable
      Sinkable flag
    • _strRedemptionCurrency

      public java.lang.String _strRedemptionCurrency
      Redemption Currency
    • _strCouponCurrency

      public java.lang.String _strCouponCurrency
      Coupon Currency
    • _strTradeCurrency

      public java.lang.String _strTradeCurrency
      Trade Currency
    • _bHasBeenCalled

      public boolean _bHasBeenCalled
      Has Been Exercised flag
    • _strFloatCouponConvention

      public java.lang.String _strFloatCouponConvention
      Floater Coupon Day Count Convention
    • _dblCurrentCoupon

      public double _dblCurrentCoupon
      Current Coupon
    • _bIsFloater

      public boolean _bIsFloater
      Is Floater flag
    • _dtFinalMaturity

      public JulianDate _dtFinalMaturity
      Final Maturity Date
    • _bIsPerpetual

      public boolean _bIsPerpetual
      Is Perpetual flag
    • _bIsDefaulted

      public boolean _bIsDefaulted
      Is Defaulted flag
    • _dblFloatSpread

      public double _dblFloatSpread
      Floater Spread
    • _strRateIndex

      public java.lang.String _strRateIndex
      Rate Index
    • _strIssuerSPN

      public java.lang.String _strIssuerSPN
      Issuer SPN
  • Constructor Details

    • BondProductBuilder

      public BondProductBuilder()
      Empty BondProductBuilder ctr - uninitialized members
  • Method Details

    • CreateFromResultSet

      public static final BondProductBuilder CreateFromResultSet​(java.sql.ResultSet rs, ScenarioMarketParams mpc)
      Create BondProductBuilder from the SQL ResultSet and the input MPC
      Parameters:
      rs - SQL ResultSet
      mpc - org.drip.param.definition.MarketParams to help fill some of the fields in
      Returns:
      BondProductBuilder object
    • CreateFromJSONMap

      public static final BondProductBuilder CreateFromJSONMap​(CaseInsensitiveTreeMap<java.lang.String> mapJSON, ScenarioMarketParams mpc)
      Create BondProductBuilder from the JSON Map and the input MPC
      Parameters:
      mapJSON - The JSON Ref Data Map
      mpc - org.drip.param.definition.MarketParams to help fill some of the fields in
      Returns:
      BondProductBuilder object
    • setISIN

      public boolean setISIN​(java.lang.String strISIN)
      Set the Bond ISIN
      Parameters:
      strISIN - ISIN input
      Returns:
      Success (true), failure (false)
    • setCUSIP

      public boolean setCUSIP​(java.lang.String strCUSIP)
      Set the Bond CUSIP
      Parameters:
      strCUSIP - CUSIP input
      Returns:
      Success (true), failure (false)
    • setTicker

      public boolean setTicker​(java.lang.String strTicker)
      Set the Bond Ticker
      Parameters:
      strTicker - Ticker input
      Returns:
      Success (true), failure (false)
    • setCoupon

      public boolean setCoupon​(java.lang.String strCoupon)
      Set the Bond Coupon
      Parameters:
      strCoupon - Coupon input
      Returns:
      Success (true), failure (false)
    • setMaturity

      public boolean setMaturity​(java.lang.String strMaturity)
      Set the Bond Maturity
      Parameters:
      strMaturity - Maturity input
      Returns:
      Success (true), failure (false)
    • setCouponFreq

      public boolean setCouponFreq​(java.lang.String strCouponFreq)
      Set the Bond Coupon Frequency
      Parameters:
      strCouponFreq - Coupon Frequency input
      Returns:
      Success (true), failure (false)
    • setCouponType

      public boolean setCouponType​(java.lang.String strCouponType)
      Set the Bond Coupon Type
      Parameters:
      strCouponType - Coupon Type input
      Returns:
      Success (true), failure (false)
    • setMaturityType

      public boolean setMaturityType​(java.lang.String strMaturityType)
      Set the Bond Maturity Type
      Parameters:
      strMaturityType - Maturity Type input
      Returns:
      Success (true), failure (false)
    • setCalculationType

      public boolean setCalculationType​(java.lang.String strCalculationType)
      Set the Bond Calculation Type
      Parameters:
      strCalculationType - Calculation Type input
      Returns:
      Success (true), failure (false)
    • setDayCountCode

      public boolean setDayCountCode​(java.lang.String strDayCountCode)
      Set the Bond Day Count Code
      Parameters:
      strDayCountCode - Day Count Code input
      Returns:
      Success (true), failure (false)
    • setRedemptionValue

      public boolean setRedemptionValue​(java.lang.String strRedemptionValue)
      Set the Bond Redemption Value
      Parameters:
      strRedemptionValue - Redemption Value input
      Returns:
      Success (true), failure (false)
    • setAnnounce

      public boolean setAnnounce​(java.lang.String strAnnounce)
      Set the Bond Announce
      Parameters:
      strAnnounce - Announce Date String
      Returns:
      Success (true), failure (false)
    • setFirstSettle

      public boolean setFirstSettle​(java.lang.String strFirstSettle)
      Set the Bond First Settle
      Parameters:
      strFirstSettle - First Settle Date String
      Returns:
      Success (true), failure (false)
    • setFirstCoupon

      public boolean setFirstCoupon​(java.lang.String strFirstCoupon)
      Set the Bond First Coupon Date
      Parameters:
      strFirstCoupon - First Coupon Date String
      Returns:
      Success (true), failure (false)
    • setInterestAccrualStart

      public boolean setInterestAccrualStart​(java.lang.String strInterestAccrualStart)
      Set the Bond Interest Accrual Start Date
      Parameters:
      strInterestAccrualStart - Interest Accrual Start Date String
      Returns:
      Success (true), failure (false)
    • setIssue

      public boolean setIssue​(java.lang.String strIssue)
      Set the Bond Issue Date
      Parameters:
      strIssue - Issue Date String
      Returns:
      Success (true), failure (false)
    • setIsCallable

      public boolean setIsCallable​(java.lang.String strCallable)
      Set whether the Bond Is Callable
      Parameters:
      strCallable - Callable String
      Returns:
      Success (true), failure (false)
    • setIsPutable

      public boolean setIsPutable​(java.lang.String strPutable)
      Set whether the Bond Is Putable
      Parameters:
      strPutable - Putable String
      Returns:
      Success (true), failure (false)
    • setIsSinkable

      public boolean setIsSinkable​(java.lang.String strSinkable)
      Set whether the Bond Is Sinkable
      Parameters:
      strSinkable - Sinkable String
      Returns:
      Success (true), failure (false)
    • setRedemptionCurrency

      public boolean setRedemptionCurrency​(java.lang.String strRedemptionCurrency)
      Set The redemption Currency
      Parameters:
      strRedemptionCurrency - Redemption Currency String
      Returns:
      Success (true), failure (false)
    • setCouponCurrency

      public boolean setCouponCurrency​(java.lang.String strCouponCurrency)
      Set The Coupon Currency
      Parameters:
      strCouponCurrency - Coupon Currency String
      Returns:
      Success (true), failure (false)
    • setTradeCurrency

      public boolean setTradeCurrency​(java.lang.String strTradeCurrency)
      Set The Trade Currency
      Parameters:
      strTradeCurrency - Trade Currency String
      Returns:
      Success (true), failure (false)
    • setHasBeenCalled

      public boolean setHasBeenCalled​(java.lang.String strHasBeenCalled)
      Set whether the bond Has Been Called
      Parameters:
      strHasBeenCalled - Has Been Called String
      Returns:
      Success (true), failure (false)
    • setFloatCouponConvention

      public boolean setFloatCouponConvention​(java.lang.String strFloatCouponConvention)
      Set the bond's Float Coupon Convention
      Parameters:
      strFloatCouponConvention - Float Coupon Convention String
      Returns:
      Success (true), failure (false)
    • setCurrentCoupon

      public boolean setCurrentCoupon​(java.lang.String strCurrentCoupon)
      Set the bond's Current Coupon
      Parameters:
      strCurrentCoupon - Current Coupon String
      Returns:
      Success (true), failure (false)
    • setIsFloater

      public boolean setIsFloater​(java.lang.String strIsFloater)
      Set whether the bond is a floater or not
      Parameters:
      strIsFloater - String indicating whether the bond is a floater
      Returns:
      Success (true), failure (false)
    • setFinalMaturity

      public boolean setFinalMaturity​(java.lang.String strFinalMaturity)
      Set the final maturity of the bond
      Parameters:
      strFinalMaturity - String representing the bond's final maturity
      Returns:
      Success (true), failure (false)
    • setIsPerpetual

      public boolean setIsPerpetual​(java.lang.String strIsPerpetual)
      Set whether the bond is perpetual or not
      Parameters:
      strIsPerpetual - String representing whether the bond is perpetual or not
      Returns:
      Success (true), failure (false)
    • setIsDefaulted

      public boolean setIsDefaulted​(java.lang.String strIsDefaulted)
      Set whether the bond is defaulted or not
      Parameters:
      strIsDefaulted - String representing whether the bond is defaulted or not
      Returns:
      Success (true), failure (false)
    • setFloatSpread

      public boolean setFloatSpread​(java.lang.String strFloatSpread)
      Set the bond's floating rate spread
      Parameters:
      strFloatSpread - String representing the bond's floating spread
      Returns:
      Success (true), failure (false)
    • setFloatSpread

      public boolean setFloatSpread​(ScenarioMarketParams mpc)
      Set the bond's floating rate spread from the MPC
      Parameters:
      mpc - org.drip.param.definition.MarketParams
      Returns:
      Success (true), failure (false)
    • setRateIndex

      public boolean setRateIndex​(java.lang.String strRateIndex)
      Set the bond's Rate Index
      Parameters:
      strRateIndex - Rate Index
      Returns:
      Success (true), failure (false)
    • setIssuerSPN

      public boolean setIssuerSPN​(java.lang.String strIssuerSPN)
      Set the bond's Issuer SPN
      Parameters:
      strIssuerSPN - Issuer SPN String
      Returns:
      Success (true), failure (false)
    • validate

      public boolean validate​(ScenarioMarketParams mpc)
      Validate the state
      Parameters:
      mpc - org.drip.param.definition.MarketParams
      Returns:
      Success (true), failure (false)
    • makeSQLInsert

      public java.lang.String makeSQLInsert()
      Create an SQL Insert statement from the object's state
      Returns:
      String representing the SQL Insert
    • getIdentifierParams

      public IdentifierSet getIdentifierParams()
      Get the Bond's identifier Parameters
      Returns:
      BondIdentifierParams object
    • getCouponParams

      public CouponSetting getCouponParams()
      Get the Bond's Coupon Parameters
      Returns:
      BondCouponParams object
    • getFloaterParams

      public FloaterSetting getFloaterParams()
      Get the Bond's Floater Parameters
      Returns:
      BondFloaterParams object
    • getMarketConvention

      public QuoteConvention getMarketConvention()
      Get the Bond's Market Convention
      Returns:
      MarketConvention object
    • getCRValuationParams

      public CreditSetting getCRValuationParams()
      Get the Bond's Credit Component Parameters
      Returns:
      CompCRValParams object
    • getCFTEParams

      public TerminationSetting getCFTEParams()
      Get the Bond's CF termination event Parameters
      Returns:
      BondCFTerminationEvent object
    • getNotionalParams

      public NotionalSetting getNotionalParams()
      Get the Bond's Notional Parameters
      Returns:
      BondNotionalParams object
    • getPeriodGenParams

      public BondStream getPeriodGenParams()
      Get the Bond's Period Generation Parameters
      Returns:
      BondPeriodGenerationParams object
    • makeSQLDelete

      public java.lang.String makeSQLDelete()
      Create an SQL Delete statement from the object's state
      Returns:
      String representing the SQL Delete