Record Class IsdaCdsModel.Conventions
java.lang.Object
java.lang.Record
com.quantfinlib.credit.IsdaCdsModel.Conventions
- Record Components:
calendar- business-day calendar for accrual, payment and settlement adjustmenthalfDayAccrual- add half a day of accrued coupon at default (mid-day default convention)
- Enclosing class:
IsdaCdsModel
public static record IsdaCdsModel.Conventions(BusinessCalendar calendar, boolean halfDayAccrual)
extends Record
Model conventions beyond the contract terms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IsdaCdsModel.ConventionsThe 2.1 behaviour: weekends only, no half-day adjustment. -
Constructor Summary
ConstructorsConstructorDescriptionConventions(BusinessCalendar calendar, boolean halfDayAccrual) Validates the calendar. -
Method Summary
Modifier and TypeMethodDescriptioncalendar()Returns the value of thecalendarrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehalfDayAccrualrecord component.final inthashCode()Returns a hash code value for this object.static IsdaCdsModel.Conventionsof(BusinessCalendar calendar) Conventions with a holiday calendar and no half-day adjustment.final StringtoString()Returns a string representation of this record class.withHalfDayAccrual(boolean on) The same calendar with the half-day option set.
-
Field Details
-
DEFAULT
The 2.1 behaviour: weekends only, no half-day adjustment.
-
-
Constructor Details
-
Conventions
Validates the calendar.
-
-
Method Details
-
of
Conventions with a holiday calendar and no half-day adjustment.- Parameters:
calendar- the calendar- Returns:
- the conventions
-
withHalfDayAccrual
The same calendar with the half-day option set.- Parameters:
on- whether to apply the half-day adjustment- Returns:
- new conventions
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
calendar
-
halfDayAccrual
public boolean halfDayAccrual()Returns the value of thehalfDayAccrualrecord component.- Returns:
- the value of the
halfDayAccrualrecord component
-