Overall Statistics Total Trades0Average Win0%Average Loss0%Compounding Annual Return0%Drawdown0%Expectancy0Net Profit0%Sharpe Ratio0Loss Rate0%Win Rate0%Profit-Loss Ratio0Alpha0Beta0Annual Standard Deviation0Annual Variance0Information Ratio0Tracking Error0Treynor Ratio0Total Fees\$0.00
```import numpy as np
import datetime
import decimal as d
import json
class BasicTemplateAlgorithm(QCAlgorithm):

def Initialize(self):
'''Initialise the data and resolution required'''

self.SetStartDate(2018,10,1)  #Set Start Date
self.SetEndDate(2019,1,31)    #Set End Date
#self.SetWarmUp(timedelta(50)) # set warmup in days
self.SetCash(100000)           #Set Strategy Cash
self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage) #optional
self.SetBenchmark('SPY')

sym = 'SPY'
self.AddEquity(sym, Resolution.Minute)
self.myRSI = self.RSI(sym, 14, Resolution.Daily)

# Schedule trades
self.Schedule.On(self.DateRules.EveryDay('SPY'), \
self.TimeRules.BeforeMarketClose('SPY', 12), \
Action(self.Trade))

self.Log("end init")

#def OnData(self, data):
#    self.Log("OD: "+ str(self.Time)+" : "+str(self.myRSI.Current.Value))

def Trade(self):
prc = self.Securities['SPY'].Price
self.Log("PM: "+ str(self.Time)+" : "+str(prc)+" : "+str(self.myRSI.Current.Value))

def OnEndOfDay(self):
prc = self.Securities['SPY'].Price
self.Log("EOD: "+ str(self.Time)+" : "+str(prc)+" : "+ str(self.myRSI.Current.Value))```