Hello!

Firtly, congratulate with all work done, it's really helpful.

I have done some own tests to do backtests, and I found that your z-score its different than mine, using this backtest as a reference:

https://www.pairtradinglab.com/backtests/Y-33ItOP-XTOENSIDetails:

What could be wrong in my calculations of z-score to be near of yours?

I attached my dataframe exported to excel to compare.

Thank you again,

Best Regards.