I copied to notebook and ran it just as is and get this error when doing the backtest.
Want to start off with a backtest before working on tweaking it.
Failed to initialize algorithm: Initialize(): Python.Runtime.PythonException: InvalidCastException : cannot convert object to target type
at Python.Runtime.PyObject.AsManagedObject (System.Type t) [0x00011] in <69d4fd635645431aa1e955e701040fd1>:0
at QuantConnect.Algorithm.QCAlgorithm.GetSymbolsFromPyObject (Python.Runtime.PyObject pyObject) [0x00048] in <116cdc081d27411fa228fed64bb70d2a>:0
at QuantConnect.Algorithm.QCAlgorithm.History (Python.Runtime.PyObject tickers, System.Int32 periods, System.Nullable`1[T] resolution) [0x00001] in <116cdc081d27411fa228fed64bb70d2a>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in :0
at Python.Runtime.PyObject.Invoke (Python.Runtime.PyTuple args, Python.Runtime.PyDict kw) [0x00033] in <69d4fd635645431aa1e955e701040fd1>:0
at Python.Runtime.PyObject.InvokeMethod (System.String name, Python.Runtime.PyTuple args, Python.Runtime.PyDict kw) [0x00007] in <69d4fd635645431aa1e955e701040fd1>:0
at Python.Runtime.PyObject.TryInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Object[] args, System.Object& result) [0x0003e] in <69d4fd635645431aa1e955e701040fd1>:0
at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1[T0] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x0011d] in <63992662b765477a898ef49cdcc99ee2>:0
at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.Initialize () [0x00045] in <4ccae4aa57f04451bebbca50379a76cd>:0
at QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler+<>c__DisplayClass19_0.b__0 () [0x00066] in <149201027745430ba9d7e32be5c4266e>:0