Overall Statistics
Total Orders
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Sortino Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-6.344
Tracking Error
0.417
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
Portfolio Turnover
0%
# region imports
from AlgorithmImports import *
from QuantConnect.DataSource import *
from QuantConnect.Data.UniverseSelection import *
# import numpy as np
# import os
# import pandas as pd
# from pytz import timezone
# from datetime import datetime
# endregion


class FormalSkyBlueLion(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2023, 7, 1)
        self.SetEndDate(2024, 4, 7)
        self.SetCash(0)
        self.SetCash("USDT", 10000)

        self.UniverseSettings.Asynchronous = False
        self.UniverseSettings.Resolution = Resolution.Daily
        self.SetBrokerageModel(BrokerageName.Binance, AccountType.Cash)

        # Add universe selection of cryptos based on coarse fundamentals
        self.AddUniverse(CryptoUniverse.Binance(self.universe_filter))


    def universe_filter(self, crypto_coarse):
        filtered_crypto = [cf for cf in crypto_coarse if cf.VolumeInUsd is not None and cf.VolumeInUsd > 10000000]
        sorted_crypto = sorted(filtered_crypto, key=lambda x: x.VolumeInUsd if x.VolumeInUsd is not None else 0, reverse=True)
        return [cf.Symbol for cf in sorted_crypto[:5]]


    def OnData(self, slice):

        top_symbols = self.ActiveSecurities.Keys

        for symbol in top_symbols:
            price = self.Securities[symbol].Price
            self.Log(f"{self.Time.date()} : Symbol: {symbol.Value}, Price: {price}")