# Risk assessment in cryptocurrency portfolios: a composite hidden Markov factor analysis framework

## Risk assessment in cryptocurrency portfolios

### Abstract

In this paper, we deal with the estimation of two widely used risk measures such as Value-at-Risk (VaR) and Expected Shortfall (ES) in a cryptocurrency context. To face the presence of regime switching in the cryptocurrency volatilities and the dynamic interconnection between them, we propose a Monte Carlo-based approach using heteroskedastic factor analysis and hidden Markov models (HMM) combined with a structured variational Expectation-Maximization (EM) learning approach. This composite approach allows the construction of a diversified portfolio and determines an optimal allocation strategy making it possible to minimize the conditional risk of the portfolio and maximize the return. The out-of-sample prediction experiments show that the composite factorial HMM approach performs better, in terms of prediction accuracy, than some other baseline methods presented in the literature. Moreover, our results show that the proposed methodology provides the best performing crypto-asset allocation strategies and it is also clearly superior to the existing methods in VaR and ES predictions.### References

Abbara, O., and Zevallos, M. (2018). Modeling and Forecasting Intraday VaR of an Exchange Rate Portfolio. Journal of Forecasting, 37 (7), pp. 729-738.

Alizadeh, S., Brandt, M. W., and Diebold, F. X. (2002). Range-Based Estimation of Stochastic Volatility Models. The Journal of Finance, 57 (3), pp. 1047-1091.

Bayer, S., and Dimitriadis, T., (2018). Regression Based Expected Shortfall Backtesting. arXiv preprint. https://arxiv.org/abs/1801.04112

Bera, A. K., and Jarque, C. M. (1982). Model specification tests: A simultaneous approach. Journal of Econometrics, 20 (1), pp. 59-82.

Charles, A., and Darn´e, O. (2019). Volatility Estimation for Cryptocurrencies: Further Evidence with Jumps and Structural Breaks. Economics Bulletin, 39 (2), pp. 954-968.

Chen, X., and Yin, X. (2019). Solve Nonlinear Optimization with Nonlinear Constraints, Version 0.6. https://cran.rproject.org/web/packages/NlcOptim/NlcOptim.pdf

Christoffersen, P. F., (1998). Evaluating Interval Forecasts. International Economic Review, 29 (4), pp. 841-862.

Dempster, A., Laird, N., and Rubin, D. (1977). Maximum Likelihood from incomplete data via the EM algorithm. Journal of Royal Statistical Society Series B, 39 (1), pp. 1-38.

Elendner, H., Trimborn, S., Ong, B., and Lee, T. M. (2017). The Cross-Section of Cryptocurrencies as Financial Assets: Investing in Cryptocurrencies Beyond Bitcoin. In Handbook of Blockchain, Digital Finance, and Inclusion, Volume 1: Cryptocurrency, FinTech, InsurTech, and Regulation, Elsevier, pp. 145-173.

Engle, R. F., and Manganelli, S., (2004). CAViaR: Conditional Autoregressive Value at Risk by Regression Quantiles. Journal of Business & Economic Statistics, 22 (4), pp. 367-381.

Gaglianone, W. P., Lima, L. R., Linton, O., and Smith, D. R. (2011). Evaluating Value-at-Risk Models via Quantile Regression. Journal of Business & Economic Statistics, 29 (1), pp. 150-160.

Gkillas, K. and Katsiampa, P. (2018). An application of extreme value theory to cryptocurrencies. Economics Letters, 164 (C), pp. 109-111.

Gonzalez-Rivera, G., Lee, T. H., and Mishra, S. (2004). Forecasting Volatility: A Reality Check Based on Option pricing, Utility function, Value-at-Risk, and Predictive Likelihood. International Journal of Forecasting, 20 (4), pp. 629-645.

Hansen, P. R., Lunde, A., and Nason, J. M. (2011). The Model Confidence Set. Econometrica, 79 (2), pp. 453-497.

Harvey, D. I., Leybourne, S., and Newbold, P. (1998). Tests for forecast encompassing. Journal of Business and Economic Statistics, 16 (2), pp. 254-259.

Harvey, A., Ruiz, E., and Sentana, E. (1992). Unobserved component time series models with ARCH disturbances. Journal of Econometrics. 52 (1-2), pp. 129-157.

Kupiec, P. H. (1995). Techniques for Verifying the Accuracy of Risk Measurement Models. The Journal of Derivatives, 3 (2), pp. 73-84.

Levy, B. P., and Lopes, H. F. (2021a). Dynamic Ordering Learning in Multivariate Forecasting. arXiv preprint. https://arxiv.org/pdf/2101.04164.pdf

Levy, B. P., and Lopes, H. F. (2021b). Dynamic Portfolio Allocation in High Dimensions using Sparse Risk Factors. arXiv preprint. https://arxiv.org/pdf/2105.06584.pdf

Liu, W., Semeyutin, A., Lau, C. K. M., and Gozgor, G. (2020). Forecasting Value-at-Risk of Cryptocurrencies with RiskMetrics type models. Research in International Business and Finance, 54, 101259.

Ljung, G., and Box, G. (1978). On a Measure of Lack of Fit in Time Series Models. Biometrika, 65 (2), pp. 297-303.

Maciel, L. (2020). Cryptocurrencies value-at-risk and expected shortfall: Do regime-switching volatility models improve forecasting? International Journal of Finance & Economics, pp. 1-16.

Markowitz, H. M. (1952). Portfolio Selection. The Journal of Finance, 7 (1), pp. 77-91.

McNeil, A. J., and Frey, R. (2000). Estimation of Tail-related Risk Measures for Heteroscedastic Financial Time Series: An Extreme Value Approach. Journal of Empirical Finance, 7 (3–4), pp. 271-300.

Nolde, N., and Ziegel, J. F. (2017). Elicitability and Backtesting: Perspectives for Banking Regulation. The Annals of Applied Statistics, 11 (4), pp. 1833-1874.

Petukhina, A., Trimborn, S., Hardle, W. K., and Elendner, H. (2021). Investing with cryptocurrencies - evaluating their potential for portfolio allocation strategies. Quantitative Finance, 21 (11), pp. 1825-1853.

Saidane, M. (2023). Sequential Forecasting Strategies for Crypto Portfolio Allocation: A Dynamic Latent Factor Analysis Approach. Journal of Administrative and Economic Sciences, 16 (2), pp. 61-84.

Saidane, M. (2022a). A New Viterbi-Based Decoding Strategy for Market Risk Tracking: an Application to the Tunisian Foreign Debt Portfolio during 2010-2012. Statistika: Statistics and Economy Journal, 102 (4), pp. 454-470.

Saidane, M. (2022b). Switching latent factor value-at-risk models for conditionally heteroskedastic portfolios: A comparative approach. Communications in Statistics: Case Studies, Data Analysis and Applications, 8 (2), pp. 282-307.

Saidane, M. (2019). Forecasting Portfolio-Value-at-Risk with Mixed Factorial Hidden Markov Models. Croatian Operational Research Review, 10 (2), pp. 241-255.

Saidane, M. (2017). A Monte-Carlo-based Latent Factor Modeling Approach with Time-Varying Volatility for Value-at-Risk Estimation: Case of the Tunisian Foreign Exchange Market. Industrial Engineering & Management Systems, 16 (3), pp. 400-414.

Saidane, M., Lavergne, C. (2011). Can the GQARCH Latent Factor Model Improve the Prediction Performance of Multivariate Financial Time Series? American Journal of Mathematical and Management Sciences, 31 (1,2), pp. 73-116.

Saidane, M., and Lavergne, C. (2009). Optimal Prediction with Conditionally Heteroskedastic Factor Analysed Hidden Markov Models. Computational Economics, 34 (4), pp. 323-364.

Saidane, M., and Lavergne, C. (2008). An EM-Based Viterbi Approximation Algorithm for Mixed-State Latent Factor Models. Communications in Statistics - Theory and Methods, 37 (17), pp. 2795-2814.

Saidane, M., and Lavergne, C. (2007a). A structured variational learning approach for switching latent factor models. Advances in Statistical Analysis - AStA, 91 (3), pp 245-268.

Saidane, M., and Lavergne, C. (2007b). Conditionally heteroscedastic factorial HMMs for time series in finance. Applied Stochastic Models in Business and Industry, 23 (6), pp. 503-529.

Saidane, M., and Lavergne, C. (2006). On factorial HMMs for time series in finance. The Kyoto Economic Review, 75 (1), pp. 23-50.

Schwarz, G. (1978). Estimating the dimension of a model. Annals of Statistics, 6 (2), pp. 461-464.

Takeda, A. and Sugiyama, M. (2008). N-Support Vector Machine As Conditional Value-At- Risk Minimization. Proceedings of the 25-th International Conference on Machine Learning, pp. 1056-1063.

Troster, V., Tiwari, V, Shahbaz, M., and Macedo, D. N. (2019). Bitcoin Returns and Risk: A General GARCH and GAS Analysis. Finance Research Letters, 30 (6), pp. 187-193.

Trucios, C. (2019). Forecasting Bitcoin Risk Measures: A Robust Approach. International Journal of Forecasting, 35 (3), pp. 836-847.

Trucios, C., Tiwari, A. K., and Alqahtani, F. (2020). Value-at-risk and expected shortfall in cryptocurrencies’ portfolio: A vine copulabased approach. Applied Economics, 52 (24), pp. 2580-2593.

Yu, W., Yang, K., Wei, Y., and Lei, L. (2018). Measuring Value-at-Risk and Expected Shortfall of Crude Oil Portfolio Using Extreme Value Theory and Vine Copula. Physica A: Statistical Mechanics and Its Applications, 490 (C), pp.1423-1433.

*Statistics, Optimization & Information Computing*,

*12*(2), 463-487. https://doi.org/10.19139/soic-2310-5070-1837

- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).