Author Topic: kalman filters  (Read 9892 times)

offpista

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
kalman filters
« on: February 14, 2018, 10:06:01 am »
Hello,

I am new here, I like the site a lot, it has a big value for pair traders.
I have few questions:
1. the backtester, what periods of price it uses? minute data? tick data, daily data...and how's it's fed into the kalman fiters?

2. the kalman fiters grid 2 and auto - can you share your code modifications for each one with this code template? I am using python.

    # y is 1-dimensional, (alpha, beta) is 2-dimensional
    kf = KalmanFilter(n_dim_obs=1, n_dim_state=2,
                      initial_state_mean=np.ones(2),
                      initial_state_covariance=np.ones((2, 2)),
                      transition_matrices=np.eye(2),
                      observation_matrices=obs_mat,
                      observation_covariance=10**3,
                      transition_covariance=0.01**2 * np.eye(2))
thanks
Don't forget to smile

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 336
  • Karma: +13/-0
    • Pair Trading Lab
Re: kalman filters
« Reply #1 on: February 15, 2018, 07:38:07 am »
Hello!

1) daily data
2) sorry, Kalman-Grid and Kalman-auto models are proprietary...they use many standalone KFs which follow the reference implementation by Ernesto P Chan http://www.epchan.com/

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 336
  • Karma: +13/-0
    • Pair Trading Lab
Re: kalman filters
« Reply #2 on: February 16, 2018, 01:47:44 am »