Class CdsIndex.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndex>
-
- com.opengamma.strata.product.credit.CdsIndex.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CdsIndex
build()
CdsIndex.Builder
buySell(BuySell buySell)
Sets whether the CDS index is buy or sell.CdsIndex.Builder
cdsIndexId(StandardId cdsIndexId)
Sets the CDS index identifier.CdsIndex.Builder
currency(Currency currency)
Sets the currency of the CDS index.CdsIndex.Builder
dayCount(DayCount dayCount)
Sets the day count convention.CdsIndex.Builder
fixedRate(double fixedRate)
Sets the fixed coupon rate.Object
get(String propertyName)
CdsIndex.Builder
legalEntityIds(StandardId... legalEntityIds)
Sets thelegalEntityIds
property in the builder from an array of objects.CdsIndex.Builder
legalEntityIds(List<StandardId> legalEntityIds)
Sets the legal entity identifiers.CdsIndex.Builder
notional(double notional)
Sets the notional amount, must be non-negative.CdsIndex.Builder
paymentOnDefault(PaymentOnDefault paymentOnDefault)
Sets the payment on default.CdsIndex.Builder
paymentSchedule(PeriodicSchedule paymentSchedule)
Sets the payment schedule.CdsIndex.Builder
protectionStart(ProtectionStartOfDay protectionStart)
Sets the protection start of the day.CdsIndex.Builder
set(String propertyName, Object newValue)
CdsIndex.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
CdsIndex.Builder
settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.CdsIndex.Builder
stepinDateOffset(DaysAdjustment stepinDateOffset)
Sets the number of days between valuation date and step-in date.String
toString()
-
-
-
Method Detail
-
set
public CdsIndex.Builder set(String propertyName, Object newValue)
-
set
public CdsIndex.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
-
build
public CdsIndex build()
-
buySell
public CdsIndex.Builder buySell(BuySell buySell)
Sets whether the CDS index 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
-
cdsIndexId
public CdsIndex.Builder cdsIndexId(StandardId cdsIndexId)
Sets the CDS index identifier.This identifier is used to refer this CDS index product.
- Parameters:
cdsIndexId
- the new value, not null- Returns:
- this, for chaining, not null
-
legalEntityIds
public CdsIndex.Builder legalEntityIds(List<StandardId> legalEntityIds)
Sets the legal entity identifiers.These identifiers refer to the reference legal entities of the CDS index.
- Parameters:
legalEntityIds
- the new value, not null- Returns:
- this, for chaining, not null
-
legalEntityIds
public CdsIndex.Builder legalEntityIds(StandardId... legalEntityIds)
Sets thelegalEntityIds
property in the builder from an array of objects.- Parameters:
legalEntityIds
- the new value, not null- Returns:
- this, for chaining, not null
-
currency
public CdsIndex.Builder currency(Currency currency)
Sets the currency of the CDS index.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 CdsIndex.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 CdsIndex.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 CdsIndex.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 CdsIndex.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 CdsIndex.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 CdsIndex.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 CdsIndex.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 index 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 CdsIndex.Builder settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.It is usually 3 business days for standardized CDS index 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
-
-