This algorithm computes and compares the realized volatility of the S&P 500 versus the implied volatility of the index as measured by VIX futures.
Attempts to partially replicate Ernie Chan's Variance Risk Premium for Return Forecasting:
http://epchan.blogspot.com/2014/01/variance-risk-premium-for-return.html