Documentation ¶
Index ¶
- Constants
- func AsDiscountFactor(rate m.SpotRate) m.DiscountFactor
- func AsSpotRate(discountFactor m.DiscountFactor) m.SpotRate
- func ConstantSpotRateInterpolation(curve *FixedSpotCurve, t m.Time) m.Rate
- func Convexity(bond Bond, t m.Time, rate m.Rate) float64
- func DFByConstantRateInterpolation(curve *FixedForwardRateCurve) m.DiscountFactor
- func DollarConvexity(bond Bond, t m.Time, rate m.Rate) float64
- func Duration(bond Bond, t m.Time, rate m.Rate) float64
- func InterpolateOnArray(interpolator func(m.Time) m.Rate, tenors []m.Time) []m.Rate
- func MacaulayDuration(bond Bond, t m.Time, rate m.Rate) float64
- type Bond
- type Cashflow
- type Expirable
- type FixedCouponBond
- func (bond *FixedCouponBond) AccruedInterest(t m.Time) m.Money
- func (bond *FixedCouponBond) CurrentYield(t m.Time, rate m.Rate) m.Rate
- func (bond *FixedCouponBond) Price(t m.Time, rate m.Rate) m.Money
- func (bond FixedCouponBond) PriceByDF(t m.Time, df m.DiscountFactor) m.Money
- func (bond FixedCouponBond) RemainingCashflows(t m.Time) []Cashflow
- func (bond *FixedCouponBond) YieldToMaturity(t m.Time, price m.Money) m.Rate
- type FixedCouponTerm
- type FixedForwardRateCurve
- type FixedSpotCurve
- type ZeroCouponBond
Constants ¶
View Source
const EPS = 1e-10
Variables ¶
This section is empty.
Functions ¶
func AsDiscountFactor ¶
func AsDiscountFactor(rate m.SpotRate) m.DiscountFactor
func AsSpotRate ¶
func AsSpotRate(discountFactor m.DiscountFactor) m.SpotRate
func ConstantSpotRateInterpolation ¶
func ConstantSpotRateInterpolation(curve *FixedSpotCurve, t m.Time) m.Rate
func DFByConstantRateInterpolation ¶
func DFByConstantRateInterpolation(curve *FixedForwardRateCurve) m.DiscountFactor
func InterpolateOnArray ¶
Types ¶
type FixedCouponBond ¶
type FixedCouponBond struct { Expirable IssueTime m.Time Coupon FixedCouponTerm }
func (*FixedCouponBond) AccruedInterest ¶
func (bond *FixedCouponBond) AccruedInterest(t m.Time) m.Money
func (*FixedCouponBond) CurrentYield ¶
func (FixedCouponBond) PriceByDF ¶
func (bond FixedCouponBond) PriceByDF(t m.Time, df m.DiscountFactor) m.Money
func (FixedCouponBond) RemainingCashflows ¶
func (bond FixedCouponBond) RemainingCashflows(t m.Time) []Cashflow
func (*FixedCouponBond) YieldToMaturity ¶
type FixedForwardRateCurve ¶
func NaiveBootstrapFromFixedCoupon ¶
func NaiveBootstrapFromFixedCoupon(quotedYields []m.Rate, quotedBonds []*FixedCouponBond, t0 m.Time) *FixedForwardRateCurve
func NaiveBootstrapFromZCYields ¶
func NaiveBootstrapFromZCYields(yields []m.Rate, ttms []m.Time) *FixedForwardRateCurve
type FixedSpotCurve ¶
func SpotCurveByConstantRateInterpolation ¶
func SpotCurveByConstantRateInterpolation(curve *FixedForwardRateCurve) *FixedSpotCurve
type ZeroCouponBond ¶
type ZeroCouponBond struct {
Expirable
}
func (*ZeroCouponBond) CurrentYield ¶
func (*ZeroCouponBond) PriceByDF ¶
func (bond *ZeroCouponBond) PriceByDF(t m.Time, df m.DiscountFactor) m.Money
func (*ZeroCouponBond) YieldToMaturity ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.