Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-22.960%
Drawdown
76.500%
Expectancy
0
Net Profit
-36.653%
Sharpe Ratio
-0.121
Probabilistic Sharpe Ratio
3.684%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.093
Beta
1.168
Annual Standard Deviation
0.488
Annual Variance
0.238
Information Ratio
-0.197
Tracking Error
0.446
Treynor Ratio
-0.05
Total Fees
$0.00
Estimated Strategy Capacity
$19000000.00
Lowest Capacity Asset
BTCUSD XJ
Portfolio Turnover
0.16%
# region imports
from AlgorithmImports import *
# endregion

class BuyAndHoldBitcoin(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 10, 1)  # Set the start date
        self.SetCash(100000)  # Set the initial cash balance

        # Define the BTCUSD symbol
        self.btcusd = self.AddCrypto("BTCUSD", Resolution.Daily).Symbol

    def OnData(self, data: Slice):
        if not self.Portfolio.Invested:
            self.SetHoldings(self.btcusd, 1)