Class Stream

java.lang.Object
org.drip.product.rates.Stream
Direct Known Subclasses:
BondStream

public class Stream
extends java.lang.Object
Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • Stream

      public Stream​(java.util.List<CompositePeriod> lsPeriod) throws java.lang.Exception
      Stream constructor
      Parameters:
      lsPeriod - List of the Coupon Periods
      Throws:
      java.lang.Exception - Thrown if inputs are invalid
  • Method Details

    • periods

      public java.util.List<CompositePeriod> periods()
      Retrieve a list of the component's coupon periods
      Returns:
      List of Coupon Period
    • freq

      public int freq()
      Retrieve the Stream Frequency
      Returns:
      The Stream Frequency
    • couponDC

      public java.lang.String couponDC()
      Retrieve the Coupon Day Count
      Returns:
      The Coupon Day Count
    • couponEOMAdjustment

      public boolean couponEOMAdjustment()
      Retrieve the Coupon EOM Adjustment
      Returns:
      The Coupon EOM Adjustment
    • calendar

      public java.lang.String calendar()
      Retrieve the Calendar
      Returns:
      The Calendar
    • accrualDC

      public java.lang.String accrualDC()
      Retrieve the Accrual Day Count
      Returns:
      The Accrual Day Count
    • accrualEOMAdjustment

      public boolean accrualEOMAdjustment()
      Retrieve the Accrual EOM Adjustment
      Returns:
      The Accrual EOM Adjustment
    • creditLabel

      public EntityCDSLabel creditLabel()
      Retrieve the Credit Label
      Returns:
      The Credit Label
    • floaterLabel

      public FloaterLabel floaterLabel()
      Retrieve the Floater Label
      Returns:
      The Floater Label
    • forwardLabel

      public ForwardLabel forwardLabel()
      Retrieve the Forward Label, if Present
      Returns:
      The Forward Label
    • otcFixFloatLabel

      public OTCFixFloatLabel otcFixFloatLabel()
      Retrieve the OTC Fix Float Label, if Present
      Returns:
      The OTC Fix Float Label
    • fundingLabel

      public FundingLabel fundingLabel()
      Retrieve the Funding Label
      Returns:
      The Funding Label
    • fxLabel

      public FXLabel fxLabel()
      Retrieve the FX Label
      Returns:
      The FX Label
    • cashFlowPeriod

      public java.util.List<CompositePeriod> cashFlowPeriod()
      Retrieve the Coupon Period List
      Returns:
      The Coupon Period List
    • containingPeriod

      public CompositePeriod containingPeriod​(int iDate)
      Retrieve the Period Instance enveloping the specified Date
      Parameters:
      iDate - The Date
      Returns:
      The Period Instance enveloping the specified Date
    • initialNotional

      public double initialNotional()
      Retrieve the Initial Notional
      Returns:
      The Initial Notional
    • notional

      public double notional​(int iDate) throws java.lang.Exception
      Retrieve the Notional corresponding to the specified Date
      Parameters:
      iDate - The Date
      Returns:
      The Notional corresponding to the specified Date
      Throws:
      java.lang.Exception - Thrown if the Notional cannot be computed
    • notional

      public double notional​(int iDate1, int iDate2) throws java.lang.Exception
      Retrieve the Notional aggregated over the Date Pairs
      Parameters:
      iDate1 - The Date #1
      iDate2 - The Date #2
      Returns:
      The Notional aggregated over the Date Pairs
      Throws:
      java.lang.Exception - Thrown if the Notional cannot be computed
    • effective

      public JulianDate effective()
      Retrieve the Effective Date
      Returns:
      The Effective Date
    • maturity

      public JulianDate maturity()
      Retrieve the Maturity Date
      Returns:
      The Maturity Date
    • firstCouponDate

      public JulianDate firstCouponDate()
      Retrieve the First Coupon Pay Date
      Returns:
      The First Coupon Pay Date
    • couponCurrency

      public java.lang.String couponCurrency()
      Retrieve the Coupon Currency
      Returns:
      The Coupon Currency
    • payCurrency

      public java.lang.String payCurrency()
      Retrieve the Pay Currency
      Returns:
      The Pay Currency
    • cashflowCurrencySet

      public java.util.Set<java.lang.String> cashflowCurrencySet()
      Retrieve the Cash Flow Currency Set
      Returns:
      The Cash Flow Currency Set
    • name

      public java.lang.String name()
      Retrieve the Stream Name
      Returns:
      The Stream Name
    • coupon

      public CompositePeriodCouponMetrics coupon​(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)
      Get the Coupon Metrics for the period corresponding to the specified accrual end date
      Parameters:
      iAccrualEndDate - The Accrual End Date
      valParams - Valuation parameters
      csqs - Market Parameters
      Returns:
      The Coupon Metrics for the period corresponding to the specified accrual end date
    • calibQuoteSet

      public ProductQuoteSet calibQuoteSet​(LatentStateSpecification[] aLSS)
      Generate the Calibration Quote Set corresponding to the specified Latent State Array
      Parameters:
      aLSS - The Latent State Array
      Returns:
      The Calibration Quote Set corresponding to the specified Latent State Array
    • basis

      public double basis()
      Retrieve the Stream Coupon Basis
      Returns:
      The Stream Coupon Basis
    • value

      public CaseInsensitiveTreeMap<java.lang.Double> value​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
      Generate a Value Map for the Stream
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      The Value Map for the Stream
    • availableMeasures

      public java.util.Set<java.lang.String> availableMeasures()
      Retrieve the set of the implemented measures
      Returns:
      The set of the implemented measures
    • pv

      public 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
    • forwardPRWC

      Generate the State Loading Constraints for the Forward Latent State
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      pqs - The Product Calibration Quote Set
      Returns:
      The State Loading Constraints for the Forward Latent State
    • fundingPRWC

      Generate the State Loading Constraints for the Funding Latent State
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      pqs - The Product Calibration Quote Set
      Returns:
      The State Loading Constraints for the Funding Latent State
    • fundingForwardPRWC

      Generate the State Loading Constraints for the Merged Forward/Funding Latent State
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      pqs - The Product Calibration Quote Set
      Returns:
      The State Loading Constraints for the Merged Forward/Funding Latent State
    • fxPRWC

      Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged FX Curve FX Forward Latent State from the Component's Cash Flows. The Constraints here typically correspond to Date/Cash Flow pairs and the corresponding leading PV.
      Parameters:
      valParams - Valuation Parameters
      pricerParams - Pricer Parameters
      csqs - Component Market Parameters
      vcp - Valuation Customization Parameters
      pqs - Product Quote Set
      Returns:
      The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding FX Forward)
    • govviePRWC

      Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged Govvie Curve Yield Latent State from the Component's Cash Flows. The Constraints here typically correspond to Date/Cash Flow pairs and the corresponding leading PV.
      Parameters:
      valParams - Valuation Parameters
      pricerParams - Pricer Parameters
      csqs - Component Market Parameters
      vcp - Valuation Customization Parameters
      pqs - Product Quote Set
      Returns:
      The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding Yield)
    • volatilityPRWC

      Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged Volatility Curve Volatility Latent State from the Component's Cash Flows. The Constraints here typically correspond tovDate/Cash Flow pairs and the corresponding leading PV.
      Parameters:
      valParams - Valuation Parameters
      pricerParams - Pricer Parameters
      csqs - Component Market Parameters
      vcp - Valuation Customization Parameters
      pqs - Product Quote Set
      Returns:
      The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding Volatility)
    • jackDDirtyPVDManifestMeasure

      public WengertJacobian jackDDirtyPVDManifestMeasure​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
      Generate the Jacobian of the Dirty PV to the Manifest Measure
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      The Jacobian of the Dirty PV to the Manifest Measure
    • manifestMeasureDFMicroJack

      public WengertJacobian manifestMeasureDFMicroJack​(java.lang.String strManifestMeasure, ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
      Generate the micro-Jacobian of the Manifest Measure to the Discount Factor
      Parameters:
      strManifestMeasure - The Manifest Measure
      valParams - The Valuation Parameters
      pricerParams - The Pricer parameters
      csqs - The Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      The micro-Jacobian of the Manifest Measure to the Discount Factor