for sensitivity calculation, stress testing or market risk (VaR, etc.) calculation market data items (like interest rate and FX curves) need to be shifted.
Often the base items and the shift sizes are not defined on the same maturity grid, thus interpolation is required.
This small package aims at making “calculations” with market data items easier by taking care about interpolations. E.g. when “adding” two curves containing the base interest rates and (maturity dependent) shift sizes, they are interpolated to a common grid before adding.
A Curve in this package is essentially a collection of points (x, y) , together with an interpolation and extrapolation method. Curve objects have a number of standard calculation function defined (like addition, multiplication, logarithm), thus they can be used in algebraic expressions analogue to scalars.
This is my first Julia package, I hope that this will be helpful for you.
Suggestions, Issues, etc. are welcome!
Looks cleanly coded Consider using inline or block comments for others reading your code. For example, clarify { etp, etpm, itpm, Titp} and any clear algorithmic choices you may have made.
I improved the docstrings, added reasonings / explanations and a few more tests (especially for non-standard interpolation / extrapolation methods taken from Interpolations.jl). Hope that makes my choices more transparent.