Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
81.081%
Drawdown
17.100%
Expectancy
0
Net Profit
34.904%
Sharpe Ratio
2.321
Probabilistic Sharpe Ratio
71.515%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.813
Beta
-0.282
Annual Standard Deviation
0.303
Annual Variance
0.092
Information Ratio
0.869
Tracking Error
0.363
Treynor Ratio
-2.496
Total Fees
$1.64
class VerticalParticleAtmosphericScrubbers(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 6, 14)  # Set Start Date
        self.SetCash(50000)  # Set Strategy Cash
        
        spy = self.AddEquity("SPY", Resolution.Daily)
        spy.SetLeverage(4)


    def OnData(self, data):
        if not self.Portfolio.Invested:
            self.SetHoldings("SPY", 2)
        self.Plot("Margin", "Remaining", self.Portfolio.MarginRemaining)
        self.Plot("Margin", "Used", self.Portfolio.TotalMarginUsed)
        self.Plot("Cash", "Remaining", self.Portfolio.Cash)