I'm trying to come up with a weighted average formula for commodity futures curves. The end goal is to produce a confidence band for where future commodity prices will be. If I simply use a formula that rolls off each futures contract at expiry, the confidence band looks jagged on a graph, because the futures curve has some curvature. My plan is to come up with a formula that weights each month's futures curve price more strongly as the time series gets nearer to that month, which should smooth out the bands. But I'm having trouble doing this (using match function) - the biggest problem is figuring out how to have the weight of the weights increase as the time series gets nearer to that month's contract.
Any suggestions would be much appreciated. If what I've written here is unclear, please contact me for more clarification. Thanks for your time.
Any suggestions would be much appreciated. If what I've written here is unclear, please contact me for more clarification. Thanks for your time.