# Select our confidence interval (I'll choose 95% here)conf_level1 =0.05# Using SciPy ppf method to generate values for the# inverse cumulative distribution function to a normal distribution# Plugging in the mean, standard deviation of our portfolio# as calculated above# https://docs.scipy.or...
in the main function. The functions in the fileBinomialTestare used at the end to determine the statistical significance of the test by generating a binomial proportion confidence interval and checking whether or not the number of exceedances fall within this confidence interval. A two-tailed p-...
In this case Z0.95 = 1.645. Other common confidence levels used are 90% and 99%. Corresponding z values are given below for convenient reference: Confidence levelz 90% 1.282 95% 1.645 99% 2.326 Example: Given one-year monthly data of AMZN, TSLA and AAPL within the time interval of 11/...