Class ResolvedCds.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCds>
-
- com.opengamma.strata.product.credit.ResolvedCds.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedCds>
- Enclosing class:
- ResolvedCds
public static final class ResolvedCds.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCds>
The bean-builder forResolvedCds.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedCdsbuild()ResolvedCds.BuilderbuySell(BuySell buySell)Sets whether the CDS is buy or sell.ResolvedCds.BuilderdayCount(DayCount dayCount)Sets the day count convention.Objectget(String propertyName)ResolvedCds.BuilderlegalEntityId(StandardId legalEntityId)Sets the legal entity identifier.ResolvedCds.BuilderpaymentOnDefault(PaymentOnDefault paymentOnDefault)Sets the payment on default.ResolvedCds.BuilderpaymentPeriods(CreditCouponPaymentPeriod... paymentPeriods)Sets thepaymentPeriodsproperty in the builder from an array of objects.ResolvedCds.BuilderpaymentPeriods(List<CreditCouponPaymentPeriod> paymentPeriods)Sets the periodic payments based on the fixed rate.ResolvedCds.BuilderprotectionEndDate(LocalDate protectionEndDate)Sets the protection end date.ResolvedCds.BuilderprotectionStart(ProtectionStartOfDay protectionStart)Sets the protection start of the day.ResolvedCds.Builderset(String propertyName, Object newValue)ResolvedCds.Builderset(org.joda.beans.MetaProperty<?> property, Object value)ResolvedCds.BuildersettlementDateOffset(DaysAdjustment settlementDateOffset)Sets the number of days between valuation date and settlement date.ResolvedCds.BuilderstepinDateOffset(DaysAdjustment stepinDateOffset)Sets the number of days between valuation date and step-in date.StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<ResolvedCds>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCds>
-
set
public ResolvedCds.Builder set(String propertyName, Object newValue)
-
set
public ResolvedCds.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<ResolvedCds>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCds>
-
build
public ResolvedCds build()
-
buySell
public ResolvedCds.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 ResolvedCds.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
-
paymentPeriods
public ResolvedCds.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 ResolvedCds.Builder paymentPeriods(CreditCouponPaymentPeriod... paymentPeriods)
Sets thepaymentPeriodsproperty in the builder from an array of objects.- Parameters:
paymentPeriods- the new value, not empty- Returns:
- this, for chaining, not null
-
protectionEndDate
public ResolvedCds.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 ResolvedCds.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 ResolvedCds.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 ResolvedCds.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 ResolvedCds.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.
- Parameters:
stepinDateOffset- the new value, not null- Returns:
- this, for chaining, not null
-
settlementDateOffset
public ResolvedCds.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.
- Parameters:
settlementDateOffset- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCds>
-
-