Overall Statistics |
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Net Profit 0% Sharpe Ratio 0 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio 0 Tracking Error 0 Treynor Ratio 0 Total Fees $0.00 |
import numpy as np import pandas as pd class DynamicMultidimensionalCoreWave(QCAlgorithm): def Initialize(self): #1. Required: Five years of backtest history self.SetStartDate(2019, 1, 1) self.SetEndDate(2019,1,10) #2. Required: Alpha Streams Models: self.SetBrokerageModel(BrokerageName.AlphaStreams) #3. Required: Significant AUM Capacity self.SetCash(5000000) # Tech List self.tech_etf = ["XLK", "QQQ", "SOXX", "IGV", "VGT", "QTEC", "FDN", "FXL", "TECL", "SOXL", "SKYY", "SMH", "KWEB", "FTEC", "SOXS", "TECS"] self.t_list = ["TECL", "TECS"] #5. Set Relevent Benchmark self.reference = "XLK" self.AddEquity(self.reference, Resolution.Minute) self.SetBenchmark(self.reference) # Add Equity ------------------------------------------------ for i in range(len(self.tech_etf)): self.AddEquity(self.tech_etf[i],Resolution.Minute) # Schedue --------------------------------------------------- self.Schedule.On(self.DateRules.EveryDay("XLK"), self.TimeRules.AfterMarketOpen(self.reference, 0), self.tech_trade) def OnData(self, data): pass def tech_trade(self): history = self.History(self.tech_etf, 5, Resolution.Daily) df_history = history['close'].unstack(level=0) tech_columns = df_history.columns self.Log('Tech_Symbols : Total ' + str(len(tech_columns)) + '\n' + str(tech_columns)) self.Log('df_Tech_History : ' + '\n' + str(df_history) +'\n') history_tecs = self.History(self.t_list, 5, Resolution.Daily) df_tecs = history_tecs['close'].unstack(level=0) self.Log('df_TECL_TECS : ' + '\n' + str(df_tecs) +'\n')