Section 6 unit 6

Print the Cash Remaining in the Portfolio

My code:



def initialize(context):

    pass

    

def handle_data(context, data):

    # Enter the code below

    print(context.portfolio.cash)

    end()



The error:

 An error occured while running the code:



Code: 404 - {"result":"no instance available"}

Hello Hugo,



Same issue as this one:  https://quantra.quantinsti.com/questionDetails/682/Error-Section-6-Unit-5