We study a dynamic portfolio optimization problem related to convergence trading, which is an investment strategy that exploits temporary mispricing by simultaneously buying relatively underpriced assets and selling short relatively overpriced ones with the expectation that their prices converge in the future. We build on the model of Liu and Timmermann (2013) and extend it by incorporating unobservable Markov-modulated pricing errors into the price dynamics of two co-integrated assets. We characterize the optimal portfolio strategies in full and partial information settings both under the assumption of unrestricted and beta-neutral strategies. By using the innovations approach, we provide the filtering equation that is essential for solving the optimization problem under partial information. Finally, in order to illustrate the model capabilities, we provide an example with a two-state Markov chain.