OPEN-SOURCE SCRIPT

Pairs Trading (basic OLS regression)

Pairs trading using hedge ratio.

Firstly, it calculates hedge ration using OLS linear regression.
Then it calculates spread and z-score of spread.
if spread in specific range (which it's possible to change in settings) it makes Long/Short orders.

The very basic script.

คำจำกัดสิทธิ์ความรับผิดชอบ