Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rwijtvliet
rwijtvliet / constant_to_smooth.py
Created September 25, 2020 08:58
Approximating a piecewise constant function with a continuous function, while retaining the piecewise average
# -*- coding: utf-8 -*-
"""
Created 2020-09
Investigating various ways of smoothing a piecewise contant function, while
retaining the piecewise average.
(Goal: smoothing the monthly prices for price-forward-curve).
"""