Skip to content
Stata.Professor : Your Partner in Research Logo Stata.Professor : Your Partner in Research Logo

  • Home
  • Paid Help
    • Empirical Models using Stata®
    • Data Management
    • Paid Help | Pricing
    • Paid Help – Frequently Asked Questions (FAQs)
    • Privacy
  • Completed Projects
    • Asset Pricing Models
      • Fama and French Model
      • Fama – MacBeth
      • Bootstrap Fund Performance
      • Investors attention
      • Misvaluing Innovation
    • Implied cost of equity (ICC)
      • Gebhardt et al. (2001) – GLS
      • ICC GLS Model
      • Claus and Thomas (2001)
      • Cost of Equity using CAPM & FF3
      • Mutual Funds performance
    • Event studies
      • Event study methodology
      • Returns to New IPOs
      • Share repurchases
    • Momentum & Trading
      • asm Momentum Portfolios
      • Absolute Strength Momentum
      • Non-parametric momentum
      • Trading rules
      • Herding behavior
      • Sentiment, disagreement
    • KMV – Default Probability
    • Earning Management Model
    • Market Liquidity
      • Market liquidity models
      • Bid Ask Spread
    • Volatility
      • Backtesting VaR Models
      • P42 – Volatility portfolios
      • P31 – Realized volatility
      • Volatility Managed Portfolios
      • Expected Idiosyncratic Skewness
    • CEO debt and R&D
    • Zero-leverage firms
    • Financial Statement Comparability
  • Stata Programs
    • ASDOC: Stata to Word
      • asdoc : examples
      • asdoc : Tables of summary statistics
    • ASROL: Rolling window stats
    • ASREG: rolling regressions
    • ASTILE: for Portfolios and Groups
    • ASCOL: Converts Data Frequency
    • ASM: Momentum Portfolios
    • Stata Random Tips
    • Download Statistics
  • BLOG
  • ForumsbbPress Forums
  • About Us
  • Home
  • Paid Help
    • Empirical Models using Stata®
    • Data Management
    • Paid Help | Pricing
    • Paid Help – Frequently Asked Questions (FAQs)
    • Privacy
  • Completed Projects
    • Asset Pricing Models
      • Fama and French Model
      • Fama – MacBeth
      • Bootstrap Fund Performance
      • Investors attention
      • Misvaluing Innovation
    • Implied cost of equity (ICC)
      • Gebhardt et al. (2001) – GLS
      • ICC GLS Model
      • Claus and Thomas (2001)
      • Cost of Equity using CAPM & FF3
      • Mutual Funds performance
    • Event studies
      • Event study methodology
      • Returns to New IPOs
      • Share repurchases
    • Momentum & Trading
      • asm Momentum Portfolios
      • Absolute Strength Momentum
      • Non-parametric momentum
      • Trading rules
      • Herding behavior
      • Sentiment, disagreement
    • KMV – Default Probability
    • Earning Management Model
    • Market Liquidity
      • Market liquidity models
      • Bid Ask Spread
    • Volatility
      • Backtesting VaR Models
      • P42 – Volatility portfolios
      • P31 – Realized volatility
      • Volatility Managed Portfolios
      • Expected Idiosyncratic Skewness
    • CEO debt and R&D
    • Zero-leverage firms
    • Financial Statement Comparability
  • Stata Programs
    • ASDOC: Stata to Word
      • asdoc : examples
      • asdoc : Tables of summary statistics
    • ASROL: Rolling window stats
    • ASREG: rolling regressions
    • ASTILE: for Portfolios and Groups
    • ASCOL: Converts Data Frequency
    • ASM: Momentum Portfolios
    • Stata Random Tips
    • Download Statistics
  • BLOG
  • ForumsbbPress Forums
  • About Us
  • Home
  • Paid Help
    • Empirical Models using Stata®
    • Data Management
    • Paid Help | Pricing
    • Paid Help – Frequently Asked Questions (FAQs)
    • Privacy
  • Completed Projects
    • Asset Pricing Models
      • Fama and French Model
      • Fama – MacBeth
      • Bootstrap Fund Performance
      • Investors attention
      • Misvaluing Innovation
    • Implied cost of equity (ICC)
      • Gebhardt et al. (2001) – GLS
      • ICC GLS Model
      • Claus and Thomas (2001)
      • Cost of Equity using CAPM & FF3
      • Mutual Funds performance
    • Event studies
      • Event study methodology
      • Returns to New IPOs
      • Share repurchases
    • Momentum & Trading
      • asm Momentum Portfolios
      • Absolute Strength Momentum
      • Non-parametric momentum
      • Trading rules
      • Herding behavior
      • Sentiment, disagreement
    • KMV – Default Probability
    • Earning Management Model
    • Market Liquidity
      • Market liquidity models
      • Bid Ask Spread
    • Volatility
      • Backtesting VaR Models
      • P42 – Volatility portfolios
      • P31 – Realized volatility
      • Volatility Managed Portfolios
      • Expected Idiosyncratic Skewness
    • CEO debt and R&D
    • Zero-leverage firms
    • Financial Statement Comparability
  • Stata Programs
    • ASDOC: Stata to Word
      • asdoc : examples
      • asdoc : Tables of summary statistics
    • ASROL: Rolling window stats
    • ASREG: rolling regressions
    • ASTILE: for Portfolios and Groups
    • ASCOL: Converts Data Frequency
    • ASM: Momentum Portfolios
    • Stata Random Tips
    • Download Statistics
  • BLOG
  • ForumsbbPress Forums
  • About Us
P31 – HAR RV (Realized) volatility and GARCH(1,1) comparison models | StataAttaullah Shah2023-06-25T14:29:06+05:00

Project details

Volatility estimation models have been extensively studied, with significant findings reported in academic papers such as Engle’s seminal work in 1982. However, these models struggle to explain the variation in realized volatility outside the sample, leading researchers to question their practical value. Andersen and Bollerslev (1998a) countered this skepticism by demonstrating that well-designed volatility models can provide accurate forecasts. The challenge lies in the noisy estimation of volatility using squared returns, which limits the achievable R2 from regression. Hence, significant parameter estimates do not necessarily contradict poor out-of-sample predictive performance when using squared returns as a measure of volatility. To resolve the problem Andersen and Bollerslev (1998a) high frequency data can be used to compute improved ex-post volatility measurements based on cumulative squared intra-day returns. We use this measure in this project and compare its performance with GARCH(1,1) model. We have primarily adopted the methodology outlined by Hansen and Lunde (2005) in our Stata code for comparing volatility models.

Stata Code

We have developed easy-to-use yet robust codes for the steps mentioned above. These codes only require a basic understanding of Stata. Additionally, our comments on each line of code will assist you in running the code and understanding the process more clearly. Typically, we provide all Stata files, raw data files, and Stata codes with comments. The purpose is to help researchers learn and independently apply these codes. We are also available to answer any questions that may arise during the application of these codes at a later stage.

Is the code accurate?

Our codes have undergone rigorous testing to ensure their accuracy and reliability. We have implemented comprehensive validation processes to verify the correctness of our codes. Our team has meticulously reviewed and tested every aspect of the codebase, leaving no room for errors or inconsistencies. Through extensive testing, we have confirmed that our codes perform as intended, delivering reliable results. We are confident in the quality and correctness of our codes, providing you with a solid foundation for your work.

Pricing

The code is available for 189 USD with some example data. If you need help with data processing or application of the code to your data, you may contact us for help.

PayPal email: stata.professor@gmail.com

Wise bank transfer (preferred due to low transaction costs).

For further details, please contact us at:

aullah.shah@imsciences.edu.pk | Stata.Professor@gmail.com

What is included in the code?

  • Importing different files from Excel
  • Reshaping the data to a long format
  • Merging different datasets
  • Making business calendar to account for non-trading days
  • Calculating stock returns
  • Estimating volatility with GARCH(1,1) model
  • Run the HRV model to find realized volatility
  • Using several measures for model comparison to see whether GARCH(1,1) or the HAR-RV model perform well

How the process works?

Once the payment is received, we guarantee to share the codes and relevant files within 24 hours. You can expect to receive them promptly through email. Our efficient process ensures a smooth and timely delivery of the materials you need to begin your analysis.

About the developer

Attaullah Shah
Dr. Attaullah Shah, Ph.D. in Finance, brings over 20 years of extensive experience in developing cutting-edge Stata packages and writing robust codes for various financial analyses. With a strong background in finance and a deep understanding of quantitative methodologies, Dr. Attaullah Shah has successfully developed codes for portfolio creation, asset pricing, cost of equity estimation, event studies, and many other applications.

Having authored several Stata packages, Dr. Attaullah Shah has established a reputation for delivering high-quality, reliable solutions to the financial research community. With a passion for facilitating knowledge transfer, Dr. Shah has designed the code and accompanying resources to be user-friendly, even for those with basic understanding of Stata.

Dr. Shah is committed to providing exceptional support and ensuring that researchers can seamlessly apply these codes to their own projects. By leveraging Dr. Shah’s expertise and extensive experience, you can trust that this code is built on a solid foundation of academic rigor and practical applicability. View his academic contributions and software development here.

See Alos

Stata code for volatility managed portfolios

References

Andersen, T. G., & Bollerslev, T. (1997). Intraday periodicity and volatility persistence in financial markets. Journal of Empirical Finance, 4(2-3), 115-158.

Engle, R. F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica: Journal of the Econometric Society, 987-1007.

Hansen, P. R., & Lunde, A. (2005). A forecast comparison of volatility models: does anything beat a GARCH (1, 1)?. Journal of Applied Econometrics, 20(7), 873-889.

Project Details

Categories:

GARCH
HAR RV
Model Comparison
Realized Volatility
Risk
Stock Returns

Related Projects

Stata Codes for Conditional Beta using MGARCH Approach
Stata Codes for Conditional Beta using MGARCH Approach
Gallery

Stata Codes for Conditional Beta using MGARCH Approach

Returns to New IPOs : Stata Codes
Returns to New IPOs : Stata Codes
Gallery

Returns to New IPOs : Stata Codes

Stata Code for Liquidity Adjusted (LCAPM) with Application of MGARCH
Stata Code for Liquidity Adjusted (LCAPM) with Application of MGARCH
Gallery

Stata Code for Liquidity Adjusted (LCAPM) with Application of MGARCH

KMV – Merton Distance to Default Model through an iterative process in Stata
KMV – Merton Distance to Default Model through an iterative process in Stata
Gallery

KMV – Merton Distance to Default Model through an iterative process in Stata

Paid Help Menu

  • What is Paid Help
  • Paid Help | Pricing
  • Paid Help – FAQs
  • List of Completed Projects
  • Details of All Projects
  • Our Stata Programs
  • Contact

Key Links

  • Paid Help
  • Data Management
  • Empirical Models using Stata®
  • Paid Help – FAQs
  • Paid Help | Pricing
  • Privacy

Recent Projects

  • Conditional Beta using MGARCH Approach
  • Returns to New IPOs
  • Trading frequency | Price Impact
  • Measuring Financial Statement Comparability
  • Expected Idiosyncratic Skewness and Stock Returns
  • Absolute Strength Momentum

Contact Info

Phone: +92 3459146115

Mobile: +92 3459146115

Email: attaullah.shah@imsciences.edu.pk

Copyright 2012 - 2020 Attaullah Shah | All Rights Reserved
FacebookXInstagramPinterest
Page load link
Go to Top