On Fri, Nov 9, 2012 at 8:35 AM, sheen maria <sheenmar...@gmail.com> wrote:
> Sir,
>   But in this price returns only the closing value (Cl(getsymbols("IBM"))
> i already refer the ?TreynorRatio
>
> But it not specify how to calculate the benchmark return.
> In this case what value i put as benchmark return series.
>

Please keep your replies on list.

You choose the benchmark -- no one else can. For most asset classes,
there are well-defined standards, but ultimately it's the analyst's
job.

To calculate returns, you can use the Return.calculate() function as
you did below.

Note however that you're misusing getSymbols. This would be better

getSymbols("SPY")
r = Return.calculate(SPY)

or this

g = getSymbols("SPY", auto.assign = FALSE)
r = Return.calculate(g)

Michael

>
>
>
> On Fri, Nov 9, 2012 at 1:32 PM, R. Michael Weylandt
> <michael.weyla...@gmail.com> wrote:
>>
>> On Fri, Nov 9, 2012 at 6:46 AM, sheenmaria <sheenmar...@gmail.com> wrote:
>> > 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.  anyboday can help
>>
>> Type
>>
>> ?TreynorRatio
>>
>> to see the documentation. The Treynor ratio is a relative performance
>> metric, so you have to give a benchmark return series as well.
>>
>> Michael
>
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to