Package org.drip.service.product
Class FixedBondAPI
java.lang.Object
org.drip.service.product.FixedBondAPI
public class FixedBondAPI
extends java.lang.Object
FixedBondAPI demonstrates the Details behind the Pricing and the Scenario Runs behind a Fixed Bond.
It provides the following Functionality:
- Generate a Full Map Invocation of the Bond Valuation Run
- Generate the Treasury Curve Tenor Key Rate Sensitivity/Duration
- Return Attribution for the Specified Bond Instance
- Generate the Relative Value Metrics for the Specified Bond
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description FixedBondAPI()
-
Method Summary
Modifier and Type Method Description static java.util.List<PositionChangeComponents>
HorizonChangeAttribution(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, JulianDate[] julianSpotDateArray, double[] cleanPriceArray)
Returns Attribution for the Specified Bond Instancestatic java.util.Map<java.lang.String,java.lang.Double>
KeyRateDuration(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, double bondMarketCleanPrice)
Generate the Treasury Curve Tenor Key Rate Sensitivity/Durationstatic BondRVMeasures
RelativeValueMetrics(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String[] fundingCurveDepositTenor, double[] fundingCurveDepositQuote, java.lang.String fundingCurveDepositMeasure, double[] fundingCurveFuturesQuote, java.lang.String fundingCurveFuturesMeasure, java.lang.String[] fundingCurveFixFloatTenor, double[] fundingCurveFixFloatQuote, java.lang.String fundingFixFloatMeasure, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, java.lang.String creditCurveName, java.lang.String[] creditCurveCDSTenorArray, double[] creditCurveCDSCouponArray, double[] creditCurveCDSQuoteArray, java.lang.String creditCurveCDSMeasure, double bondMarketCleanPrice)
Generate the Relative Value Metrics for the Specified Bondstatic java.util.Map<java.lang.String,java.lang.Double>
ValuationMetrics(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String[] fundingCurveDepositTenor, double[] fundingCurveDepositQuote, java.lang.String fundingCurveDepositMeasure, double[] fundingCurveFuturesQuote, java.lang.String fundingCurveFuturesMeasure, java.lang.String[] fundingCurveFixFloatTenor, double[] fundingCurveFixFloatQuote, java.lang.String fundingFixFloatMeasure, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, java.lang.String creditCurveName, java.lang.String[] creditCurveCDSTenorArray, double[] creditCurveCDSCouponArray, double[] creditCurveCDSQuoteArray, java.lang.String creditCurveCDSMeasure, java.lang.String bondMarketQuoteName, double bondMarketQuote)
Generate a Full Map Invocation of the Bond Valuation RunMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FixedBondAPI
public FixedBondAPI()
-
-
Method Details
-
ValuationMetrics
public static final java.util.Map<java.lang.String,java.lang.Double> ValuationMetrics(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String[] fundingCurveDepositTenor, double[] fundingCurveDepositQuote, java.lang.String fundingCurveDepositMeasure, double[] fundingCurveFuturesQuote, java.lang.String fundingCurveFuturesMeasure, java.lang.String[] fundingCurveFixFloatTenor, double[] fundingCurveFixFloatQuote, java.lang.String fundingFixFloatMeasure, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, java.lang.String creditCurveName, java.lang.String[] creditCurveCDSTenorArray, double[] creditCurveCDSCouponArray, double[] creditCurveCDSQuoteArray, java.lang.String creditCurveCDSMeasure, java.lang.String bondMarketQuoteName, double bondMarketQuote)Generate a Full Map Invocation of the Bond Valuation Run- Parameters:
issuerName
- Bond Issuer NamebondEffectiveDate
- Bond Effective DatebondMaturityDate
- Bond Maturity DatebondCoupon
- Bond CouponbondCouponFrequency
- Bond Coupon FrequencybondCouponDayCount
- Bond Coupon Day CountbondCouponCurrency
- Bond Coupon CurrencyspotDate
- Spot DatefundingCurveDepositTenor
- Deposit Instruments Tenor (for Funding Curve)fundingCurveDepositQuote
- Deposit Instruments Quote (for Funding Curve)fundingCurveDepositMeasure
- Deposit Instruments Measure (for Funding Curve)fundingCurveFuturesQuote
- Futures Instruments Tenor (for Funding Curve)fundingCurveFuturesMeasure
- Futures Instruments Measure (for Funding Curve)fundingCurveFixFloatTenor
- Fix-Float Instruments Tenor (for Funding Curve)fundingCurveFixFloatQuote
- Fix-Float Instruments Quote (for Funding Curve)fundingFixFloatMeasure
- Fix-Float Instruments Tenor (for Funding Curve)govvieCode
- Govvie Bond Code (for Treasury Curve)govvieCurveTreasuryEffectiveDateArray
- Array of the Treasury Instrument Effective Date (for Treasury Curve)govvieCurveTreasuryMaturityDateArray
- Array of the Treasury Instrument Maturity Date (for Treasury Curve)govvieCurveTreasuryCouponArray
- Array of the Treasury Instrument Coupon (for Treasury Curve)govvieCurveTreasuryYieldArray
- Array of the Treasury Instrument Yield (for Treasury Curve)govvieCurveTreasuryMeasure
- Treasury Instrument Measure (for Treasury Curve)creditCurveName
- Credit Curve Name (for Credit Curve)creditCurveCDSTenorArray
- CDS Maturity Tenor (for Credit Curve)creditCurveCDSCouponArray
- Array of CDS Fixed Coupon (for Credit Curve)creditCurveCDSQuoteArray
- Array of CDS Market Quotes (for Credit Curve)creditCurveCDSMeasure
- CDS Calibration Measure (for Credit Curve)bondMarketQuoteName
- Name of the Bond Market QuotebondMarketQuote
- Bond Market Quote Value- Returns:
- The Output Measure Map
-
KeyRateDuration
public static final java.util.Map<java.lang.String,java.lang.Double> KeyRateDuration(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, double bondMarketCleanPrice)Generate the Treasury Curve Tenor Key Rate Sensitivity/Duration- Parameters:
issuerName
- Bond Issuer NamebondEffectiveDate
- Bond Effective DatebondMaturityDate
- Bond Maturity DatebondCoupon
- Bond CouponbondCouponFrequency
- Bond Coupon FrequencybondCouponDayCount
- Bond Coupon Day CountbondCouponCurrency
- Bond Coupon CurrencyspotDate
- Spot DategovvieCode
- Govvie Bond Code (for Treasury Curve)govvieCurveTreasuryEffectiveDateArray
- Array of the Treasury Instrument Effective Date (for Treasury Curve)govvieCurveTreasuryMaturityDateArray
- Array of the Treasury Instrument Maturity Date (for Treasury Curve)govvieCurveTreasuryCouponArray
- Array of the Treasury Instrument Coupon (for Treasury Curve)govvieCurveTreasuryYieldArray
- Array of the Treasury Instrument Yield (for Treasury Curve)govvieCurveTreasuryMeasure
- Treasury Instrument Measure (for Govvie Curve)bondMarketCleanPrice
- Bond Market Clean Price- Returns:
- The Treasury Curve Tenor Sensitivity/Duration
-
HorizonChangeAttribution
public static final java.util.List<PositionChangeComponents> HorizonChangeAttribution(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, JulianDate[] julianSpotDateArray, double[] cleanPriceArray)Returns Attribution for the Specified Bond Instance- Parameters:
issuerName
- Bond Issuer NamebondEffectiveDate
- Bond Effective DatebondMaturityDate
- Bond Maturity DatebondCoupon
- Bond CouponbondCouponFrequency
- Bond Coupon FrequencybondCouponDayCount
- Bond Coupon Day CountbondCouponCurrency
- Bond Coupon CurrencyjulianSpotDateArray
- Array of Spot DatescleanPriceArray
- Array of Closing Clean Prices- Returns:
- List of the Position Change Components
-
RelativeValueMetrics
public static final BondRVMeasures RelativeValueMetrics(java.lang.String issuerName, int bondEffectiveDate, int bondMaturityDate, double bondCoupon, int bondCouponFrequency, java.lang.String bondCouponDayCount, java.lang.String bondCouponCurrency, int spotDate, java.lang.String[] fundingCurveDepositTenor, double[] fundingCurveDepositQuote, java.lang.String fundingCurveDepositMeasure, double[] fundingCurveFuturesQuote, java.lang.String fundingCurveFuturesMeasure, java.lang.String[] fundingCurveFixFloatTenor, double[] fundingCurveFixFloatQuote, java.lang.String fundingFixFloatMeasure, java.lang.String govvieCode, int[] govvieCurveTreasuryEffectiveDateArray, int[] govvieCurveTreasuryMaturityDateArray, double[] govvieCurveTreasuryCouponArray, double[] govvieCurveTreasuryYieldArray, java.lang.String govvieCurveTreasuryMeasure, java.lang.String creditCurveName, java.lang.String[] creditCurveCDSTenorArray, double[] creditCurveCDSCouponArray, double[] creditCurveCDSQuoteArray, java.lang.String creditCurveCDSMeasure, double bondMarketCleanPrice)Generate the Relative Value Metrics for the Specified Bond- Parameters:
issuerName
- Bond Issuer NamebondEffectiveDate
- Bond Effective DatebondMaturityDate
- Bond Maturity DatebondCoupon
- Bond CouponbondCouponFrequency
- Bond Coupon FrequencybondCouponDayCount
- Bond Coupon Day CountbondCouponCurrency
- Bond Coupon CurrencyspotDate
- Spot DatefundingCurveDepositTenor
- Deposit Instruments Tenor (for Funding Curve)fundingCurveDepositQuote
- Deposit Instruments Quote (for Funding Curve)fundingCurveDepositMeasure
- Deposit Instruments Measure (for Funding Curve)fundingCurveFuturesQuote
- Futures Instruments Tenor (for Funding Curve)fundingCurveFuturesMeasure
- Futures Instruments Measure (for Funding Curve)fundingCurveFixFloatTenor
- Fix-Float Instruments Tenor (for Funding Curve)fundingCurveFixFloatQuote
- Fix-Float Instruments Quote (for Funding Curve)fundingFixFloatMeasure
- Fix-Float Instruments Tenor (for Funding Curve)govvieCode
- Govvie Bond Code (for Treasury Curve)govvieCurveTreasuryEffectiveDateArray
- Array of the Treasury Instrument Effective Date (for Treasury Curve)govvieCurveTreasuryMaturityDateArray
- Array of the Treasury Instrument Maturity Date (for Treasury Curve)govvieCurveTreasuryCouponArray
- Array of the Treasury Instrument Coupon (for Treasury Curve)govvieCurveTreasuryYieldArray
- Array of the Treasury Instrument Yield (for Treasury Curve)govvieCurveTreasuryMeasure
- Treasury Instrument Measure (for Treasury Curve)creditCurveName
- Credit Curve Name (for Credit Curve)creditCurveCDSTenorArray
- CDS Maturity Tenor (for Credit Curve)creditCurveCDSCouponArray
- Array of CDS Fixed Coupon (for Credit Curve)creditCurveCDSQuoteArray
- Array of CDS Market Quotes (for Credit Curve)creditCurveCDSMeasure
- CDS Calibration Measure (for Credit Curve)bondMarketCleanPrice
- Bond Market Clean Price- Returns:
- The Relative Value Metrics
-