/Normality-Test-Jarque-Bera

Introduction to statistical tests

Primary LanguagePython

Normality-Test-Jarque-Bera

Introduction to statistical tests

With the following code we can create simulated Returns, by means of the "random" code we can generate different types of variables, such as:

  • Normal
  • Exponential
  • Student
  • Chi-squere

As a basis we will take a sample with 1,000,000 simulated returns, 2 degrees of freedom. All this to be able to carry out an adequate Normality Test, but it does not necessarily have to be that number of observations or degrees of freedom. To perform the Jarque-Bera Normality Test, we must obtain some Statistical Indicators or Metric Risk, such as:

  • Mean
  • Standard deviation
  • Skewness
  • Kurtosis
  • VaR
  • p_value
  • Jarque Bera

And with this we can perform its Normality Test, where the result of each of these indicators can be viewed in the Spyder IDE Console, along with the Viewing of their respective Histogram. We will even be able to visualize the Arrays of the observations in the "Variables Explorer", where we will be able to see a million simulations. It should be clarified that since it is a Million of Simulated Returns, the simulation will stop until it finds a series of returns that are NOT Normal.

First

Practice elaborated in: Seminario Finanzas Cuantitativas - Facultad de Ciencias UNAM