Class: InterestDays::Calculation::IsdaActAct
- Defined in:
- lib/interest_days/calculation/isda_act_act.rb
Overview
ISDA Act Act Convention calculation
Constant Summary collapse
- RELEVANT_DAYS_IN_YEAR =
365
- RELEVANT_DAYS_IN_LEAP_YEAR =
366
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from InterestDays::Calculation::Base
Instance Method Details
#day_count_factor ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/interest_days/calculation/isda_act_act.rb', line 10 def day_count_factor return days.fdiv(stard_date_days_in_year) if start_date_and_end_date_in_same_year? end_date_days.fdiv(end_date_days_in_year) + start_date_days.fdiv(stard_date_days_in_year) + full_years_between_start_and_end_date end |