Overall Statistics
Total Trades
1490
Average Win
0%
Average Loss
-0.01%
Compounding Annual Return
-50.042%
Drawdown
5.700%
Expectancy
-1
Net Profit
-5.724%
Sharpe Ratio
-32.219
Probabilistic Sharpe Ratio
0%
Loss Rate
100%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.39
Beta
0.022
Annual Standard Deviation
0.012
Annual Variance
0
Information Ratio
-9.477
Tracking Error
0.084
Treynor Ratio
-17.279
Total Fees
$0.00
Estimated Strategy Capacity
$84000.00
Lowest Capacity Asset
BTCUSD E3
from AlgorithmImports import *


class Bugreport(QCAlgorithm):
    _ondatacalls=0
    def Initialize(self):
        self.SetStartDate(2021, 4, 1)  # Set Start Date
        self.SetEndDate(2021, 5, 1)  # Set End Date
        self.SetCash(100000)  # Set Strategy Cash

        self._selection = []

        self.UniverseSettings.Resolution = Resolution.Hour
        self.AddUniverse(self._coarse_selection)

    def _coarse_selection(self, coarse):
        if len(self._selection) == 0:
            self._selection = [Symbol.Create(
                "BTCUSD", SecurityType.Crypto, Market.Bitfinex)]
        return self._selection

    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
        """
        self._ondatacalls += 1
        self.Debug("On Data " + str(self._ondatacalls))
        if not self.Portfolio.Invested:
            each_percent = 1/len(self._selection)
            for symbol in self._selection:
                self.SetHoldings(symbol, each_percent)
            self.Debug("Purchased Stock")
        if self.Portfolio.Invested:
            self.Liquidate()
            self.Debug("Sold Stock")