From: Brigitte on
http://www.mathworks.com/access/helpdesk/help/toolbox/econ/briajhb.html

Hello!
A couple of months ago I bought the Econometrics Toolbox because I thought it would be easier for me to simulate interest rates with Hull-White. Unfortunately I still don't know how to do this after approx. 5 months. It's not that I don't know how to do it with a pencil and a piece of paper, I cannot figure out which line of code is really useful for me and how can I modify it for my purpose.
I have several questions:
1) How do I modify the input data? I didn't find any file called Data_GlobalIdx2 in my MATLAB files. Where is it and how can I put different interest rate in it?
2) Which steps are necessary if I only want to get interest rate (per annum) for 10 years from now on? I don't need anything but the numbers, I want an output like y(1)=..., ..., y(10).

That's all. I really need help because obviously I don't understand the code. It seems so complex to me and I really tried to understand it.

Thank you very much in advance.

Sembilan :-)
From: Steven_Lord on


"Brigitte " <sembilansepuluh(a)gmail.com> wrote in message
news:i2vhpk$38i$1(a)fred.mathworks.com...
> http://www.mathworks.com/access/helpdesk/help/toolbox/econ/briajhb.html
>
> Hello!
> A couple of months ago I bought the Econometrics Toolbox because I thought
> it would be easier for me to simulate interest rates with Hull-White.
> Unfortunately I still don't know how to do this after approx. 5 months.
> It's not that I don't know how to do it with a pencil and a piece of
> paper, I cannot figure out which line of code is really useful for me and
> how can I modify it for my purpose.
> I have several questions:
> 1) How do I modify the input data? I didn't find any file called
> Data_GlobalIdx2 in my MATLAB files. Where is it and how can I put
> different interest rate in it?

The file Data_GlobalIdx2.mat is an example data file used by Econometrics
Toolbox for demos and examples. The data itself is stored in a dataset
array from Statistics Toolbox; the Description variable in that MAT-file
contains a description of the information in the dataset object.

> 2) Which steps are necessary if I only want to get interest rate (per
> annum) for 10 years from now on? I don't need anything but the numbers, I
> want an output like y(1)=..., ..., y(10).

I'm not certain how to answer this question; econometrics isn't my forte.
Sorry. You should contact Technical Support with these questions.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

From: Kevin on
"Steven_Lord" <slord(a)mathworks.com> wrote in message <i39odd$odf$1(a)fred.mathworks.com>...
>
>
> "Brigitte " <sembilansepuluh(a)gmail.com> wrote in message
> news:i2vhpk$38i$1(a)fred.mathworks.com...
> > http://www.mathworks.com/access/helpdesk/help/toolbox/econ/briajhb.html
> >
> > Hello!
> > A couple of months ago I bought the Econometrics Toolbox because I thought
> > it would be easier for me to simulate interest rates with Hull-White.
> > Unfortunately I still don't know how to do this after approx. 5 months.
> > It's not that I don't know how to do it with a pencil and a piece of
> > paper, I cannot figure out which line of code is really useful for me and
> > how can I modify it for my purpose.
> > I have several questions:
> > 1) How do I modify the input data? I didn't find any file called
> > Data_GlobalIdx2 in my MATLAB files. Where is it and how can I put
> > different interest rate in it?
>
> The file Data_GlobalIdx2.mat is an example data file used by Econometrics
> Toolbox for demos and examples. The data itself is stored in a dataset
> array from Statistics Toolbox; the Description variable in that MAT-file
> contains a description of the information in the dataset object.
>
> > 2) Which steps are necessary if I only want to get interest rate (per
> > annum) for 10 years from now on? I don't need anything but the numbers, I
> > want an output like y(1)=..., ..., y(10).
>
> I'm not certain how to answer this question; econometrics isn't my forte.
> Sorry. You should contact Technical Support with these questions.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Dear Sembilan,

The documentation example you have highlighted,

http://www.mathworks.com/access/helpdesk/help/toolbox/econ/briajhb.html

is likely the best place to start to solve your problem. That said, I&#8217;m not entirely sure what the real problem is.

As for &#8220;modifying&#8221; the data, all you need to do is load some interest rate data into MATLAB, however you choose to do that is entirely up to you (there are many, many options).

The doc example we&#8217;ve referenced shows you how to calibrate a Vasicek model using the &#8220;dt&#8221; obtained from the data. The important point to note is that you must be consistent with the number of periods (NPERIODS) and the time increment per period (DeltaTime, the familiar &#8220;dt&#8221;).

For instance, in the example we loaded data observed daily and simulated a certain number of days, and so &#8220;dt&#8221; is 1 day and we simulated out to 64 days. There is no reason why you cannot scale the data to annualize it. That said, whatever data you load might already be annualized.

Another point, which may help you, is that the HWV model has a simple closed-form solution, and therefore the class has a &#8220;simBySolution&#8221; that could likely help you. You might want to take a look at this.

As even another option, the example also illustrates the closed form mean and variance of a Vasicek model (Vasicek = constant coefficient Hull-White model).

Since the terminal value at the end of any time increment is Normally distributed, you could always just make Gaussian draws and simulate it yourself. Since this solution is valid for any time increment, you could easily simulate at any times (e.g., on only annual dates).

Hope this helps!

Rick (just posted by Kevin)