Description Usage Arguments Details Value See Also Examples
View source: R/risk.attrib.Copula.R
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.
1 | risk.attrib.Copula(tickers, data, start, end, sim.size=1000, df=10)
|
tickers |
A character vector of ticker names of companies in the portfolio. |
data |
A |
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. |
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.
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 |
volatility
,
portvol
,
mctr
,
cctr
,
zoo
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)
|
$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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.