Latest News 


My book on MATLAB and Strategic Asset Allocation is out now. You can buy it at



Strategic Asset Allocation in Fixed Income Markets



Download MATLAB code used in the book here

  • 02 AUG 09: printing of results in EX_NS and EX_SS has been updated - thanks to Craig Nelson for finding the bug

  • 03 FEB 09: regime.m now includes additional optional parameter constraints that might facilitate faster convergence (at least in some cases) 

  • 03 FEB 09: ols_est.m  has been changed

  • 16 JAN 09: a bug has been corrected in NA_a_b.m - thanks to Arjan Berkelaar for spotting it.

  • 16 JAN 09: improvements have been implemented in NA_est.m.

  • 05 FEB 12: Code and slides from the 2012 course at Frankfurt University have been uploaded (in zip format).

  • 05 FEB 12: New Matlab code has been added for example: VAR(p) estimation, and Granger-causality testing.




Course outline               SAA_Introduction               Basic Principles


Intro2Matlab                  Matrix Algebra                   Risk and Return


Functions in Matlab         Asset Allocation                 Econometric Tools


Excel sheets 


Data                               Nelson-Siegel                   Regime-switching


2012 course materials (incl. updated code library) 


Lecture Notes 1/2            Lecture Notes 2/2              Matlab files


Excel sheets                    Slides



Privacy Policy

The content of this web site is not related to or endorsed by my employer. All views expressed here (if any) are mine alone and are not necessarily shared by my employer.


Terms Of Use  

All material on this website is provided "as is" and no warranty is given for the correct functioning of e.g. computer codes. Nothing on this website should be seen as indicating investment advice of any kind. MATLAB code and teaching materials can be downloaded free of charge. Support is not guaranteed (but please do email me if you find bugs or have questions).  


Send comments and bug reports to:



(exchange _at_ by @)



  Ken Nyholm  2008    Last updated on 2 August 2009