Rohan,

I'm a little confused about what you really

want, but perhaps 'var.shrink.eqcor' from

the 'BurStFin' package can help.

The package is not yet on CRAN (but it's

getting closer), get it from:

install.packages('BurStFin',

repos="

http://www.burns-stat.com/R")

(which doesn't work under 2.14.x because it

doesn't have a namespace).

'var.shrink.eqcor' returns the shrinkage that

it uses as an attribute.

To get estimates that are trying to mimic the

original Ledoit-Wolf code, you need to set the

weights to be all equal and the 'compatible'

argument to TRUE.

The shrinkage parameter is slightly different

from that estimated in 'tawny'. I have a sample

size of one that suggests I get the value that

Ledoit and Wolf's Matlab code gets. I couldn't

see where the difference comes from in the little

time I spent trying.

Pat

On 28/01/2012 05:42, Rohan Sadler wrote:

> Hi All,

>

> newbie question: I am interested in acquiring the value of Ledoit& Wolf's

> (2003) optimal shrinkage estimate from the tawny package (or other). Having

> read the paper, and then had a look at tawny, then I can derive the

> shrinkage intensity (intensity.shrinkage, see below code). However, as the

> value of the intensity is larger than one then I wanted to confirm whether

> the L&W shrinkage parameter is not tawny's intensity/T, where T is the

> length of the time series (i.e., rows of the returns matrix). That is,

> confirm whether tawny's shrinkage.intensity function returns what L&W

> termed as the 'optimal constant' kappa (p611), rather than L&W's optimal

> shrinkage intensity alpha.

>

> sample.vcov<-cov.sample(returns.zoo)

> F<- cov.prior.cc(sample.vcov)

> k<- shrinkage.intensity(returns.zoo, F, sample.vcov)

> shrunk.vcov<-cov.shrink(returns.zoo,prior.fun = cov.prior.cc)

>

> The output from Brian's site:

>

http://nurometic.com/quantitative-finance/tawny/exploring-shrinkage-estimation> doesn't

> seem

> to hold for the latest R/tawny version. It would be nice to acquire that

> information somehow, perhaps embedded in one of the shrunk objects, or at

> least one or two more lines of documentation in the associated help pages

> (apologies for being demanding!!). Packages fPortfolio and corpcor didn't

> seem to provide any of this information either for the newbie crowd.

>

>> S.hat<- cov.shrink(h)

> Got intensity k = 146.8918 and coefficient d = 0.9792788

>

>

> Regards

> Rohan Sadler

>

--

Patrick Burns

[hidden email]
http://www.burns-stat.comhttp://www.portfolioprobe.com/blogtwitter: @portfolioprobe

_______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. If you want to post, subscribe first.

-- Also note that this is not the r-help list where general R questions should go.