This algorithm takes a tuple of etfs and measures the spread between the highest and the lowest returns.
Whenever the spread exceeds a certain level (recorded as tolerance) it is supposed to short the best performing and buy the worst performing, as soon as the spread returns to a normal level, all positions should be exited!
Somehow I failed terribly at writing a proper code, can someone halp me out?