Paul Söderlind's Software Page
MatLab and Octave
- My MatLab/Octave scripts
- My MatLab/Octave tutorial (zip file) which demonstrates
how to use some of the most useful commands. (Updated May 2014)
- Mathworks is selling a
student version of MatLab
- Octave is a nice (and free) MatLab substitute.
It uses the same syntax and has most of the MatLab commands (except for the latest ones).
You can download Windows binaries here (scroll down to Windows installers).
As of April 2013, version 3.6.4 (MinGW) works fine for me. If you install this, then I recommend to use the
gnuplot graphics engine (apply the command "graphics_toolkit('gnuplot')"), since this saves plots ("print")
without the strange effects generated by other graphics engines. Also, to load, for instance, the optim package, make sure to
download/install the file with all packages and then execute the command "pkg rebuild -auto optim" and restart Octave and
(to be on the safe side) execute "pkg load optim". The statistics package contains
many useful functions for doing empirical economics/finance.
- Links to
Statistics/Econometrics Toolboxes for MatLab and Octave (some are free).
In particular, check out
James P. LeSage's Econometrics toolbox
- Link to on-line MatLab tutorials:
Wikibooks/MatLab,
Henri Gavin's list of Matlab tutorials and
Paul Fackler's MatLab Primer.
LaTeX
Links to some Other (mostly Windows) Software
Links to Internet Stuff
MatLab/Octave Scripts
This section contains links to some of my MatLab/Octave scripts (for economics and finance).
- Function for panel regression with Driscoll-Kraay standard errors, used
in the paper "Individual Investor Activity and Performance" (with Magnus Dahlquist and José Vicente Martinez).
This code implements some of the functionality of Daniel Hoechle's Stata program xtscc (see Hoechle, 2007, The Stata Journal, 281-312.)
- Function for the LSTAR regression, used
in the paper "The Time-Varying Systematic Risk of Carry Trade Strategies,"
Journal of Financial and Quantitative Analysis, 46, 1107-1125, 2011 (with Charlotte Christiansen and Angelo Ranaldo).
This code is a rewrite of the code used in the paper, and is (as of Jan 2013) experimental.
- Code for fitting a normal distribution to a histogram, used in
(a) "Inflation Risk Premia and Survey Evidence on Macroeconomic Uncertainty,"
International Journal of Central Banking, 7, 113-133, 2011;
(b) "Is there Evidence of Pessimism and Doubt in Subjective Distributions? Implications for the Equity Premium Puzzle" (with Paolo Giordani),
Journal of Economic Dynamics and Control, 30, 1027-1043, 2006; and
(c) "Inflation Forecast Uncertainty" (with Paolo Giordani), European Economic Review, 47, 1037-1059, 2003.
This code is a rewrite of the code used in those papers, and is (as of May 2013) experimental.
- Programs for "Solution and Estimation of
RE Macromodels with Optimal Policy,"
European Economic Review, 43, 813-823, 1999.
Updated versions (July 2007) of
some of the routines (significant speed increase).
- Programs for "Solution of Macromodels
with Hansen-Sargent Robust Policies: Some Extensions,"
Journal of Economic Dynamics and Control, 28, 2367-2397, 2004 (with Paolo Giordani).
Updated versions (July 2007) of
some of the routines speed up the calculations considerably.
- Programs for "New Techniques to
Extract Market Expectations from Financial Instruments,"
Journal of Monetary Economics, 40, 383-429, 1997 (with Lars E.O. Svensson).
These MatLab/Octave programs are experimental versions of the original Gauss programs.
Gauss Procedures
This section contains some of my Gauss procedures (for economics and finance).
- Programs for "Solution and Estimation
of RE Macromodels with Optimal Policy,"
European Economic Review, 43, 813-823, 1999.
These programs use my
dll-files with Lapack code for the Schur decomposition
and the generalized Schur decomposition (updated on 1 May 2003 to work with Gauss 5).
- Programs for "Solution of Macromodels
with Hansen-Sargent Robust Policies: Some Extensions,"
Journal of Economic Dynamics and Control, 28, 2367-2397, 2004 (with Paolo Giordani).
These programs use my
dll-files with Lapack code for the Schur decomposition
and the generalized Schur decomposition (updated on 1 May 2003 to work with Gauss 5).
- Programs for "New Techniques to
Extract Market Expectations from Financial Instruments,"
Journal of Monetary Economics, 40, 383-429, 1997 (with Lars E.O. Svensson).
Scientific Word and MiKTeX
You can use Scientific Word (SW) 5.5 as a front end to MiKTeX 2.6 by doing the following:
- Download and install MiKTeX.
- Configure SW (User Setup-Files) to open LaTeX files and save files as "Portable LaTeX."
- Configure SW to use MiKTeX for compiling the TeX code and showing the dvi file.
Go to Typeset-Expert Settings-DVI Format Settings and change to MiKTeX
(set path to D:/miktex/miktex/bin/texify.exe or wherever texify.exe is found), with
%x --max-iterations=1 %f
as command line. Tick the box "Run in new command
console." Leave "Tex format file" blank.
Then, change Previewer to Yap (set path to D:/miktex/miktex/bin/yap.exe), with
%x --single-instance %f
as command line. Use by clicking Typeset-Preview.
- Configure SW to use MiKTeX for creating pdf files. Go to Typeset-Expert Settings-PDF Format Settings and change to pdftex.
Do as for the DVI format settings, except that the command line should be
%x -p "%f"
. This will create the pdf file, but not display it, so you need to open it manually.
Unfortunately, it is not easy (but possible) to get SW to both create and show the pdf file, so this is a second-best solution.
(The best solution is make SW call on a cmd file instead, which will both create and show the pdf file.)
- SW tends to insert its own tcilatex macros in case you have not included the
\usepackage{}
that your code needs (...or Scientific Word thinks that it needs).
If so, the file cannot be processed by MiKTeX. To avoid this, create your tex file from
inside Scientific Workplace (File-New). Then, use File-Import Contents to edit material from
non-SW tex files.
- The best way to print is through the dvi previewer (Yap) or Acrobat.
Reload Paul Söderlind's Home Page
This page is maintained by Paul Söderlind (Paul.Soderlind at unisg.ch)