vix_utils icon indicating copy to clipboard operation
vix_utils copied to clipboard

VX30 Weightings Are Significantly Off VXX Current Holdings

Open UpsidePotential opened this issue 1 year ago • 6 comments
trafficstars

Since VXX follows the VX30 index, I would expect he holdings to be close to the calculated VX30 weightings.
image

image

UpsidePotential avatar Mar 26 '24 20:03 UpsidePotential

did you able to download vix-utils features, it's looks like M2 broken for now.

githubbla avatar Apr 30 '24 17:04 githubbla

weights are definitively off

import vix_utils as vu

vix_dates = vu.vix_futures_dates.vix_futures_trade_dates_and_expiry_dates()
weights = vu.vix_futures_dates.vix_constant_maturity_weights(vix_dates)

image

gnzsnz avatar May 20 '24 19:05 gnzsnz

I am just starting to look at this now. Anyone already looking at it?

dougransom avatar May 20 '24 23:05 dougransom

Roll Period Calendar Days is Zero anywhere thse weights are off. I have some unit tests I am working on to identify these cases, trying to solve the problem now.

dougransom avatar May 21 '24 03:05 dougransom

there are many cases for 2024

image

the issue should be around this line of code (before it actually)

https://github.com/dougransom/vix_utils/blob/1b231b2c7fc44ae84584496940ac068139a2e55b/src/vix_utils/vix_futures_dates.py#L184

but i have not been able to pin point it

I don't think that roll period calendar days is the main issue. There are plenty of good weights with it being zero

image

gnzsnz avatar May 21 '24 16:05 gnzsnz

Working on this in branch https://github.com/dougransom/vix_utils/tree/weights.

So far some refactorings, so we can debug the logic that generates the weights on a small subset of dates.

dougransom avatar May 21 '24 17:05 dougransom

The orginal code was far off the documentation. I think I am close to resolving …

dougransom avatar May 23 '24 03:05 dougransom

Closer still, it might a week or two though before I complete it. There is an edge case on Wednesday of Vix Future Expiration. That is the front month (at least I think it is), but on those days, for the purpose of S&P 500 VIX Short-Term Futures Index, the front month is the following expiration.

dougransom avatar May 24 '24 16:05 dougransom

I think it is working now, try vixutil -w w.xlsx.

Note the weights are for three expirations, since there are a couple days where the front month may not be included in VXX etc. (instead it is the following two months). It happens the day before and day of expiration.

dougransom avatar May 25 '24 03:05 dougransom

The latest on PyPi has this fix now 0.1.7.

dougransom avatar May 25 '24 04:05 dougransom

thanks a lot!

so now front month goes to zero the friday before expiration. it makes sense to me.

gnzsnz avatar May 26 '24 18:05 gnzsnz