public final class ImmutableCdsConvention extends Object implements CdsConvention, org.joda.beans.ImmutableBean, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCdsConvention.Builder
The bean-builder for
ImmutableCdsConvention. |
static class |
ImmutableCdsConvention.Meta
The meta-bean for
ImmutableCdsConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCdsConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
BusinessDayAdjustment |
getBusinessDayAdjustment()
Gets the business day adjustment to apply to payment schedule dates.
|
Currency |
getCurrency()
Gets the currency of the CDS.
|
DayCount |
getDayCount()
Gets the day count convention applicable.
|
BusinessDayAdjustment |
getEndDateBusinessDayAdjustment()
Gets the business day adjustment to apply to the end date,
providing a default result if no override specified.
|
String |
getName()
Gets the convention name.
|
Frequency |
getPaymentFrequency()
Gets the periodic frequency of payments.
|
PaymentOnDefault |
getPaymentOnDefault()
Gets the payment on default.
|
ProtectionStartOfDay |
getProtectionStart()
Gets the protection start of the day.
|
RollConvention |
getRollConvention()
Gets the convention defining how to roll dates, optional with defaulting getter.
|
DaysAdjustment |
getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.
|
BusinessDayAdjustment |
getStartDateBusinessDayAdjustment()
Gets the business day adjustment to apply to the start date,
providing a default result if no override specified.
|
DaysAdjustment |
getStepinDateOffset()
Gets the number of days between valuation date and step-in date.
|
StubConvention |
getStubConvention()
Gets the convention defining how to handle stubs, optional with defaulting getter.
|
int |
hashCode() |
static ImmutableCdsConvention.Meta |
meta()
The meta-bean for
ImmutableCdsConvention. |
ImmutableCdsConvention.Meta |
metaBean() |
static ImmutableCdsConvention |
of(String name,
Currency currency,
DayCount dayCount,
Frequency paymentFrequency,
BusinessDayAdjustment businessDayAdjustment,
DaysAdjustment settlementDateOffset)
Obtains a convention based on the specified parameters.
|
ImmutableCdsConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
CdsTrade |
toTrade(StandardId legalEntityId,
TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notional,
double fixedRate)
Creates a CDS trade with
TradeInfo. |
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 and
TradeInfo. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateTrade, createTrade, createTrade, createTrade, createTrade, createTrade, extendedEnum, ofpublic static ImmutableCdsConvention of(String name, Currency currency, DayCount dayCount, Frequency paymentFrequency, BusinessDayAdjustment businessDayAdjustment, DaysAdjustment settlementDateOffset)
name - the name of the conventioncurrency - the currencydayCount - the day countpaymentFrequency - the payment frequencybusinessDayAdjustment - the business day adjustmentsettlementDateOffset - the settlement date offsetpublic BusinessDayAdjustment getStartDateBusinessDayAdjustment()
The start date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the start date to a valid business day.
This will default to the businessDayAdjustment if not specified.
public BusinessDayAdjustment getEndDateBusinessDayAdjustment()
The end date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the end date to a valid business day.
This will default to the 'None' if not specified.
public CdsTrade toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
CdsConventionTradeInfo.toTrade in interface CdsConventionlegalEntityId - the legal entity IDtradeInfo - the trade infostartDate - the start dateendDate - the end datebuySell - buy or sellnotional - the notionalfixedRate - the fixed ratepublic CdsTrade toTrade(StandardId legalEntityId, TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upfrontFee)
CdsConventionTradeInfo.toTrade in interface CdsConventionlegalEntityId - the legal entity IDtradeInfo - the trade infostartDate - the start dateendDate - the end datebuySell - buy or sellnotional - the notionalfixedRate - the fixed rateupfrontFee - the upFront feepublic static ImmutableCdsConvention.Meta meta()
ImmutableCdsConvention.public static ImmutableCdsConvention.Builder builder()
public ImmutableCdsConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface CdsConventionpublic Currency getCurrency()
The amounts of the notional are expressed in terms of this currency.
getCurrency in interface CdsConventionpublic DayCount getDayCount()
This is used to convert schedule period dates to a numerical value.
public Frequency getPaymentFrequency()
Regular payments will be made at the specified periodic frequency. This also defines the accrual periodic frequency.
public BusinessDayAdjustment getBusinessDayAdjustment()
Each date in the calculated schedule is determined without taking into account weekends and holidays. The adjustment specified here is used to convert those dates to valid business days.
The start date and end date may have their own business day adjustment rules. If those are not present, then this adjustment is used instead.
public StubConvention getStubConvention()
The stub convention is used during schedule construction to determine whether the irregular remaining period occurs at the start or end of the schedule. It also determines whether the irregular period is shorter or longer than the regular period.
This will default to 'SmartInitial' if not specified.
public RollConvention getRollConvention()
The schedule periods are determined at the high level by repeatedly adding the frequency to the start date, or subtracting it from the end date. The roll convention provides the detailed rule to adjust the day-of-month or day-of-week.
This will default to 'Day20' if not specified.
public PaymentOnDefault getPaymentOnDefault()
Whether the accrued premium is paid in the event of a default.
This will default to 'accrued premium' if not specified.
public ProtectionStartOfDay getProtectionStart()
When the protection starts on the start date.
This will default to 'beginning of the start day' if not specified.
public DaysAdjustment getStepinDateOffset()
The step-in date is also called protection effective date.
This will default to '1 calendar day' if not specified.
public DaysAdjustment getSettlementDateOffset()
It is usually 3 business days for standardised CDS contracts.
getSettlementDateOffset in interface CdsConventionpublic ImmutableCdsConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.