Overall Statistics
Total Trades
335
Average Win
0%
Average Loss
0%
Compounding Annual Return
34.811%
Drawdown
49.000%
Expectancy
0
Net Profit
49.459%
Sharpe Ratio
0.778
Probabilistic Sharpe Ratio
31.087%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.107
Beta
1.773
Annual Standard Deviation
0.54
Annual Variance
0.291
Information Ratio
0.481
Tracking Error
0.507
Treynor Ratio
0.237
Total Fees
$335.00
Estimated Strategy Capacity
$380000000.00
Lowest Capacity Asset
TSLA UNU3P8Y3WFAD
class OptimizedTransdimensionalReplicator(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 10, 1)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        tickers = ["AAPL", "MSFT", "TSLA"]
        self.symbols = [ Symbol.Create(ticker, SecurityType.Equity, Market.USA) for ticker in tickers]
        
        
        self.SetUniverseSelection(FineFundamentalUniverseSelectionModel(self.CoarseSelectionFunction, self.FineSelectionFunction))
        self.UniverseSettings.Resolution = Resolution.Daily

    def func(self,x):
        return self.Securities[x].Fundamentals.ValuationRatios.NormalizedPERatio
    def OnData(self, data):
        selected = None
        
        selected = sorted(self.symbols,key = self.func,reverse = True)[0]
        
        if selected in data.Bars:
            self.MarketOrder(selected,1)

    def CoarseSelectionFunction(self, coarse):
        return self.symbols
    
    def FineSelectionFunction(self, fine):
        return self.symbols