Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-4.347%
Drawdown
0.100%
Expectancy
0
Net Profit
-0.069%
Sharpe Ratio
-5.25
Probabilistic Sharpe Ratio
24.652%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.023
Beta
0.026
Annual Standard Deviation
0.008
Annual Variance
0
Information Ratio
2.32
Tracking Error
0.305
Treynor Ratio
-1.65
Total Fees
$1.00
Estimated Strategy Capacity
$1000000000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
class EmotionalRedLlama(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2018, 10, 20)
        self.SetEndDate(2018, 10, 25)
        self.SetCash(100000) 
        self.spy = self.AddEquity("SPY", Resolution.Minute).Symbol
        self.limOrder = None
        
        self.Schedule.On(self.DateRules.EveryDay("SPY"), \
                 self.TimeRules.BeforeMarketClose("SPY", 10), \
                 self.EveryDayBeforeMarketClose)
    def EveryDayBeforeMarketClose(self):
        if self.limOrder.Status != OrderStatus.Filled:
            response = self.limOrder.Cancel("Canceled SPY Trade")
            if response.IsSuccess:
                self.Debug("Order successfully canceled")
    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
        '''
      
        # Check if we're not invested and then put portfolio 100% in the SPY ETF.      
        if not self.Portfolio.Invested:
           self.MarketOrder(self.spy,10)
           price = data.Bars[self.spy].Close
           self.limOrder = self.LimitOrder(self.spy,-10,price*1.5)