In this project, we compared volatility model that included Heterogeneous Autoregressive model of Realized Volatility (HAR RV) and GARCH(1,1). Following is the list of main coding activities of this project.
- Importing different files from Excel
- Reshaping the data to a long format
- Merging different datasets
- Making business calendar to account for non-trading days
- Finding stock returns
- Estimating volatility with GARCH(1,1) model
- Fit the HAR-RV model and create realized variance
- Using several measures for model comparison to see whether GARCH(1,1) or the HAR-RV model perform well
Our Stata Code
We have developed easy to use yet robust codes for the above steps. The codes need just a basic understanding of Stata.
Further, our comments on each line of code will surely help you in running the code as well as in understanding the process more clearly. We normally share all Stata files, the raw data files, and Stata codes with comments. The purpose is to help researchers to learn and apply these codes on their own. We also try to answer questions that might arise at a later stage when the researcher applies these codes.
The code is available for $ $189, plus a $50 for raw data processing (in case the data is not in Stata format and variables are not already constructed). For further details, please contact us at:
See our full list of completed projects