We introduce srvar-toolkit, an open-source Python package for Bayesian vector autoregression with shadow-rate constraints and stochastic volatility. The toolkit implements the methodology of Grammatikopoulos (2025, Journal of Forecasting) for forecasting macroeconomic variables when interest rates hit the effective lower bound. We provide conjugate Normal-Inverse-Wishart priors with Minnesota-style shrinkage, latent shadow-rate data augmentation via Gibbs sampling, diagonal stochastic volatility using the Kim-Shephard-Chib mixture approximation, and stochastic search variable selection. Core dependencies are NumPy, SciPy, and Pandas, with optional extras for plotting and a configuration-driven command-line interface. We release the software under the MIT licence at https://github.com/shawcharles/srvar-toolkit.
翻译:本文介绍srvar-toolkit,一个用于贝叶斯向量自回归的开源Python软件包,该模型包含影子利率约束和随机波动率。该工具包实现了Grammatikopoulos(2025,Journal of Forecasting)提出的方法,用于在利率触及有效下限时预测宏观经济变量。我们提供了采用明尼苏达式收缩的共轭正态-逆Wishart先验分布、通过Gibbs采样进行的潜在影子利率数据增强、使用Kim-Shephard-Chib混合近似的对角随机波动率模型,以及随机搜索变量选择功能。核心依赖项为NumPy、SciPy和Pandas,并可选配用于绘图的扩展功能及一个由配置驱动的命令行界面。本软件在MIT许可证下发布,地址为 https://github.com/shawcharles/srvar-toolkit。