Skip to content

项目主要构建了多混频Realized GARCH-MIDAS-X模型,结合社交媒体情绪和高频数据,与 不加社交媒体情绪指标的模型相比,加入后的模型显著提升了内地低碳市场波动预测的准确性。通过稳健 性检验,证明了研究结果的可靠性。该研究丰富了市场波动模型,并为低碳投资和宏观调控提供了参考。

Notifications You must be signed in to change notification settings

YOLOWinnnn/Code-for-fitting-the-GARCH-family-model-to-the-volatility-of-Mainland-China-Low-Carbon-Stocks

Repository files navigation

Code for Fitting the GARCH Family Model to the Volatility of Mainland China Low Carbon Stocks

This repository contains code and resources for fitting the GARCH family models (Generalized Autoregressive Conditional Heteroskedasticity) to model the volatility of stocks in Mainland China, particularly focusing on low-carbon stocks. The analysis aims to understand the volatility dynamics and financial modeling of low-carbon stock indices.

Description

The main goal of this project is to apply the GARCH family models to the volatility of stocks, with a focus on the low-carbon sector in Mainland China. By using historical stock price data and financial metrics, we analyze volatility patterns and predict future risks, which is crucial for investors and policymakers in the context of low-carbon economic transitions.

Topics

  • Data Analysis
  • Financial Modeling
  • GARCH Models
  • Low Carbon Economy
  • Volatility Modeling

Installation

To run the code and replicate the analysis, you will need the following software and dependencies:

Prerequisites

  • Python 3.7
  • Libraries:
    • numpy
    • pandas
    • matplotlib
    • arch (for GARCH modeling)
    • statsmodels

You can install the required libraries using pip:

pip install numpy pandas matplotlib arch statsmodels
Dataset
The dataset used for this analysis includes historical stock data from Mainland China, specifically focused on low-carbon companies. You can download the dataset from the following link:

Low Carbon Stock Dataset
Once you have the dataset, you can load it into the code using Pandas.

Usage
To use the code for volatility modeling with the GARCH family model, follow these steps:

Clone this repository to your local machine:

git clone https://github.com/YOLOWinnnn/Code-for-fitting-the-GARCH-family-model-to-the-volatility-of-Mainland-China-Low-Carbon-Stocks.git

Navigate to the project directory:

cd Code-for-fitting-the-GARCH-family-model-to-the-volatility-of-Mainland-China-Low-Carbon-Stocks

Run the main script to fit a GARCH model:

python garch_volatility_modeling.py
The script will load the data, preprocess it, and fit the appropriate GARCH model to model the volatility. The results will be displayed and saved in the outputs/ folder.

Results
The output includes:

Volatility forecasts based on the GARCH model.
Plots showing historical volatility and predicted volatility.
Model diagnostics and performance evaluation.

Contributing
Contributions are welcome! If you would like to contribute to this project, please follow these steps:

Fork the repository.
Create a new branch (git checkout -b feature-branch).
Commit your changes (git commit -am 'Add new feature').
Push to the branch (git push origin feature-branch).
Create a new Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments
This work uses the arch package for GARCH modeling.
Special thanks to the contributors of the dataset and to all who supported this project.
For any questions or issues, please feel free to open an issue on this repository or contact me at [ljw2556826312@gmail.com].

About

项目主要构建了多混频Realized GARCH-MIDAS-X模型,结合社交媒体情绪和高频数据,与 不加社交媒体情绪指标的模型相比,加入后的模型显著提升了内地低碳市场波动预测的准确性。通过稳健 性检验,证明了研究结果的可靠性。该研究丰富了市场波动模型,并为低碳投资和宏观调控提供了参考。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published