Package org.drip.product.creator
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.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Streams and Products Construction Utilities
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description boolean
_bHasBeenCalled
Has Been Exercised flagboolean
_bIsCallable
Callable flagboolean
_bIsDefaulted
Is Defaulted flagboolean
_bIsFloater
Is Floater flagboolean
_bIsPerpetual
Is Perpetual flagboolean
_bIsPutable
Putable flagboolean
_bIsSinkable
Sinkable flagdouble
_dblCoupon
Coupondouble
_dblCurrentCoupon
Current Coupondouble
_dblFloatSpread
Floater Spreaddouble
_dblRedemptionValue
Redemption ValueJulianDate
_dtAnnounce
Announce DateJulianDate
_dtFinalMaturity
Final Maturity DateJulianDate
_dtFirstCoupon
First Coupon DateJulianDate
_dtFirstSettle
First Settle DateJulianDate
_dtInterestAccrualStart
Interest Accrual Start DateJulianDate
_dtIssue
Issue DateJulianDate
_dtMaturity
Maturityint
_iCouponFreq
Coupon Frequencyjava.lang.String
_strCalculationType
Calculation Typejava.lang.String
_strCouponCurrency
Coupon Currencyjava.lang.String
_strCouponType
Coupon Typejava.lang.String
_strCUSIP
CUSIPjava.lang.String
_strDayCountCode
Day count Codejava.lang.String
_strFloatCouponConvention
Floater Coupon Day Count Conventionjava.lang.String
_strISIN
ISINjava.lang.String
_strIssuerSPN
Issuer SPNjava.lang.String
_strMaturityType
Maturity Typejava.lang.String
_strRateIndex
Rate Indexjava.lang.String
_strRedemptionCurrency
Redemption Currencyjava.lang.String
_strTicker
Tickerjava.lang.String
_strTradeCurrency
Trade Currency -
Constructor Summary
Constructors Constructor Description BondProductBuilder()
Empty BondProductBuilder ctr - uninitialized members -
Method Summary
Modifier and Type Method Description static BondProductBuilder
CreateFromJSONMap(CaseInsensitiveTreeMap<java.lang.String> mapJSON, ScenarioMarketParams mpc)
Create BondProductBuilder from the JSON Map and the input MPCstatic BondProductBuilder
CreateFromResultSet(java.sql.ResultSet rs, ScenarioMarketParams mpc)
Create BondProductBuilder from the SQL ResultSet and the input MPCTerminationSetting
getCFTEParams()
Get the Bond's CF termination event ParametersCouponSetting
getCouponParams()
Get the Bond's Coupon ParametersCreditSetting
getCRValuationParams()
Get the Bond's Credit Component ParametersFloaterSetting
getFloaterParams()
Get the Bond's Floater ParametersIdentifierSet
getIdentifierParams()
Get the Bond's identifier ParametersQuoteConvention
getMarketConvention()
Get the Bond's Market ConventionNotionalSetting
getNotionalParams()
Get the Bond's Notional ParametersBondStream
getPeriodGenParams()
Get the Bond's Period Generation Parametersjava.lang.String
makeSQLDelete()
Create an SQL Delete statement from the object's statejava.lang.String
makeSQLInsert()
Create an SQL Insert statement from the object's stateboolean
setAnnounce(java.lang.String strAnnounce)
Set the Bond Announceboolean
setCalculationType(java.lang.String strCalculationType)
Set the Bond Calculation Typeboolean
setCoupon(java.lang.String strCoupon)
Set the Bond Couponboolean
setCouponCurrency(java.lang.String strCouponCurrency)
Set The Coupon Currencyboolean
setCouponFreq(java.lang.String strCouponFreq)
Set the Bond Coupon Frequencyboolean
setCouponType(java.lang.String strCouponType)
Set the Bond Coupon Typeboolean
setCurrentCoupon(java.lang.String strCurrentCoupon)
Set the bond's Current Couponboolean
setCUSIP(java.lang.String strCUSIP)
Set the Bond CUSIPboolean
setDayCountCode(java.lang.String strDayCountCode)
Set the Bond Day Count Codeboolean
setFinalMaturity(java.lang.String strFinalMaturity)
Set the final maturity of the bondboolean
setFirstCoupon(java.lang.String strFirstCoupon)
Set the Bond First Coupon Dateboolean
setFirstSettle(java.lang.String strFirstSettle)
Set the Bond First Settleboolean
setFloatCouponConvention(java.lang.String strFloatCouponConvention)
Set the bond's Float Coupon Conventionboolean
setFloatSpread(java.lang.String strFloatSpread)
Set the bond's floating rate spreadboolean
setFloatSpread(ScenarioMarketParams mpc)
Set the bond's floating rate spread from the MPCboolean
setHasBeenCalled(java.lang.String strHasBeenCalled)
Set whether the bond Has Been Calledboolean
setInterestAccrualStart(java.lang.String strInterestAccrualStart)
Set the Bond Interest Accrual Start Dateboolean
setIsCallable(java.lang.String strCallable)
Set whether the Bond Is Callableboolean
setIsDefaulted(java.lang.String strIsDefaulted)
Set whether the bond is defaulted or notboolean
setIsFloater(java.lang.String strIsFloater)
Set whether the bond is a floater or notboolean
setISIN(java.lang.String strISIN)
Set the Bond ISINboolean
setIsPerpetual(java.lang.String strIsPerpetual)
Set whether the bond is perpetual or notboolean
setIsPutable(java.lang.String strPutable)
Set whether the Bond Is Putableboolean
setIsSinkable(java.lang.String strSinkable)
Set whether the Bond Is Sinkableboolean
setIssue(java.lang.String strIssue)
Set the Bond Issue Dateboolean
setIssuerSPN(java.lang.String strIssuerSPN)
Set the bond's Issuer SPNboolean
setMaturity(java.lang.String strMaturity)
Set the Bond Maturityboolean
setMaturityType(java.lang.String strMaturityType)
Set the Bond Maturity Typeboolean
setRateIndex(java.lang.String strRateIndex)
Set the bond's Rate Indexboolean
setRedemptionCurrency(java.lang.String strRedemptionCurrency)
Set The redemption Currencyboolean
setRedemptionValue(java.lang.String strRedemptionValue)
Set the Bond Redemption Valueboolean
setTicker(java.lang.String strTicker)
Set the Bond Tickerboolean
setTradeCurrency(java.lang.String strTradeCurrency)
Set The Trade Currencyboolean
validate(ScenarioMarketParams mpc)
Validate the stateMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_strISIN
public java.lang.String _strISINISIN -
_strCUSIP
public java.lang.String _strCUSIPCUSIP -
_strTicker
public java.lang.String _strTickerTicker -
_dblCoupon
public double _dblCouponCoupon -
_dtMaturity
Maturity -
_iCouponFreq
public int _iCouponFreqCoupon Frequency -
_strCouponType
public java.lang.String _strCouponTypeCoupon Type -
_strMaturityType
public java.lang.String _strMaturityTypeMaturity Type -
_strCalculationType
public java.lang.String _strCalculationTypeCalculation Type -
_strDayCountCode
public java.lang.String _strDayCountCodeDay count Code -
_dblRedemptionValue
public double _dblRedemptionValueRedemption Value -
_dtAnnounce
Announce Date -
_dtFirstSettle
First Settle Date -
_dtFirstCoupon
First Coupon Date -
_dtInterestAccrualStart
Interest Accrual Start Date -
_dtIssue
Issue Date -
_bIsCallable
public boolean _bIsCallableCallable flag -
_bIsPutable
public boolean _bIsPutablePutable flag -
_bIsSinkable
public boolean _bIsSinkableSinkable flag -
_strRedemptionCurrency
public java.lang.String _strRedemptionCurrencyRedemption Currency -
_strCouponCurrency
public java.lang.String _strCouponCurrencyCoupon Currency -
_strTradeCurrency
public java.lang.String _strTradeCurrencyTrade Currency -
_bHasBeenCalled
public boolean _bHasBeenCalledHas Been Exercised flag -
_strFloatCouponConvention
public java.lang.String _strFloatCouponConventionFloater Coupon Day Count Convention -
_dblCurrentCoupon
public double _dblCurrentCouponCurrent Coupon -
_bIsFloater
public boolean _bIsFloaterIs Floater flag -
_dtFinalMaturity
Final Maturity Date -
_bIsPerpetual
public boolean _bIsPerpetualIs Perpetual flag -
_bIsDefaulted
public boolean _bIsDefaultedIs Defaulted flag -
_dblFloatSpread
public double _dblFloatSpreadFloater Spread -
_strRateIndex
public java.lang.String _strRateIndexRate Index -
_strIssuerSPN
public java.lang.String _strIssuerSPNIssuer 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 ResultSetmpc
- 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 Mapmpc
- 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
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
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
Get the Bond's identifier Parameters- Returns:
- BondIdentifierParams object
-
getCouponParams
Get the Bond's Coupon Parameters- Returns:
- BondCouponParams object
-
getFloaterParams
Get the Bond's Floater Parameters- Returns:
- BondFloaterParams object
-
getMarketConvention
Get the Bond's Market Convention- Returns:
- MarketConvention object
-
getCRValuationParams
Get the Bond's Credit Component Parameters- Returns:
- CompCRValParams object
-
getCFTEParams
Get the Bond's CF termination event Parameters- Returns:
- BondCFTerminationEvent object
-
getNotionalParams
Get the Bond's Notional Parameters- Returns:
- BondNotionalParams object
-
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
-