找回密码
 注册
查看: 1021|回复: 0

R语言 tawny包 cov_shrink()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-9-30 23:39:06 | 显示全部楼层 |阅读模式
cov_shrink(tawny)
cov_shrink()所属R语言包:tawny

                                         Shrink the covariance matrix towards some global mean
                                         对一些全球平均收缩的协方差矩阵

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This performs a covariance shrinkage estimation as specified in Ledoit and Wolf. Using within the larger framework only requires using the  ShrinkageFilter type, which handles the work of constructing a shrinkage estimate of the covariance matrix of returns (and consequently its corresponding correlation matrix).
执行指定的协方差收缩估计在Ledoit与灰太狼。使用的大框架内,只需要,使用ShrinkageFilter类型,处理工作,构建收缩估计回报率的协方差矩阵(因此,其相应的相关矩阵)。


用法----------Usage----------


cov_shrink(...)

cov_sample(...)

cov.prior.cc(S)

cor.mean(S)

shrinkage.intensity(returns, prior, sample)

shrinkage.p(returns, sample)

shrinkage.r(returns, sample, pi.est)

shrinkage.c(prior, sample)

cov.shrink(...)
cov.sample(...)



参数----------Arguments----------

参数:returns
A zoo object of returns. This is TxM  
一个动物园对象的回报。这是TXM


参数:sample
The sample covariance matrix (synonomous to S)  
样本协方差矩阵(同义向S)


参数:prior
The shrinkage target covariance matrix (synonomous to F)  
收缩目标的协方差矩阵(同义的F)


参数:S
The sample covariance matrix  
样本协方差矩阵


参数:pi.est
The estimate returned from shrinkage.p  
估计返回shrinkage.p


参数:...
Additional parameters to pass to prior.fun  
的额外参数传递到prior.fun的的


Details

详细信息----------Details----------

cov_shrink(h, prior.fun = cov.prior.cc, ...) cov_shrink(h, T, constant.fun, prior.fun = cov.prior.cc, ...) cov_shrink(h, ...)
cov_shrink(H,prior.fun = cov.prior.cc,...)cov_shrink(H,T,constant.fun,prior.fun = cov.prior.cc,...)cov_shrink(H,...)

cov_sample... cov_samplereturns cov_samplereturns
cov_sample ... cov_samplereturns cov_samplereturns

T - Length of returns series used in scaling of shrinkage coefficient h - A generic tawny object representing either a returns, covariance, or correlation matrix constant.fun -Use this function to calculate the shrinkage constant prior.fun - Generates the prior/model covariance matrix
T  - 长度的收益率序列的收缩系数在扩大 - 一个通用的黄褐色物体代表退货,协方差,相关矩阵的constant.fun使用此功能来计算的收缩不变prior.fun  - 生成前/模型协方差矩阵

Most of the code related to the shrinkage estimator is tied to calculating a value for the shrinkage coefficient. The remainder of the code shrinks the sample covariance matrix towards the target. In addition, there is a function generator used in conjunction with the optimizePortfolio process to produce a correlation matrix based on the shrinkage.
相关的代码的收缩估计是联系在一起的收缩系数计算值。代码的其余部分收缩朝向目标的协方差矩阵。此外,还有使用一并与optimizePortfolio进程产生的收缩率的基础上的相关矩阵是一个函数发生器。


值----------Value----------

Scalars are produced by all of the shrinkage.* functions, resulting in the  final shrinkage coefficient, calculated by shrinkage.intensity.
标量所产生的所有的收缩。*函数,导致在最终收缩系数,计算出shrinkage.intensity。

The cov.sample function calculates the sample covariance matrix and is MxM.
cov.sample函数计算样本协方差矩阵为M×M。

The cov.shrink function produces the shrunk version of the covariance matrix and has the same dimensions as the sample covariance matrix.
cov.shrink函数产生缩水版的协方差矩阵,并作为样本协方差矩阵具有相同的尺寸。

The cor.mean function calculates the constant correlation used in estimating the global mean (aka the shrinkage target) produced by cov.prior.cc.
cor.mean函数计算的常相关估计,全球平均(又名收缩目标)产生的cov.prior.cc。


(作者)----------Author(s)----------


Brian Lee Yung Rowe



参见----------See Also----------

tawny, optimizePortfolio
tawny,optimizePortfolio


实例----------Examples----------


  # This is autorun outside of examples[这是自动运行的例子外]
  tawny:::.init()

  # Estimate the covariance matrix based on the given asset returns[估计根据给定的资产收益率的协方差矩阵]
  data(sp500.subset)
  ys <- create(TawnyPortfolio, sp500.subset, 150)
  S.hat <- cov_shrink(ys)

  # Optimize the portfolio weights using the shrinkage estimator[优化投资组合权重的收缩估计]
  ws <- optimizePortfolio(ys, create(ShrinkageFilter))
  #plotPerformance(ys,ws, bg='white', name='Shrinkage')[plotPerformance(YS,WS,BG =“白”,名称=收缩)]

  # Calculate the sample covariance matrix[计算样本协方差矩阵]
  #S &lt;- cov.sample(ys)[S < -  cov.sample(YS)]

  # Calculate the shrinkage coefficient[计算收缩系数]
  #F &lt;- cov.prior.cc(S)[F < -  cov.prior.cc(S)]
  #k &lt;- shrinkage.intensity(ys, F, S)[K表的< -  shrinkage.intensity(YS,F,S)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-23 20:05 , Processed in 0.022757 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表