Interest Rates¶
Concrete Interest Rate type
type InterestRate
rate::Float64
dc::DayCount
comp::CompoundingType
freq::Frequency
end
-
discount_factor
(ir::InterestRate, time_frac::Float64)¶ Discount factor implied by the rate compounded at time time_frac
-
discount_factor
(ir::InterestRate, date1::Date, date2::Date, ref_start::Date = Date(), ref_end::Date = Date()) Discount factor implied by the rate compounded between two dates
-
compound_factor
(ir::InterestRate, time_frac::Float64)¶ Compound factor implied by the rate compounded at time time_frac
-
compound_factor
(ir::InterestRate, date1::Date, date2::Date, ref_start::Date = Date(), ref_end::Date = Date()) Compound factor implied by the rate compounded between two dates
-
equivalent_rate
(ir::InterestRate, comp::CompoundingType, freq::Frequency, time_frac::Float64)¶ Equivalent interest rate for a compounding period time_frac. The resulting InterestRate shares the same implicit day-counting rule of the original InterestRate instance
-
equivalent_rate
(ir::InterestRate, result_dc::DayCount, comp::CompoundingType, freq::Frequency, date1::Date, date2::Date, ref_start::Date = Date(), ref_end::Date = Date()) Equivalent rate for a compounding period between two dates. The resulting rate is calculated taking the required day-counting rule into account
-
implied_rate
(compound::Float64, dc::DayCount, comp::CompoundingType, time_frac::Float64, freq::Frequency)¶ Implied interest rate for a given compound factor at a given time. The resulting InterestRate has the day-counter provided as input
-
implied_rate
(compound::Float64, dc::DayCount, comp::CompoundingType, date1::Date, date2::Date, freq::Frequency, ref_start::Date = Date(), ref_end::Date = Date()) Implied rate for a given compound factor between two dates. The resulting rate is calculated taking the required day-counting rule into account
Compounding Types¶
abstract CompoundingType
type ContinuousCompounding <: CompoundingType end # exp(r * t)
type SimpleCompounding <: CompoundingType end # (1+r*t)
type CompoundedCompounding <: CompoundingType end # (1 + r)^t
type SimpleThenCompounded <: CompoundingType end # Simple up to the first period then Compounded
Duration¶
abstract Duration
type ModifiedDuration <: Duration end