在R中使用历史方法对成分VaR无贡献
我是R新手。我正在使用软件包计算投资组合的组成部分VaR。在R中使用历史方法对成分VaR无贡献,r,finance,performanceanalytics,risk-analysis,R,Finance,Performanceanalytics,Risk Analysis,我是R新手。我正在使用软件包计算投资组合的组成部分VaR。如果我使用高斯方法,它将返回贡献 > VaR(edhec, p=.95, method="gaussian", portfolio_method="component") no weights passed in, assuming equal weighted portfolio $VaR [,1] [1,] 0.01193358 $contribution Convertible Arbitrage
如果我使用高斯方法,它将返回贡献
> VaR(edhec, p=.95, method="gaussian", portfolio_method="component")
no weights passed in, assuming equal weighted portfolio
$VaR
[,1]
[1,] 0.01193358
$contribution
Convertible Arbitrage CTA Global Distressed Securities Emerging Markets Equity Market Neutral Event Driven Fixed Income Arbitrage
0.0014400703 0.0003687009 0.0012961865 0.0032090406 0.0003479361 0.0013848605 0.0010051944
Global Macro Long/Short Equity Merger Arbitrage Relative Value Short Selling Funds of Funds
0.0011151866 0.0015860006 0.0004412756 0.0009265836 -0.0027498306 0.0015623733
$pct_contrib_VaR
Convertible Arbitrage CTA Global Distressed Securities Emerging Markets Equity Market Neutral Event Driven Fixed Income Arbitrage
0.12067381 0.03089608 0.10861675 0.26890849 0.02915606 0.11604738 0.08423244
Global Macro Long/Short Equity Merger Arbitrage Relative Value Short Selling Funds of Funds
0.09344947 0.13290235 0.03697764 0.07764507 -0.23042800 0.13092245
>
但如果我使用历史方法,它只返回单个投资组合级别的值
> VaR(edhec, p=.95, method="historical", portfolio_method="component")
no weights passed in, assuming equal weighted portfolio
[1] 0.01439231
>
这是正确的吗?我错过什么了吗 编辑
我想使用历史模拟方法计算每个部分的组成部分风险值。不使用
组合_method=“component”
部分返回所有单独的百分比贡献
> VaR(edhec, p=.95, method="historical")
结果:
Convertible Arbitrage CTA Global Distressed Securities Emerging Markets
VaR -0.01916 -0.0354 -0.018875 -0.044605
Equity Market Neutral Event Driven Fixed Income Arbitrage Global Macro
VaR -0.006385 -0.02254 -0.00929 -0.01624
Long/Short Equity Merger Arbitrage Relative Value Short Selling Funds of Funds
VaR -0.02544 -0.013455 -0.013175 -0.07848 -0.021265
虽然这是为什么,但我不确定,因为我对包或VaR一般都不熟悉
help(VaR)
对行为似乎是明确的。无论如何,对我未经训练的眼睛来说,这不是一种“历史”方法。这种方法不是一种“模拟”方法。它是对已实现历史损失分位数的度量
我在R-Forge上的v1.4.3574中添加了对性能和Altytics
的历史贡献
您的示例现在生成:
> VaR(edhec, p=.95, method="historical", portfolio_method="component")
no weights passed in, assuming equal weighted portfolio
$hVaR
hVaR 95%
0.01419502
$contribution
Convertible.Arbitrage CTA.Global Distressed.Securities Emerging.Markets Equity.Market.Neutral Event.Driven Fixed.Income.Arbitrage Global.Macro Long.Short.Equity
-0.0006396664 -0.0001887839 -0.0007621405 -0.0020091076 -0.0001331756 -0.0008771216 -0.0004113300 -0.0006202640 -0.0010782781
Merger.Arbitrage Relative.Value Short.Selling Funds.of.Funds
-0.0002735736 -0.0005046562 0.0012263158 -0.0008257281
$pct_contrib_hVaR
Convertible.Arbitrage CTA.Global Distressed.Securities Emerging.Markets Equity.Market.Neutral Event.Driven Fixed.Income.Arbitrage Global.Macro Long.Short.Equity
0.09012547 0.02659862 0.10738139 0.28307218 0.01876371 0.12358159 0.05795412 0.08739178 0.15192344
Merger.Arbitrage Relative.Value Short.Selling Funds.of.Funds
0.03854501 0.07110328 -0.17278113 0.11634054
它现在可以从SVN获得,应该以二进制形式“很快”提供,并将包含在下一版本的
PerformanceAnalytics
中帮助(VaR)
是否提供了任何见解?组件VaR不是正常的VaR。因此不能保留此参数。任何人都可以获得最有用的解决方案。谢谢:)