Support Articles

Support Articles Financial Modelling and Analysis South African Fixed Income Toolbox 1.0

South African Fixed Income Toolbox 1.0

Futuregrowth Asset Management and OPTI-NUM solutions have collaborated to create the South African Fixed Income Toolbox for MATLAB based on the BESA conventions. The first version of the toolbox, contains amongst others, functions to price South Africa bonds and inflation linked bonds, calculate convexity, duration and implied yields and price bond options using Black's model. The full list of functions is shown at the bottom of this page as are the licensing terms.

This is the first release of the South Africa Fixed Income Toolbox. We plan on providing regular updates to this code.

This software is experimental and distributed in the hope that it will be useful and stimulate collaborative development. It is distributed without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

Note that the South Africa Fixed Income Toolbox requires The MathWorks Finance Toolbox.

Download, installation and getting started

  • Since we will be updating this Toolbox regularly, please send us an email letting us know that you have downloaded the code. We will then send you an email whenever we update the files.
  • Download the "matlab_besa.zip" file.
  • Extract the contents of the zip file retaining the directory structure. You can extract the zip file to any directory you wish, although we recommend using "$MATLAB\toolbox\" (where $MATLAB is the directory in which MATLAB is installed). The directory to which you unzipped the files should now contain 19 files including "Contents.m" and "besa_intro.m" and 2 directories named "html" and "test_code".
  • Start MATLAB.
  • Use PATHTOOL to add a path to the "besa" directory. For example, if you extracted the zip file to "C:\MATLAB\R2006a\toolbox", you need to add a path to "C:\MATLAB\R2006a\toolbox\besa".
  • The "holidays.m" file in the South African Fixed Income Toolbox includes both South African and US holidays, whereas the "holidays.m" file in the Finance Toolbox has only US holidays. Therefore in order that the "holidays.m" file in the South African Fixed Income Toolbox take precedence over the "holidays.m" file in the Finance Toolbox, you need to ensure that the path to the South African Fixed Income Toolbox is above the path to the Finance Toolbox.
  • To get started, open the script file "besa_intro.m" in the editor and look at the examples of how to price bonds, bond options and inflation linked bonds using the functions provided. Also run BESA_INTRO to see how the code runs and view the automatically generated report in the html directory.
  • Step through the code in the directory "test_code" to view the toolbox test cases.
  • Send an email to support@optinum.co.za if you have any technical support queries.
  • Send an email to support@optinum.co.za letting us know what functionality you would like us to add in future versions.

 

South African Fixed Income Toolbox
Version 1.0 (R2006a) 03-Feb-2006

Authors: Tim Gebbie, Grant Grobbelaar
Copyright 2006 Tim Gebbie, Futuregrowth Asset Management and
OPTI-NUM solutions (Pty) Ltd

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA

NO WARRANTY

General information.
This toolbox provides fixed income pricing functions based on the
BESA (Bond Exchange of South Africa) specification documentations:

1. Bond Pricing Formulae, BESA, Quant Financial Research 1997
2. Option Pricing for Risk Management, BESA Quant Financial Research 1998
3. Buy/Sell Back(carries) and Forward Pricing, BESA, Quant Financial Research 1997
4. Risk Management Methodology, BESA, Quant Financial Research 1997

General Functions:    
besaaip - Allinprice for South African bonds using BESA specification
besainfaip - Allinprice for inflation linked bonds
besatenor - Bond tenor
besaconv - Bond Convexity
besamoddur - Bond Modified Duration
besaimpytm - Implied yield-to-maturity
besafwdprc - Bond forward price
besaoption - Bond option using Blacks model as per BESA specification
ncdproceeds - NCD proceeds
ncdmvalue - NCD maturity value
eqvalue - Equivalent value of continuous rate
settledate - Settlement date rule
valuedate - Valuation date
cpiratio - Compute the CPI ratio for inflation link bonds
cpirefdates - Compute the reference dates for CPI data
holidays - Holidays and non-trading days in South Africa and the US

Collaborator details

Dr Tim Gebbie
Equity Division
Futuregrowth Asset Management
3rd Floor, Great Westerford Main Rd,
Rondebosch
7700
South Africa