I am creating a genetic algorithm using zipline as the trading platform but for the genetic algorithm I need to setup zipline in a class which I thought I did correctly but my implementation gives different data than running it the standard way in the tutorial. Returning a sortino ratio of 102.397 with a ending portfolio value of -80000
While if i run the same logic in the standard way it gives a sortino ratio -0.84 of and portfolio value of 98000.
So my question is how is the correct way to setup zipline in a python class?
I've tried removing the context in the function calls but then it gives the error saying initialize expects 2 arguments and only one was given.