Overall Statistics |
Total Trades 2 Average Win 0% Average Loss -66.52% Compounding Annual Return -9.462% Drawdown 84.300% Expectancy -1 Net Profit -66.515% Sharpe Ratio -0.119 Probabilistic Sharpe Ratio 0.012% Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.096 Beta 0.355 Annual Standard Deviation 0.343 Annual Variance 0.118 Information Ratio -0.554 Tracking Error 0.355 Treynor Ratio -0.115 Total Fees $33.01 Estimated Strategy Capacity $310000.00 |
from datetime import datetime,timedelta import numpy as np class ScheduledEventsAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2010, 1, 1) # Set Start Date self.SetEndDate(2021, 1, 1) # Set end date self.SetCash(40000) # Set Strategy Cash #self.symbol="XLK" self.XLK = self.AddEquity("APHA", Resolution.Hour) #self.DBA = self.AddEquity("DBA", Resolution.Hour) #self.forex = self.AddForex(self.symbol, Resolution.Minute, Market.Oanda) #self.SetBrokerageModel(BrokerageName.Alpaca) #self.SetBrokerageModel(BrokerageName.Oanda) def OnData(self, data): if not self.Portfolio.Invested: self.SetHoldings("APHA",1) #self.SetHoldings("DBA",-1)