Ibor Single Curve
financepy.market.curves.ibor_single_curve
Classes
IborSingleCurve
IborSingleCurve(anchor_dt: financepy.utils.date.Date, ibor_deposits: list, ibor_fras: list, ibor_swaps: list, interp_type: financepy.market.curves.interpolator.InterpTypes = <InterpTypes.FLAT_FWD_RATES: 1>, curve_dc_type: financepy.utils.day_count.DayCountTypes = <DayCountTypes.ACT_365F: 7>, check_refit_flag: bool = False, do_build: bool = True, **kwargs) -> None
Inherits from: DiscountCurve
Constructs one discount and index curve as implied by prices of Ibor
deposits, FRAs and IRS. Discounting is assumed to be at Libor and the value
of the floating leg (including a notional) is assumed to be par. This
approach has been overtaken since 2008 as OIS discounting has become the
agreed discounting approach for ISDA derivatives. This curve method is
therefore intended for those happy to assume simple Libor discounting.
The curve date is the date on which we are performing the valuation based
on the information available on the curve date. Typically it is the date on
which an amount of 1 unit paid has a present value of 1. This class
inherits from DiscountCurve and so it has all of the methods that that
class has.
There are two main curve-building approaches:
1) The first uses a bootstrap that interpolates swap rates linearly for
coupon dates that fall between the swap maturity dates. With this, we can
solve for the discount factors iteratively without need of a solver. This
will give us a set of discount factors on the grid dates that refit the
market exactly. However, when extracting discount factors, we will then
assume flat forward rates between these coupon dates. There is no
contradiction as it is as though we had been quoted a swap curve with all
of the market swap rates, and with an additional set as though the market
quoted swap rates at a higher frequency than the market.
2) The second uses a bootstrap that uses only the swap rates provided but
which also assumes that forwards are flat between these swap maturity
dates. This approach is non-linear and so requires a solver. Consequently
it is slower. Its advantage is that we can switch interpolation schemes
to provide a smoother or other functional curve shape which may have a more
economically justifiable shape. However the root search makes it slower.
Methods
build_curve
build_curve(self, **kwargs)
Build curve based on interpolation.
Not all interpolators are suitable for the bootstrap/1d solver, only those
that are local,
where the value of df[i] does not affect discount factors for t<=t[i-1]
bump_parallel
bump_parallel(self, bump_size: float)
Return a new curve with all calibration quotes bumped in parallel.
check_refit
check_refit(self, depo_tol, fra_tol, swap_tol)
Ensure that the Ibor curve refits the calibration instruments.
print_calibration_instruments
print_calibration_instruments(self)
Print out the details of the Ibor curve.
Generated automatically from the FinancePy source code.
Do not edit this file manually.