Overall Statistics
Total Trades
29
Average Win
16.38%
Average Loss
-4.99%
Compounding Annual Return
30.909%
Drawdown
37.200%
Expectancy
0.835
Net Profit
60.123%
Sharpe Ratio
0.787
Probabilistic Sharpe Ratio
30.925%
Loss Rate
57%
Win Rate
43%
Profit-Loss Ratio
3.28
Alpha
0.312
Beta
0.525
Annual Standard Deviation
0.363
Annual Variance
0.132
Information Ratio
0.971
Tracking Error
0.346
Treynor Ratio
0.544
Total Fees
$152209.44
Estimated Strategy Capacity
$400000.00
Lowest Capacity Asset
BTCUSD XJ
Portfolio Turnover
4.55%
from AlgorithmImports import *

class DualThrustAlgorithm(QCAlgorithm):

    def Initialize(self):
        # set date
        self.SetStartDate(2021, 10 , 1)
        # set trade cash
        self.SetCash(1_000_000)
        # set brokerage
        self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)
        # add crypto symbol
        self.AddCrypto("BTCUSD", Resolution.Minute)
        # add trading alpha models
        self.AddAlpha(RsiAlphaModel())
        self.AddAlpha(EmaCrossAlphaModel())
        # set portfolio construction
        self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel())
        # set risk management
        self.AddRiskManagement(MaximumDrawdownPercentPerSecurity(0.3))
        self.AddRiskManagement(MaximumUnrealizedProfitPercentPerSecurity(0.5))   
        # set execution model     
        self.SetExecution(ImmediateExecutionModel())