Overall Statistics
from QuantConnect.Data.Custom.Fred import *

class TachyonQuantumContainmentField(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 4, 23)
        self.SetCash(100000)
        self.aapl = self.AddEquity("AAPL", Resolution.Daily).Symbol
        self.vix = self.AddData(Fred, Fred.CBOE.VIX).Symbol

    def OnData(self, data):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        '''
        if not self.Portfolio.Invested and data.ContainsKey(self.vix):
            self.SetHoldings(self.aapl, 0.5)