[R-SIG-Finance] Value-at-risk

Brian G. Peterson brian at braverock.com
Sun Jun 19 14:06:28 CEST 2011


On Sun, 2011-06-19 at 03:19 -0700, sadako wrote:
> I'm ok with the notions of component and marginal VaR but can't retrieve
> results from marginal.
> 
> First what is the PortfolioVaR with the portfolio_method="marginal" ?
> Except the sign, the 2 figures I get from these functions for PortfolioVaR
> are differents :
> VaR(tsdata,method="gaussian",portfolio_method="marginal")
> VaR(tsdata,method="gaussian",portfolio_method="component")$VaR

Marginal and component VaR *are* different.  So I'm not sure I
understand what you're asking, entirely.

Component VaR is a coherent risk measure per Artzner.  The component
risks will add up to the univariate VaR of the entire portfolio.  The
univariate portfolio VaR is given in the $VaR slot you reference in your
code.  The additive measures are available two different ways, in the
$contribution slot (which will add up to the univariate portfolio VaR)
and in the $pct_contrib_VaR slot which will add up to 1(100%)

> Second -and it is maybe be related - how is the marginal VaR computed ?

Marginal VaR is the difference between the univariate portfolio VaR of a
a portfolio with the instrument in question and the VaR of the portfolio
without that instrument.  It is not guaranteed to add up to anything.
Frankly, I think it is a useless measure *unless* you are comparing two
otherwise similar instruments for inclusion in a portfolio, and want to
see which of those two instruments would add less risk to the portfolio
"at the margin".

> I tried the following but the result is different from the function (here it
> is the 5th marginal) :
> 
> VaR(tsdata,method="gaussian",portfolio_method="component")$VaR-VaR(tsdata[,-5],method="gaussian",portfolio_method="component")$VaR

Component VaR and marginal VaR aren't interchangeable, as described
above, and as described in the documentation.

simple subtraction doesn't work, because the portfolio (capital) needs
to be redistributed.

The weighting factor is

weightfactor = sum(weightingvector)/sum(t(weightingvector)[, -column])

you can see the code with:

PerformanceAnalytics:::VaR.Marginal

> Many thanks for any helpful comment,

I hope this helps,

    - Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list