Back

Get Historical data from quandl

Hi,

I have a problem getting vix and vxx historical data 

def Initialize(self):  

   self.quandlCodeVIX = "CBOE/VIX"

   self.quandlCodeVXV = "CBOE/VXV"

def OnData(self, slice):

  VIX_history_tradebars = self.History(self.quandlCodeVIX, 1, Resolution.Daily)

  VXV_history_tradebars = self.History(self.quandlCodeVXV, 1, Resolution.Daily)
  ####Above the problem occurs.

class QuandlVIX(Quandl):
    def __init__(self):
            self.ValueColumnName = "VIX CLOSE"

class QuandlVXV(PythonQuandl):
    def __init__(self):
        self.ValueColumnName = "CLOSE"

VIX_history_tradebars doesn't return me anything. I would like to get previous close price for VIX and VXV.  with this method. I could get current close price. But how can I get the previous data closing price ? Please help out 

Update Backtest








Lu, I would also like to know how to do this.

2

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed