Code covered by the BSD License  

Highlights from
MIDAS regression

5.0
5.0 | 3 ratings Rate this file 94 Downloads (last 30 days) File Size: 406 KB File ID: #45150 Version: 1.2
image thumbnail

MIDAS regression

by

Hang Qian (view profile)

 

21 Jan 2014 (Updated )

repack of the Mi(xed) Da(ta) S(ampling) regressions (MIDAS) programs written by Eric Ghysels

| Watch this File

File Information
Description

The mixed frequency regression studies the explanatory power of high frequency variables on the low frequency outcome. The weights associated with high frequency regressors are usually assumed some functional form. This toolbox is a repack of the Mi(xed) Da(ta) S(ampling) regressions (MIDAS) programs written by Eric Ghysels. It supports ADL-MIDAS type regressions.
Syntax:
[...] = MIDAS_ADL(DataY,DataYdate,DataX,DataXdate)
[...] = MIDAS_ADL(DataY,DataYdate,DataX,DataXdate,name,value,...)

Required Products Econometrics Toolbox
Optimization Toolbox
Symbolic Math Toolbox
MATLAB
MATLAB release MATLAB 8.4 (R2014b)
MATLAB Search Path
/
/MIDASv1.2
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
08 May 2015 Eric

Eric (view profile)

Dear Du-hyun:

The MIDAS Toolbox only covers MIDAS regression analysis. To my knowledge there is no user friendly MIDAS volatility model code publicly available. Still to be done, unfortunately. However, it is not so difficult to start from Matlab ARCH-type code and replace the volatility dynamics with a MIDAS polynomial specification. It would not be generic, but easy to tailor to a specific application you have in mind.

I agree that it would be useful to have generic MIDAS volatility code publicly available. I've had discussions with Hang on this topic.

Sincerely,

Eric Ghysels

Comment only
08 May 2015 Du-hyun Cho

It is honor to say to you Eric
Actually, I am deeply interested asymmetric MIDAS model in your paper "There is risk return tradeoff after all"

One of my focuses is finding empirical relations between risk and return though estimating ICAPM model in Asian Pacific stock market.

Anyway I found a related toolbox manual

the ULR is that
http://pages.stern.nyu.edu/~ehedegaa/PDFs/MidasManual.pdf

However, there was only manual of a toolbox but I couldn't find original toolbox still.

If I wouldn't be bothering you, I want to ask a help about the toolbox.

Anyway,thank you for giving a change to me describing my focus. I will wait your answer Thank you very much

Comment only
08 May 2015 Du-hyun Cho

It is honor to say to you Eric
Actually, I am deeply interested asymmetric MIDAS model in your paper "There is risk return tradeoff after all"

One of my focuses is finding empirical relations between risk and return though estimating ICAPM model in Asian Pacific stock market.

Anyway I finded a related toolbox manual

the ULR is that
http://pages.stern.nyu.edu/~ehedegaa/PDFs/MidasManual.pdf

However, there was only manual of a toolbox but I couldn't find original toolbox still.

If I wouldn't be bothering you, I want to ask a help about the toolbox.

Anyway,thank you for giving a change to me describing my focus. I will wait your answer Thank you very much

07 May 2015 Eric

Eric (view profile)

Dear Du-hyun:

Would you mind being more specific about asymmetric MIDAS - what exactly you are thinking of?

Thanks

Eric Ghysels

Comment only
07 May 2015 Du-hyun Cho

Thnak you very much for your kindness
I tried again as I mentioned before and there is no problem the error message has been completely removed.

If it wouldn't be annoying you, I want to ask one more question with respect to asymmetric MIDAS regression.

first, is this code available for asymmetric MIDAS? or needed to change some codes or syntax of this toolbox.

I tried to find asymmetric model form Eric Ghysels homepage and other authors of academic papers related to MIDAS model but this is not really easy task to find it.

could you give me an idea? I shall wait your answer

06 May 2015 Hang Qian

Hang Qian (view profile)

Hi Du-hyun,

Thank you for catching that.

The error message at Line 392 pops up after parameter estimation. The estimation results have displayed on the screen. This line just makes date display more beautiful. The error comes from reshaping a vectorized empty matrix; it changes the row/column dimension of an empty matrix.

I have updated the codes. The error message should disappear.

Comment only
06 May 2015 Du-hyun Cho

Hi Qian

firstly, Thanks for uploading the toolbox

Actually, I wander how to use DL MIDAS model in this tool box.

I tried several times Ylag = 0 in the toolbox because, in my research, autoregression terms do not needed.

unfortunately, there is several error massage in matlab like

Error : MIDAS_ADL (line 392)
MixedFreqData.EstLagYdate = reshape(cellstr(datestr(MixedFreqData.EstLagYdate)),size(MixedFreqData.EstLagYdate));

is there any method to clean that error?

Comment only
06 May 2015 Hang Qian

Hang Qian (view profile)

Hi Ruizhi,

I did not test and do not know whether the program can work properly using minute or second data, but you may have a try. DataXdate and DataYdate follow the MATLAB supported time format. For example, 01-Mar-2000 15:45:17 and 2000-03-01 15:45:17 can be recognized by MATLAB.

Thank you.

Comment only
05 May 2015 Ruizhi Ma

Hello! Really thanks for the upload! I'm curious about using intra-daily data to forecast daily stock returns by MIDAS, how can I write the DataXdate and DataYdate ? Thank you!

Comment only
05 May 2015 Anni208

Thank you for the very fast answer!
I will follow your advice!

Comment only
04 May 2015 Hang Qian

Hang Qian (view profile)

Hi Anni208,

The date string '01.04.1947' is not a supported MATLAB date format, so it cannot be parsed by the program. MATLAB has 14 supported formats, such as '01/04/1947', '1947-01-04', '04-Jan-1947', 'Jan.01,1947', etc.. If you could change your date format to one of the supported formats, the error message will disappear.

You may refer to this page for the MATLAB date string format:

http://www.mathworks.com/help/matlab/ref/datevec.html

Thank you.

Comment only
04 May 2015 Anni208

Hello!
I'm very cuurious to try your code unfortunately while running appADLMIDAS1.m I receive the following error message:

Error using datevec (line 277)
Cannot parse date 01.04.1947.

Why is there a problem with datevec? Can you please help me with this?
Thanks in advance!
Anni208

Comment only
27 Apr 2015 WMendieta89

Thank you very much for your reply! It worked!

Thanks again for this great toolkit.

William M.

Comment only
14 Apr 2015 Hang Qian

Hang Qian (view profile)

Hi WMendieta,
MIDAS uses a direct multi-step forecast. For example, if we want a 3-step ahead forecast, we specify a MIDAS model as
Y(t+3) = b0 + b1*Y(t) + b2*Y(t-1) + ... + high frequency regressor terms X(j,t-i), j=1,...,Nd, i = 0,1,2,...
Similarly, for a 5-step ahead forecast, we use a model like
Y(t+5) = b0 + b1*Y(t) + b2*Y(t-1) + ... + high frequency regressor terms X(j,t-i), j=1,...,Nd, i = 0,1,2,...
By direct forecast, we mean the left hand side of the model is the h-step ahead dependent variable. This is in contrast to the iterated forecast in an autoregressive model.
Please refer to Section 2.3 of the MIDAS user guide for the multi-step forecast:
http://www.unc.edu/~eghysels/papers/MIDAS_Usersguide_V1.0.pdf
For the software usage, put the lagged dependent variables in 'ExoReg' and then adjust the name-value pair 'Horizon' accordingly.
Thank you.

Comment only
13 Apr 2015 WMendieta89

Hi! Thanks for uploading this toolbox! I wonder how do you perform h-step ahead forecast using this toolbox? I have performed 1 step ahead out-of-sample forecast but i´ve been unable to do so for h-step ahead forecasts

thanks in advanced,

WMendieta

Updates
08 Apr 2014 1.1

Allow leads and lags specification 'horizon' be negative.

Add true out-of-sample forecast; results are restored in the last output argument 'Extended Forecast' struct.

06 May 2015 1.2

Support the special case DL_MIDAS by setting Ylag = 0

09 Jun 2015 1.2

Update the user guide (version Dec 21, 2014)

Contact us