Year fraction calculation function


#1

Hello,
Is there a year fraction calculation method/function in OG?

Thanks


#2

Are you looking for one of these?


#3

Looks like:) Thank you!
I’m trying to do something like this:
double yearFraction = DayCountFactory.of(“ACT/360”).getDayCountFraction(LocalDate.now(), security.getExpiry().getExpiry().toLocalDate());
double ir = yieldCurve.getInterestRate(yearFraction);