Displaying 2 results from an estimated 2 matches for "sharperatio".
2011 May 23
2
Passing function arguments to dataset names
...wondering if anybody
knows the answer. I am a relatively new R user.
How do I use an argument of a custom function in the name of a dataset in R?
For example, I have the function:
MyF <- function(Tic, price){
xxxxx
xxxxx
xxxxx
Ratio.Tic<- SharpeRatio.annualized(roc)
}
I would like to have a dataset that's labelled Ratio.MSFT, Ratio.XOM,
Ratio.IBM...etc. The objective is to append multiple Ratio.Tic datasets that
contains all the ratios in one single data.
Thanks in for your time!
Mateo
--
View this message in context: http://r.789695.n4....
2012 Nov 09
2
TreynorRatio
i read about the performance analytics package
i have a doubt about the TreynorRatio
i have code
g=getSymbols("IBM")
> c=Cl(g)
> r=Return.calculate(c)
> SharpeRatio.annualized(r)
IBM.Close
Annualized Sharpe Ratio (Rf=0%) 0.3566339
> TreynorRatio (ret)
Error in inherits(x, "xts") : argument "Rb" is missing, with no default
TreynorRatio give the error like this.
what value i give for the Rb field. anybo...