Machine Learning for Financial Risk Management: Modeling Time-Varying Factor Sensitivities Using Factor Variational Autoencoders
- 1 John P Stevens High School, Edison, NJ, USA
- 2 Department of Computer Science, Rice University, Houston, TX, USA
Abstract
Accurate measurement of time-varying systematic risk exposures is essential for robust financial risk management. Conventional asset pricing models, such as the Fama-French three-factor framework, assume constant factor loadings, limiting their ability to capture shifts in risk during volatile market conditions. This study employs a Factor Variational Autoencoder (FactorVAE) to model nonlinear, dynamic sensitivities to the size (SMB) and value (HML) factors using daily returns for 100 S&P 500 constituents from January 2018 to December 2024. The model extracts ten statistically independent latent risk factors, reducing reconstruction error by 44% relative to rolling-window Ordinary Least Squares (OLS). These latent factors align with economically interpretable structures—volatility regimes, sector-specific risk dynamics, and macroeconomic cycles—providing enhanced insight into evolving firm-level exposures. The dataset exhibits pronounced fat tails, validating the use of nonlinear models for improved tail-risk estimation. Factor trajectories reveal continuous evolution in exposures, with earlier detection of structural changes during the COVID-19 recovery and Federal Reserve tightening cycles compared to linear benchmarks. Principal Component Analysis of the latent space identifies distinct market regimes and gradual transitions, facilitating forward-looking regime classification. The results demonstrate that machine learning-based dynamic factor modeling can materially improve systematic risk measurement, enable proactive regime monitoring, and support more responsive hedging and capital allocation strategies.
- Bianchi, D., Büchner, M., & Tamoni, A. (2022). Bond Risk Premia with Machine Learning. Review of Financial Studies, 35, 2680-2721.
- Bouchacourt, D., Tomioka, R., & Nowozin, S. (2018). Multi-Level Variational Autoencoder : Learning Disentangled Representations from Grouped Observations . arXiv:1705.08841 https://cdn.aaai.org/ojs/11867/11867-13-15395-1-2-20201228.pdf
- Burgess, C. P., Higgins, I., Pal, A., Matthey, L., Watters, N., Desjardins, G., & Lerchner, A. (2018). Understanding Disentangling in β -VAE. arXiv: 1804.03599.
- Chen, Li, X., Grosse, R., & Duvenaud, D. (2018). Isolating Sources of Disentanglement in Variational Autoencoders. arXiv: 1802.04942.
- Chen, X., Pelger, M., & Zhu, J. (2021). Deep Learning in Asset Pricing. Review of Financial Studies, 34, 5133-5185.
- Duan, J., Wang, C., Li, Y., & Zhang, X. (2022). Dynamic Latent Factor Modeling with Variational Autoencoders. Journal of Financial Data Science, 4, 10-28.
- Fama, E. F., & French, K. R. (1993). Common Risk Factors in the Returns on Stocks and Bonds. Journal of Financial Economics, 33, 3-56. https://doi.org/10.1016/0304-405x(93)90023-5
- Feng, G., Polson, N. G., & Xu, J. (2019). Deep Learning in Characteristics-Sorted Factor Models. Review of Financial Studies, 32, 3676-3713.
- Ferson, W. E., & Schadt, R. W. (1996). Measuring Fund Strategy and Performance in Changing Economic Conditions. The Journal of Finance, 51, 425-461. https://doi.org/10.1111/j.1540-6261.1996.tb02690.x
- Gu, S., Kelly, B., & Xiu, D. (2020). Empirical Asset Pricing via Machine Learning. The Review of Financial Studies, 33, 2223-2273. https://doi.org/10.1093/rfs/hhaa009
- Gygax, F., Rösch, D., & Schmid, M. (2021). Disentangling Risk Premia Using Deep Generative Models. Finance Research Letters, 39, Article ID: 101618.
- Kim, H., & Mnih, A. (2018). Disentangling by Factorising. International Conference on Machine Learning (ICML), 80, 2649-2658. https://proceedings.mlr.press/v80/kim18b.html
- Kingma, D. P., & Ba, J. (2015). Adam: A Method for Stochastic Optimization. arXiv: 1412.6980. https://arxiv.org/abs/1412.6980
- Kozak, S., Nagel, S., & Santosh, S. (2020). Shrinking the Cross-Section. Journal of Financial Economics, 135, 271-292. https://doi.org/10.1016/j.jfineco.2019.06.008