Overall Statistics
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Indicators")
AddReference("QuantConnect.Common")

from System import *
from QuantConnect import *
from QuantConnect.Data import *
from QuantConnect.Algorithm import *
from QuantConnect.Indicators import *
from QuantConnect.Python import PythonQuandl
# from QuantConnect.Data.Custom import Quandl

from datetime import timedelta

import pandas as pd


class Example(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2012, 6, 12)
        self.SetEndDate(2017, 7, 18)
        self.SetCash(100000)

        self.ASSET_UNDERLYING = 'SPXL' 

        # Add the equities to universe
        self._asset_underlying = self.AddEquity(self.ASSET_UNDERLYING, Resolution.Minute)


    def OnData (self, slice):
        if not self.Portfolio.Invested:
            self.Buy("SPXL", 100);