Interface CdsConvention
-
- All Superinterfaces:
Named
,TradeConvention
- All Known Implementing Classes:
ImmutableCdsConvention
public interface CdsConvention extends TradeConvention, Named
A market convention for credit default swap trades.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee based on the trade date and the IMM date logic.default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade based on the trade date and the IMM date logic.default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee based on the trade date, start date and the IMM date logic.default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade based on the trade date, start date and the IMM date logic.default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee from trade date, start date and end date.default CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade from trade date, start date and end date.static ExtendedEnum<CdsConvention>
extendedEnum()
Gets the extended enum helper.Currency
getCurrency()
Get the currency of the CDS.String
getName()
Gets the name that uniquely identifies this convention.DaysAdjustment
getSettlementDateOffset()
Get the number of days between valuation date and settlement date.static CdsConvention
of(String uniqueName)
Obtains an instance from the specified unique name.CdsTrade
toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
Creates a CDS trade withTradeInfo
.CdsTrade
toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee)
Creates a CDS trade with upfront fee andTradeInfo
.
-
-
-
Method Detail
-
of
static CdsConvention of(String uniqueName)
Obtains an instance from the specified unique name.- Parameters:
uniqueName
- the unique name- Returns:
- the convention
- Throws:
IllegalArgumentException
- if the name is not known
-
extendedEnum
static ExtendedEnum<CdsConvention> extendedEnum()
Gets the extended enum helper.This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.
- Returns:
- the extended enum helper
-
getSettlementDateOffset
DaysAdjustment getSettlementDateOffset()
Get the number of days between valuation date and settlement date.It is usually 3 business days for standardised CDS contracts.
- Returns:
- days adjustment
-
getCurrency
Currency getCurrency()
Get the currency of the CDS.The amounts of the notional are expressed in terms of this currency.
- Returns:
- the currency
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade based on the trade date and the IMM date logic.The start date and end date are computed from trade date with the standard semi-annual roll convention.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datetenor
- the tenorbuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed raterefData
- the reference data- Returns:
- the CDS trade
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade based on the trade date, start date and the IMM date logic.The end date is computed from the start date with the standard semi-annual roll convention.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datestartDate
- the start datetenor
- the tenorbuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed raterefData
- the reference data- Returns:
- the CDS trade
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a CDS trade from trade date, start date and end date.The settlement date is computed from the trade date using
settlementDateOffset
defined in the convention.- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datestartDate
- the start dateendDate
- the end datebuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed raterefData
- the reference data- Returns:
- the CDS trade
-
toTrade
CdsTrade toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
Creates a CDS trade withTradeInfo
.- Parameters:
legalEntityId
- the legal entity IDtradeInfo
- the trade infostartDate
- the start dateendDate
- the end datebuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed rate- Returns:
- the CDS trade
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee based on the trade date and the IMM date logic.The start date and end date are computed from trade date with the standard semi-annual roll convention.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datetenor
- the tenorbuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed rateupFrontFee
- the upFront feerefData
- the reference data- Returns:
- the CDS trade
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee based on the trade date, start date and the IMM date logic.The end date is computed from the start date with the standard semi-annual roll convention.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datestartDate
- the start datetenor
- the tenorbuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed rateupFrontFee
- the upFront feerefData
- the reference data- Returns:
- the CDS trade
-
createTrade
default CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a CDS trade with upfront fee from trade date, start date and end date.The settlement date is computed from the trade date using
settlementDateOffset
defined in the convention.- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the trade datestartDate
- the start dateendDate
- the end datebuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed rateupFrontFee
- the upFront feerefData
- the reference data- Returns:
- the CDS trade
-
toTrade
CdsTrade toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee)
Creates a CDS trade with upfront fee andTradeInfo
.- Parameters:
legalEntityId
- the legal entity IDtradeInfo
- the trade infostartDate
- the start dateendDate
- the end datebuySell
- buy or sellnotional
- the notionalfixedRate
- the fixed rateupFrontFee
- the upFront fee- Returns:
- the CDS trade
-
getName
String getName()
Gets the name that uniquely identifies this convention.This name is used in serialization and can be parsed using
of(String)
.
-
-