Monte Carlo Simulations for Gaussian White Noise

This is Monte Carlo simulation to find critical values of the L1 version of the Ljung-Box test. I was too lazy to look for the official L2 norm for ACF using the classic Ljung-Box test. I simply decided to simulate.

Consider a sample of 100 standard normal random variables  Z(1), \ldots, Z(100).

Compute the empirical autocorrelation function with lag  \hat{\rho}(k) which is an empirical correlation of  Z(1), \ldots, Z(100-k) and  Z(k+1), \ldots, Z(100). Do this for  k = 1, \ldots, 5. Then compute the L1 norm  \sum_{k=1}^5|\hat{\rho}(k)|.

Do the same for  |Z(1)|,\ldots, |Z(100)| instead of  Z(1), \ldots, Z(100).

Finally, compute empirical mean  \overline{Z} := \frac1{100}\sum_{k=1}^{100}Z(k) and the empirical centered moments of order  m:

 \mathcal M(m) := \frac1{100}\sum_{k=1}^{100}(Z(k) - \overline{Z})^m

Then the empirical skewness is  \mathcal M(3)/\mathcal M(2)^{3/2} and the empirical kurtosis is  \mathcal M(4)/\mathcal M(2)^{2} - 3.

We create 1 million simulations of this 100 i.i.d. Gaussian variables. We compute values corresponding to 95% and 99% percentiles of simulated data for 100 IID standard normal (a million simulations). We get the following table (skewness is taken with absolute value, disregarding the sign). See https://github.com/asarantsev/4rates

Function95% percentile99% percentile
Skewness0.470.63
Excess Kurtosis (normal = 0)0.761.38
L1 norm for ACF (both), 5 lags0.630.76

Added on June 5, 2025: If we make 100 000 simulation of only 50 i.i.d. Gaussian variables (instead of 100, simply changing this number in the code), we have:

Function95 percentile99 percentile
Skewness0.6430.878
Excess Kurtosis (normal = 0)0.9771.859
L1 norm for ACF (5 lags), original0.8821.079
L1 norm for ACF (5 lags), absolute0.8771.073

We also simulate skew normal variables with skewness parameter 3. Obviously, the true skewness and excess kurtosis will not be equal to zero any more. But we can still take percentiles for the empirical kurtosis and for these L1 norms for ACF, applied to original values of these variables and to absolute values of these variables. We take only 10000 simulations. For sample of size 100/50, we get:

Function95 percentile99 percentile
Excess Kurtosis (normal = 0)1.92/2.083.37/3.92
L1 norm for ACF (5 lags), both0.63/0.870.75/1.06

This is done in the file skewsim.py in the same GitHub repository.

Published by


Responses

  1. Growth/Volatility vs Spreads – My Finance

    […] absolute values. All these 12 numbers are less than 0.6, which is less than the 95% critical value; see Monte Carlo simulations. The following table shows skewness, kurtosis, and the results of Shapiro-Wilk and Jarque-Bera […]

    Like

  2. Vector autoregression with volatility for two spreads – My Finance

    […] and for their absolute values: Yes, we can model as independent identically distributed. Same is shown by the L1 norms. But the quantile-quantile plots clearly say these are not Gaussian. Similarly, the Shapiro-Wilk […]

    Like

  3. Four bond rates from 1927 – My Finance

    […] items 1, 2, 6, 7, we use the Monte Carlo simulations giving us 95% and 99% percentiles. This allows us to make normality tests and white noise […]

    Like

  4. Stock Returns vs Earnings Yield and Two Spreads – My Finance

    […] L1 norm for the autocorrelation function and comparing with this simulation, we get values which lie between 0.4 and 0.5 for and between 0.6 and 0.7 for , which are within […]

    Like

  5. Earnings Yield, 3 Bond Spreads, Annual Returns – My Finance

    […] the critical values for the L1 version of the Ljung-Box white noise test. Comparing them with our values here, we confirm we fail to […]

    Like

  6. To Do List – My Finance

    […] distribution. All normality tests fail, and the autocorrelation function L1 norm for first 5 lags are not compatible with IID assumption. See the GitHub/asarantsev repository Inflation-Modeling-1928-2024 for data and […]

    Like

  7. Does the new valuation measure need volatility? – My Finance

    […] for nominal or real version of earnings. We discuss which has the best innovations, according to the L1 norm of the autocorrelation function. We consider various averaging windows from 1 to […]

    Like

  8. New Simulator – My Finance

    […] five series of residuals are well-modeled by independent identically distributed random variables, judging by Monte Carlo simulation. Unfortunately, they are not normal. Namely, and (the innovations for factor autoregressions) are […]

    Like

  9. Updated Simulator for Rate and Volatility – My Finance

    […] five series of residuals are well-modeled by independent identically distributed random variables, judging by Monte Carlo simulation. I present the autocorrelation plots for them and their absolute values in a separate blog […]

    Like

Leave a reply to To Do List – My Finance Cancel reply