Overall Statistics
Total Trades
119
Average Win
0.04%
Average Loss
-0.05%
Compounding Annual Return
-8.711%
Drawdown
6.000%
Expectancy
-0.158
Net Profit
-4.504%
Sharpe Ratio
-1.279
Probabilistic Sharpe Ratio
2.810%
Loss Rate
54%
Win Rate
46%
Profit-Loss Ratio
0.84
Alpha
0.008
Beta
-0.449
Annual Standard Deviation
0.043
Annual Variance
0.002
Information Ratio
-1.43
Tracking Error
0.137
Treynor Ratio
0.123
Total Fees
$119.00
Estimated Strategy Capacity
$8600000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
class MuscularSkyBlueLlama(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 6, 1)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity("SPY", Resolution.Minute)

    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
        '''
        
        if not self.Securities["SPY"].Invested: 
                self.MarketOrder("SPY",100)
                self.LimitOrder("SPY", -100, data["SPY"].Close*1.001)
                self.StopMarketOrder("SPY", -100, data["SPY"].Close*0.999)
        
        
    def OnOrderEvent(self, orderEvent):
        order = self.Transactions.GetOrderById(orderEvent.OrderId)
        
        if order.Status == OrderStatus.Filled:
            if order.Type == OrderType.Limit or order.Type == OrderType.Limit:
                self.Transactions.CancelOpenOrders(order.Symbol)