Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-32.487%
Drawdown
37.800%
Expectancy
0
Net Profit
-32.705%
Sharpe Ratio
-1.108
Probabilistic Sharpe Ratio
0.413%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.255
Beta
-0.023
Annual Standard Deviation
0.231
Annual Variance
0.053
Information Ratio
-1.192
Tracking Error
0.269
Treynor Ratio
11.366
Total Fees
$90.60
Estimated Strategy Capacity
$670.00
class UglyBlueCow(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2017, 11, 28)
        self.SetEndDate(2018, 12, 1)
        self.SetCash(100000)
        
        self.symbol = Symbol.Create("ALYA", SecurityType.Equity, Market.USA)
        self.SetUniverseSelection(FineFundamentalUniverseSelectionModel(self.CoarseSelectionFunction, self.FineSelectionFunction, None, None))

    def CoarseSelectionFunction(self, coarse):
        for c in coarse:
            if c.Symbol == self.symbol:
                return [self.symbol]
        return []
        
    def FineSelectionFunction(self, fine):
        return [f.Symbol for f in fine]


    def OnData(self, data):
        if not self.Portfolio.Invested and data.ContainsKey(self.symbol) and data[self.symbol] is not None:
            self.SetHoldings(self.symbol, 1)

    def OnSecuritiesChanged(self, changes):
        for security in changes.AddedSecurities:
            self.Log(f"Added {security.Symbol} on {self.Time}")