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
0
Tracking Error
0
Treynor Ratio
0
Total Fees
$0.00
class ResistanceUncoupledAtmosphericScrubbers(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(1981,1,1)
        self.SetEndDate(2020,1,1)
        self.SetCash(100000)
        self.SetBenchmark(lambda t: 0)
        self.spy3x = self.AddData(spy3x, "D_UPRO", Resolution.Daily).Symbol
        
    def OnData(self, data): 
        #self.Debug(data["D_UPRO"])
        pass
        
class spy3x(PythonData):
    
    def GetSource(self, config, date, isLiveMode):
        return SubscriptionDataSource("https://www.dropbox.com/s/1et85hf5s31jate/3x-vfinx-sp500-history.csv?dl=1", SubscriptionTransportMedium.RemoteFile)
    
    def Reader(self, config, line, date, isLiveMode):
        if not (line.strip() and line[0].isdigit()): return None
         
        currency = spy3x()
        currency.Symbol = config.Symbol
    
        data = line.split(',')
        
        if data[0] == "Date":
            return None
        
        currency.Time = datetime.strptime(data[0], "%Y-%m-%d")
        currency.Value = data[1] 
        currency["Close"] = float(data[1]) 
        
            
        return currency