Author Topic: Kalman filter  (Read 8554 times)

Stephane Benichou

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Kalman filter
« on: November 24, 2014, 10:30:29 am »
Hello Karel,
I saw your post in quantopian about the kalman filter applied to pairs (as seen in the Chan book).
What do you think of this approach?
I think that we all face the same problem with our pairs portfolio, arround 70% winning trades but loosers are hudge and hit the profits. Do you have an idea how to face it?
Tx

Steph

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Kalman filter
« Reply #1 on: November 24, 2014, 03:31:18 pm »
I find the Kalman filter method very interesting and I have almost finished the implementation to PTL. Huge losses in pairs trading are usually caused by not-so-good pair selection or just bad luck.

I would prefer trading ETF pairs over single stocks pairs (or mixing stocks with ETFs) to achieve better stability. Of course, bad luck cannot be avoided - and this is why you trade the portfolio of pairs, not the single pair.

Stephane Benichou

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Kalman filter
« Reply #2 on: November 25, 2014, 07:46:38 am »
Hello Karel,
I selected 28 pairs among the best in regard of their backtests on many periods. The problem is that it can be stable for a period and loose another period.
We should find a way to recalculate parameters regulary or signal that indicate that pair is trending.

ANy idea?

TX

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Kalman filter
« Reply #3 on: November 25, 2014, 11:57:19 am »
Kalman filter based pairs trading model is now online. Example:
https://www.pairtradinglab.com/backtests/VHSr4kJ8tya2ap4R

About your portfolio - please create a new thread in section Trading Results, better with some info (maybe you can post some portfolio backtests?) so we can discuss it there. It is more related to pair selection and to portfolio management than to the underlying trading strategy model.

Stephane Benichou

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Kalman filter
« Reply #4 on: November 25, 2014, 03:12:46 pm »
thank you.
will you post a tuto for the kalman filter?
tx

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Kalman filter
« Reply #5 on: November 26, 2014, 05:05:07 am »
Some basic documentation will be there soon, concrete tutorials later (no estimate when). In any case I strongly advise to read Ernie Chan's book, it dedicates 8 pages just to Kalman model.

Stephane Benichou

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Kalman filter
« Reply #6 on: November 26, 2014, 09:16:24 am »
of course i already read it!!

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Kalman filter
« Reply #7 on: November 26, 2014, 10:07:13 am »
Perfect! This model is quite new to me as well, so I need to get more experience myself before posting a tutorial.

Also, I need to perform screening of all US stocks and ETFs to get some more insight about this model pros and cons.

I already like that this model doesn't need any periods, on the other hand it seems quite selective to Delta parameter.