Overall Statistics
Total Orders
2
Average Win
14.61%
Average Loss
0%
Compounding Annual Return
14499.453%
Drawdown
0.600%
Expectancy
0
Start Equity
100000.0
End Equity
114629.63
Net Profit
14.630%
Sharpe Ratio
385.01
Sortino Ratio
1040926714873.68
Probabilistic Sharpe Ratio
95.410%
Loss Rate
0%
Win Rate
100%
Profit-Loss Ratio
0
Alpha
358.743
Beta
0.043
Annual Standard Deviation
0.932
Annual Variance
0.868
Information Ratio
337.935
Tracking Error
1.064
Treynor Ratio
8419.727
Total Fees
$221.46
Estimated Strategy Capacity
$67000000000000.00
Lowest Capacity Asset
BTCUSD 10B
Portfolio Turnover
18.66%
from AlgorithmImports import *

class SimpleBTCTest(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2024, 7, 1)
        self.set_end_date(2024, 7, 10)
        self.set_time_zone(TimeZones.UTC)    
        self.SetBrokerageModel(BrokerageName.BINANCE, AccountType.Margin)
        self.symbol = self.AddCrypto("BTCUSD", Resolution.Minute, Market.KRAKEN).Symbol
        
        self.Schedule.On(self.DateRules.On(2024, 7, 5), 
                         self.TimeRules.At(8, 32), 
                         self.buy_btc)

        self.Schedule.On(self.DateRules.On(2024, 7, 5), 
                         self.TimeRules.At(14, 32), 
                         self.Liquidate)

    def buy_btc(self) -> None:        
        self.set_holdings(self.symbol,1)