public class CDSComponent extends CreditDefaultSwap
Modifier and Type | Class and Description |
---|---|
class |
CDSComponent.SpreadCalibOP
CDS spread calibration output
|
class |
CDSComponent.SpreadCalibrator
Implementation of the CDS spread calibrator
|
NULL_SER_STRING, VERSION
Constructor and Description |
---|
CDSComponent(byte[] ab)
CreditDefaultSwap de-serialization from input byte array
|
CDSComponent(double dblEffective,
double dblMaturity,
double dblCoupon,
int iFreq,
java.lang.String strCouponDC,
java.lang.String strAccrualDC,
java.lang.String strFloatingRateIndex,
boolean bConvCDS,
DateAdjustParams dapEffective,
DateAdjustParams dapMaturity,
DateAdjustParams dapPeriodStart,
DateAdjustParams dapPeriodEnd,
DateAdjustParams dapAccrualStart,
DateAdjustParams dapAccrualEnd,
DateAdjustParams dapPay,
DateAdjustParams dapReset,
FactorSchedule notlSchedule,
double dblNotional,
java.lang.String strIR,
CreditSetting crValParams,
java.lang.String strCalendar)
Most generic CDS creation functionality
|
Modifier and Type | Method and Description |
---|---|
double |
calibFlatSpread(ValuationParams valParams,
PricerParams pricerParams,
ComponentMarketParams mktParams,
QuotingParams quotingParams)
Calibrates the CDS's flat spread from the calculated up-front points
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
CashSettleParams |
getCashSettleParams()
Gets the component cash settlement parameters
|
java.lang.String |
getComponentName()
Gets the component name
|
double |
getCoupon(double dblValue,
ComponentMarketParams mktParams)
Gets the component's coupon at the given date
|
java.util.List<CouponPeriodCurveFactors> |
getCouponFlow(ValuationParams valParams,
PricerParams pricerParams,
ComponentMarketParams mktParams)
Gets the coupon flow for the credit component
|
java.util.List<Period> |
getCouponPeriod()
Gets the component's coupon periods
|
java.lang.String |
getCreditCurveName()
Gets the credit curve name
|
CreditSetting |
getCRValParams()
Get the credit component's Credit Valuation Parameters
|
java.lang.String |
getEDSFCurveName()
Gets the EDSF curve name
|
JulianDate |
getEffectiveDate()
Get the Effective Date
|
java.lang.String |
getFieldDelimiter()
Returns the Field Delimiter String
|
JulianDate |
getFirstCouponDate()
Get the First Coupon Date
|
double |
getInitialNotional()
Gets the Initial Notional for the Component
|
java.lang.String |
getIRCurveName()
Gets the IR curve name
|
java.util.List<LossPeriodCurveFactors> |
getLossFlow(ValuationParams valParams,
PricerParams pricerParams,
ComponentMarketParams mktParams)
Generates the loss flow for the credit component based on the pricer parameters
|
JulianDate |
getMaturityDate()
Get the Maturity Date
|
double |
getNotional(double dblDate)
Gets the Notional for the Component at the given date
|
double |
getNotional(double dblDate1,
double dblDate2)
Gets the time-weighted Notional for the Component between 2 dates
|
java.lang.String |
getObjectTrailer()
Returns the Object Trailer String
|
java.lang.String |
getPrimaryCode()
Return the primary code
|
double |
getRecovery(double dblDate,
CreditCurve cc)
Get the recovery of the credit component for the given date
|
double |
getRecovery(double dblDateStart,
double dblDateEnd,
CreditCurve cc)
Get the time-weighted recovery of the credit component between the given dates
|
java.lang.String |
getTreasuryCurveName()
Gets the treasury curve name
|
double |
resetCoupon(double dblCoupon)
Resets the CDS's coupon
|
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
setCurves(java.lang.String strIR,
java.lang.String strIRTSY,
java.lang.String strCC)
Sets the component's IR, treasury, and credit curve names
|
boolean |
setName(java.lang.String strName) |
void |
setPrimaryCode(java.lang.String strCode)
Sets the component's primary code
|
java.util.Map<java.lang.String,java.lang.Double> |
value(ValuationParams valParams,
PricerParams pricerParams,
ComponentMarketParams mktParams,
QuotingParams quotingParams)
Generates a full list of the component measures for the full input set of market parameters
|
getSecondaryCode
calcCustomScenarioMeasures, calcMeasures, calcMeasureValue
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter
public CDSComponent(double dblEffective, double dblMaturity, double dblCoupon, int iFreq, java.lang.String strCouponDC, java.lang.String strAccrualDC, java.lang.String strFloatingRateIndex, boolean bConvCDS, DateAdjustParams dapEffective, DateAdjustParams dapMaturity, DateAdjustParams dapPeriodStart, DateAdjustParams dapPeriodEnd, DateAdjustParams dapAccrualStart, DateAdjustParams dapAccrualEnd, DateAdjustParams dapPay, DateAdjustParams dapReset, FactorSchedule notlSchedule, double dblNotional, java.lang.String strIR, CreditSetting crValParams, java.lang.String strCalendar) throws java.lang.Exception
dblEffective
- Effective DatedblMaturity
- Maturity DatedblCoupon
- CouponiFreq
- FrequencystrCouponDC
- Coupon DCstrAccrualDC
- Accrual DCstrFloatingRateIndex
- Floating Rate IndexbConvCDS
- Is CDS ConventionaldapEffective
- Effective DAPdapMaturity
- Maturity DAPdapPeriodStart
- Period Start DAPdapPeriodEnd
- Period End DAPdapAccrualStart
- Accrual Start DAPdapAccrualEnd
- Accrual End DAPdapPay
- Pay DAPdapReset
- Reset DAPnotlSchedule
- Notional ScheduledblNotional
- Notional AmountstrIR
- IR Curve NamecrValParams
- Credit Valuation ParametersstrCalendar
- Calendarjava.lang.Exception
public CDSComponent(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if CreditDefaultSwap cannot be properly de-serializedpublic java.lang.String getPrimaryCode()
CalibratableComponent
getPrimaryCode
in class CalibratableComponent
public void setPrimaryCode(java.lang.String strCode)
CalibratableComponent
setPrimaryCode
in class CalibratableComponent
strCode
- Primary Codepublic boolean setName(java.lang.String strName)
public java.lang.String getComponentName()
ComponentMarketParamRef
public java.lang.String getTreasuryCurveName()
ComponentMarketParamRef
public java.lang.String getEDSFCurveName()
ComponentMarketParamRef
public double getInitialNotional()
Component
getInitialNotional
in class Component
public double getNotional(double dblDate) throws java.lang.Exception
Component
getNotional
in class Component
dblDate
- Double date inputjava.lang.Exception
- Thrown if Notional cannot be computedpublic double getNotional(double dblDate1, double dblDate2) throws java.lang.Exception
Component
getNotional
in class Component
dblDate1
- Double date firstdblDate2
- Double date secondjava.lang.Exception
- Thrown if Notional cannot be computedpublic double getRecovery(double dblDate, CreditCurve cc) throws java.lang.Exception
CreditComponent
getRecovery
in class CreditComponent
dblDate
- Double JulianDatecc
- Credit Curvejava.lang.Exception
- Thrown if recovery cannot be calculatedpublic double getRecovery(double dblDateStart, double dblDateEnd, CreditCurve cc) throws java.lang.Exception
CreditComponent
getRecovery
in class CreditComponent
dblDateStart
- Double JulianDatedblDateEnd
- Double JulianDatecc
- Credit Curvejava.lang.Exception
- Thrown if recovery cannot be calculatedpublic CreditSetting getCRValParams()
CreditComponent
getCRValParams
in class CreditComponent
public double getCoupon(double dblValue, ComponentMarketParams mktParams) throws java.lang.Exception
Component
public double resetCoupon(double dblCoupon) throws java.lang.Exception
resetCoupon
in class CreditDefaultSwap
dblCoupon
- The new Couponjava.lang.Exception
- Thrown if the coupon cannot be resetpublic boolean setCurves(java.lang.String strIR, java.lang.String strIRTSY, java.lang.String strCC)
Component
public java.lang.String getIRCurveName()
ComponentMarketParamRef
public java.lang.String getCreditCurveName()
ComponentMarketParamRef
public JulianDate getEffectiveDate()
Component
getEffectiveDate
in class Component
public JulianDate getMaturityDate()
Component
getMaturityDate
in class Component
public JulianDate getFirstCouponDate()
Component
getFirstCouponDate
in class Component
public java.util.List<Period> getCouponPeriod()
Component
getCouponPeriod
in class Component
public CashSettleParams getCashSettleParams()
Component
getCashSettleParams
in class Component
public java.util.List<CouponPeriodCurveFactors> getCouponFlow(ValuationParams valParams, PricerParams pricerParams, ComponentMarketParams mktParams)
CreditComponent
getCouponFlow
in class CreditComponent
valParams
- ValuationParamspricerParams
- PricerParamsmktParams
- Component Market Paramspublic java.util.List<LossPeriodCurveFactors> getLossFlow(ValuationParams valParams, PricerParams pricerParams, ComponentMarketParams mktParams)
CreditComponent
getLossFlow
in class CreditComponent
valParams
- ValuationParamspricerParams
- PricerParamsmktParams
- ComponentMarketParamspublic java.util.Map<java.lang.String,java.lang.Double> value(ValuationParams valParams, PricerParams pricerParams, ComponentMarketParams mktParams, QuotingParams quotingParams)
Component
public double calibFlatSpread(ValuationParams valParams, PricerParams pricerParams, ComponentMarketParams mktParams, QuotingParams quotingParams) throws java.lang.Exception
calibFlatSpread
in class CreditDefaultSwap
valParams
- ValuationParamspricerParams
- PricerParamsmktParams
- ComponentMarketParamsjava.lang.Exception
- Thrown if cannot calibratepublic java.lang.String getFieldDelimiter()
Serializer
getFieldDelimiter
in class Serializer
public java.lang.String getObjectTrailer()
Serializer
getObjectTrailer
in class Serializer
public byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer