Closed UpsidePotential closed 6 months ago
did you able to download vix-utils features, it's looks like M2 broken for now.
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)
I am just starting to look at this now. Anyone already looking at it?
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.
there are many cases for 2024
the issue should be around this line of code (before it actually)
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
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.
The orginal code was far off the documentation. I think I am close to resolving …
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.
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.
The latest on PyPi has this fix now 0.1.7.
thanks a lot!
so now front month goes to zero the friday before expiration. it makes sense to me.
Since VXX follows the VX30 index, I would expect he holdings to be close to the calculated VX30 weightings.