From: Brigitte on 30 Jul 2010 17:56 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 3 Aug 2010 14:50 "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 4 Aug 2010 12:00 "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’m not entirely sure what the real problem is. As for “modifying” 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’ve referenced shows you how to calibrate a Vasicek model using the “dt” 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 “dt”). For instance, in the example we loaded data observed daily and simulated a certain number of days, and so “dt” 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 “simBySolution” 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)
|
Pages: 1 Prev: Finding a Matlab contractor Next: fread repetition factor |