While we would like to predict exact values, the information available, being incomplete, is rarely sufficient - usually allowing only conditional probability distributions to be predicted. This article discusses hierarchical correlation reconstruction (HCR) methodology for such a prediction using the example of bid-ask spreads (usually unavailable), but here predicted from more accessible data like closing price, volume, high/low price and returns. Using HCR methodology, as in copula theory, we first normalized marginal distributions so that they were nearly uniform. Then we modelled joint densities as linear combinations of orthonormal polynomials, obtaining their decomposition into mixed moments. Then we modelled each moment of the predicted variable separately as a linear combination of mixed moments of known variables using least squares linear regression. By combining these predicted moments, we obtained the predicted density as a polynomial, for which we can e.g. calculate the expected value, but also the variance to determine the uncertainty of the prediction, or we can use the entire distribution for, e.g. more accurate further calculations or generating random values. 10-fold cross-validation log-likelihood tests were conducted for 22 DAX companies, leading to very accurate predictions, especially when individual models were used for each company, as significant differences were found between their behaviours. An additional advantage of using this methodology is that it is computationally inexpensive; estimating and evaluating a model with hundreds of parameters and thousands of data points by means of this methodology takes only a second on a computer.

machine learning, conditional distribution, bid-ask spread, liquidity

C49, C58, G15

ABDI, F., RANALDO, A., (2017). A simple estimation of bid-ask spreads from daily close, high, and low prices. The Review of Financial Studies 30(12), pp. 4437–4480

AMIHUD, Y., (2002). Illiquidity and stock returns: cross-section and time-series effects. Journal of Financial Markets 5(1), pp. 31–56

ARMITAGE, S, BRZESZCZYN´ SKI, J., SERDYUK, A., (2014). Liquidity measures and cost of trading in an illiquid market. Journal of Emerging Market Finance 13(2), pp. 155– 196

BE¸DOWSKA-SO´ JKA, B., ECHAUST, K., (2019). Commonality in Liquidity Indices: The Emerging European Stock Markets. Systems 7(2), pp. 7–24

BESSEMBINDER, H., (2003). Issues in assessing trade execution costs. Journal of Financial Markets 6(3), pp. 233–257

BUTLER, A. W., GRULLON, G., WESTON, J. P., (2005). Stock market liquidity and the cost of issuing equity. Journal of Financial and Quantitative Analysis 40(2), pp. 331–348

CHAN, L. K., LAKONISHOK, J., (1993). Institutional trades and intraday stock price behavior. Journal of Financial Economics 33(2), pp. 173–199

CHEN, X., LINTON, O., YI, Y., (2017). Semiparametric identification of the bid–ask spread in extended Roll models. Journal of Econometrics 200(2), pp. 312–325

CHRISTIE, W. G., SCHULTZ, P. H., (1994). Why do NASDAQ market makers avoid oddeighth quotes? The Journal of Finance 49(5), pp. 1813–1840

CORWIN, S. A., SCHULTZ, P., (2012). A simple way to estimate bid-ask spreads from daily high and low prices. The Journal of Finance 67(2), pp. 719–760

DUDA, J., (2018). Exploiting statistical dependencies of time series with hierarchical correlation reconstruction. arXiv preprint arXiv:180704119

DUDA, J., (2019). Parametric context adaptive Laplace distribution for multimedia compression. arXiv preprint arXiv:190603238

DUDA, J., SZULC, A., (2018). Credibility evaluation of income data with hierarchical correlation reconstruction. arXiv preprint arXiv:181208040

DUDA, J., SYREK, R., GURGUL, H., (2019). Modelling bid-ask spread conditional distributions using hierarchical correlation reconstruction. arXiv preprint arXiv:191102361

FONG, K. Y., HOLDEN, C. W., TRZCINKA, C. A., (2017). What are the best liquidity proxies for global research? Review of Finance 21(4), pp. 1355–1401

GAJEWSKI, J. F., GRESSE, C., (2007). Centralised order books versus hybrid order books: A paired comparison of trading costs on NSC (Euronext Paris) and SETS (London Stock Exchange). Journal of Banking & Finance 31(9), pp. 2906–2924

GURGUL, H., MACHNO, A., (2016). Modeling dependence structure among European markets and among Asian-Pacific markets: a regime switching regular vine copula approach. Central European Journal of Operations Research 24(3), pp. 763–786

GURGUL, H., MACHNO, A., (2017). The impact of asynchronous trading on Epps effect onWarsaw Stock Exchange. Central European Journal of Operations Research 25(2), pp. 287–301

GURGUL, H., SYREK, R., (2019). Dependence Structure of Volatility and Illiquidity on Vienna and Warsaw Stock Exchanges. Finance a Uver: Czech Journal of Economics & Finance 69(3), pp. 298–321

HANSCH, O., NAIK, N. Y., VISWANATHAN, S., (1999). Preferencing, internalization, best execution, and dealer profits. The Journal of Finance 54(5), pp. 1799–1828

HUANG, R. D., STOLL, H. R., (1996). Dealer versus auction markets: A paired comparison of execution costs on NASDAQ and the NYSE. Journal of Financial Economics 41(3), pp. 313–357

LESMOND, D. A., OGDEN, J. P., TRZCINKA, C. A., (1999). A new estimate of transaction costs. The Review of Financial Studies 12(5), pp. 1113–1141

MESTEL, R., MURG, M., THEISSEN, E., (2018). Algorithmic trading and liquidity: Long term evidence from Austria. Finance Research Letters 26, pp. 198–203

NAIK, N. Y., YADAV, P. K., (2003). Trading costs of public investors with obligatory and voluntary market-making: Evidence from market reforms. In: EFA 2003 Annual Conference Paper, 408

REISS, P. C., WERNER, I. M., (1996). Transaction costs in dealer markets: Evidence from the London Stock Exchange. In: The Industrial Organization and Regulation of the Securities Industry, University of Chicago Press

ROLL, R., (1984). A simple implicit measure of the effective bid-ask spread in an efficient market. The Journal of Finance 39(4), pp. 1127–1139

STOLL, H. R., (2000) Presidential address: friction. The Journal of Finance 55(4), pp. 1479–1514

Copyright © 2019 Statistics Poland