risk.attrib.Copula: Risk Attribution of a Portfolio with t-Copula

Description Usage Arguments Details Value See Also Examples

View source: R/risk.attrib.Copula.R

Description

Combined representation of the risk attributes MCTR, CCTR, Portfolio Volatility, Portfolio Value at Risk (VaR) and individual Volatility of the stocks in a given portfolio for a Markowitz's Optimized weights using t-Copula.

Usage

1
risk.attrib.Copula(tickers, data, start, end, sim.size=1000, df=10)

Arguments

tickers

A character vector of ticker names of companies in the portfolio.

data

A zoo object whose rownames are dates and colnames are ticker names of the companies. Values of the table corresponds to the daily returns of the stocks of corresponding ticker names.

start

Start date in the format "yyyy-mm-dd".

end

End date in the format "yyyy-mm-dd".

sim.size

Simulation size. Default at 1000.

df

Degrees of freedom for t-Copula. Default set at 10.

Details

It calculate portfolio Value at Risk after fitting t-Copula with empirical distribution on marginals. It simulate returns from the fitted t-Copula and uses Markowitz's Optimized weight.

Value

Returns a list of following objects:

Volatility

Data frame caontaining Markowitz's optimized weights, individual stock's volatility, MCTR, CCTR for the given tickers.

Portfolio Volatility

Portfolio Volatility

Portfilio VaR

Portfolio Value at Risk

See Also

volatility, portvol, mctr, cctr, zoo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# load the data 'SnP500Returns'
data(SnP500Returns)

# consider the portfolio containing the stocks of the companies
# Apple, IBM, Intel, Microsoft
pf <- c("AAPL","IBM","INTC","MSFT")

# risk attribution for the portfolio 'pf' 
# for the time period January 1, 2013 - January 10, 2013
st<-"2013-01-01"
ed<-"2013-10-10"
risk.attrib.Copula(tickers = pf, data = SnP500Returns,
                    start = st, end = ed,
                    sim.size=1000, df=10)

Example output

$Volatility
         weight        vol      mctr       cctr
AAPL 0.09826158 0.01960915 0.8261843 0.08118218
IBM  0.40380457 0.01151683 0.8536179 0.34469481
INTC 0.30151052 0.01341829 0.9614916 0.28989982
MSFT 0.19642332 0.01635819 1.0350282 0.20330367

$`Portfolio Volatility`
[1] 0.9190805

$`Portfilio VaR`
       1%        5% 
-2.516420 -1.401095 

PortRisk documentation built on May 2, 2019, 7:22 a.m.