public class FloatingpointDate extends Object
LocalDate
or LocalDateTime
. 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 modeled as some
real value \( t \).
To allow for both approaches to coexists 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 BlackScholes models, multiplying volatility by W(t), changing from an ACT/365 to ACT/360 would represent a rescaling of the volatilities.
The specification of this internal time representation is to some extend just a convention which defines the unit of internal model parameters.
A constant volatility measured against a floating point time ACT/365 corresponds 1:1: to a constant volatility measure again a floating point time ACT/360
with a conversion factor of 360/365. However, the situation is not always trivial, since a constant volatility measured against a floating point time ACT/365
would correspond to a weakly timedependent volatility volatility measured against ACT/ACT.
Such nuances represent differences in the model, a model calibration will ensure that the parameters are choosen such that the model matches observed quantities
independent from the convention used to express internal model parameters.Modifier and Type  Method and Description 

static LocalDate 
getDateFromFloatingPointDate(LocalDate referenceDate,
double floatingPointDate)
Convert a floating point date to a LocalDate.

static LocalDateTime 
getDateFromFloatingPointDate(LocalDateTime referenceDate,
double floatingPointDate)
Convert a floating point date to a LocalDateTime.

static double 
getFloatingPointDateFromDate(LocalDate referenceDate,
LocalDate date)
Convert a given date to a floating point date using a given reference date.

static double 
getFloatingPointDateFromDate(LocalDateTime referenceDate,
LocalDateTime date)
Convert a given date to a floating point date using a given reference date.

public static LocalDateTime getDateFromFloatingPointDate(LocalDateTime referenceDate, double floatingPointDate)
referenceDate
 The reference date associated with \( t=0 \).floatingPointDate
 The value to the time offset \( t \).public static double getFloatingPointDateFromDate(LocalDateTime referenceDate, LocalDateTime date)
referenceDate
 The reference date associated with \( t=0 \).date
 The given date to be associated with the return value \( T \).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 © 2019. All rights reserved.