Pair Trading Lab Helpdesk & Forum
Pair Trading => Good & Bad Pairs => Topic started by: offpista 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 1dimensional, (alpha, beta) is 2dimensional
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

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

https://wiki.pairtradinglab.com/wiki/Pair_Trading_Models