Hello, 

I am trying to implement a pair trading strategy based on the following paper:

https://www.math.nyu.edu/faculty/avellane/AvellanedaLeeStatArb071108.pdf

 

I tried to code the strategy (the paper is not hard to understand) but it appears that the algorithm doesn't liquidate stocks .How can I fix this small problem?

Thank you 

 

Author