Class: InterestDays::Calculation::ThirtyThreesixtyBase

Inherits:
Base
  • Object
show all
Defined in:
lib/interest_days/calculation/thirty_threesixty_base.rb

Overview

ISDA 30 E 360 Convention calculation

Direct Known Subclasses

Isda30e360, UsEom30360

Constant Summary collapse

RELEVANT_DAYS_IN_YEAR =
360
RELEVANT_DAY_IN_MONTH =
30

Instance Attribute Summary

Attributes inherited from Base

#end_date, #start_date

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from InterestDays::Calculation::Base

Instance Method Details

#day_count_factorObject



10
11
12
# File 'lib/interest_days/calculation/thirty_threesixty_base.rb', line 10

def day_count_factor
  (year_interval_in_days + month_interval_in_days + day_interval).fdiv(RELEVANT_DAYS_IN_YEAR)
end