Package org.drip.product.definition
Class Component
java.lang.Object
org.drip.product.definition.Component
- All Implemented Interfaces:
ComponentMarketParamRef
- Direct Known Subclasses:
CalibratableComponent
,TreasuryFutures
public abstract class Component extends java.lang.Object implements ComponentMarketParamRef
Component abstract class extends the ComponentMarketParamRef and provides the following methods:
- Get the product's initial notional, notional, and coupon.
- Get the Effective date, Maturity date, First Coupon Date.
- List the coupon periods.
- Set the market curves - discount, TSY, forward, and Credit curves.
- Retrieve the product's settlement parameters.
- Value the product's using standard/custom market parameters.
- Retrieve the product's named measures and named measure values.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Fixed Income Components/Baskets Definitions
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description Component()
-
Method Summary
Modifier and Type Method Description abstract CashSettleParams
cashSettleParams()
Get the Product's cash settlement parametersabstract CompositePeriodCouponMetrics
couponMetrics(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)
Get the Product's coupon Metrics at the specified accrual dateabstract java.util.List<CompositePeriod>
couponPeriods()
Get the Product's Cash Flow PeriodsCaseInsensitiveTreeMap<java.lang.Double>
customScenarioMeasures(ValuationParams valParams, CreditPricerParams pricerParams, ScenarioMarketParams mpc, java.lang.String strCustomScenName, ValuationCustomizationParams vcp, CaseInsensitiveTreeMap<java.lang.Double> mapBaseMeasures)
Generate a full list of custom measures for the set of scenario market parameters present in the org.drip.param.definition.MarketParamsabstract JulianDate
effectiveDate()
Get the Effective Dateabstract JulianDate
firstCouponDate()
Get the First Coupon Dateabstract int
freq()
Retrieve the Coupon Frequencyabstract double
initialNotional()
Get the Initial Notional for the Productabstract JulianDate
maturityDate()
Get the Maturity DateJulianDate
maturityPayDate()
Get the Maturity Pay Dateabstract java.util.Set<java.lang.String>
measureNames()
Retrieve the ordered set of the measure names whose values will be calculatedComponentMeasures
measures(ValuationParams valParams, CreditPricerParams pricerParams, ScenarioMarketParams mpc, ValuationCustomizationParams vcp)
Generate a full list of the Product's measures for the set of scenario market parameters present in the org.drip.param.definition.MarketParamsdouble
measureValue(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, java.lang.String strMeasure)
Calculate the value of the given Product's measureabstract double
notional(int iDate)
Get the Notional for the Product at the given dateabstract double
notional(int iDate1, int iDate2)
Get the time-weighted Notional for the Product between 2 datesabstract double
pv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)
Compute the PV for the specified Market Parametersjava.lang.String
tenor()
Retrieve the Instrument's Imputed Tenorabstract CaseInsensitiveTreeMap<java.lang.Double>
value(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
Generate a full list of the Product measures for the full input set of market parametersMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.drip.product.definition.ComponentMarketParamRef
couponCurrency, creditLabel, forwardLabel, fundingLabel, fxLabel, govvieLabel, name, otcFixFloatLabel, payCurrency, principalCurrency, volatilityLabel
-
Constructor Details
-
Component
public Component()
-
-
Method Details
-
initialNotional
public abstract double initialNotional() throws java.lang.ExceptionGet the Initial Notional for the Product- Returns:
- Initial Notional
- Throws:
java.lang.Exception
- Thrown if Initial Notional cannot be computed
-
notional
public abstract double notional(int iDate) throws java.lang.ExceptionGet the Notional for the Product at the given date- Parameters:
iDate
- Date- Returns:
- Product Notional
- Throws:
java.lang.Exception
- Thrown if Notional cannot be computed
-
notional
public abstract double notional(int iDate1, int iDate2) throws java.lang.ExceptionGet the time-weighted Notional for the Product between 2 dates- Parameters:
iDate1
- Date #1iDate2
- Date #2- Returns:
- The Product Notional
- Throws:
java.lang.Exception
- Thrown if Notional cannot be computed
-
effectiveDate
Get the Effective Date- Returns:
- Effective Date
-
maturityDate
Get the Maturity Date- Returns:
- Maturity Date
-
firstCouponDate
Get the First Coupon Date- Returns:
- First Coupon Date
-
freq
public abstract int freq()Retrieve the Coupon Frequency- Returns:
- The Coupon Frequency
-
couponPeriods
Get the Product's Cash Flow Periods- Returns:
- List of the Product's Cash Flow Periods
-
couponMetrics
public abstract CompositePeriodCouponMetrics couponMetrics(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)Get the Product's coupon Metrics at the specified accrual date- Parameters:
iAccrualEndDate
- Accrual End DatevalParams
- The Valuation Parameterscsqs
- Component Market Parameters- Returns:
- The Product's coupon Nominal/Adjusted Coupon Measures
-
cashSettleParams
Get the Product's cash settlement parameters- Returns:
- Cash settlement Parameters
-
value
public abstract CaseInsensitiveTreeMap<java.lang.Double> value(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)Generate a full list of the Product measures for the full input set of market parameters- Parameters:
valParams
- ValuationParamspricerParams
- PricerParamscsqs
- Market Parametersvcp
- Valuation Customization Parameters- Returns:
- Map of measure name and value
-
measureNames
public abstract java.util.Set<java.lang.String> measureNames()Retrieve the ordered set of the measure names whose values will be calculated- Returns:
- Set of Measure Names
-
pv
public abstract double pv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp) throws java.lang.ExceptionCompute the PV for the specified Market Parameters- Parameters:
valParams
- ValuationParamspricerParams
- PricerParamscsqc
- Market Parametersvcp
- Valuation Customization Parameters- Returns:
- The PV
- Throws:
java.lang.Exception
- Thrown if the PV cannot be computed
-
maturityPayDate
Get the Maturity Pay Date- Returns:
- Maturity Pay Date
-
measureValue
public double measureValue(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, java.lang.String strMeasure) throws java.lang.ExceptionCalculate the value of the given Product's measure- Parameters:
valParams
- ValuationParamspricerParams
- PricerParamscsqs
- ComponentMarketParamsstrMeasure
- Measure Stringvcp
- Valuation Customization Parameters- Returns:
- Double measure value
- Throws:
java.lang.Exception
- Thrown if the measure cannot be calculated
-
tenor
public java.lang.String tenor()Retrieve the Instrument's Imputed Tenor- Returns:
- The Instrument's Imputed Tenor
-
measures
public ComponentMeasures measures(ValuationParams valParams, CreditPricerParams pricerParams, ScenarioMarketParams mpc, ValuationCustomizationParams vcp)Generate a full list of the Product's measures for the set of scenario market parameters present in the org.drip.param.definition.MarketParams- Parameters:
valParams
- ValuationParamspricerParams
- PricerParamsmpc
- org.drip.param.definition.MarketParamsvcp
- Valuation Customization Parameters- Returns:
- ComponentOutput object
-
customScenarioMeasures
public CaseInsensitiveTreeMap<java.lang.Double> customScenarioMeasures(ValuationParams valParams, CreditPricerParams pricerParams, ScenarioMarketParams mpc, java.lang.String strCustomScenName, ValuationCustomizationParams vcp, CaseInsensitiveTreeMap<java.lang.Double> mapBaseMeasures)Generate a full list of custom measures for the set of scenario market parameters present in the org.drip.param.definition.MarketParams- Parameters:
valParams
- ValuationParamspricerParams
- PricerParamsmpc
- org.drip.param.definition.MarketParamsstrCustomScenName
- Custom Scenario Namevcp
- Valuation Customization ParametersmapBaseMeasures
- Base Measures from used to calculate the desired delta measure. If null, the base measures will be generated.- Returns:
- Custom Scenarios Measures output set
-