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_bHasBeenCalledHas Been Exercised flagboolean_bIsCallableCallable flagboolean_bIsDefaultedIs Defaulted flagboolean_bIsFloaterIs Floater flagboolean_bIsPerpetualIs Perpetual flagboolean_bIsPutablePutable flagboolean_bIsSinkableSinkable flagdouble_dblCouponCoupondouble_dblCurrentCouponCurrent Coupondouble_dblFloatSpreadFloater Spreaddouble_dblRedemptionValueRedemption ValueJulianDate_dtAnnounceAnnounce DateJulianDate_dtFinalMaturityFinal Maturity DateJulianDate_dtFirstCouponFirst Coupon DateJulianDate_dtFirstSettleFirst Settle DateJulianDate_dtInterestAccrualStartInterest Accrual Start DateJulianDate_dtIssueIssue DateJulianDate_dtMaturityMaturityint_iCouponFreqCoupon Frequencyjava.lang.String_strCalculationTypeCalculation Typejava.lang.String_strCouponCurrencyCoupon Currencyjava.lang.String_strCouponTypeCoupon Typejava.lang.String_strCUSIPCUSIPjava.lang.String_strDayCountCodeDay count Codejava.lang.String_strFloatCouponConventionFloater Coupon Day Count Conventionjava.lang.String_strISINISINjava.lang.String_strIssuerSPNIssuer SPNjava.lang.String_strMaturityTypeMaturity Typejava.lang.String_strRateIndexRate Indexjava.lang.String_strRedemptionCurrencyRedemption Currencyjava.lang.String_strTickerTickerjava.lang.String_strTradeCurrencyTrade Currency -
Constructor Summary
Constructors Constructor Description BondProductBuilder()Empty BondProductBuilder ctr - uninitialized members -
Method Summary
Modifier and Type Method Description static BondProductBuilderCreateFromJSONMap(CaseInsensitiveTreeMap<java.lang.String> mapJSON, ScenarioMarketParams mpc)Create BondProductBuilder from the JSON Map and the input MPCstatic BondProductBuilderCreateFromResultSet(java.sql.ResultSet rs, ScenarioMarketParams mpc)Create BondProductBuilder from the SQL ResultSet and the input MPCTerminationSettinggetCFTEParams()Get the Bond's CF termination event ParametersCouponSettinggetCouponParams()Get the Bond's Coupon ParametersCreditSettinggetCRValuationParams()Get the Bond's Credit Component ParametersFloaterSettinggetFloaterParams()Get the Bond's Floater ParametersIdentifierSetgetIdentifierParams()Get the Bond's identifier ParametersQuoteConventiongetMarketConvention()Get the Bond's Market ConventionNotionalSettinggetNotionalParams()Get the Bond's Notional ParametersBondStreamgetPeriodGenParams()Get the Bond's Period Generation Parametersjava.lang.StringmakeSQLDelete()Create an SQL Delete statement from the object's statejava.lang.StringmakeSQLInsert()Create an SQL Insert statement from the object's statebooleansetAnnounce(java.lang.String strAnnounce)Set the Bond AnnouncebooleansetCalculationType(java.lang.String strCalculationType)Set the Bond Calculation TypebooleansetCoupon(java.lang.String strCoupon)Set the Bond CouponbooleansetCouponCurrency(java.lang.String strCouponCurrency)Set The Coupon CurrencybooleansetCouponFreq(java.lang.String strCouponFreq)Set the Bond Coupon FrequencybooleansetCouponType(java.lang.String strCouponType)Set the Bond Coupon TypebooleansetCurrentCoupon(java.lang.String strCurrentCoupon)Set the bond's Current CouponbooleansetCUSIP(java.lang.String strCUSIP)Set the Bond CUSIPbooleansetDayCountCode(java.lang.String strDayCountCode)Set the Bond Day Count CodebooleansetFinalMaturity(java.lang.String strFinalMaturity)Set the final maturity of the bondbooleansetFirstCoupon(java.lang.String strFirstCoupon)Set the Bond First Coupon DatebooleansetFirstSettle(java.lang.String strFirstSettle)Set the Bond First SettlebooleansetFloatCouponConvention(java.lang.String strFloatCouponConvention)Set the bond's Float Coupon ConventionbooleansetFloatSpread(java.lang.String strFloatSpread)Set the bond's floating rate spreadbooleansetFloatSpread(ScenarioMarketParams mpc)Set the bond's floating rate spread from the MPCbooleansetHasBeenCalled(java.lang.String strHasBeenCalled)Set whether the bond Has Been CalledbooleansetInterestAccrualStart(java.lang.String strInterestAccrualStart)Set the Bond Interest Accrual Start DatebooleansetIsCallable(java.lang.String strCallable)Set whether the Bond Is CallablebooleansetIsDefaulted(java.lang.String strIsDefaulted)Set whether the bond is defaulted or notbooleansetIsFloater(java.lang.String strIsFloater)Set whether the bond is a floater or notbooleansetISIN(java.lang.String strISIN)Set the Bond ISINbooleansetIsPerpetual(java.lang.String strIsPerpetual)Set whether the bond is perpetual or notbooleansetIsPutable(java.lang.String strPutable)Set whether the Bond Is PutablebooleansetIsSinkable(java.lang.String strSinkable)Set whether the Bond Is SinkablebooleansetIssue(java.lang.String strIssue)Set the Bond Issue DatebooleansetIssuerSPN(java.lang.String strIssuerSPN)Set the bond's Issuer SPNbooleansetMaturity(java.lang.String strMaturity)Set the Bond MaturitybooleansetMaturityType(java.lang.String strMaturityType)Set the Bond Maturity TypebooleansetRateIndex(java.lang.String strRateIndex)Set the bond's Rate IndexbooleansetRedemptionCurrency(java.lang.String strRedemptionCurrency)Set The redemption CurrencybooleansetRedemptionValue(java.lang.String strRedemptionValue)Set the Bond Redemption ValuebooleansetTicker(java.lang.String strTicker)Set the Bond TickerbooleansetTradeCurrency(java.lang.String strTradeCurrency)Set The Trade Currencybooleanvalidate(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
-