Journal of Open Innovation: Technology, Market and Complexity (Jun 2024)

Modeling high-frequency financial data using R and Stan: A bayesian autoregressive conditional duration approach

  • Mosab I. Tabash,
  • T. Muhammed Navas,
  • P.V. Thayyib,
  • Shazia Farhin,
  • Athar Ali Khan,
  • Azzam Hannoon

Journal volume & issue
Vol. 10, no. 2
p. 100249

Abstract

Read online

In econometrics, Autoregressive Conditional Duration (ACD) models use high-frequency economic or financial duration data, which mostly exhibit irregular time intervals. The ACD model is widely used to examine the duration of transaction volume and duration of price variations in stock markets. In this work, our goal is to devise testing that will aid in the identification of the best potential duration model among a set of four models using Bayesian approach. We test three models that rely on conditional mean duration (Weibull ACD, Log Weibull ACD, Generalized Gamma ACD) and one conditional median duration model (Birnbaum-Saunders ACD), and are being compared each other. The study was done in Rstan, a programming language for statistical inference, and the simulation uses the Hamiltonian Monte Carlo (HMC) algorithm of Markov Chain Monte Carlo (MCMC) to sample from the posterior distribution. Our findings show that Log Weibull ACD (second-generation model) as best among the four models followed by Birnbaum-Saunders ACD (third-generation model). The result offers methodological implications for algorithmic trading (algo-trading), high-frequency trading and risk management.

Keywords