Class ResolvedCdsIndex.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
-
- com.opengamma.strata.product.credit.ResolvedCdsIndex.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedCdsIndex>
- Enclosing class:
- ResolvedCdsIndex
public static final class ResolvedCdsIndex.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
The bean-builder forResolvedCdsIndex
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedCdsIndex
build()
ResolvedCdsIndex.Builder
buySell(BuySell buySell)
Sets whether the CDS index is buy or sell.ResolvedCdsIndex.Builder
cdsIndexId(StandardId cdsIndexId)
Sets the CDS index identifier.ResolvedCdsIndex.Builder
dayCount(DayCount dayCount)
Sets the day count convention.Object
get(String propertyName)
ResolvedCdsIndex.Builder
legalEntityIds(StandardId... legalEntityIds)
Sets thelegalEntityIds
property in the builder from an array of objects.ResolvedCdsIndex.Builder
legalEntityIds(List<StandardId> legalEntityIds)
Sets the legal entity identifiers.ResolvedCdsIndex.Builder
paymentOnDefault(PaymentOnDefault paymentOnDefault)
Sets the payment on default.ResolvedCdsIndex.Builder
paymentPeriods(CreditCouponPaymentPeriod... paymentPeriods)
Sets thepaymentPeriods
property in the builder from an array of objects.ResolvedCdsIndex.Builder
paymentPeriods(List<CreditCouponPaymentPeriod> paymentPeriods)
Sets the periodic payments based on the fixed rate.ResolvedCdsIndex.Builder
protectionEndDate(LocalDate protectionEndDate)
Sets the protection end date.ResolvedCdsIndex.Builder
protectionStart(ProtectionStartOfDay protectionStart)
Sets the protection start of the day.ResolvedCdsIndex.Builder
set(String propertyName, Object newValue)
ResolvedCdsIndex.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
ResolvedCdsIndex.Builder
settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.ResolvedCdsIndex.Builder
stepinDateOffset(DaysAdjustment stepinDateOffset)
Sets the number of days between valuation date and step-in date.String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedCdsIndex>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
-
set
public ResolvedCdsIndex.Builder set(String propertyName, Object newValue)
-
set
public ResolvedCdsIndex.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedCdsIndex>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
-
build
public ResolvedCdsIndex build()
-
buySell
public ResolvedCdsIndex.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 ResolvedCdsIndex.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 ResolvedCdsIndex.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 ResolvedCdsIndex.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
-
paymentPeriods
public ResolvedCdsIndex.Builder paymentPeriods(List<CreditCouponPaymentPeriod> paymentPeriods)
Sets the periodic payments based on the fixed rate.Each payment period represents part of the life-time of the leg. In most cases, the periods do not overlap. However, since each payment period is essentially independent the data model allows overlapping periods.
- Parameters:
paymentPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
paymentPeriods
public ResolvedCdsIndex.Builder paymentPeriods(CreditCouponPaymentPeriod... paymentPeriods)
Sets thepaymentPeriods
property in the builder from an array of objects.- Parameters:
paymentPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
protectionEndDate
public ResolvedCdsIndex.Builder protectionEndDate(LocalDate protectionEndDate)
Sets the protection end date.This may be different from the accrual end date of the last payment period in
periodicPayments
.- Parameters:
protectionEndDate
- the new value, not null- Returns:
- this, for chaining, not null
-
dayCount
public ResolvedCdsIndex.Builder dayCount(DayCount dayCount)
Sets the day count convention.This is used to convert dates to a numerical value.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentOnDefault
public ResolvedCdsIndex.Builder paymentOnDefault(PaymentOnDefault paymentOnDefault)
Sets the payment on default.Whether the accrued premium is paid in the event of a default.
- Parameters:
paymentOnDefault
- the new value, not null- Returns:
- this, for chaining, not null
-
protectionStart
public ResolvedCdsIndex.Builder protectionStart(ProtectionStartOfDay protectionStart)
Sets the protection start of the day.When the protection starts on the start date.
- Parameters:
protectionStart
- the new value, not null- Returns:
- this, for chaining, not null
-
stepinDateOffset
public ResolvedCdsIndex.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.
- Parameters:
stepinDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
settlementDateOffset
public ResolvedCdsIndex.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.
- Parameters:
settlementDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
-
-