Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
0%
Compounding Annual Return
-1.003%
Drawdown
0.000%
Expectancy
0
Net Profit
-0.028%
Sharpe Ratio
-6.406
Probabilistic Sharpe Ratio
1.472%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.009
Beta
0.003
Annual Standard Deviation
0.001
Annual Variance
0
Information Ratio
-1.059
Tracking Error
0.285
Treynor Ratio
-2.316
Total Fees
$2.00
Estimated Strategy Capacity
$70000000000.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.Daily).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.")