* t status pep8 conversion * Minor tweaks and rebase * Various minor fixes --------- Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
This commit is contained in:
@@ -19,17 +19,17 @@ from AlgorithmImports import *
|
||||
class QuitAfterInitializationRegressionAlgorithm(QCAlgorithm):
|
||||
'''Basic template algorithm simply initializes the date range and cash'''
|
||||
|
||||
def Initialize(self):
|
||||
def initialize(self):
|
||||
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''
|
||||
|
||||
self.SetStartDate(2013,10, 7) #Set Start Date
|
||||
self.SetEndDate(2013,10,11) #Set End Date
|
||||
self.SetCash(100000) #Set Strategy Cash
|
||||
self.set_start_date(2013,10, 7) #Set Start Date
|
||||
self.set_end_date(2013,10,11) #Set End Date
|
||||
self.set_cash(100000) #Set Strategy Cash
|
||||
|
||||
self.AddEquity("SPY", Resolution.Daily)
|
||||
self.add_equity("SPY", Resolution.DAILY)
|
||||
self._stopped = False
|
||||
|
||||
def OnData(self, data):
|
||||
def on_data(self, data):
|
||||
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
|
||||
|
||||
Arguments:
|
||||
@@ -38,4 +38,4 @@ class QuitAfterInitializationRegressionAlgorithm(QCAlgorithm):
|
||||
if self._stopped:
|
||||
raise ValueError("Algorithm should of stopped!")
|
||||
self._stopped = True
|
||||
self.Quit()
|
||||
self.quit()
|
||||
|
||||
Reference in New Issue
Block a user