R bloggers

Replicating Volatiltiy ETN Returns From CBOE Futures

FavoriteLoadingAdd to favorites

This post will demonstrate how to replicate the volatility ETNs (XIV, VXX, ZIV, VXZ) from CBOE futures, thereby allowing any individual to create synthetic ETF returns from before their inception, free of cost. So, before I get to the actual algorithm, it depends on an update to the term structure algorithm I shared some months back. In that algorithm, mistakenly (or for the purpose of simplicity), I used calendar days as the time to expiry, when it should have been business days, which also accounts for weekends, and holidays, which are an irritating artifact to keep track of. So here’s the salient change, in the loop that calculates times to expiry: source(“tradingHolidays.R”) masterlist <- list() timesToExpiry <- list() for(i in 1:length(contracts)) { # obtain data contract <- contracts[i] dataFile <- paste0(stem, contract, “_VX.csv”) expiryYear <- paste0(“20”,substr(contract, 2, 3)) expiryMonth <-…
Original Post: Replicating Volatiltiy ETN Returns From CBOE Futures