financialnoob.me

Blog about quantitative finance

  • Introduction to partial autoregressive (PAR) model

    This article is based on the paper ‘Modeling Time Series with both Permanent and Transient Components using the Partially Autoregressive Model’ (Clegg et al. 2015). I am going to describe the model from that paper, show how to implement provided estimation techniques in Python and try to replicate some studies using both synthetic and real data….

  • Pairs trading with cointegrated Logistic Mixture Autoregressive (LMAR) model

    In the previous article I presented a working implementation of EM algorithm for estimating parameters of LMAR time series model. In this article I will describe and implement a pairs trading strategy that uses LMAR to model the spread. The strategy is based on a paper ‘Basket trading under co-integration with the logistic mixture autoregressive mode’ (Cheng et…

  • Expectation Maximization for Logistic Mixture Autoregressive (LMAR) model. Attempt #2

    Some time ago I wrote an article describing my unsuccessful attempt to implement Expectation Maximization algorithm for estimating parameters of Logistic Mixture Autoregressive (LMAR) model. In this article I am going to describe how I was able to fix the problem and provide a correct implementation of the algorithm. I will also provide code for…

  • Bayesian analysis of cointegrated time series

    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 links to several tutorials, which…

  • Pairs trading with kagi indicator

    In this article I will describe how to implement and backtest a pairs trading strategy using kagi indicator. It is based on a paper ‘Pairs trading based on statistical variability of the spread process’ (Bogomolov, 2013). It is an approach to pairs trading which does not rely on a long-term mean of the spread process. Kagi indicator…

  • Pairs trading. Analysis of several pair selection methods and trading strategies

    In this article I will describe and implement 7 pair selection methods and 2 trading strategies based on a paper ‘Investigation of Stochastic Pairs Trading Strategies Under Different Volatility Regimes’ (Baronyan et al. 2010). Pair selection methods are based on several metrics and their combinations. Most of the metrics I’ve already implemented in my other pairs trading articles,…