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
Estimated Strategy Capacity
$0
Lowest Capacity Asset
class HistoryBug(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022, 2, 14) 
        self.SetCash(100000) 
        self.spy = self.AddEquity("SPY", Resolution.Tick, extendedMarketHours=True).Symbol


    def OnData(self, data):
        try:
            self.History(self.spy, self.Time, self.Time-timedelta(hours=10), Resolution.Hour, True, True) 
        except TypeError as e:
            self.Log(f"1 failed: {e}")
        try:
            self.History(self.spy, self.Time, self.Time-timedelta(hours=10), Resolution.Hour, fillForward=True, extendedMarket=True) 
        except TypeError as e:
            self.Log(f"2 failed: {e}")
            
        try:
            h = self.History([self.spy], self.Time, self.Time-timedelta(hours=10), Resolution.Hour, True, True) 
            self.Log(f"{h}")
        except TypeError as e:
            self.Log(f"3 failed: {e}")
        try:
            self.History([self.spy], self.Time, self.Time-timedelta(hours=10), Resolution.Hour, fillForward=True, extendedMarket=True) 
            self.Log(f"{h}")
        except TypeError as e:
            self.Log(f"4 failed: {e}")
        try:
            self.History(self.spy, 10, Resolution.Hour, True, True) 
        except TypeError as e:
            self.Log(f"5 failed: {e}")
        try:
            self.History([self.spy], 10, Resolution.Hour, True, True) 
        except TypeError as e:
            self.Log(f"6 failed: {e}")
        try:
            self.History(self.spy, 10, Resolution.Hour, fillForward=True, extendedMarket=True) 
        except TypeError as e:
            self.Log(f"7 failed: {e}")
        try:
            self.History([self.spy], 10, Resolution.Hour, fillForward=True, extendedMarket=True) 
        except TypeError as e:
            self.Log(f"8 failed: {e}")
        try:
            self.History(self.spy, timedelta(hours=10), Resolution.Hour, fillForward=True, extendedMarket=True) 
        except TypeError as e:
            self.Log(f"9 failed: {e}")
        try:
            self.History([self.spy], timedelta(hours=10), Resolution.Hour, fillForward=True, extendedMarket=True) 
        except TypeError as e:
            self.Log(f"10 failed: {e}")
        try:
            self.History(self.spy, timedelta(hours=10), Resolution.Hour, True, True) 
        except TypeError as e:
            self.Log(f"11 failed: {e}")
        try:
            self.History([self.spy], timedelta(hours=10), Resolution.Hour, True, True) 
        except TypeError as e:
            self.Log(f"12 failed: {e}")
        
        self.Quit()