« Return to Thread: Flexible inputs fPortfolio possible?

Re: [R-sig-finance] Flexible inputs fPortfolio possible?

by Yohan Chalabi :: Rate this Message:

Reply to Author | View in Thread

>>>> "R" == "R@Nabble" <vlanschot@...>
>>>> on Thu, 29 May 2008 00:20:18 -0700 (PDT)


   R> Following your advice,  I did the following:
   R>
   R> PropEstimates<-function(x,Estmu=colMeans(x),Covar=cov(x))
   R> list(mu=Estmu,
   R> Sigma=Covar)
   R> ####### Efficient Frontier
   R> Data <- as.timeSeries(MatR)
   R> NAss=ncol(Data)
   R> NAss
   R> SpecDef <- portfolioSpec()
   R> Rfree = 0.04/12
   R> setRiskFreeRate(SpecDef)<- Rfree
   R> TotUni<-PropEstimates(Data,colMeans(Data),cov(Data))
   R> TotUni
   R> This code results in the following (what looks like correct)
   R> results:

how do you expect this code to work?? I did not recommend you to do
that!

you should specify the name of your estimator function with
"setEstimator<-".

this means,

setEstimator(SpecDef) <- "PropEstimates"

in your example.

Please use the code I already posted with the
*dev-version* of fPortfolio available at *R-forge*.

Yohan

--
PhD student
Swiss Federal Institute of Technology
Zurich

www.ethz.ch
www.rmetrics.org

NOTE:
Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
June 29th - July 3rd Meielisalp, Lake Thune, Switzerland

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

 « Return to Thread: Flexible inputs fPortfolio possible?

LightInTheBox - Buy quality products at wholesale price!