MATLAB


MATLAB

Since these codes were written using a previous version of Matlab, version 2008 it is possible that some of the functions nolonger runs. Please send me an email if you encounter problems.

- A zip file containing code and data from my book:

Strategic Asset Allocation in Fixed Income Markets: A Matlab based guide

- Code to perform spillover analysis following the Diebold-Yilmaz approach:

Spillover.zip

Spillover.zip  (updated, runs without vgx functions)

Note that this code may run a bit slow because it calculates spillovers for both Cholesky and Generalised FEVDs.

- Some code that can be used to fit the Smith-Wilson yield curve mode:

Smith-Wilson.zip

I implemented the Smith-Wilson model while I was working for EIOPA. However, please note that the code made available here is not identical to that currently used by EIOPA to produce risk free discount curves.

- A short summary on how to fit a yield curve to bond data using MATLAB's Financial Instruments Toolbox:

MATLAB code

HTML document

- Comparing Orthogonalised and Generalised Impulse Response Functions:

MATLAB code (.m script and Live Editor script)

HTML document

- Yield curve projections that are guaranteed to pass through future pre-specified yield curve fix-points (and the dynamic Nelson-Siegel model estimated with OLS and MATLAB's state-space toolbox):

MATLAB code and workspace

HTML document

- A term structure modelling class programmed in MATLAB. It facilitates estimation of several yield curve models (e.g. dynamic Nelson-Siegel, Svensson-Soderlind, and JSZ). The term structure of term premia are also calculated. An example file is included to illustrate how to use the code, and background documentation is added as well.


Term structure class


Documentation 



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 materials on this website are 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 and used free of charge as long as re-used materials include proper quoting of the source (i.e. me). Support is not guaranteed (but please do email me if you find bugs or have questions).


Ken Nyholm (c)  -  Updated August 2019