Class TreasuryFutures

java.lang.Object
org.drip.product.definition.Component
org.drip.product.govvie.TreasuryFutures
All Implemented Interfaces:
ComponentMarketParamRef

public class TreasuryFutures
extends Component
TreasuryFutures implements the Treasury Futures Product Contract Details.



Author:
Lakshmi Krishnamurthy
  • Field Details

    • FORWARD_PRICE_OAS

      public static final int FORWARD_PRICE_OAS
      Forward Price OAS
      See Also:
      Constant Field Values
    • FORWARD_PRICE_YIELD

      public static final int FORWARD_PRICE_YIELD
      Forward Price Yield
      See Also:
      Constant Field Values
    • FORWARD_PRICE_ZSPREAD

      public static final int FORWARD_PRICE_ZSPREAD
      Forward Price Z-Spread
      See Also:
      Constant Field Values
    • FORWARD_PRICE_CREDIT_BASIS

      public static final int FORWARD_PRICE_CREDIT_BASIS
      Forward Price Credit Basis
      See Also:
      Constant Field Values
  • Constructor Details

    • TreasuryFutures

      public TreasuryFutures​(Bond[] aBond, double[] adblConversionFactor, CashSettleParams csp) throws java.lang.Exception
      BondFutures Constructor
      Parameters:
      aBond - Array of the Bonds on the Basket
      adblConversionFactor - The Bond Conversion Factor
      csp - Cash Settlement Parameters
      Throws:
      java.lang.Exception - thrown if the Inputs are Invalid
  • Method Details

    • setType

      public boolean setType​(java.lang.String strType)
      Set the Futures Type
      Parameters:
      strType - The Futures Type
      Returns:
      TRUE - Futures Type Successfully Set
    • type

      public java.lang.String type()
      Retrieve the Futures Type
      Returns:
      The Futures Type
    • setNotionalValue

      public boolean setNotionalValue​(double dblNotionalValue)
      Retrieve the Notional Value
      Parameters:
      dblNotionalValue - The Notional Value
      Returns:
      TRUE - The Notional Value successfully retrieved
    • notionalValue

      public double notionalValue()
      Retrieve the Notional Value
      Returns:
      The Notional Value
    • setReferenceCoupon

      public boolean setReferenceCoupon​(double dblReferenceCoupon)
      Set the Reference Coupon Rate
      Parameters:
      dblReferenceCoupon - The Reference Coupon Rate
      Returns:
      TRUE - The Reference Coupon Rate successfully set
    • referenceCoupon

      public double referenceCoupon()
      Retrieve the Reference Coupon Rate
      Returns:
      The Reference Coupon Rate
    • setMinimumMaturity

      public boolean setMinimumMaturity​(java.lang.String strDeliverableGradeMinimumMaturity)
      Retrieve the Deliverable Grade Minimum Maturity
      Parameters:
      strDeliverableGradeMinimumMaturity - Minimum Maturity of the Deliverable Grade
      Returns:
      TRUE - Minimum Maturity Successfully set
    • minimumMaturity

      public java.lang.String minimumMaturity()
      Retrieve the Minimum Maturity of the Contract
      Returns:
      The Minimum Maturity of the Contract
    • setMaximumMaturity

      public boolean setMaximumMaturity​(java.lang.String strDeliverableGradeMaximumMaturity)
      Retrieve the Deliverable Grade Maximum Maturity
      Parameters:
      strDeliverableGradeMaximumMaturity - Maximum Maturity of the Deliverable Grade
      Returns:
      TRUE - Maximum Maturity Successfully set
    • maximumMaturity

      public java.lang.String maximumMaturity()
      Retrieve the Maximum Maturity of the Contract
      Returns:
      The Maximum Maturity of the Contract
    • setDeliveryMonths

      public boolean setDeliveryMonths​(int[] aiDeliveryMonth)
      Set the Delivery Months
      Parameters:
      aiDeliveryMonth - Array of Delivery Months
      Returns:
      TRUE - Delivery Months successfully set
    • deliveryMonths

      public int[] deliveryMonths()
      Retrieve the Array of Delivery Months
      Returns:
      Array of Delivery Months
    • setLastTradingDayLag

      public boolean setLastTradingDayLag​(int iLastTradingDayLag)
      Set the Last Trading Day Lag
      Parameters:
      iLastTradingDayLag - The Last Trading Day Lag
      Returns:
      TRUE - Last Trading Day Lag Successfully Set
    • lastTradingDayLag

      public int lastTradingDayLag()
      Retrieve the Last Trading Day Lag
      Returns:
      Last Trading Day Lag
    • setMinimumPriceMovement

      public boolean setMinimumPriceMovement​(double dblMinimumPriceMovement)
      Retrieve the Minimum Price Movement
      Parameters:
      dblMinimumPriceMovement - The Minimum Price Movement
      Returns:
      TRUE - The Minimum Price Movement Successfully Set
    • minimumPriceMovement

      public double minimumPriceMovement()
      Retrieve the Minimum Price Movement
      Returns:
      The Minimum Price Movement
    • setTickValue

      public boolean setTickValue​(double dblTickValue)
      Retrieve the Tick Value
      Parameters:
      dblTickValue - The Tick Value
      Returns:
      TRUE - The Tick Value Successfully Set
    • tickValue

      public double tickValue()
      Retrieve the Tick Value
      Returns:
      The Tick Value
    • basket

      public Bond[] basket()
      Retrieve the Bond Basket Array
      Returns:
      The Bond Basket Array
    • conversionFactor

      public double[] conversionFactor()
      Retrieve the Conversion Factor Array
      Returns:
      The Conversion Factor Array
    • setExpiry

      public boolean setExpiry​(JulianDate dtExpiry)
      Set the Futures Expiration Date
      Parameters:
      dtExpiry - The Futures Expiration Date
      Returns:
      TRUE - The Futures Expiration Date Successfully Set
    • expiry

      public JulianDate expiry()
      Retrieve the Futures Expiration Date
      Returns:
      The Futures Expiration Date
    • cheapestToDeliver

      public CTDEntry cheapestToDeliver​(int iValueDate, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp, double[] adblCleanPrice, int iForwardPriceMethod)
      Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market Parameters
      Parameters:
      iValueDate - The Valuation Date
      csqc - The Market Parameters
      vcp - Valuation Customization Parameters
      adblCleanPrice - Array of the Bond Clean Prices
      iForwardPriceMethod - Forward Price Calculation Method
      Returns:
      The Cheapest-to-deliver Entry in the Basket Using the Current Market Parameters
    • cheapestToDeliverYield

      public CTDEntry cheapestToDeliverYield​(int iValueDate, double[] adblCleanPrice)
      Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market Prices Alone
      Parameters:
      iValueDate - The Valuation Date
      adblCleanPrice - Array of the Bond Clean Prices
      Returns:
      The Cheapest-to-deliver Entry in the Basket Using the Current Market Prices Alone
    • cheapestToDeliverOAS

      public CTDEntry cheapestToDeliverOAS​(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
      Extract the Cheapest-to-deliver Entry in the Basket Using Bond OAS Metric
      Parameters:
      iValueDate - The Valuation Date
      csqc - The Market Parameters
      adblCleanPrice - Array of the Bond Clean Prices
      Returns:
      The Cheapest-to-deliver Entry in the Basket Using Bond OAS Metric
    • cheapestToDeliverZSpread

      public CTDEntry cheapestToDeliverZSpread​(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
      Extract the Cheapest-to-deliver Entry in the Basket Using Bond Z Spread Metric
      Parameters:
      iValueDate - The Valuation Date
      csqc - The Market Parameters
      adblCleanPrice - Array of the Bond Clean Prices
      Returns:
      The Cheapest-to-deliver Entry in the Basket Using Bond Z Spread Metric
    • cheapestToDeliverCreditBasis

      public CTDEntry cheapestToDeliverCreditBasis​(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
      Extract the Cheapest-to-deliver Entry in the Basket Using Bond Credit Basis Metric
      Parameters:
      iValueDate - The Valuation Date
      csqc - The Market Parameters
      adblCleanPrice - Array of the Bond Clean Prices
      Returns:
      The Cheapest-to-deliver Entry in the Basket Using Bond Credit Basis Metric
    • name

      public java.lang.String name()
      Description copied from interface: ComponentMarketParamRef
      Get the component name
      Returns:
      The component name
    • cashSettleParams

      public CashSettleParams cashSettleParams()
      Description copied from class: Component
      Get the Product's cash settlement parameters
      Specified by:
      cashSettleParams in class Component
      Returns:
      Cash settlement Parameters
    • couponMetrics

      public CompositePeriodCouponMetrics couponMetrics​(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)
      Description copied from class: Component
      Get the Product's coupon Metrics at the specified accrual date
      Specified by:
      couponMetrics in class Component
      Parameters:
      iAccrualEndDate - Accrual End Date
      valParams - The Valuation Parameters
      csqs - Component Market Parameters
      Returns:
      The Product's coupon Nominal/Adjusted Coupon Measures
    • couponPeriods

      public java.util.List<CompositePeriod> couponPeriods()
      Description copied from class: Component
      Get the Product's Cash Flow Periods
      Specified by:
      couponPeriods in class Component
      Returns:
      List of the Product's Cash Flow Periods
    • effectiveDate

      public JulianDate effectiveDate()
      Description copied from class: Component
      Get the Effective Date
      Specified by:
      effectiveDate in class Component
      Returns:
      Effective Date
    • firstCouponDate

      public JulianDate firstCouponDate()
      Description copied from class: Component
      Get the First Coupon Date
      Specified by:
      firstCouponDate in class Component
      Returns:
      First Coupon Date
    • freq

      public int freq()
      Description copied from class: Component
      Retrieve the Coupon Frequency
      Specified by:
      freq in class Component
      Returns:
      The Coupon Frequency
    • initialNotional

      public double initialNotional()
      Description copied from class: Component
      Get the Initial Notional for the Product
      Specified by:
      initialNotional in class Component
      Returns:
      Initial Notional
    • notional

      public double notional​(int iDate) throws java.lang.Exception
      Description copied from class: Component
      Get the Notional for the Product at the given date
      Specified by:
      notional in class Component
      Parameters:
      iDate - Date
      Returns:
      Product Notional
      Throws:
      java.lang.Exception - Thrown if Notional cannot be computed
    • notional

      public double notional​(int iDate1, int iDate2) throws java.lang.Exception
      Description copied from class: Component
      Get the time-weighted Notional for the Product between 2 dates
      Specified by:
      notional in class Component
      Parameters:
      iDate1 - Date #1
      iDate2 - Date #2
      Returns:
      The Product Notional
      Throws:
      java.lang.Exception - Thrown if Notional cannot be computed
    • maturityDate

      public JulianDate maturityDate()
      Description copied from class: Component
      Get the Maturity Date
      Specified by:
      maturityDate in class Component
      Returns:
      Maturity Date
    • couponCurrency

      public CaseInsensitiveTreeMap<java.lang.String> couponCurrency()
      Description copied from interface: ComponentMarketParamRef
      Get the Map of Coupon Currencies
      Returns:
      The Map of Coupon Currencies
    • principalCurrency

      public java.lang.String principalCurrency()
      Description copied from interface: ComponentMarketParamRef
      Get the Principal Currency
      Returns:
      The Principal Currency
    • payCurrency

      public java.lang.String payCurrency()
      Description copied from interface: ComponentMarketParamRef
      Get the Pay Currency
      Returns:
      The Pay Currency
    • creditLabel

      public EntityCDSLabel creditLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Credit Curve Latent State Identifier Label
      Returns:
      The Credit Curve Latent State Identifier Label
    • forwardLabel

      public CaseInsensitiveTreeMap<ForwardLabel> forwardLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Map of Forward Latent State Labels
      Returns:
      The Map of the Forward Latent State Labels
    • otcFixFloatLabel

      public CaseInsensitiveTreeMap<OTCFixFloatLabel> otcFixFloatLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Map of OTC Fix Float Latent State Labels
      Returns:
      The Map of the OTC Fix Float Latent State Labels
    • fundingLabel

      public FundingLabel fundingLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Funding Curve Latent State Label
      Returns:
      Funding Curve Latent State Label
    • govvieLabel

      public GovvieLabel govvieLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Govvie Curve Latent State Label
      Returns:
      Govvie Curve Latent State Label
    • fxLabel

      public CaseInsensitiveTreeMap<FXLabel> fxLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Map of FX Latent State Identifier Labels
      Returns:
      The Map of FX Latent State Identifier Labels
    • volatilityLabel

      public CaseInsensitiveTreeMap<VolatilityLabel> volatilityLabel()
      Description copied from interface: ComponentMarketParamRef
      Get the Map of Volatility Latent State Identifier Labels
      Returns:
      The Map of Volatility Latent State Identifier Labels
    • value

      public CaseInsensitiveTreeMap<java.lang.Double> value​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)
      Description copied from class: Component
      Generate a full list of the Product measures for the full input set of market parameters
      Specified by:
      value in class Component
      Parameters:
      valParams - ValuationParams
      pricerParams - PricerParams
      csqc - Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      Map of measure name and value
    • measureNames

      public java.util.Set<java.lang.String> measureNames()
      Description copied from class: Component
      Retrieve the ordered set of the measure names whose values will be calculated
      Specified by:
      measureNames in class Component
      Returns:
      Set of Measure Names
    • pv

      public double pv​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp) throws java.lang.Exception
      Description copied from class: Component
      Compute the PV for the specified Market Parameters
      Specified by:
      pv in class Component
      Parameters:
      valParams - ValuationParams
      pricerParams - PricerParams
      csqc - Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      The PV
      Throws:
      java.lang.Exception - Thrown if the PV cannot be computed