[R] Newbie question re stddev, quantmod and performanceanalytics

Stefan Grosse singularitaet at gmx.net
Mon Aug 17 14:01:17 CEST 2009


On Sun, 16 Aug 2009 22:43:14 -0700 (PDT) afx111 <afx111 at yahoo.com>
wrote:

A> getSymbols("YHOO")
A> retYHOO <- Return.calculate(Cl(YHOO))
A> > sd(retYHOO)
A> 
A> YHOO.Close 
A>         NA 
A> 
A> but i received an NA....can any assist? tks!

You receive NA because getSymbols went wrong, so YHOO was empty. Try
getSymbols('YHOO',src='yahoo',return.class='ts')

Btw. there is a r-finance mailing list which is a good place for such
questions. 

Hth 
Stefan




More information about the R-help mailing list