It is unclear what you are trying to do. Contango is not influenced by # days remaining in the Futures contract. (The formula for Contango is merely (BM-FM)/BM) To obtain another reference point, look at VixCentral, and observe their % Contango value for the front two months! -> "http://vixcentral.com/" See below: My interest in Contango is primarily with only the front two VX Futures contracts, as those influence XIV and SVXY (which are of interest to me). However, you may adjust the code to pick whichever terms you like.
I am still learning about contango. Is it that simple as the above formula as a start? (I could not see the image you attached) JackRab mentioned this: I am not sure if that refers to some kind of Weight for the front/back month future. What I am thinking of is that on the first day of the Front month. Almost all of the futures are still in the front month and we would give almost all weight to that price but I can be completely wrong? Another thing I am thinking of is when I looking at the data: 03/21/2017,J (Apr 17),13.15,13.80,12.80,13.77,13.7750,0.60,278286,0,325183 We can see that 278286 contracts was traded on this date in the Front month. I wonder if it is an interesting idéa to include number of contracts in any kind of formula as a Weight to the close number?
In a contango situation, where the front VIX future is lower than the next one, the VXX continuously decays... it's like gravity, constant dropping... With my example I was trying to picture how VXX is constructed. They need to have a constant 30 day duration. So when April has 30 cal days to go, VXX is constructed fully of April futures. When there's 15 days left and May has 45 days... it's equally weighted between both futures.
Yes, then I understand I think. I will try to do the calculation as such and see how it will look like. Yes, at one point all futures should exist in one month. Thanks!