Overall Statistics
Total Trades
295
Average Win
0%
Average Loss
0%
Compounding Annual Return
1.123%
Drawdown
32.000%
Expectancy
0
Net Profit
0.564%
Sharpe Ratio
0.353
Probabilistic Sharpe Ratio
27.171%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.272
Beta
-0.067
Annual Standard Deviation
0.654
Annual Variance
0.428
Information Ratio
-0.439
Tracking Error
0.882
Treynor Ratio
-3.466
Total Fees
$6349.16
Estimated Strategy Capacity
$0
Lowest Capacity Asset
EOSDTUSDT E3
import csv


def get_crypto_universe(algo):
    def is_valid_quote_currency(currency):
        # return True
        # this list if far from completeness
        return currency in ("USD", "USDT", "USDC", "BTC", "ETH", "EUR", "GBP", "AUD", "JPY", "XCHF", "CNHT") 

    DB_URL = "https://raw.githubusercontent.com/QuantConnect/Lean/master/Data/symbol-properties/" \
             "symbol-properties-database.csv"
    csv = algo.Download(DB_URL)
    csv = csv.split("\n")
    market = Market.Bitfinex
    lines = [line for line in csv if line.startswith(market) and ",crypto," in line]
    lines = [s.split(",") for s in lines]
    tickers_with_quotes = [(x[1], x[4]) for x in lines]
    tickers = [row[0] for row in tickers_with_quotes if is_valid_quote_currency(row[1])]
    symbols = [Symbol.Create(x, SecurityType.Crypto, market) for x in tickers]

    return ManualUniverseSelectionModel(symbols)

class GeekyFluorescentYellowScorpion(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 6, 13)  # Set Start Date
        self.SetCash(100_000_000)  # Set Strategy Cash
        self.UniverseSettings.Resolution = Resolution.Daily
        self.SetBrokerageModel(BrokerageName.Bitfinex)
        self.AddUniverseSelection(get_crypto_universe(self))
        

    def OnData(self, data):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        '''
        for symbol in data.Keys:
            if not self.Portfolio[symbol].Invested:
                self.SetHoldings(symbol, 0.0001)