Stocks outperforming their index
On Mon, Apr 22, 2013 at 3:24 PM, Arturo DiDonna
<arturo.didonna at gmail.com> wrote:
I am sorry if this is a FAQ, but I am looking for a resource allowing to determine which stocks have out(under)performed their index by a given parameter over a certain period of time. Ideally, the r package should provide also some facility for data retrieval. Thanks in advance.
It's fairly canned, but I think library(quantmod) ? getSymbols # Data retreival ? ROC # Convert Prices to returns ? runMean # running returns get you there. Of course, you'll need to use > / < operators yourself, but it's quite easily programmed. Cheers, MW
Arturo.
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at r-project.org 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.