Yields
Yields.AbstractYield
Yields.Constant
Yields.Step
Base.:+
Base.:-
Base.accumulate
Yields.Forward
Yields.Par
Yields.discount
Yields.discount
Yields.rate
Yields.AbstractYield
— TypeAn AbstractYield is an object which can be called with:
rate(yield,time)
for the spot rate at a given timediscount(yield,time)
for the spot discount rate at a given time
Yields.Constant
— TypeConstant(rate)
Construct a yield object where the spot rate is constant for all maturities.
Examples
julia> y = Yields.Constant(0.05)
julia> discount(y,2)
0.9070294784580498 # 1 / (1.05) ^ 2
Yields.Step
— TypeStep(rates,times)
Create a yield curve object where the applicable rate is the effective rate of interest applicable until corresponding time.
Examples
julia>y = Yields.Step([0.02,0.05], [1,2])
julia>rate(y,0.5)
0.02
julia>rate(y,1.5)
0.05
julia>rate(y,2.5)
0.05
Base.:+
— MethodYields.AbstractYield + Yields.AbstractYield
The addition of two yields will create a RateCombination
. For rate
, discount
, and accumulation
purposes the spot rates of the two curves will be added together.
Base.:-
— MethodYields.AbstractYield - Yields.AbstractYield
The subtraction of two yields will create a RateCombination
. For rate
, discount
, and accumulation
purposes the spot rates of the second curves will be subtracted from the first.
Base.accumulate
— Methodaccumulate(yield,time)
The accumulation factor for the yield
from time zero through time
.
Yields.Forward
— MethodForward(rate_vector)
Takes a vector of 1-period forward rates and constructs a discount curve.
Yields.Par
— MethodConstruct a curve given a set of bond yields priced at par with a single coupon per period.
Yields.discount
— Methoddiscount(yield,from,to)
The discount factor for the yield
from time from
through to
.
Yields.discount
— Methoddiscount(yield,time)
The discount factor for the yield
from time zero through time
. If yield is a Real
number, will assume a Constant
interest rate.
Yields.rate
— Methodrate(yield,time)
The spot rate at time
for the given yield
.