Statistical arbitrage a.k.a. Pairs Trading

Posted By: AttilaZ

Statistical arbitrage a.k.a. Pairs Trading - 12/27/13 11:06

With my limited Zorro knowledge accumulated thus far I assume that "pairs trading" is possible with Zorro.

That is : taking at least 2 assets, whose spread is cointegrating (mean reverting), buying the under performer and selling the over performer. That old gag. laugh

For that technially I need to asset() calls
create the spread series (diff of the 2 assets close prices)

And do some linear regression / kalman-filtering to get the legs correct.

Is this strategy feasible to implement ? I mean ever building block is given by Zorro as far as I see. Please correct me If I am wrong.

Best,
Attila
Posted By: jcl

Re: Statistical arbitrage a.k.a. Pairs Trading - 12/27/13 14:04

Yes, that sounds like a serious strategy that should be straightforward to implement.
Posted By: AttilaZ

Re: Statistical arbitrage a.k.a. Pairs Trading - 12/27/13 16:06

Ok, I'll dive under, I'll keep you posted on the results.
Posted By: ytc

Re: Statistical arbitrage a.k.a. Pairs Trading - 08/12/17 03:11

When using kalman filter for dynamic hedge ratio of a cointegrated pair, will you consider C++ libraries such as KFilter, or R packages such as KFAS, DLM, or code one by yourself?

Also, it's greatly appreciated if someone can demonstrate a simple example since I got stuck on this issue for a long time crazy .
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/06/18 07:33

Somebody post any examples or link to see how to build the pairs strategy?
Posted By: Hredot

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/06/18 17:52

This sounds interesting. What are some example assets?
I might give it a try and will post my code if it works, like I did with the Dual Momentum script.
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/06/18 22:46

Dax and cac40 are two good assets for pairs trading. For my vision is also possible with eurusd and gbpusd.

We can build it together. We can try!
Posted By: Hredot

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/07/18 00:37

I seem to find several different hits for these abbreviations. Could you post yahoo finance links to the exact assets?
Posted By: AndrewAMD

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/07/18 01:39

Those are stock indices. Either trade index futures or equivalent ETFs.

EDIT: Oh yeah, there's also some CFD's.
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/07/18 07:19

Originally Posted By: Hredot
Could you post yahoo finance links to the exact assets?


You can find it with the symbols below from yahoo.com

GDAXI
FCHI

The pairs trading is it possible to apply it at different instrument correlated and cointegrated
Posted By: luisd

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/07/18 18:37

EURUSD + GBPUSD --> EURGBP.
It could stay stationary, but it could easily trend as well.
Posted By: Hredot

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/08/18 17:26

Ok, looked at GDAXI and FCHI. A couple questions:

- First thing I notice is that they are rather expensive. Are there cheaper etfs following the same curves?
- Their price is different in magnitude, while % change might be cointegrated. Still, which indicator do you propose to decide when the two prices are "in line" and when they are "apart"?
- I guess the general strategy then would be - sell bigger and buy smaller one, close position when they align again to win the initial discrepancy?
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/08/18 21:32

Originally Posted By: Hredot
which indicator do you propose to decide when the two prices are "in line" and when they are "apart"?


Ratio (spread) indicator between BB is very interesting to make pairs trading
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/08/18 21:37

Originally Posted By: Hredot
Ok, looked at GDAXI and FCHI.

- First thing I notice is that they are rather expensive. Are there cheaper etfs following the same curves?


You can use all symbols which are correlated and cointegrated between them
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/08/18 21:40

Originally Posted By: Hredot

- I guess the general strategy then would be - sell bigger and buy smaller one, close position when they align again to win the initial discrepancy?


sell the strongest symbol and buy the weakest symbol till reach the medium line of BB. This is my main rule
Posted By: Hredot

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/08/18 22:19

Thank you for the replies. Excuse my ignorance, but what is BB? Could you describe a bit more details on how you propose to use a ratio to determine spread?
Posted By: tradingest

Re: Statistical arbitrage a.k.a. Pairs Trading - 03/09/18 07:15

BB are the Bollinger Bands.
Later I post a screen on my use
© 2024 lite-C Forums