All the material I currently use to teach is uploaded to Blackboard, hence, it can only be accessed by University of Southampton students enrolled in the courses I teach. However, below you can find the materials I used to teach an introductory course to Fortran for Ph.D. students at Universitat Autònoma de Barcelona and the material for a three-sessions introduction to GRETL for undergraduate students (in Catalan).

Introductory course to coding in Fortran

To follow this course you will need to have a source code editor installed in you computer. I use TextWrangler  but you are welcome to use any editor you like (as long as is adapted to Fortran). A source code editor is nothing else than a fancy WordPad. That is, a text editor that puts different colors to the text that you are writing when coding so that it is easier for you to understand the code you are creating. Some source code editors also point out syntax mistakes. But that's about it.

You will also need to install a Fortran compiler. A compiler is just a program that translates whatever you write in Fortran (or any other programming language) into something that computers actually understand, that is, 0s and 1s. The compiler is an important/non-trivial issue but what I would recommend for you right now is to install a binary of GFortran.

Session 01:

  1. -Slides printout (Editable PDF)

  2. -hello.f90

  3. -linspace.f90

  4. -linspace_txt.f90 and parameters.txt

  5. -crra.f90 (exercise solution)

  6. -random_numbers.f90

  7. -max_rndnum.f90 (exercise solution)

Session 02:

  1. -Slides printout (Editable PDF)

  2. -f_linspace.f90

  3. -exp_utility.f90 (exercise solution)

  4. -max_rndnum_sub.f90 and sub_max.f90

  5. -read_data.f90r, sub_read.f90 and data.txt (exercise solution)

  6. -using_modules.f90 and mathutils.f90

Session 03:

  1. -Slides printout (Editable PDF)

  2. -globals.f90

  3. -sub_read.f90, numerical.txt, parameters.txt, data.txt (exercise)

  4. -sub_model_ex.f90

  5. -sub_model.f90 (exercise solution)

  6. -toy_model.f90 (do not forget to use mathutils.f90)

Session 04:

  1. -Slides printout (Editable PDF)

  2. -globals.f90, numerical.txt, and sub_read.f90

  3. -sub_sim_ex.f90

  4. -sub_sim.f90 (exercise solution)

  5. -sub_print.f90 (exercise solution)

  6. -toy_model.f90 and sub_model.f90

  7. -f_model.m and calibration.m

Some useful links:

  1. -Fortran 90 Tutorial by Dr. C.-K- Shene

  2. -Fortran 90 Tutorial by Paul H. Hargrove and Sara T. Whitlock (Standford)

  3. -Essentials of Fortran 90/95/2003 by D. C. Smolarski

  4. -GNU Fortran: Using the compiler

  5. -GNU Fortran debugging options

Very good people teaching Numerical Methods in Economics:

  1. -Karen A. Kopecky

  2. -Makoto Nakajima

  3. -Josep Pijoan-Mas

  4. -Víctor Ríos Rull

  5. -David Wiczer

Introducció a GRETL

  1. -Sessió 1: Slides

  2. -Sessió 1: Data

  3. -Sessió 2: Slides

  4. -Sessió 2: Data

  5. -Sessió 3: Slides

  6. -Sessió 3: Data