
Econometrics
| m file | Description | |
| Datafiles1.zip | Data files for the codes. | Download |
| SyntaxML.pdf | The pdf file of the description how Maximum Likelihood works. | Download |
| Max_lik.m | Computes the maximum-likelihood estimates. | Download |
| test_ml.m | Estimates via ML the mean and std of a normal sample. | Download |
| test_ml2.m | Applies the code to S&P500 returns and computes moments under N assumption. | Download |
| test_ml3.m | Assumes that data is generated via a Student t | Download |
| Garch codes (requires the optimization toolbox as well as the Maximum Likelihood interface) | ||
| GARCH_n.m and MixRND.mat file |
Estimates a GARCH(1,1) under the normality assumption. | Download |
| GARCH_t.m and GB2RND.mat file |
Estimates a GARCH(1,1) under Student T assumption. | Download |
| GARCH_t_as.m | Estimates a GARCH(1,1) under Student T assumption but assuming Zakoian type volatility. | Download |
| test_mlmix1.m | Estimates mixtures of distribution parameter (code is unsophisticated). | Download |
| StkIdx.xls | Simulation of a GARCH process. | Download |
| getFTSE.m | Extracts out of Excel sheet FTSE index level data. | Download |
| Kalman filter codes (The following files are a MATLAB translation of Thierry Roncalli's Gauss codes) | ||
| Kalman_filter.m | Kalman filter codes. (The following files are a MATLAB translation of Thierry Roncalli's Gauss codes), A description of how this works is available on KalmanFilter.pdf. | Download |
| Kalman_Forecasting.m | Download | |
| Kalman_Simulation.m | Download | |
| Kalman_Smoothing.m | Download | |
| KALMAN2.m | Estimates a model with time varying parameters. | Download |
| KALMAN2Play.m | Applies the model to SP500 returns. | Download |
| KLocal.m | Analysis of Harveys' purse data. | Download |
| KLocalAR.m | Same date with AR process. | Download |
| GMM Codes | ||
| SyntaxGMM.pdf | A description how GMM works. | Download |
| GMM.m | . | Download |
| TestGMM.m | . | Download |
| Other useful (?) codes | ||
| SimExpJump | Simulates a process with exponential jumps. Model as in Chacko-Viceira (JoEconometrics2003,p.274/275). | Download |
| SimJumpDiff | Simulates the diffusion with positive and negative jumps. | Download |
| TestSimJumpDiff | Puts everything to test, simulates stock price with jumps and plot the result. | Download |
| ExistSkKu.m | Traces skewness and kurtosis for increasing samples. | Download |
| TempAgreg.m | Investigation how the various moments evolve as one aggregates along temporal dimension. | Download |
| Studentize.m | Studentizes returns (takes out the mean and divides data by standard deviation). | Download |
| get_Var_emp.m | Compute the empirical VaR and CVaR (expected shortfall) at a given probability level (Choose side of density). Returns two arguments. | Download |
| Testget_var_emp.m | Test the get_Var_emp.m with normal distributed random numbers. | Download |
| CDFBVNorm.m | Computes the Pr[X < a, Y < b] when X and Y are normally dist. with N(0,1) and correlation rho. | Download |
| pearsonIV_moments.m | Returns the skewness and kurtosis of a pearson type IV distribution as per a set of the distribution Parameters. | Download |
| ShapeExponential.m | Plot Shape of exponential density and of associated CDF. | Download |
| Codes related to the Skewed Student t of Hansen (1994) | ||
| skt.pdf | The following page reminds some useful results concerning the Skewed Student-t, First proposed by Bruce Hansen 1994. | Download |
| GTdens.m | Constructs Hansen's generalized Student t. | Download |
| TestGTDens.m | Constructs and plot the Generalized Student t over a given support. | Download |
| SkTDens.m | Constructs Hansen's generalized Student t. | Download |
| SkTCDF.m and TestSkTCDF.m |
Implements, tests the CDF of the Skewed student. | Download |
| Download | ||
| SkTCDFInv.m and TestSkTCDFInv.m |
Implements, tests the CDF of the Skewed student. | Download |
| Download | ||
| SkTDensM.m | Returns the value of the Skewed-Student T of Hansen in a multivariate contaxt. | Download |
| SkTSim.m and TestSkTSim.m |
Simulates deviates from the Skewed Student T dencity. | Download |
| Download | ||
| SkTtheo_mom.m | Indicates for given parameters the skewness and kurtosis of the Sk-t. | Download |
| SkTnum_mom.m | Computes for actual data the moments. | Download |
| SkT_FS_CDF.m | The CDF of skewed student t, Fernandez-Steel version. | Download |
| SkT_FS_CDFInv.m | Inverse cdf of skewed student t, Fernandez-Steel version. | Download |
| SkT_FS_Dens.m | Density of skewed student t, Fernandez-Steel version. | Download |
| SkT_FS_Sim.m | Simulation along skewed student t, Fernandez-Steel version. | Download |
| SkT_FS_theo_mom.m | Theoretical moments, Fernandez-Steel version. | Download |
| Gevcdf.m | Returns the cdf of the General Extreme Value distribution. | Download |
| Gevpdf.m | Returns the pdf of the General Extreme Value distribution. | Download |
| MLgev.m | Returns the Log Likelihood function of the General Extreme Value distribution. | Download |
| GPDcdf.m | Returns the cdf of the General Pareto distribution. | Download |
| GPDpdf.m | Returns the pdf of the General Pareto distribution. | Download |
| MLGPD.m | Returns the Log Likelihood function of the General Pareto Distribution. | Download |