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 intFORWARD_PRICE_CREDIT_BASISForward Price Credit Basisstatic intFORWARD_PRICE_OASForward Price OASstatic intFORWARD_PRICE_YIELDForward Price Yieldstatic intFORWARD_PRICE_ZSPREADForward 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 ArrayCashSettleParamscashSettleParams()Get the Product's cash settlement parametersCTDEntrycheapestToDeliver(int iValueDate, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp, double[] adblCleanPrice, int iForwardPriceMethod)Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market ParametersCTDEntrycheapestToDeliverCreditBasis(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)Extract the Cheapest-to-deliver Entry in the Basket Using Bond Credit Basis MetricCTDEntrycheapestToDeliverOAS(int iValueDate, CurveSurfaceQuoteContainer csqc, double[] adblCleanPrice)Extract the Cheapest-to-deliver Entry in the Basket Using Bond OAS MetricCTDEntrycheapestToDeliverYield(int iValueDate, double[] adblCleanPrice)Extract the Cheapest-to-deliver Entry in the Basket Using the Current Market Prices AloneCTDEntrycheapestToDeliverZSpread(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 CurrenciesCompositePeriodCouponMetricscouponMetrics(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 PeriodsEntityCDSLabelcreditLabel()Get the Credit Curve Latent State Identifier Labelint[]deliveryMonths()Retrieve the Array of Delivery MonthsJulianDateeffectiveDate()Get the Effective DateJulianDateexpiry()Retrieve the Futures Expiration DateJulianDatefirstCouponDate()Get the First Coupon DateCaseInsensitiveTreeMap<ForwardLabel>forwardLabel()Get the Map of Forward Latent State Labelsintfreq()Retrieve the Coupon FrequencyFundingLabelfundingLabel()Get the Funding Curve Latent State LabelCaseInsensitiveTreeMap<FXLabel>fxLabel()Get the Map of FX Latent State Identifier LabelsGovvieLabelgovvieLabel()Get the Govvie Curve Latent State LabeldoubleinitialNotional()Get the Initial Notional for the ProductintlastTradingDayLag()Retrieve the Last Trading Day LagJulianDatematurityDate()Get the Maturity Datejava.lang.StringmaximumMaturity()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.StringminimumMaturity()Retrieve the Minimum Maturity of the ContractdoubleminimumPriceMovement()Retrieve the Minimum Price Movementjava.lang.Stringname()Get the component namedoublenotional(int iDate)Get the Notional for the Product at the given datedoublenotional(int iDate1, int iDate2)Get the time-weighted Notional for the Product between 2 datesdoublenotionalValue()Retrieve the Notional ValueCaseInsensitiveTreeMap<OTCFixFloatLabel>otcFixFloatLabel()Get the Map of OTC Fix Float Latent State Labelsjava.lang.StringpayCurrency()Get the Pay Currencyjava.lang.StringprincipalCurrency()Get the Principal Currencydoublepv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)Compute the PV for the specified Market ParametersdoublereferenceCoupon()Retrieve the Reference Coupon RatebooleansetDeliveryMonths(int[] aiDeliveryMonth)Set the Delivery MonthsbooleansetExpiry(JulianDate dtExpiry)Set the Futures Expiration DatebooleansetLastTradingDayLag(int iLastTradingDayLag)Set the Last Trading Day LagbooleansetMaximumMaturity(java.lang.String strDeliverableGradeMaximumMaturity)Retrieve the Deliverable Grade Maximum MaturitybooleansetMinimumMaturity(java.lang.String strDeliverableGradeMinimumMaturity)Retrieve the Deliverable Grade Minimum MaturitybooleansetMinimumPriceMovement(double dblMinimumPriceMovement)Retrieve the Minimum Price MovementbooleansetNotionalValue(double dblNotionalValue)Retrieve the Notional ValuebooleansetReferenceCoupon(double dblReferenceCoupon)Set the Reference Coupon RatebooleansetTickValue(double dblTickValue)Retrieve the Tick ValuebooleansetType(java.lang.String strType)Set the Futures TypedoubletickValue()Retrieve the Tick Valuejava.lang.Stringtype()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, tenorMethods 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:ComponentMarketParamRefGet the component name- Returns:
- The component name
-
cashSettleParams
Description copied from class:ComponentGet the Product's cash settlement parameters- Specified by:
cashSettleParamsin classComponent- Returns:
- Cash settlement Parameters
-
couponMetrics
public CompositePeriodCouponMetrics couponMetrics(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)Description copied from class:ComponentGet the Product's coupon Metrics at the specified accrual date- Specified by:
couponMetricsin 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:ComponentGet the Product's Cash Flow Periods- Specified by:
couponPeriodsin classComponent- Returns:
- List of the Product's Cash Flow Periods
-
effectiveDate
Description copied from class:ComponentGet the Effective Date- Specified by:
effectiveDatein classComponent- Returns:
- Effective Date
-
firstCouponDate
Description copied from class:ComponentGet the First Coupon Date- Specified by:
firstCouponDatein classComponent- Returns:
- First Coupon Date
-
freq
public int freq()Description copied from class:ComponentRetrieve the Coupon Frequency -
initialNotional
public double initialNotional()Description copied from class:ComponentGet the Initial Notional for the Product- Specified by:
initialNotionalin classComponent- Returns:
- Initial Notional
-
notional
public double notional(int iDate) throws java.lang.ExceptionDescription copied from class:ComponentGet the Notional for the Product at the given date -
notional
public double notional(int iDate1, int iDate2) throws java.lang.ExceptionDescription copied from class:ComponentGet the time-weighted Notional for the Product between 2 dates -
maturityDate
Description copied from class:ComponentGet the Maturity Date- Specified by:
maturityDatein classComponent- Returns:
- Maturity Date
-
couponCurrency
Description copied from interface:ComponentMarketParamRefGet the Map of Coupon Currencies- Returns:
- The Map of Coupon Currencies
-
principalCurrency
public java.lang.String principalCurrency()Description copied from interface:ComponentMarketParamRefGet the Principal Currency- Returns:
- The Principal Currency
-
payCurrency
public java.lang.String payCurrency()Description copied from interface:ComponentMarketParamRefGet the Pay Currency- Returns:
- The Pay Currency
-
creditLabel
Description copied from interface:ComponentMarketParamRefGet the Credit Curve Latent State Identifier Label- Returns:
- The Credit Curve Latent State Identifier Label
-
forwardLabel
Description copied from interface:ComponentMarketParamRefGet the Map of Forward Latent State Labels- Returns:
- The Map of the Forward Latent State Labels
-
otcFixFloatLabel
Description copied from interface:ComponentMarketParamRefGet 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:ComponentMarketParamRefGet the Funding Curve Latent State Label- Returns:
- Funding Curve Latent State Label
-
govvieLabel
Description copied from interface:ComponentMarketParamRefGet the Govvie Curve Latent State Label- Returns:
- Govvie Curve Latent State Label
-
fxLabel
Description copied from interface:ComponentMarketParamRefGet the Map of FX Latent State Identifier Labels- Returns:
- The Map of FX Latent State Identifier Labels
-
volatilityLabel
Description copied from interface:ComponentMarketParamRefGet 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:ComponentGenerate 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:ComponentRetrieve the ordered set of the measure names whose values will be calculated- Specified by:
measureNamesin 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:ComponentCompute the PV for the specified Market Parameters
-