Hi,
I am trying to execute this code-
class MomentumBasedTacticalAllocation(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2007, 8, 1) # Set Start Date
self.SetEndDate(2010, 8, 1) # Set End Date
#1. Subscribe to SPY -- S&P 500 Index ETF -- using daily resolution
#2. Subscribe to BND -- Vanguard Total Bond Market ETF -- using daily resolution
#3. Set strategy cash to $3000
def OnData(self, data):
pass
Basically this [Python] ------Link removed because commercial site------- code from the module of 7 is a class definition for a momentum-based tactical asset allocation algorithm for use in the QuantConnect Algorithm Trading Engine.
When I execute the code, it is showing error- exercise failed, please try again.
Can anyone please solve this error.
Thanks in advance.
James