Some Useful Resources

Here I provide codes to simulate some popular Dynamic Stochastic General Equilibrium models using the package Dynare, codes to estimate some econometric and financial models using the software R, as well as links to some free databases, statistical packages, and working paper archives.

1. Macroeconomics Using Dynare


Real Business Cycle (RBC) Models

  • The Basic RBC model (Cooley and Prescott, 1995), text file 
  • The Indivisible Labor model (Hansen,1985), text file 
  • The Time to Build model (Kydland and Prescott, 1982), text file 
  • The Investment-Specific Technological Change (Greenwood et al, 2000), text file
  • The Household Production Model (Benhabib et al, 1991, Greenwooed et al, 1995) text file1, text file 2
  • The Household Production and Human Capital Accumulation Model, text file

Monetary Business Cycle Models 

  • The Inflation Tax model (Cooley and Hansen, 1998),  text file
  • The Endogenous Money RBC model (Gavin and Kydland, 1999), text file
  • The Inflation and Tax Code model (Gavin, Kydland, and Pakko, 2007), text file
  • The Sticky Price model with Rigity a la Calvo (Amano, Ambler, and Rebei, 2007), text file
  • The Financial Accelerator model (Bernanke, 1999), text file
Other codes are available on Dynare's website [here] and on Johannes Pfeifer's website [here].

2. Econometrics Using R


Descriptive Statistics 

  • Gini Inequality Index and Lorenzo Curve, Text file
  • Summary Statistics (skewness, kurtosis, Jarque-Bera, Mahalanobis distance, leverage score) and growth rate, Text file

Least Squares Regression

  • Autocorrelation: Durbin-Watson and Breusch-Godfrey tests, Cochrane-Orcutt Transormation, and Hildreth-Lu estimation, text file
  • Autocorrelation: Estimating a model transformed using either the Prais-Winsten or the Cochrane-Orcutt transformation, text file
  • Heteroskedasticity: Breusch-Pagan test for autoregressive conditional heteroskedasticity effect and White test, text file
  • Heteroskedasticity: White's robust estimator of the standard errors for OLS, text file  
  • Linear Restrictions: Fisher, Wald, Lagrange multiplier, and likelihood ratio tests, text file  
  • Panel Data Analysis:  Pooled regression, fixed effects method (LSDV, within group), and random effects method (between group and Estimated GLS), text file

Time Series Analysis

  • Error Correction Model: Estimation of an Engle-Granger cointegrating relation, unit root and Durbin-Watson tests on its residuals, and estimation the error correction model, text file  
  • Exponential autoregressive  (or amplitude-dependent) model estimation, text file
  • Forecasting: Mean absolute  prediction error, mean squared absolute error, Their coefficient, and F-test , text file
  • Markov Switching Model (First-order): Estimation of a state-dependent univariate normal model, text file 
  • Markov Switching Model (Second-order): Estimation of a state-dependent univariate normal model, text file
  • Markov Chain (First- and second-order), Estimation of the transition probability matrix and the stationary distribution, text file
  • Markov Switching Model (First-order): Estimation of a state-dependent multivariate normal  (or a linear) model, text file
  • Markov Switching Model (Second-order): Estimation of a state-dependent multivariate normal  (or a linear) model, text file
  • Portmanteau test: Diagnostic checking on the residuals of a time series regression (autocorrelation, heteroskedasticity, Box-Pierce,and Ljung-Box tests), text file   
  • Volatility clustering: Estimation of an autoregressive conditional heteroskedasticity (ARCH) process, text file 1, text file 2
  • Volatility clustering: Estimation of a generalized autoregressive conditional heteroskedasticity (GARCH) process, text file 1,text file 2 
  • Volatility clustering: Estimation of a Glosten-Jagannathan-Runkle generalized autoregressive conditional heteroskedasticity (GJR-GARCH), text file  
  • Volatility clustering: Estimation of a quadratic generalized autoregressive conditional heteroskedasticity (QGARCH), text file    
  • Volatility clustering: Estimation of a threshold generalized autoregressive conditional heteroskedasticity (TGARCH), text file 
A large number of packages to estimate various econometric models using R are available on the econometrics tak view. Some codes to estimate models using the software Eviews, Stata, and R are available on the blog, Econometrics Beat, of Dave Giles,

3. Finance Using R

  • Black-Scholes-Merton, , European option pricing, text file
  • Black-Scholes-Merton, Probability to exercise a european call option, text file
  • Black-Scholes-Merton, , European option, Greek letters and hedging, text file
  • Monte Carlo simulation of option price, text file  
  • CAPM, Henriksson and Merton (1981), market timing measure, text file
  • CAPM, Treynor-Mazuy (1966) market timing measure, text file
  • Sharpe (1992) Model, text file

4. Databases 

Canada 
European Union
  • European Commission- Eurostat 
  • Organisation for Economic Cooperation and Development- Statistics
United Kingdom
  • Office for National Statistics (ONS)
United States
West Africa
World Data

5. Free Statistical Software

See a list of the top software here

6. Working Paper and Lecture Archives 


7. Jobs and Networking


References  

Amano, R,  S Ambler, and N  Rebei (2007) The Macroeconomic Effects of Nonzero Trend Inflation, Journal of Money, Credit and Banking, 39(7), pp 1831-38.
Benhabib, J, R Rogerson, and R Wright (1991) Homework in Macroeconomics: Household Production and  Aggregate Fluctuations, Journal of Political Economy, 99(6), pp1166-1187 [pdf].
Bernanke, B, S and R Gertler, and S Gilchrist (1999) The Financial Accelerator in a Quantitative Business Cycle Framework, Handbook of Macroeconomics, 1, 1341-93 [pdf].
Cooley, T F and E C Prescott (1995) Economic Growth and Business Cycles, Frontiers of Business Cycle Research, chapter 1, pp 1-38,
Cooley, T F and G D Hansen (1998) The Role of Monetary Shocks in Equilibrium Business Cycle Theory, European Economic Review, vol 42, pp 605-17 [pdf].
Einarsson, T and M H Marquis (1997) Home Production and Endogenous Growth, Journal of Monetary Economics, vol 39, pp 551-69.
Gavin, W T and F E Kydland (1999) Endogenous Money Supply and the Business Cycle, Review of Economic Dynamics, vol 2, pp 347-69 [pdf].
Gavin, W T, F E Kydland, and M R Pakko (2007) Monetary Policy, Taxes, and the Business Cycle, vol 54, pp 1587-611 [pdf].
Glosten, L R and R Jagannathan and D E Runkle (1993) On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks, The Journal of Finance, Vol. 48, No. 5 (Dec., 1993), pp. 1779-180, [pdf]
Greenwood, J, Z Hercovitz,  P Krusell (2000) The  Role of Investment-Specific Technological Change in the Business Cycle, The American Economic Review, 44(1), pp 91-115 [pdf].
Greenwood, H, R Rogerson, and R Wright (1995) Household Production in the Business Cycle Theory, Frontiers of Business Cycle Research, pp 157-74.
Haggan, V., and T. Ozaki (1981): “Modelling nonlinear random vibrations using an amplitude-dependent autoregressive time series model,” Biometrika, 68(1), 189–196 [pdf].
Hansen, G D (1985) Indivisible Labor and the Business Cycle, Journal of Monetary Economics, vol 16(3), pp 309-327 [pdf].
Henriksson, R D and R C Merton (1981) On Market Timing and Investment Performance. IL. Statistical Procedures for Evaluating Forecasting Skills, Journal of Business, vol. 54, no. 4 [pdf].
Kydland , F E and E C Prescott (1982) Time to Build and Aggregate Fluctuations, Econometrica,  vol 50(6), pp 1345-70 [pdf].
Sharpe, W F (1992) Asset allocation: Management style and performance measurement, Journal of portfolio Management, vol 18(2), pp 7-19 [pdf]
Treynor, J. and Mazuy, K. (1966) Can Mutual Funds Outguess the Market? Harvard Business Review, 44, 131-136 [pdf].