Interface CdsTemplate
-
- All Superinterfaces:
TradeTemplate
- All Known Implementing Classes:
DatesCdsTemplate
,TenorCdsTemplate
public interface CdsTemplate extends TradeTemplate
A template for creating credit default swap trades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a trade based on this template.CdsTrade
createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a trade based on this template.CdsConvention
getConvention()
Gets the market convention of the credit default swap.
-
-
-
Method Detail
-
getConvention
CdsConvention getConvention()
Gets the market convention of the credit default swap.- Returns:
- the convention
-
createTrade
CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a trade based on this template.This returns a trade based on the specified trade date.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the date of the tradebuySell
- the buy/sell flagnotional
- the notional amount, in the payment currency of the templatefixedRate
- the fixed rate, typically derived from the marketrefData
- the reference data, used to resolve the trade dates- Returns:
- the trade
- Throws:
ReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference data
-
createTrade
CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
Creates a trade based on this template.This returns a trade based on the specified trade date and upfront fee.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.
- Parameters:
legalEntityId
- the legal entity IDtradeDate
- the date of the tradebuySell
- the buy/sell flagnotional
- the notional amount, in the payment currency of the templatefixedRate
- the fixed rate, typically derived from the marketupFrontFee
- the reference datarefData
- the reference data, used to resolve the trade dates- Returns:
- the trade
- Throws:
ReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference data
-
-