Record Class Deposit
java.lang.Object
java.lang.Record
com.quantfinlib.rates.Deposit
- All Implemented Interfaces:
CurveInstrument
public record Deposit(LocalDate start, LocalDate end, double rate, DayCount dayCount)
extends Record
implements CurveInstrument
A cash deposit over
[start, end] at simple rate rate:
1 at start grows to 1 + rate * tau at end, tau from
dayCount. Implied rate: the projection curve's simple forward
(P(start)/P(end) - 1)/tau. 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
-
Deposit
Creates an instance of aDepositrecord 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
-