Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-2.504
Tracking Error
0.065
Treynor Ratio
0
Total Fees
$0.00
from datetime import datetime, timedelta


class MyDataAlgorithm(QCAlgorithm):
    def Initialize(self):
        self.SetStartDate(2018, 6, 6)  # Set Start Date
        self.SetEndDate(2018, 10,1)
        self.SetCash(10000)  # Set Strategy Cash

        
        self.vx1_symbol = self.AddData(QuandlCustomCols,"CHRIS/CBOE_VX1", Resolution.Daily, TimeZones.NewYork).Symbol
        self.vx3_symbol = self.AddData(QuandlCustomCols,"CHRIS/CBOE_VX1", Resolution.Daily, TimeZones.NewYork).Symbol

    # for each day from the set start date, look at the vx1 and vx2 OHLC values for that day. Peform some math on those values
    # and buy or short the "SPY based on the math results"
    def OnData(self, data):
        if self.vx1_symbol in data.Bars:
            self.Log("We have data for VX1!")
        else:
            self.Log("VX1 data not available")
        
        if self.vx3_symbol in data.Bars:
            self.Log("We have data in vx3!")
        else:
            self.Log("VX3 data not available")
        
        #contrived
        #if vx1.open > vx2.open buy spy
        #if vx1.open < vx2.open short spy
        
class QuandlCustomCols(PythonQuandl):
    def __init__(self):
        self.ValueColumnName = "Open"