[mug shot]

Iskander Karibzhanov

Office: 3-161 Hanson Hall
Phone: 612-625-3923
E-mail: karib003@umn.edu

Department of Economics
University of Minnesota
1925 S 4TH ST STE 4-101
Minneapolis, MN 55455-0407

I'm a third year Ph.D. student in the Department of Economics at University of Minnesota.
I'm interested in macroeconomics, international trade, computational finance and econometrics.
My CV can be downloaded here.

This is a listing of some of my programs for working with dynamic stochastic general equilibrium models written in Fortran and C language (with MEX interface to MATLAB).


A Fortran toolkit for analyzing nonlinear economic dynamic models

  • checks analytic log-linearization vs numerical
  • solves DSGE models using QZ decomposition
  • computes log-likelihood using Kalman Filter
  • performs maximum likelihood estimation
Download source code and binaries for Windows and Linux: toolkit.zip
Download presentation: toolkit.pdf

The example in the toolkit program was based on Ellen McGrattan's paper "Business Cycle Accounting".


The Kalman Filter

The Kalman filter is one of the computational techniques used by applied economists necessary to implement Bayesian methods when doing empirical work. It provides a tool for dealing with state space models to analyze economic and financial time series of not only correlated its past values but also contemporaneously correlated each other and each other's past values. You can develop a model of the univariate or multivariate time series and the relationships between the vector time series. The program computes the one-step prediction and the filtered estimate, as well as their covariance matrices. The function uses forward recursions, and you can also use it to obtain k-step forecasts.
Overview of Kalman Filter Functions
Getting Started with State Space Models
KALCVF performs covariance filtering and prediction
KALCVS performs fixed-interval smoothing
Kalman Filtering Example 1: Likelihood Function Evaluation
Kalman Filtering Example 2: Estimating an SSM Using the EM Algorithm
Download compiled mex-programs: kalcvf.mexw32 (for Windows) or kalcvf.mexglx (for Linux)
(kalcvs function is presently available only in the form of M-file - see below)
Download translated Kalman examples in MATLAB's M scripts: kalex1.m and kalex2.m
Download original Kalman examples in SAS/IML language: kalex1.sas and kalex2.sas
Download C source codes of MEX-files: kalcvf.c and kalcvs.c
Download MS Visual Studio 2008 project file: mex.zip
NOTE: you will need C source codes in case compiled MEX-files do not run on your computer.
To compile use "mex filename.c" on Linux or "mex filename.c $MATLAB\extern\lib\win32\$CC\libmwlapack.lib" on PC, where $MATLAB denotes your MATLAB installation directory (e.g. C:\MATLAB6p5 or C:\MATLAB6p1) and $CC denotes your C compiler chosen after running "mex -setup" (e.g. lcc, microsoft\msvc60, borland, etc.).
Download M analogies of MEX-files: kalcvf.m and kalcvs.m
NOTE: these M functions work as described, but are inefficient since written in MATLAB language and not intended for production purposes. They do not necessarily replicate the exact algorithm of MEX files.


Solving Linear Rational Expectations Models

C implementation of Chris Sims' solution algorithm for Linear Rational Expectations Models.
The program is based on the Intel Math Kernel Library which provides routines for a complex QZ (generalized Schur) decomposition. (Note: the LAPACK ZGGES routine has advantage over MATLAB's qz built-in function by giving possibility of ordering the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper triangular complex output matrices. Therefore, the algorithm of qzdiv.m and qzswitch.m functions was not neccessary to write gensys program.)
The program analyzes linear rational expectations systems and returns solutions for their dependence on exogenous disturbances. The systems need not have non-singular lead matrices (coefficients on current variables in discrete time) and they need not be well-specified. The program analyzes them to determine whether solutions exist and whether they are unique. It returns a solution even when it is not unique, and it returns a solution that constrains exogenous variable behavior when no solution that does not do so exists. Only discrete time program is currently available.
View manual UsingGensys.pdf
Download program gensys.mexw32
Download source code gensys.c
Download MS Visual Studio 2008 project file: mex.zip

Unconstrained Minimization Algorithm

C implementation of Chris Sims' robust optimization algorithm commonly used to maximize likelihood function.
The program is based on a gradient quasi-Newton method with BFGS update of the estimated inverse Hessian. It is robust against certain pathologies common on likelihood functions and attempts to be robust against "cliffs", i.e. hyperplane discontinuities, though it is not really clear whether what it does in such cases succeeds reliably. If no analytic gradient is supplied, the program uses crude numerical derivative. Beware of this or any other numerical derivative on large or ill-conditioned problems. The algorithm tries random search directions if things look bad and will not get stuck at a flat spot in the sum of deviations objective function that is not a solution.
Download program csminwel.mexw32
Download source code csminwel.c
Download MS Visual Studio 2008 project file: mex.zip

Options Calculators

These European/American and barrier option pricing calculators use enhanced binomial and adaptive mesh methods described in the paper by Figlewski & Gao..
To improve precision increase the number of time steps and/or AMM level.

Download American/European Options Calculator and C source codes
Download Barrier Options Calculator and C source codes