楼主: xuehe
2019 0

Gauss programs for estimating the term structure of interest rates [推广有奖]

贵宾

学术权威

90%

还不是VIP/贵宾

-

威望
8
论坛币
576388 个
通用积分
476.7592
学术水平
365 点
热心指数
361 点
信用等级
202 点
经验
355197 点
帖子
4354
精华
9
在线时间
2628 小时
注册时间
2004-12-31
最后登录
2024-10-4

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Home | New | Topics | Contact | Short bio | CV | Teaching | Links | Search | Princeton Econ | IES | BCF | Princeton U | IIES | Google

Paper abstract 1 | Paper abstract 2 | Sample Gauss programs

Gauss programs for estimating
the term structure of interest rates

Lars E.O. Svensson

Please print and read this page before unzipping the file SSTerm2.zip below.
This page contains contains information on how to set up and run my Gauss procedures for estimating the term structure of interest rates. It assumes familiarity with Gauss, and requires Gauss 386i VM version 3.1.4 (or later) with Publication Quality Graphics and the Maxlik module.
I regret that I do not have time for any customer support.
The following is a brief explanation of what needs to be done to run the program. For ease of transfer, the directory structure in the zipfile has been set up to be consistent with the directory structure on
the harddisk. Take care to preserve this directory structure. Therefore, when unzipping, use the option "Use Folder Name" or equivalent, and specify the c drive as target. The unzip command will then create the subdirectories C:\GAUSS\SRCLS, C:\RES\TERM2\DATA, C:\RES\TERM2\OUT and
C:\RES\TERM2\PROG. The C:\GAUSS\SRCLS subdirectory now contains procedures that are essential to run the actual program. The programs that calculate forward rates are called ?x.P (?=DE, FR, GB, IT, SWE, US) and are located in C:\RES\TERM2\PROG. Edit and run these program to calculate or print forward rates.

The ASCII files that contain the data are called ?c, ?m, and ?y for coupon, maturity, and yield files respectively. These files have 17 columns (trading date + 16 bonds). To include more bonds than 16, a small adjustment needs to be made: when loading the data, in the program Gauss performs a RESHAPE command to create a matrix with 17 columns. To include 16+x bonds for estimation, simply change 17 to 17+x in the RESHAPE command.

Some of the values in the ASCII files are ".". This denotes missing values. Missing values have been included only for convenience, to make maturity dates line up more conformably column-wise. The location or inclusion of missing values is unconstrained (except for first location), but if there is a
missing values in column z of of one data file for one country, the two other data files for that country must also include a missing value at the same location.

The result files with the estimated parameters are called ?res2x.fmt. To save new parameters, answer "y" to the question after estimation.

The section entitled Switches in the beginning of the program contains user parameters that may need to be changed (self-explanatory parameters are omitted):

obs: which observation to estimate (37='1994.0504')
nsx: =1 implies using the extended version of Nelson & Siegel
with two more parameters
restr: =1 imposes the restriction that must go through first
observation (ie overnight rate)

Running the programs
Run the programs from the directory c:\res\term2\prog. Other directory structures are possible, but then the programs need to be edited accordingly.

Gauss needs acess to the maxlik, maxutil, publication quality graphics, and my procedures. To accomplish this, include a reference to maxlik, pgraph, and ls in the startup file. Also, the program allres.p must be run prior to running the the ?x.p programs: most conveniently done in the startup file. An example of how this might be done is included in C:\GAUSS\STARTUP.

Preset programs

There are two programs (figure1.p and figure2.p) included in the directory c:\res\term2\prog that are preset in order to produce figure 3.1 and 4.1 from the article "New Techniques to Extract Market Expectations from Financial Instruments" (Svensson, Lars. E.O. and Söderlind, Paul, 1997, CEPR Discussion Paper Series, No 1556, Journal of Monetary Economics40(2) (1997), 373-429). These diagrams can also be found in Svensson, Lars E.O., "Estimating and Interpreting Forward Interest Rates: Sweden 1992-1994", Working Paper No. WP/94/114, International Monetary Fund, Washington, D.C. and in Svensson, Lars E.O., "Estimating Forward Interest Rates with the Extended Nelson & Siegel Method", Quarterly Review, Sveriges Riksbank, 1995:3, 13-26.

Troubleshooting

Convergence problems. Check that the data is correct. Change the initial guess of starting parameters. Change from "extended N&S" to N&S: in cases where N&S gives ok fit, extended tends to be over-parameterized, and then has convergence problems.

Matrices not conformable. A favorite Gauss error message. Here it usually means that a missing value is inconsistent with other data files.

Note that the file Allres.p must be run prior to running the programs. It loads the files containing the estimated parameters that are used as starting values (optionally).

Please report any errors found.
Please notify me that you will download the programs.
Download zip file: SSTerm2.zip (right-click and save to your harddisk)
Paper abstract 1 | Paper abstract 2 | Sample Gauss programs

Top | Home | New | Topics | Contact | Short bio | CV | Teaching | Links | Search | Princeton Econ | IES | BCF | Princeton U | IIES | Google

Updated måndag, juli 16, 2007 .
Comments and suggestions are welcome.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Estimating Structure interest programs Program GAUSS Structure interest term Estimating

已有 1 人评分经验 论坛币 学术水平 热心指数 收起 理由
zhaomn200145 + 40 + 40 + 1 + 1 根据规定进行奖励

总评分: 经验 + 40  论坛币 + 40  学术水平 + 1  热心指数 + 1   查看全部评分

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-11-5 19:45