Create a variance cumulation function from a volatility term structure
Create a variance cumulation function from a volatility term structure
Given a volatility term structure, create a corresponding variance cumulation function. The function assumes piecewise constant forward volatility, with the final such forward volatility extending to infinity.
variance_cumulation_from_vols(vols_df)
Arguments
vols_df: A data.frame with numeric columns time (in increasing order) and volatility (not decreasing so quickly as to give negative forward variance)
Returns
A function taking two time arguments, which returns the cumulated variance from the second to the first