Hi All
I am using optimizer functionality to evaluate the best parameter combination that I can use in my trading strategy. The output from the optimizer for each parameter set (Slow_EMA, Fast_EMA) along with it's value are added to the list and the code for the same is
val_list = [self.params.sl_maperiod, self.params.ft_maperiod,self.broker.getvalue()]
print (val_list)
the first column is Slow_EMA value and the second column is Fast_EMA value and the third column is the cash value that the optimizer generates for the Slow_EMA and Fast_EMA combination. I am providing the output below
[5, 20, 101416.90550000001]
[5, 21, 101717.35600000001]
[5, 22, 101942.15999999999]
[5, 23, 101938.65450000002]
[5, 24, 101785.45050000002]
[5, 25, 102084.91550000002]
[5, 26, 101634.87550000002]
[5, 27, 101835.576]
[5, 28, 101889.99200000001]
[5, 29, 101906.11300000001]
I want to sort this output in a descending order based on column 3(Cash Value) such that the record with the highest value gets displayed at the top.
Please help me here