Package org.drip.product.rates
Class Stream
java.lang.Object
org.drip.product.rates.Stream
- Direct Known Subclasses:
BondStream
public class Stream
extends java.lang.Object
Stream implements the fixed and the floating streams.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Fixed Income Multi-Stream Components
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description Stream(java.util.List<CompositePeriod> lsPeriod)
Stream constructor -
Method Summary
Modifier and Type Method Description java.lang.String
accrualDC()
Retrieve the Accrual Day Countboolean
accrualEOMAdjustment()
Retrieve the Accrual EOM Adjustmentjava.util.Set<java.lang.String>
availableMeasures()
Retrieve the set of the implemented measuresdouble
basis()
Retrieve the Stream Coupon Basisjava.lang.String
calendar()
Retrieve the CalendarProductQuoteSet
calibQuoteSet(LatentStateSpecification[] aLSS)
Generate the Calibration Quote Set corresponding to the specified Latent State Arrayjava.util.Set<java.lang.String>
cashflowCurrencySet()
Retrieve the Cash Flow Currency Setjava.util.List<CompositePeriod>
cashFlowPeriod()
Retrieve the Coupon Period ListCompositePeriod
containingPeriod(int iDate)
Retrieve the Period Instance enveloping the specified DateCompositePeriodCouponMetrics
coupon(int iAccrualEndDate, ValuationParams valParams, CurveSurfaceQuoteContainer csqs)
Get the Coupon Metrics for the period corresponding to the specified accrual end datejava.lang.String
couponCurrency()
Retrieve the Coupon Currencyjava.lang.String
couponDC()
Retrieve the Coupon Day Countboolean
couponEOMAdjustment()
Retrieve the Coupon EOM AdjustmentEntityCDSLabel
creditLabel()
Retrieve the Credit LabelJulianDate
effective()
Retrieve the Effective DateJulianDate
firstCouponDate()
Retrieve the First Coupon Pay DateFloaterLabel
floaterLabel()
Retrieve the Floater LabelForwardLabel
forwardLabel()
Retrieve the Forward Label, if PresentPredictorResponseWeightConstraint
forwardPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the State Loading Constraints for the Forward Latent Stateint
freq()
Retrieve the Stream FrequencyPredictorResponseWeightConstraint
fundingForwardPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the State Loading Constraints for the Merged Forward/Funding Latent StateFundingLabel
fundingLabel()
Retrieve the Funding LabelPredictorResponseWeightConstraint
fundingPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the State Loading Constraints for the Funding Latent StateFXLabel
fxLabel()
Retrieve the FX LabelPredictorResponseWeightConstraint
fxPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged FX Curve FX Forward Latent State from the Component's Cash Flows.PredictorResponseWeightConstraint
govviePRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged Govvie Curve Yield Latent State from the Component's Cash Flows.double
initialNotional()
Retrieve the Initial NotionalWengertJacobian
jackDDirtyPVDManifestMeasure(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
Generate the Jacobian of the Dirty PV to the Manifest MeasureWengertJacobian
manifestMeasureDFMicroJack(java.lang.String strManifestMeasure, ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
Generate the micro-Jacobian of the Manifest Measure to the Discount FactorJulianDate
maturity()
Retrieve the Maturity Datejava.lang.String
name()
Retrieve the Stream Namedouble
notional(int iDate)
Retrieve the Notional corresponding to the specified Datedouble
notional(int iDate1, int iDate2)
Retrieve the Notional aggregated over the Date PairsOTCFixFloatLabel
otcFixFloatLabel()
Retrieve the OTC Fix Float Label, if Presentjava.lang.String
payCurrency()
Retrieve the Pay Currencyjava.util.List<CompositePeriod>
periods()
Retrieve a list of the component's coupon periodsdouble
pv(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp)
Compute the PV for the specified Market ParametersCaseInsensitiveTreeMap<java.lang.Double>
value(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
Generate a Value Map for the StreamPredictorResponseWeightConstraint
volatilityPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)
Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged Volatility Curve Volatility Latent State from the Component's Cash Flows.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Stream
Stream constructor- Parameters:
lsPeriod
- List of the Coupon Periods- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
-
Method Details
-
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
Retrieve the Credit Label- Returns:
- The Credit Label
-
floaterLabel
Retrieve the Floater Label- Returns:
- The Floater Label
-
forwardLabel
Retrieve the Forward Label, if Present- Returns:
- The Forward Label
-
otcFixFloatLabel
Retrieve the OTC Fix Float Label, if Present- Returns:
- The OTC Fix Float Label
-
fundingLabel
Retrieve the Funding Label- Returns:
- The Funding Label
-
fxLabel
Retrieve the FX Label- Returns:
- The FX Label
-
cashFlowPeriod
Retrieve the Coupon Period List- Returns:
- The Coupon Period List
-
containingPeriod
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.ExceptionRetrieve 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.ExceptionRetrieve the Notional aggregated over the Date Pairs- Parameters:
iDate1
- The Date #1iDate2
- The Date #2- Returns:
- The Notional aggregated over the Date Pairs
- Throws:
java.lang.Exception
- Thrown if the Notional cannot be computed
-
effective
Retrieve the Effective Date- Returns:
- The Effective Date
-
maturity
Retrieve the Maturity Date- Returns:
- The Maturity Date
-
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 DatevalParams
- Valuation parameterscsqs
- Market Parameters- Returns:
- The Coupon Metrics for the period corresponding to the specified accrual end date
-
calibQuoteSet
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 ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- 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.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
-
forwardPRWC
public PredictorResponseWeightConstraint forwardPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)Generate the State Loading Constraints for the Forward Latent State- Parameters:
valParams
- The Valuation ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- Valuation Customization Parameterspqs
- The Product Calibration Quote Set- Returns:
- The State Loading Constraints for the Forward Latent State
-
fundingPRWC
public PredictorResponseWeightConstraint fundingPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)Generate the State Loading Constraints for the Funding Latent State- Parameters:
valParams
- The Valuation ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- Valuation Customization Parameterspqs
- The Product Calibration Quote Set- Returns:
- The State Loading Constraints for the Funding Latent State
-
fundingForwardPRWC
public PredictorResponseWeightConstraint fundingForwardPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)Generate the State Loading Constraints for the Merged Forward/Funding Latent State- Parameters:
valParams
- The Valuation ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- Valuation Customization Parameterspqs
- The Product Calibration Quote Set- Returns:
- The State Loading Constraints for the Merged Forward/Funding Latent State
-
fxPRWC
public PredictorResponseWeightConstraint fxPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)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 ParameterspricerParams
- Pricer Parameterscsqs
- Component Market Parametersvcp
- Valuation Customization Parameterspqs
- Product Quote Set- Returns:
- The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding FX Forward)
-
govviePRWC
public PredictorResponseWeightConstraint govviePRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)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 ParameterspricerParams
- Pricer Parameterscsqs
- Component Market Parametersvcp
- Valuation Customization Parameterspqs
- Product Quote Set- Returns:
- The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding Yield)
-
volatilityPRWC
public PredictorResponseWeightConstraint volatilityPRWC(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, ProductQuoteSet pqs)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 ParameterspricerParams
- Pricer Parameterscsqs
- Component Market Parametersvcp
- Valuation Customization Parameterspqs
- 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 ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- 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 MeasurevalParams
- The Valuation ParameterspricerParams
- The Pricer parameterscsqs
- The Market Parametersvcp
- Valuation Customization Parameters- Returns:
- The micro-Jacobian of the Manifest Measure to the Discount Factor
-