Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.03 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.03 KB

Rates.jl

License travis codecov

Rates.jl provides methods to convert an interest rate into a discount factor.

Example

import Rates

r = 0.1 # an interest rate of 10%
t = 1.5 # one and a half year (yearfraction)

Rates.erf(Rates.Continuous, r, t)
Rates.discountfactor(Rates.Continuous, r, t)
Rates.erf_to_rate(Rates.Continuous, exp(r*t), t) # will retrieve r
Rates.discountfactor_to_rate(Rates.Continuous, 1.0/exp(r*t), t) # will retrieve r

Compounding Types

  • Rates.Continuous

  • Rates.Simple

  • Rates.Exponential