Before I write the code, I was wondering if anyone had already created a function or code for calculating constant maturity for a futures contract in R. [[alternative HTML version deleted]]