This article is a tutorial on Bayesian methods and probabilistic programming with application to analysis of cointegration, which is a very important concept in econometrics and which is used in many pairs trading and statistical arbitrage strategies. I will describe basic ideas behind Bayeasian modeling and probabilistic programming and provide…