Overall Statistics
Total Trades
110
Average Win
0.11%
Average Loss
-0.14%
Compounding Annual Return
30.166%
Drawdown
1.300%
Expectancy
-0.098
Net Profit
0.580%
Sharpe Ratio
1.815
Probabilistic Sharpe Ratio
53.949%
Loss Rate
48%
Win Rate
52%
Profit-Loss Ratio
0.74
Alpha
0.487
Beta
0.418
Annual Standard Deviation
0.133
Annual Variance
0.018
Information Ratio
5.687
Tracking Error
0.146
Treynor Ratio
0.576
Total Fees
$148.59
class MultidimensionalParticleContainmentField(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 1, 20)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        
        self.SetUniverseSelection(LiquidETFUniverse())
        self.UniverseSettings.Resolution = Resolution.Daily
        self.dvol = {}

    def OnData(self, data):
        top10SortedByDVol = sorted(self.dvol.items(), key=lambda x:x[1].Current.Value, reverse=True)[:10]
        symbols = [x[0] for x in top10SortedByDVol]
        self.Liquidate()
        for symbol in symbols:
            self.SetHoldings(symbol, 1/len(symbols))
    
    def OnSecuritiesChanged(self, changed):
        for security in changed.AddedSecurities:
            symbol = security.Symbol
            price = self.Identity(symbol)
            vol = self.Identity(symbol, Field.Volume)
            dvol = IndicatorExtensions.Times(price, vol)
            self.dvol[symbol] = dvol
        
        for security in changed.RemovedSecurities:
            self.dvol.pop(security.Symbol, None)