Skip to content

Produced risk metric tools as Var & ES using log returns and creating several scenarios/simulations with different distributions

License

Notifications You must be signed in to change notification settings

14ivanperez/Risk-Management-in-Finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Risk Management using R

Introduction

I will show how to calculate the return of a portfolio of securities as well as quantify the market risk of that portfolio. I will use the two main tools for calculating the market risk of stock portfolios: Value-at-Risk (VaR) and Expected Shortfall (ES).

Installation

#load data
library(quantmod)    #package needed for data
wilsh<-getSymbols("DEXUSAL",src="FRED",auto.assign=FALSE) #obtain symbols for data
wilsh <- na.omit(wilsh) #omit NA values
wilsh <- wilsh["1979-12-31/2017-12-31"]  #to use specific dates

Required libraries

library(quantmod) 
library(moments)
library(MASS)
library(metRology)
library(rugarch)

Topics discused

# TO OBTAIN VAR AND ES FROM ACTUAL DATA
# VAR AND ES FROM SIMULATIONS:
1. different distributions (randon, normal, t)
2. Calculate skewness, kurtosis, and Jarque-Bera test 
# ESTIMATE VaR and ES at 10-DAY HORIZON
# ACF AND VOLATILITY CLUSTERING USING GARCH MODELS

Roadmap

1.Data source (FRED at the Federal Reserve Bank of St. Louis), and the calculation of returns 
                                                 ↓
2.How to calculate value-at-risk (VaR) and expected shortfall (ES) when returns are normally distribute
                                                 ↓
3.How to calculate VaR and ES when returns aren't normally distributed (random and t distributed)
                                                 ↓
4.Test for the presence of volatility clustering (Jarque-Bera test ), and how to calculate VaR and ES when returns exhibit volatility clustering

References

Financial Risk Management with R, Duke University

About

Produced risk metric tools as Var & ES using log returns and creating several scenarios/simulations with different distributions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages