Is there any example on pair trading?
naoziwatele last edited by naoziwatele
I am a newbie on backtrader. I have gone through the quick start. However the example is a simple case. I am wondering Is there any example on pair trading, I am trading two correlated products and profit from their changing of margin. I'd like to backtest such model.
It is much appreciated if anyone can offer help on such example.
There is a sample:
And there is a blog post:
But pair trading is not inherently different to regular trading.
See also this recent contribution: https://community.backtrader.com/topic/1512/kalman-pair-trade-with-ewa-ewc-from-ernie-chan-s-algorithmic-trading