[R-SIG-Finance] great conference and a question

Rowe, Brian Lee Yung (Portfolio Analytics) B_Rowe at ml.com
Mon Apr 27 20:44:36 CEST 2009

If you want the returns for the underlying index constituents, you can
also use some functions in tawny that do this for you (leverages
quantmod under the hood):

h <- getPortfolioReturns(getIndexComposition('^DJI'), obs=100,

The getIndexComposition method retrieves index data from Yahoo! (if it
exists). It works for most major indices, although their service is at
times unreliable.


-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Brian G.
Sent: Monday, April 27, 2009 2:25 PM
To: Hodgess, Erin
Cc: r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] great conference and a question

Hodgess, Erin wrote:
> Hi all!
> Wasn't the R in finance conference great this weekend?  Thanks to the
program committee!
> Anyhow, I have a question, too, please:  the S&P returns that we
typically see in examples - where can I find them online please?
> Thanks,
> Erin
You can use quantmod to download a price series for the index, and then 
use Return.calculate or other methods to generate a return series.  
Perhaps this goes without saying, but to do returns analysis, it is 
generally best to have the price series first, as what you most likely 
want is to calculate simple per-period returns before doing your 
analysis; log returns are only useful for things like a cumulative 
return chart or wealth index.


     - Brian

Brian G. Peterson
Ph: 773-459-4973
IM: bgpbraverock

R-SIG-Finance at stat.math.ethz.ch mailing list
-- Subscriber-posting only.
-- If you want to post, subscribe first.

This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. References to "Merrill Lynch" are references to any company in the Merrill Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this E-communication may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.

More information about the R-SIG-Finance mailing list