Record Class Fra
java.lang.Object
java.lang.Record
com.quantfinlib.rates.Fra
- All Implemented Interfaces:
CurveInstrument
public record Fra(LocalDate start, LocalDate end, double rate, DayCount dayCount)
extends Record
implements CurveInstrument
A forward rate agreement on the index period
[start, end] at
fixed rate rate. The FRA settles at start the discounted
value of (L - K) * tau; its par rate is the projection forward
L = (P_p(start)/P_p(end) - 1)/tau whatever the discount curve,
because the settlement amount is discounted at the fixing itself (ISDA
FRA discounting). Dates are taken as already adjusted.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondayCount()Returns the value of thedayCountrecord component.end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleimpliedQuote(DiscountCurve discount, DiscountCurve projection) The quote implied by the curves, in the units ofCurveInstrument.quote().The last date the instrument depends on; the bootstrap places a pillar there.doublequote()The market quote as a decimal rate (0.03 = 3%).doublerate()Returns the value of theraterecord component.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.withQuote(double quote) The same instrument with a different quote (used for bump-and-rebuild risk).
-
Constructor Details
-
Fra
Creates an instance of aFrarecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord componentrate- the value for theraterecord componentdayCount- the value for thedayCountrecord component
-
-
Method Details
-
pillarDate
Description copied from interface:CurveInstrumentThe last date the instrument depends on; the bootstrap places a pillar there.- Specified by:
pillarDatein interfaceCurveInstrument
-
quote
public double quote()Description copied from interface:CurveInstrumentThe market quote as a decimal rate (0.03 = 3%).- Specified by:
quotein interfaceCurveInstrument
-
withQuote
Description copied from interface:CurveInstrumentThe same instrument with a different quote (used for bump-and-rebuild risk).- Specified by:
withQuotein interfaceCurveInstrument
-
impliedQuote
Description copied from interface:CurveInstrumentThe quote implied by the curves, in the units ofCurveInstrument.quote().- Specified by:
impliedQuotein interfaceCurveInstrument
-
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. -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
rate
public double rate()Returns the value of theraterecord component.- Returns:
- the value of the
raterecord component
-
dayCount
Returns the value of thedayCountrecord component.- Returns:
- the value of the
dayCountrecord component
-