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.




Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • initialNotional

      public abstract double initialNotional() throws java.lang.Exception
      Get 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.Exception
      Get 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.Exception
      Get the time-weighted Notional for the Product between 2 dates
      Parameters:
      iDate1 - Date #1
      iDate2 - Date #2
      Returns:
      The Product Notional
      Throws:
      java.lang.Exception - Thrown if Notional cannot be computed
    • effectiveDate

      public abstract JulianDate effectiveDate()
      Get the Effective Date
      Returns:
      Effective Date
    • maturityDate

      public abstract JulianDate maturityDate()
      Get the Maturity Date
      Returns:
      Maturity Date
    • firstCouponDate

      public abstract JulianDate firstCouponDate()
      Get the First Coupon Date
      Returns:
      First Coupon Date
    • freq

      public abstract int freq()
      Retrieve the Coupon Frequency
      Returns:
      The Coupon Frequency
    • couponPeriods

      public abstract java.util.List<CompositePeriod> 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 Date
      valParams - The Valuation Parameters
      csqs - Component Market Parameters
      Returns:
      The Product's coupon Nominal/Adjusted Coupon Measures
    • cashSettleParams

      public abstract CashSettleParams 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 - ValuationParams
      pricerParams - PricerParams
      csqs - Market Parameters
      vcp - 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.Exception
      Compute the PV for the specified Market Parameters
      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
    • maturityPayDate

      public JulianDate 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.Exception
      Calculate the value of the given Product's measure
      Parameters:
      valParams - ValuationParams
      pricerParams - PricerParams
      csqs - ComponentMarketParams
      strMeasure - Measure String
      vcp - 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

      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 - ValuationParams
      pricerParams - PricerParams
      mpc - org.drip.param.definition.MarketParams
      vcp - 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 - ValuationParams
      pricerParams - PricerParams
      mpc - org.drip.param.definition.MarketParams
      strCustomScenName - Custom Scenario Name
      vcp - Valuation Customization Parameters
      mapBaseMeasures - Base Measures from used to calculate the desired delta measure. If null, the base measures will be generated.
      Returns:
      Custom Scenarios Measures output set