In "getTimeToExpiry" of "OptionDefinition" a year is always 365.25

Hi guys,

This is to report an issue we came across when pricing American Options with BjerksundStenslandModel.

Seems that in the “getTimeToExpiry” of “OptionDefinition” a year is always 365.25, which is correct from a certain perspective but not really used in fin tech AFAIK.

For our use we fixed by function override to:

{
  override def getTimeToExpiry(date: ZonedDateTime): Double = TimeCalculator.getTimeBetween(date, getExpiry.getExpiry)
}

Can this be fixed in OG please?

Thank you and regards
Atilla Kiss Gazda

details:

Class OptionDefinition

/**
*

  • @param date The date
  • @return The time to expiry in years, where a year is defined as having 365.25 days
    */
    public double getTimeToExpiry(final ZonedDateTime date) {
    if (date.isAfter(getExpiry().getExpiry())) {
    throw new IllegalArgumentException("Date " + date + " is after expiry " + getExpiry());
    }
    return DateUtils.getDifferenceInYears(date, getExpiry().getExpiry()); // ---> ...diff / DAYS_PER_YEAR; where DAYS_PER_YEAR=365.25
    }