Package org.drip.service.product
Class TreasuryFuturesAPI
java.lang.Object
org.drip.service.product.TreasuryFuturesAPI
public class TreasuryFuturesAPI
extends java.lang.Object
TreasuryFuturesAPI demonstrates the Details behind the Pricing and the Scenario Runs behind a
Treasury Futures Contract.
- Module = Computational Core Module
- Library = Computation Support
- Project = Environment, Product/Definition Containers, and Scenario/State Manipulation APIs
- Package = Product Horizon PnL Attribution Decomposition
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description TreasuryFuturesAPI()
-
Method Summary
Modifier and Type Method Description static java.util.List<PositionChangeComponents>
HorizonChangeAttribution(java.lang.String strTreasuryCode, JulianDate[] adtEffective, JulianDate[] adtMaturity, double[] adblCoupon, JulianDate[] adtExpiry, JulianDate[] adtSpot, double[] adblCleanPrice, double[] adblConversionFactor)
Returns Attribution for the Treasury Futuresstatic java.util.List<TenorDurationNodeMetrics>
HorizonKeyRateDuration(java.lang.String strTreasuryType, JulianDate[] adtEffective, JulianDate[] adtMaturity, double[] adblCoupon, JulianDate[] adtExpiry, JulianDate[] adtSpot, double[] adblCleanPrice, java.lang.String[] astrBenchmarkTenor, double[][] aadblGovvieCurveTreasuryYield)
Generate the Horizon Treasury Curve Tenor Key Rate Sensitivity/Durationstatic java.util.Map<java.lang.String,java.lang.Double>
KeyRateDuration(java.lang.String strFuturesCode, int[] aiFuturesComponentTreasuryEffectiveDate, int[] aiFuturesComponentTreasuryMaturityDate, double[] adblFuturesComponentTreasuryCoupon, double[] adblFuturesComponentConversionFactor, int iSpotDate, int[] aiGovvieCurveTreasuryEffectiveDate, int[] aiGovvieCurveTreasuryMaturityDate, double[] adblGovvieCurveTreasuryCoupon, double[] adblGovvieCurveTreasuryYield, java.lang.String strGovvieCurveTreasuryMeasure, double[] adblFuturesComponentTreasuryPrice)
Generate the Treasury Curve Tenor Key Rate Sensitivity/Durationstatic java.util.Map<java.lang.String,java.lang.Double>
ValuationMetrics(java.lang.String strFuturesCode, int[] aiFuturesComponentTreasuryEffectiveDate, int[] aiFuturesComponentTreasuryMaturityDate, double[] adblFuturesComponentTreasuryCoupon, double[] adblFuturesComponentConversionFactor, int iSpotDate, java.lang.String[] astrFundingCurveDepositTenor, double[] adblFundingCurveDepositQuote, java.lang.String strFundingCurveDepositMeasure, double[] adblFundingCurveFuturesQuote, java.lang.String strFundingCurveFuturesMeasure, java.lang.String[] astrFundingCurveFixFloatTenor, double[] adblFundingCurveFixFloatQuote, java.lang.String strFundingFixFloatMeasure, int[] aiGovvieCurveTreasuryEffectiveDate, int[] aiGovvieCurveTreasuryMaturityDate, double[] adblGovvieCurveTreasuryCoupon, double[] adblGovvieCurveTreasuryYield, java.lang.String strGovvieCurveTreasuryMeasure, double[] adblFuturesComponentTreasuryPrice)
Generate a Full Map Invocation of the Treasury Futures Run Use CaseMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TreasuryFuturesAPI
public TreasuryFuturesAPI()
-
-
Method Details
-
ValuationMetrics
public static final java.util.Map<java.lang.String,java.lang.Double> ValuationMetrics(java.lang.String strFuturesCode, int[] aiFuturesComponentTreasuryEffectiveDate, int[] aiFuturesComponentTreasuryMaturityDate, double[] adblFuturesComponentTreasuryCoupon, double[] adblFuturesComponentConversionFactor, int iSpotDate, java.lang.String[] astrFundingCurveDepositTenor, double[] adblFundingCurveDepositQuote, java.lang.String strFundingCurveDepositMeasure, double[] adblFundingCurveFuturesQuote, java.lang.String strFundingCurveFuturesMeasure, java.lang.String[] astrFundingCurveFixFloatTenor, double[] adblFundingCurveFixFloatQuote, java.lang.String strFundingFixFloatMeasure, int[] aiGovvieCurveTreasuryEffectiveDate, int[] aiGovvieCurveTreasuryMaturityDate, double[] adblGovvieCurveTreasuryCoupon, double[] adblGovvieCurveTreasuryYield, java.lang.String strGovvieCurveTreasuryMeasure, double[] adblFuturesComponentTreasuryPrice)Generate a Full Map Invocation of the Treasury Futures Run Use Case- Parameters:
strFuturesCode
- The Treasury Futures CodeaiFuturesComponentTreasuryEffectiveDate
- Array of the Treasury Futures Component Effective DateaiFuturesComponentTreasuryMaturityDate
- Array of the Treasury Futures Component Maturity DateadblFuturesComponentTreasuryCoupon
- Array of the Treasury Futures Component CouponadblFuturesComponentConversionFactor
- Array of the Treasury Futures Component Conversion FactoriSpotDate
- Spot DateastrFundingCurveDepositTenor
- Deposit Instruments Tenor (for Funding Curve)adblFundingCurveDepositQuote
- Deposit Instruments Quote (for Funding Curve)strFundingCurveDepositMeasure
- Deposit Instruments Measure (for Funding Curve)adblFundingCurveFuturesQuote
- Futures Instruments Tenor (for Funding Curve)strFundingCurveFuturesMeasure
- Futures Instruments Measure (for Funding Curve)astrFundingCurveFixFloatTenor
- Fix-Float Instruments Tenor (for Funding Curve)adblFundingCurveFixFloatQuote
- Fix-Float Instruments Quote (for Funding Curve)strFundingFixFloatMeasure
- Fix-Float Instruments Tenor (for Funding Curve)aiGovvieCurveTreasuryEffectiveDate
- Array of the Treasury Instrument Effective Date (for Treasury Curve)aiGovvieCurveTreasuryMaturityDate
- Array of the Treasury Instrument Maturity Date (for Treasury Curve)adblGovvieCurveTreasuryCoupon
- Array of the Treasury Instrument Coupon (for Treasury Curve)adblGovvieCurveTreasuryYield
- Array of the Treasury Instrument Yield (for Treasury Curve)strGovvieCurveTreasuryMeasure
- Treasury Instrument Measure (for Govvie Curve)adblFuturesComponentTreasuryPrice
- Array of the Treasury Futures Component Clean Prices- Returns:
- The Output Measure Map
-
KeyRateDuration
public static final java.util.Map<java.lang.String,java.lang.Double> KeyRateDuration(java.lang.String strFuturesCode, int[] aiFuturesComponentTreasuryEffectiveDate, int[] aiFuturesComponentTreasuryMaturityDate, double[] adblFuturesComponentTreasuryCoupon, double[] adblFuturesComponentConversionFactor, int iSpotDate, int[] aiGovvieCurveTreasuryEffectiveDate, int[] aiGovvieCurveTreasuryMaturityDate, double[] adblGovvieCurveTreasuryCoupon, double[] adblGovvieCurveTreasuryYield, java.lang.String strGovvieCurveTreasuryMeasure, double[] adblFuturesComponentTreasuryPrice)Generate the Treasury Curve Tenor Key Rate Sensitivity/Duration- Parameters:
strFuturesCode
- The Treasury Futures CodeaiFuturesComponentTreasuryEffectiveDate
- Array of the Treasury Futures Component Effective DateaiFuturesComponentTreasuryMaturityDate
- Array of the Treasury Futures Component Maturity DateadblFuturesComponentTreasuryCoupon
- Array of the Treasury Futures Component CouponadblFuturesComponentConversionFactor
- Array of the Treasury Futures Component Conversion FactoriSpotDate
- Spot DateaiGovvieCurveTreasuryEffectiveDate
- Array of the Treasury Instrument Effective Date (for Treasury Curve)aiGovvieCurveTreasuryMaturityDate
- Array of the Treasury Instrument Maturity Date (for Treasury Curve)adblGovvieCurveTreasuryCoupon
- Array of the Treasury Instrument Coupon (for Treasury Curve)adblGovvieCurveTreasuryYield
- Array of the Treasury Instrument Yield (for Treasury Curve)strGovvieCurveTreasuryMeasure
- Treasury Instrument Measure (for Govvie Curve)adblFuturesComponentTreasuryPrice
- Array of the Treasury Futures Component Clean Prices- Returns:
- The Treasury Curve Tenor Sensitivity/Duration
-
HorizonChangeAttribution
public static final java.util.List<PositionChangeComponents> HorizonChangeAttribution(java.lang.String strTreasuryCode, JulianDate[] adtEffective, JulianDate[] adtMaturity, double[] adblCoupon, JulianDate[] adtExpiry, JulianDate[] adtSpot, double[] adblCleanPrice, double[] adblConversionFactor)Returns Attribution for the Treasury Futures- Parameters:
strTreasuryCode
- The Treasury CodeadtEffective
- Array of Effective DatesadtMaturity
- Array of Maturity DatesadblCoupon
- Array of CouponsadtExpiry
- Array of Futures Expiry DatesadtSpot
- Array of Spot DatesadblCleanPrice
- Array of Closing Clean PricesadblConversionFactor
- Array of the Conversion Factor- Returns:
- List of the Position Change Components
-
HorizonKeyRateDuration
public static final java.util.List<TenorDurationNodeMetrics> HorizonKeyRateDuration(java.lang.String strTreasuryType, JulianDate[] adtEffective, JulianDate[] adtMaturity, double[] adblCoupon, JulianDate[] adtExpiry, JulianDate[] adtSpot, double[] adblCleanPrice, java.lang.String[] astrBenchmarkTenor, double[][] aadblGovvieCurveTreasuryYield)Generate the Horizon Treasury Curve Tenor Key Rate Sensitivity/Duration- Parameters:
strTreasuryType
- The Treasury TypeadtEffective
- Array of Effective DatesadtMaturity
- Array of Maturity DatesadblCoupon
- Array of CouponsadtExpiry
- Array of Futures Expiry DatesadtSpot
- Array of Spot DatesadblCleanPrice
- Array of Closing Clean PricesastrBenchmarkTenor
- Array of Benchmark TenorsaadblGovvieCurveTreasuryYield
- Array of the Treasury Instrument Yield (for Treasury Curve)- Returns:
- The Treasury Curve Tenor Sensitivity/Duration
-