Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-0.487%
Drawdown
0.000%
Expectancy
0
Net Profit
-0.013%
Sharpe Ratio
-5.817
Probabilistic Sharpe Ratio
6.297%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.004
Beta
0.002
Annual Standard Deviation
0.001
Annual Variance
0
Information Ratio
-1.044
Tracking Error
0.285
Treynor Ratio
-1.921
Total Fees
$1.00
Estimated Strategy Capacity
$18000000000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
# region imports
from AlgorithmImports import *
# endregion

class TestingAlgo(QCAlgorithm):

    def Initialize(self) -> None:
        self.SetStartDate(2022, 10, 1)
        self.SetEndDate(2022, 10, 10)
        self.SetCash(100000)

        self.symbol = self.AddEquity("SPY", Resolution.Minute).Symbol

        self.AddUniverse(self.CoarseSelection)

    def CoarseSelection(self, coarse):
        if not self.Portfolio.Invested:
            self.Debug(f"{self.Time} universe selection done.")
            self.MarketOnOpenOrder(self.symbol, 1)
        return Universe.Unchanged
    
    def OnOrderEvent(self, orderEvent):
        if orderEvent.Status == OrderStatus.Submitted:
            self.Debug(f"{self.Time} ordered 1 share of SPY.")
        elif orderEvent.Status == OrderStatus.Filled:
            self.Debug(f"{self.Time} filled 1 share of SPY.")