public class FloatingpointDate extends Object
LocalDate
. In financial applications the measurement
of time distances has to be based on a solid definition, e.g., daycount conventions to calculate
daycount fractions.
However, many mathematical models described in text books rely on time being model as some
real value \( t \).
To allow for both approaches to co-exists this class fixes the interpretation of a floating
point number representing time, unless otherwise specified.
So it still possible that models use their own "conversion".
Examples where the specification of this contract is important:
- the way of measuring time in an NSS curve determines the interpretation of the NSS parameters.
- in the textbook Black-Scholes models, multiplying volatility by W(t), changing from an ACT/365 to ACT/360 would represent a re-scaling of the volatilities.Constructor and Description |
---|
FloatingpointDate() |
Modifier and Type | Method and Description |
---|---|
static LocalDate |
getDateFromFloatingPointDate(LocalDate referenceDate,
double floatingPointDate)
Convert a floating point date to a LocalDate.
|
static double |
getFloatingPointDateFromDate(LocalDate referenceDate,
LocalDate date)
Convert a given date to a floating point date using a given reference date.
|
public static LocalDate getDateFromFloatingPointDate(LocalDate referenceDate, double floatingPointDate)
referenceDate
- The reference date associated with \( t=0 \).floatingPointDate
- The value to the time offset \( t \).public static double getFloatingPointDateFromDate(LocalDate referenceDate, LocalDate date)
referenceDate
- The reference date associated with \( t=0 \).date
- The given daten to be associated with the return value \( T \).Copyright © 2017. All rights reserved.