Class Cds.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<Cds>
-
- com.opengamma.strata.product.credit.Cds.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cds
build()
Cds.Builder
buySell(BuySell buySell)
Sets whether the CDS is buy or sell.Cds.Builder
currency(Currency currency)
Sets the currency of the CDS.Cds.Builder
dayCount(DayCount dayCount)
Sets the day count convention.Cds.Builder
fixedRate(double fixedRate)
Sets the fixed coupon rate.Object
get(String propertyName)
Cds.Builder
legalEntityId(StandardId legalEntityId)
Sets the legal entity identifier.Cds.Builder
notional(double notional)
Sets the notional amount, must be non-negative.Cds.Builder
paymentOnDefault(PaymentOnDefault paymentOnDefault)
Sets the payment on default.Cds.Builder
paymentSchedule(PeriodicSchedule paymentSchedule)
Sets the payment schedule.Cds.Builder
protectionStart(ProtectionStartOfDay protectionStart)
Sets the protection start of the day.Cds.Builder
set(String propertyName, Object newValue)
Cds.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
Cds.Builder
settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.Cds.Builder
stepinDateOffset(DaysAdjustment stepinDateOffset)
Sets the number of days between valuation date and step-in date.String
toString()
-
-
-
Method Detail
-
set
public Cds.Builder set(String propertyName, Object newValue)
-
set
public Cds.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
-
build
public Cds build()
-
buySell
public Cds.Builder buySell(BuySell buySell)
Sets whether the CDS is buy or sell.A value of 'Buy' implies buying protection, where the fixed coupon is paid and the protection is received in the event of default. A value of 'Sell' implies selling protection, where the fixed coupon is received and the protection is paid in the event of default.
- Parameters:
buySell
- the new value, not null- Returns:
- this, for chaining, not null
-
legalEntityId
public Cds.Builder legalEntityId(StandardId legalEntityId)
Sets the legal entity identifier.This identifier is used for the reference legal entity of the CDS.
- Parameters:
legalEntityId
- the new value, not null- Returns:
- this, for chaining, not null
-
currency
public Cds.Builder currency(Currency currency)
Sets the currency of the CDS.The amounts of the notional are expressed in terms of this currency.
- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public Cds.Builder notional(double notional)
Sets the notional amount, must be non-negative.The fixed notional amount applicable during the lifetime of the CDS. The currency of the notional is specified by
currency
.- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
paymentSchedule
public Cds.Builder paymentSchedule(PeriodicSchedule paymentSchedule)
Sets the payment schedule.This is used to define the payment periods.
- Parameters:
paymentSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
fixedRate
public Cds.Builder fixedRate(double fixedRate)
Sets the fixed coupon rate.This must be represented in decimal form.
- Parameters:
fixedRate
- the new value- Returns:
- this, for chaining, not null
-
dayCount
public Cds.Builder dayCount(DayCount dayCount)
Sets the day count convention.This is used to convert dates to a numerical value.
When building, this will default to 'Act/360'.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentOnDefault
public Cds.Builder paymentOnDefault(PaymentOnDefault paymentOnDefault)
Sets the payment on default.Whether the accrued premium is paid in the event of a default.
When building, this will default to 'AccruedPremium'.
- Parameters:
paymentOnDefault
- the new value, not null- Returns:
- this, for chaining, not null
-
protectionStart
public Cds.Builder protectionStart(ProtectionStartOfDay protectionStart)
Sets the protection start of the day.When the protection starts on the start date.
When building, this will default to 'Beginning'.
- Parameters:
protectionStart
- the new value, not null- Returns:
- this, for chaining, not null
-
stepinDateOffset
public Cds.Builder stepinDateOffset(DaysAdjustment stepinDateOffset)
Sets the number of days between valuation date and step-in date.The step-in date is also called protection effective date. It is usually 1 calendar day for standardized CDS contracts.
When building, this will default to 1 calendar day.
- Parameters:
stepinDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
settlementDateOffset
public Cds.Builder settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.It is usually 3 business days for standardized CDS contracts.
When building, this will default to 3 business days in the calendar of the payment schedule.
- Parameters:
settlementDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
-