1.3 Financial econometrics packages in R

  • There are several packages which are helpful in analyzing financial time–series and support different approaches. The packages required for this course are shown in the following table
TABLE 1.5: R packages usefull for financial econometrics
Package Description
xts Provides fast and flexible tools for managing financial time-series data
quantmod Supports quantitative financial modeling
PerformanceAnalytics Focuses on performance and risk analysis of financial portfolios
rugarch Implements univariate GARCH models for volatility forecasting
rmgarch Extends univariate to multivariate GARCH models
TTR Provides technical trading rules and non-parametric volatility measures
highfrequency Analyzes realized measures of volatility and co-volatility by intraday prices
evir Implements extreme value theory methods for measuring the risk
fPortfolio Supports RiskMetrics approaches to porfolio optimization
fGarch Supports RiskMetrics approaches to GARCH modelling
  • Once installed, packages do not need to be reinstalled, but they must be loaded from the library each time you use them in a new session

  • To summarize the results in well–formatted and customized tables an additional package modelsummary should be installed and loaded from the library. This package supports datasummary() command to visualize descriptive statistics and modelsummary() command to visualize econometric model output.

  • Commands datasummary() and modelsummary() require data to be of type data frame. Data frame, in general, may contain multiple columns of different types (numeric, character, factor or integer). Rows and columns of any data frame can be named/renamed, which helps in referencing to specific data in later usage