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
-22.801
Tracking Error
0.203
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
class WellDressedBlueChimpanzee(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2013, 1, 1)  # Set Start Date
        self.SetEndDate(2013,1,5)
        self.SetCash(100000)  # Set Strategy Cash
        self.spx = self.AddIndex("SPX", Resolution.Daily)
        
        self.Schedule.On(self.DateRules.EveryDay(self.spx.Symbol), 
            self.TimeRules.At(1,0), self.TrainModel)
        self.Schedule.On(self.DateRules.EveryDay(self.spx.Symbol),
            self.TimeRules.AfterMarketOpen(self.spx.Symbol, 30),Action(self.Trade))


    def OnData(self, data):
        self.data = data
    
    def TrainModel(self):
        hist = self.History(self.spx.Symbol, 2, Resolution.Daily)
        self.Debug(f"{self.Time} log: {str(hist.iloc[[-2]])}!")
        self.Debug(f"{self.Time} log: {str(hist.iloc[[-1]])}!")
         
    def Trade(self):
        hist = self.History(self.spx.Symbol, 2, Resolution.Daily)
        self.Debug(f"{self.Time} log: {str(hist.iloc[[-2]])}!")
        self.Debug(f"{self.Time} log: {str(hist.iloc[[-1]])}!")