Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This is the repository for R code associated with the paper "Garch Tutorial in R", submitted to RAC in march 2020. The full paper is available at RAC.

Available R scripts

Filename Description
00-Prepare_computer.R Setup computer by installing all required R packages. This is a mandatory step.
01-Get_Index_Data.R Using the internet, imports a dataset of prices of the Ibovespa index.
02-Do_Descriptive_Figures.R Creates and saves all descriptive figures presented in the paper.
03-Do_ARCH_Test.R Performs the arch test in the data.
04-Estimate_Garch_Model.R Estimate an introductory Garch model and present results.
05-Find_Best_Garch_Model.R Finds the best Garch/eGarch/gjcGarch model for the dataset.
06-Simulate_Garch_Model.R Simulates the previous GARCH model and plots paths and probabilities.


  1. Install latest version of R (link )

  2. Install latest version of RStudio (link)

  3. Download zip file from this repository.

  4. Unzip the content of zip file in a personal folder

  5. Run first script 00-Prepare_Computer.R to install all dependencies of the code. For that, in RStudio, open R script file and press control + shift + enter

  6. Execute other scripts in root folder in order to reproduce all results from the paper

If these steps don't work for you, please let us know by reporting OS (windows/linux/mac), R version and error code (if any).

Issues and bugs

If you've found an issue within the code, please use Git issue system. That way everyone will be able to see the history of issues and corrections.

Tested platforms:


Repository for GARCH tutorial paper in RAC






No packages published