Skip to content

Fast and Scalable Dynamic Quantile Models

Antonio Aguirre edited this page Apr 8, 2025 · 16 revisions

Welcome! This project aims to extend and optimize the exDQLM package, a Bayesian framework for dynamic quantile regression, incorporating improvements in Variational Bayes inference, C++ acceleration, and multivariate support.


Background

Time series modeling is crucial for forecasting in fields such as climate, economics, hydrology, and finance. Traditional methods generally focus on mean-based inference, which can be insufficient for capturing the complex dynamics of the tails of a distribution. Quantile regression offers a robust alternative by enabling analysis across the entire conditional distribution.

Bayesian dynamic quantile regression has emerged as a powerful tool, but existing software often lacks scalability, comprehensive Bayesian modeling, and efficient computational frameworks. The exDQLM package, based on the Extended Asymmetric Laplace (exAL) distribution and Dynamic Linear Models (DLMs), directly addresses these challenges by providing a fully Bayesian, state-space framework for time-varying quantile estimation.


Related Work

Below is a comparison of existing R packages along with their main features and limitations:

Package Approach Features Limitations
quantreg Frequentist Robust quantile regression Lacks dynamic Bayesian methods
bayesQR Bayesian Bayesian quantile regression for cross-sectional data Limited support for time dynamics
dynquant Frequentist Time-dependent quantile estimation Does not provide a full Bayesian framework
exDQLM Bayesian + DLMs Fully Bayesian dynamic quantile regression; state-space modeling; VB inference; C++ acceleration; multivariate support Under active development; further validation needed

Details of the Coding Project

This project will transform exDQLM into a comprehensive framework for Bayesian dynamic quantile regression, incorporating the following improivements:

Area of Improvement Description
Variational Bayes (VB) Inference Implement VB inference using Laplace/Delta approximations for non-conjugate priors, enabling fast posterior updates.
C++ Acceleration Utilize Rcpp and RcppParallel to develop core routines (e.g., Kalman filtering and smoothing) in C++ for superior performance.
Modular Design Decompose the model into trend, seasonal, and regression components—each with its own evolution and observation matrices—then combine them into a unified state-space model.
Posterior Predictive Quantile Synthesis (PPQS) Synthesize multiple quantile estimates into a coherent posterior predictive distribution while ensuring non-crossing quantiles.
Multivariate Extensions Extend support to multivariate time series for joint quantile estimation across multiple responses.
Hyperparameter Specification Define informative priors: inverse gamma for sigma and a truncated location–scale Student's t–distribution for gamma, with three hyperparameters.
Discount Factor Matrix Implement discount factors to adaptively update the evolution covariance in the state-space model.
Comprehensive Testing & Documentation Provide detailed documentation, unit tests, and vignettes to ensure reproducibility and ease of use.

Expected Impact

The refined exDQLM package will have a broad impact, making robust Bayesian dynamic quantile regression accessible for:

  • Environmental Modeling: Enhancing forecasting accuracy for extreme weather and hydrological events.
  • Finance: Better estimating tail risks and calculating Value-at-Risk (VaR) through dynamic quantile methods.
  • Health Economics: Modeling treatment outcomes and cost distributions more reliably under uncertainty.

Mentors & Call for Mentors

We invite experienced mentors to support this project. If you are interested in mentoring or have suggestions regarding the project, please add your details below.

Mentor Role Email Institution
Evaluating Mentor
Co-Mentor

Mentors, if you would like to add yourself as well, please feel free to update this section with your details.


Tests for Contributors

To apply, potential contributors should complete one or more of the following tests:

  • Easy Test:
    Develop a Kalman filter and smoother in C++ using RcppArmadillo for a univariate DLM and compare the results with those obtained from the dlm package in R.

  • Medium Test:
    Implement and validate the exAL distribution functions (dexal, pexal, qexal, and rexal) in R/C++ according to the formulation from Yan & Kottas (2017).

  • Hard Test:
    Create a fully Bayesian dynamic quantile regression model using Variational Bayes (VB) with Laplace/Delta approximations for non-conjugate parameters. Validate your model against existing solutions such as dynquant, bayesQR, and qrjoint.

Please post links to your GitHub test results when you contact the mentors.


Test Solutions

Contributor Name GitHub Profile Test Results
Antonio Aguirre AntonioAPDL - Easy Test: Pending
- Medium Test: exAL Implementation
- Hard Test: In-progress

Additional Resources

Resource Link
CRAN Package: exDQLM exDQLM on CRAN
Technical Report (UCSC-SOE-21-10) UCSC-SOE-21-10 (PDF)

Final Comments

We are actively seeking motivated contributors and mentors for this project. We welcome your contributions and ideas to further refine and enhance exDQLM.

For any questions or to express interest, please get in touch with the contributor directly.

Feel free to edit this page as needed.


Contact Information


Clone this wiki locally