Thanks for the video. I was wondering how you should interpret the final coefficients you obtain after running both stages? Do the coefficients represent risk premia? or rather the effect on returns?
@thedatahall Great explanation! I used the statsby command and I got the coefficients of the factors in the end but I wanted to know how can I obtain the r-squared or the adjusted r-squared in this first approach. Is it possible in the statsby approach or only in the other methods (asreg, xtfmb, etc)?
I have a question regarding the xtset command used. When I use this command it gives me an error because my symbol variable is a string variable. How could I get around this? My symbol variable is a symbol stock ticker like you have in your example
@@thedatahall After applying this solution I encountered a different error: "repeated time values within panel". My dataset is similar to yours with stock data across a set time period. How would I get around this?
Are you using the fama macbeth dataset? Can u re download and follow the steps in the video. The error tells u that there are duplicate values, generally we do following to resolve it Duplicates drop ticker date, force
@@thedatahall I am using my own dataset. There are gaps in the Year variables. When I try to fill these using one of your other videos I also need to use xtset and get the same error. I do not quite understand how to eliminate the repeated time values error
I was wondering if its possible to use this method to analyse the risk premium for a specific risk factor through time, and see if there is a signficant risk premium present in specific time periods. Is there a way to do this?
Theoretically we can use this technique but i have to look at some paper that might have done this kind of analysis. If you have paper of this kind please share
Fantastic video! I have a question about the Fama-French factors used in the model. How did you arrive at these variables that are different for each stock? When I download the factor data from Kenneth French they only vary across time and not assets (as they are calculated by comparing portfolio's). As you said that cross-sectionally invariant data is not usable I was wondering how you managed to arrive at cross-sectionally varying data.
Hi, i have the similar factors as on Kenneth french's website i.e they are time varient but same for each crossection. We applied the timeseries regression for each crossection and the generated coefficients are used in step 1 i.e crossectional regression models. Please feel free to email me (info@thedatahall.com) if there is still a confusion.
Sure, i usually add a link to the files in the description. But if in any article you do not find the link, please feel free to email me at info@thedatahall.com and i shall provide u the data and the do files.
The following link contains the files used in this video:
payhip.com/b/1RCTZ
How did you obtain the HMl and SMB factor?
These are made using another code, i dint explained because this video was particularly related to fama macbeth
Please contact me at info@thedatahall.com
@@thedatahall would you also like to make a video about these? :)
Yes its definitely on the to do list
Thanks for the video. I was wondering how you should interpret the final coefficients you obtain after running both stages? Do the coefficients represent risk premia? or rather the effect on returns?
@thedatahall Great explanation! I used the statsby command and I got the coefficients of the factors in the end but I wanted to know how can I obtain the r-squared or the adjusted r-squared in this first approach. Is it possible in the statsby approach or only in the other methods (asreg, xtfmb, etc)?
Try this command
statsby _b _se e(r2), by(foreign): regress mpg gear turn
Great video, I was just wondering how you could alter the code to use Logit regressions instead?
You can try with statsby command, asreg will not work in this case.
Great video!
Thanks
I have a question regarding the xtset command used. When I use this command it gives me an error because my symbol variable is a string variable. How could I get around this? My symbol variable is a symbol stock ticker like you have in your example
Use the following command to generate an encoded variable for ur ticker
Encode ticker, gen(e_ticker)
Then do
Xtset e_ticker date
Thank you very much!@@thedatahall
@@thedatahall After applying this solution I encountered a different error: "repeated time values within panel". My dataset is similar to yours with stock data across a set time period. How would I get around this?
Are you using the fama macbeth dataset? Can u re download and follow the steps in the video. The error tells u that there are duplicate values, generally we do following to resolve it
Duplicates drop ticker date, force
@@thedatahall I am using my own dataset. There are gaps in the Year variables. When I try to fill these using one of your other videos I also need to use xtset and get the same error. I do not quite understand how to eliminate the repeated time values error
I was wondering if its possible to use this method to analyse the risk premium for a specific risk factor through time, and see if there is a signficant risk premium present in specific time periods.
Is there a way to do this?
Theoretically we can use this technique but i have to look at some paper that might have done this kind of analysis. If you have paper of this kind please share
Fantastic video!
I have a question about the Fama-French factors used in the model.
How did you arrive at these variables that are different for each stock? When I download the factor data from Kenneth French they only vary across time and not assets (as they are calculated by comparing portfolio's). As you said that cross-sectionally invariant data is not usable I was wondering how you managed to arrive at cross-sectionally varying data.
Hi, i have the similar factors as on Kenneth french's website i.e they are time varient but same for each crossection. We applied the timeseries regression for each crossection and the generated coefficients are used in step 1 i.e crossectional regression models. Please feel free to email me (info@thedatahall.com) if there is still a confusion.
A very good tutorial but I'm still facing a problem with functions. My results do not match. I'm not sure what Im doing wrong
What results do not match? If you can email me the .dta file and the code u used at info@thedatahall.com and i will have a look.
Hello, just wondering if you provide example.dta online? Thank you.
Sure, i usually add a link to the files in the description. But if in any article you do not find the link, please feel free to email me at info@thedatahall.com and i shall provide u the data and the do files.