Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
93.532%
Drawdown
0.200%
Expectancy
0
Net Profit
0.302%
Sharpe Ratio
11.225
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
55.142
Annual Standard Deviation
0.034
Annual Variance
0.001
Information Ratio
11.225
Tracking Error
0.033
Treynor Ratio
0.007
Total Fees
$1.65
class TestMarketOnOpen(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 7, 29)  # Set Start Date
        self.SetEndDate(2019, 7, 30)
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity("SPY", Resolution.Minute)
        # For live trading, please double check the valid time period to place Market On Open orders. It varies across markets
        self.Schedule.On(self.DateRules.EveryDay("SPY"), self.TimeRules.At(9, 15), self.BeforeMarketOpen)
        
        
    def BeforeMarketOpen(self):
        
        self.SetHoldings("SPY", 1)
        

    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
        '''

        pass