Yeo-Johnson transform & objective Bayes inference for stock returns with volatility factor

0. First Remarks. We need to use the Yeo-Johnson transform, not the Box-Cox transform to make data normal, since we need to ensure data can be both positive and negative. When we run modified random walk and autoregression simulations, we can always get outside of set bounds where the inverse Box-Cox transform is defined. We succeeded in this. And we can run simulations of such transformed volatility, and transform it back using the inverse Yeo-Johnson transform, no problem.

First, we must transform log volatility, then fit the autoregression. We should not first fit the autoregression for log volatility, then transform the residuals. This would give us IID Gaussian data, but will not allow us to make objective Bayes inference for linear regression. Transforming the original data first allows us to simulate regression coefficients and standard errors.

The code and data are given in this new GitHub repository.

1. Simulation Description. We fit a one-factor model for stock returns (nominal, total, geometric) for three asset classes:

  • US stocks (domestic, measured by S&P 500)
  • International developed markets (measured by 88% MSCI EAFE + 12% MSCI Canada)
  • International emerging markets (measured by MSCI EM)

Of course, for the latter two, we have less data: 1927-2025 for US stocks, 1970-2025 for developed, and 1988-2025 for emerging. Therefore, we expect Bayesian inference to make a difference. For each of 3 classes, we have two choices:

  • Keep volatility original, as is
  • Apply the Yeo-Johnson transform

We apply three modes of statistical inference, following this blog post:

  • Classic (frequentist, with point estimates for the covariance matrix of innovations and regression coefficients)
  • Bayesian lite (fixed covariance matrix for innovations, objective Bayes posterior for regression coefficients)
  • Bayesian full (fixed correlation matrix for innovations, objective Bayes posterior for standard errors and regression coefficients)

For each of the 18 experiments, we run 10000 Monte Carlo simulations for 20 years. We return 10 results:

  • For average returns over 20 years, mean, stdev, and percentiles 10, 30, 50 (=median), 70, and 90.
  • For 3%, 4%, 5% withdrawal rules with 4% annual arithmetic increase to adjust for inflation, the ruin probability.

2. Conclusion. We do not see much difference in ruin probability. But a lot of difference in lower quantiles and in the median. However, not much difference between Bayesian-lite and Bayesian-full. Therefore, later we simply consider Bayesian-lite mode as an alternative to the frequentist approach.

Why do we need to simulate the objective Bayes posterior for the standard error? Instead, we can simply treat it as fixed, using the point estimate (in the same way as we do for the correlation matrix)? It is much easier to simulate only regression coefficients using the objective Bayes posterior. The latter coincides with classic frequentist confidence regions and intervals. Equivalent to fixed correlation matrix and standard errors is fixed covariance matrix.

3. Tables of results. Here we have complete tables which corroborate the conclusion in Section 2.

American stocks without and with the Yeo-Johnson transformation of log volatility, in %.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average9.209.059.059.008.728.71
Stdev4.295.235.264.856.456.44
Median9.549.639.659.569.589.62
10%3.532.542.362.971.641.47
30%7.306.937.017.146.756.78
70%11.6211.9911.9611.7212.0412.00
90%14.2915.0215.1114.7915.1615.19
3% ruin161919182121
4% ruin252827262928
5% ruin353737363737

Developed stocks without and with the Yeo-Johnson transformation of log volatility, in %.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average6.846.606.636.506.006.04
Stdev5.647.427.396.569.529.40
Median7.367.617.557.417.547.52
10%-0.57-2.53-2.71-1.64-4.13-4.26
30%4.333.833.864.083.463.53
70%10.0810.7410.7910.2110.8710.93
90%13.5814.8414.8513.7414.9815.01
3% ruin343636353637
4% ruin494545454545
5% ruin555353545253

Emerging stocks without and with the Yeo-Johnson transformation of log volatility, in %.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average8.558.298.338.217.697.75
Stdev7.089.899.868.0412.3111.61
Median9.159.349.349.189.359.31
10%-0.72-3.82-4.27-1.74-5.26-5.97
30%5.464.474.425.184.164.13
70%12.5813.6713.8012.7013.7813.85
90%16.9719.3319.7217.1319.5119.83
3% ruin323535673636
4% ruin414242594242
5% ruin484848484748

4. Verification. The content of this section is taken from the file vol-transform.py The transformed log volatility  \tilde{V}(t) is Gaussian, unlike the log volatility  \ln V(t) before the transformation. The  \lambda = -0.59 is the parameter for the transformation.

Below we see the quantile-quantile plot of autoregression residuals  W(t). The regression fit is  \tilde{V}(t) = 0.34 + 0.60\tilde{V}(t-1) + W(t) with Shapiro-Wilk and Jarque-Bera normality tests for  W(t) give us  p = 33\% and  p = 97\%, respectively.

And we see the autocorrelation function for original and absolute values of autoregression innovations. We see that they are well modeled by IID Gaussian random variables.

5. Updates. Apologies, I absolutely forgot that series of the two innovations also need to be correlated. All this was done for two independent series of residuals. But we still benefited from it, since we made this mistake for both original and transformed data; and for classic vs Bayesian. We need to include covariance matrix of innovations, for both classic and Bayesian versions.

Below we provide the three tables for domestic, developed, emerging stocks. Compare them with Section 3.

US stocks, measured by S&P 500, with correlated innovations.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average8.17.87.97.77.27.1
Stdev4.75.75.75.67.58.6
Median8.68.68.68.58.48.5
10%2.00.50.70.7-1.1-0.9
30%6.15.65.75.75.15.3
70%10.811.111.110.811.111.1
90%13.814.414.413.914.414.4
3% ruin232625252827
4% ruin333534353736
5% ruin434444444545

Developed international markets, measured by 88% MSCI EAFE + 12% MSCI Canada, with correlated innovations.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average6.15.65.65.64.84.6
Stdev6.17.98.27.210.316.4
Median6.76.86.76.66.76.7
10%-1.9-4.5-4.6-3.5-6.6-6.4
30%3.42.72.73.02.22.4
70%9.610.210.29.710.310.2
90%13.314.414.513.514.414.6
3% survival394040404141
4% survival494949495049
5% survival585857585757

Emerging markets, measured by MSCI EM, with correlated innovations.

StatisticFrequentist OriginalBayesian-lite OriginalBayesian-full OriginalFrequentist TransformedBayesian-lite TransformedBayesian-full Transformed
Average6.69.056.15.95.14.9
Stdev8.05.2311.09.413.719.3
Median7.39.637.67.37.47.4
10%-3.8-7.8-7.8-5.8-10.0-9.8
30%3.22.01.92.61.41.6
70%11.212.612.411.312.212.3
90%16.118.118.216.318.218.4
3% ruin414342424344
4% ruin495049505050
5% ruin565555565556

We see that making residuals correlated makes values at risk for 10% and 30$ even more biased downward, especially for the international markets, where we have less data. Doesn’t it contradict the diversification principle, which states we need to ivnest even in riskier assets, when they are not well correlated with the benchmark? Turns out if there is not enough observations for these risky assets, then this uncertainty in parameter estimates outweighs the variance reduction.

Published by


Responses

  1. Final Changes to the Financial Simulator with Gaussian Noise – My Finance

    […] Update: we need Yeo-Johnson transform because Box-Cox is valid only for positive values. In this new post, we discussed that Yeo-Johnson transform works for log volatility values, and enables usto apply […]

    Like

  2. The Box-Cox transform and its use for financial data – My Finance

    […] 7. Update: The Yeo-Johnson transform. Unfortunately, I found that the Box-Cox transform does not really work since it requires positive data and positive output. But when we run random processes on the image space, we might easily get into the negative half-line. And then we shall transform them back into the original values! This does not work for the Box-Cox transforms. But it works for the Yeo-Johnson transforms of log volatility: It has Gaussian IID innovations for its autoregression of order 1. […]

    Like

  3. Bayesian-lite Simulator – My Finance

    […] transformed the volatility using the Yeo-Johnson transform. We used the simplest […]

    Like

  4. Yeo-Johnson transform for monthly average VIX – My Finance

    […] it is time to apply our new tool, the Yeo-Johnson transform, to monthly average CBOE VIX 1986-2025 as opposed to annual volatility. We discussed such […]

    Like

  5. Rates and Spreads with Yeo-Johnson and Volatility – My Finance

    […] six spreads (with extended and updated data, using autoregression and annual volatility) with our new tool, the Yeo-Johnson transform. To be […]

    Like

  6. Current Simulation Version – My Finance

    […] Yeo-Johnson transform of log volatility with index -0.5 modeled as autoregression with lag 1 […]

    Like

Leave a Reply