| 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 Probabilistic 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.892 Tracking Error 0.553 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
#https://www.quantconnect.com/project/8573135#code-tab-main_py
# Sybols
#CURE DFEN DPST DRN FAS LABU NAIL PILL RETL TECL UTSL
#weights
#1 -0.609022204 0.063329879 -1.402526494 -0.076014761 0.121880258 -0.161395148 -1.880186944 0.36683371 -1.632101489 1.980848122
import numpy as np
import time
import gc
gc.enable()
class SlowBacktest(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2020, 1, 1)
self.SetEndDate(2020, 3, 30)
self.SetCash(100000)
self.AddEquity("SPY", Resolution.Minute)
self.tickers = ['CURE', 'DFEN', 'DPST', 'DRN', 'FAS', 'LABU', 'NAIL', 'PILL', 'RETL', 'TECL', 'UTSL']
#create symbols
self.symbols = []
for ticker in self.tickers:
self.symbols.append(Symbol.Create(ticker, SecurityType.Equity, Market.USA))
self.SetUniverseSelection(ManualUniverseSelectionModel(self.symbols))
def OnData(self, data):
self.Schedule.On(
self.DateRules.EveryDay("SPY"),
self.TimeRules.BeforeMarketClose("SPY", 5),
self.get_data
)
def get_data(self):
#now get latest prices
T=self.Time
price_list = []
for symbol in self.symbols:
price_list.append(self.Securities[symbol.Value].Price)
self.Debug(str(T) + ' ' + str(price_list))