Package org.drip.product.govvie
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.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Treasury Bills, Notes, Bonds, Futures
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
FORWARD_PRICE_CREDIT_BASIS
Forward Price Credit Basisstatic int
FORWARD_PRICE_OAS
Forward Price OASstatic int
FORWARD_PRICE_YIELD
Forward Price Yieldstatic int
FORWARD_PRICE_ZSPREAD
Forward Price Z-Spread -
Constructor Summary
Constructors Constructor Description TreasuryFutures(Bond[] aBond, double[] adblConversionFactor, CashSettleParams csp)
BondFutures Constructor -
Method Summary
Modifier and Type Method Description Bond[]
basket()
Retrieve the Bond Basket ArrayCashSettleParams
cashSettleParams()
Get the Product's cash settlement parametersCTDEntry
cheapestToDeliver(int iValueDate, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp, double[] adblCleanPrice, int iForwardPriceMethod)
Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market ParametersCTDEntry
cheapestToDeliverCreditBasis(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
Extract the Cheapest-to-deliver Entry in the Basket Using Bond Credit Basis MetricCTDEntry
cheapestToDeliverOAS(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
Extract the Cheapest-to-deliver Entry in the Basket Using Bond OAS MetricCTDEntry
cheapestToDeliverYield(int iValueDate, double[] adblCleanPrice)
Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market Prices AloneCTDEntry
cheapestToDeliverZSpread(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)
Extract the Cheapest-to-deliver Entry in the Basket Using Bond Z Spread Metricdouble[]
conversionFactor()
Retrieve the Conversion Factor ArrayCaseInsensitiveTreeMap<java.lang.String>
couponCurrency()
Get the Map of Coupon CurrenciesCompositePeriodCouponMetrics
couponMetrics(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)
Get the Product's coupon Metrics at the specified accrual datejava.util.List<CompositePeriod>
couponPeriods()
Get the Product's Cash Flow PeriodsEntityCDSLabel
creditLabel()
Get the Credit Curve Latent State Identifier Labelint[]
deliveryMonths()
Retrieve the Array of Delivery MonthsJulianDate
effectiveDate()
Get the Effective DateJulianDate
expiry()
Retrieve the Futures Expiration DateJulianDate
firstCouponDate()
Get the First Coupon DateCaseInsensitiveTreeMap<ForwardLabel>
forwardLabel()
Get the Map of Forward Latent State Labelsint
freq()
Retrieve the Coupon FrequencyFundingLabel
fundingLabel()
Get the Funding Curve Latent State LabelCaseInsensitiveTreeMap<FXLabel>
fxLabel()
Get the Map of FX Latent State Identifier LabelsGovvieLabel
govvieLabel()
Get the Govvie Curve Latent State Labeldouble
initialNotional()
Get the Initial Notional for the Productint
lastTradingDayLag()
Retrieve the Last Trading Day LagJulianDate
maturityDate()
Get the Maturity Datejava.lang.String
maximumMaturity()
Retrieve the Maximum Maturity of the Contractjava.util.Set<java.lang.String>
measureNames()
Retrieve the ordered set of the measure names whose values will be calculatedjava.lang.String
minimumMaturity()
Retrieve the Minimum Maturity of the Contractdouble
minimumPriceMovement()
Retrieve the Minimum Price Movementjava.lang.String
name()
Get the component namedouble
notional(int iDate)
Get the Notional for the Product at the given datedouble
notional(int iDate1, int iDate2)
Get the time-weighted Notional for the Product between 2 datesdouble
notionalValue()
Retrieve the Notional ValueCaseInsensitiveTreeMap<OTCFixFloatLabel>
otcFixFloatLabel()
Get the Map of OTC Fix Float Latent State Labelsjava.lang.String
payCurrency()
Get the Pay Currencyjava.lang.String
principalCurrency()
Get the Principal Currencydouble
pv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)
Compute the PV for the specified Market Parametersdouble
referenceCoupon()
Retrieve the Reference Coupon Rateboolean
setDeliveryMonths(int[] aiDeliveryMonth)
Set the Delivery Monthsboolean
setExpiry(JulianDate dtExpiry)
Set the Futures Expiration Dateboolean
setLastTradingDayLag(int iLastTradingDayLag)
Set the Last Trading Day Lagboolean
setMaximumMaturity(java.lang.String strDeliverableGradeMaximumMaturity)
Retrieve the Deliverable Grade Maximum Maturityboolean
setMinimumMaturity(java.lang.String strDeliverableGradeMinimumMaturity)
Retrieve the Deliverable Grade Minimum Maturityboolean
setMinimumPriceMovement(double dblMinimumPriceMovement)
Retrieve the Minimum Price Movementboolean
setNotionalValue(double dblNotionalValue)
Retrieve the Notional Valueboolean
setReferenceCoupon(double dblReferenceCoupon)
Set the Reference Coupon Rateboolean
setTickValue(double dblTickValue)
Retrieve the Tick Valueboolean
setType(java.lang.String strType)
Set the Futures Typedouble
tickValue()
Retrieve the Tick Valuejava.lang.String
type()
Retrieve the Futures TypeCaseInsensitiveTreeMap<java.lang.Double>
value(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)
Generate a full list of the Product measures for the full input set of market parametersCaseInsensitiveTreeMap<VolatilityLabel>
volatilityLabel()
Get the Map of Volatility Latent State Identifier LabelsMethods inherited from class org.drip.product.definition.Component
customScenarioMeasures, maturityPayDate, measures, measureValue, tenor
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
FORWARD_PRICE_OAS
public static final int FORWARD_PRICE_OASForward Price OAS- See Also:
- Constant Field Values
-
FORWARD_PRICE_YIELD
public static final int FORWARD_PRICE_YIELDForward Price Yield- See Also:
- Constant Field Values
-
FORWARD_PRICE_ZSPREAD
public static final int FORWARD_PRICE_ZSPREADForward Price Z-Spread- See Also:
- Constant Field Values
-
FORWARD_PRICE_CREDIT_BASIS
public static final int FORWARD_PRICE_CREDIT_BASISForward Price Credit Basis- See Also:
- Constant Field Values
-
-
Constructor Details
-
TreasuryFutures
public TreasuryFutures(Bond[] aBond, double[] adblConversionFactor, CashSettleParams csp) throws java.lang.ExceptionBondFutures Constructor- Parameters:
aBond
- Array of the Bonds on the BasketadblConversionFactor
- The Bond Conversion Factorcsp
- 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
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
Set the Futures Expiration Date- Parameters:
dtExpiry
- The Futures Expiration Date- Returns:
- TRUE - The Futures Expiration Date Successfully Set
-
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 Datecsqc
- The Market Parametersvcp
- Valuation Customization ParametersadblCleanPrice
- Array of the Bond Clean PricesiForwardPriceMethod
- Forward Price Calculation Method- Returns:
- The Cheapest-to-deliver Entry in the Basket Using the Current Market Parameters
-
cheapestToDeliverYield
Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market Prices Alone- Parameters:
iValueDate
- The Valuation DateadblCleanPrice
- 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 Datecsqc
- The Market ParametersadblCleanPrice
- 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 Datecsqc
- The Market ParametersadblCleanPrice
- 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 Datecsqc
- The Market ParametersadblCleanPrice
- 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
Description copied from class:Component
Get the Product's cash settlement parameters- Specified by:
cashSettleParams
in classComponent
- 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 classComponent
- Parameters:
iAccrualEndDate
- Accrual End DatevalParams
- The Valuation Parameterscsqs
- Component Market Parameters- Returns:
- The Product's coupon Nominal/Adjusted Coupon Measures
-
couponPeriods
Description copied from class:Component
Get the Product's Cash Flow Periods- Specified by:
couponPeriods
in classComponent
- Returns:
- List of the Product's Cash Flow Periods
-
effectiveDate
Description copied from class:Component
Get the Effective Date- Specified by:
effectiveDate
in classComponent
- Returns:
- Effective Date
-
firstCouponDate
Description copied from class:Component
Get the First Coupon Date- Specified by:
firstCouponDate
in classComponent
- Returns:
- First Coupon Date
-
freq
public int freq()Description copied from class:Component
Retrieve the Coupon Frequency -
initialNotional
public double initialNotional()Description copied from class:Component
Get the Initial Notional for the Product- Specified by:
initialNotional
in classComponent
- Returns:
- Initial Notional
-
notional
public double notional(int iDate) throws java.lang.ExceptionDescription copied from class:Component
Get the Notional for the Product at the given date -
notional
public double notional(int iDate1, int iDate2) throws java.lang.ExceptionDescription copied from class:Component
Get the time-weighted Notional for the Product between 2 dates -
maturityDate
Description copied from class:Component
Get the Maturity Date- Specified by:
maturityDate
in classComponent
- Returns:
- Maturity Date
-
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
Description copied from interface:ComponentMarketParamRef
Get the Credit Curve Latent State Identifier Label- Returns:
- The Credit Curve Latent State Identifier Label
-
forwardLabel
Description copied from interface:ComponentMarketParamRef
Get the Map of Forward Latent State Labels- Returns:
- The Map of the Forward Latent State Labels
-
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
Description copied from interface:ComponentMarketParamRef
Get the Funding Curve Latent State Label- Returns:
- Funding Curve Latent State Label
-
govvieLabel
Description copied from interface:ComponentMarketParamRef
Get the Govvie Curve Latent State Label- Returns:
- Govvie Curve Latent State Label
-
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
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 -
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 classComponent
- Returns:
- Set of Measure Names
-
pv
public double pv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp) throws java.lang.ExceptionDescription copied from class:Component
Compute the PV for the specified Market Parameters
-