Hi, I am quite new to using Lean CLI and wanted to try to live paper trade.

I currently have it running on Ubuntu 20.10 and in a VM

I installed docker, Lean, and pulled my algos from the cloud, However, when I try to live paper trade using Interactive Brokers, I get the error:

Loader.TryCreatePythonAlgorithm(): System.Exception: AlgorithmPythonWrapper():
NameError: name ‘QCAlgorithm’ is not defined
    at <module>
        class testalgo(QCAlgorithm):

Is there something wrong with my code?

from QuantConnect import *
from QuantConnect.Data.UniverseSelection import *
import math
import numpy as np
import pandas as pd
import scipy as sp

class testalgo(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2010, 3, 1)  #Set Start Date
        #self.SetEndDate(2021, 5, 1)  #Set Start Date
        self.cap = 1000
        self.SetCash(self.cap)
   	def OnData(self):
   		self.SetHoldings('SPY', 1)

Any help is appreciated, Thanks

 

Author