*! version 2.0.0 23jun2016

Title

returnsyh -- collects a set of online stock series from Yahoo Finance, integrate the series and calculates simple and continously compounded returns.

Syntax

returnsyh ticker_list, fm(#) fd(#) fy(#) lm(#) ld(#) ly(#) frequency(d|w|m) price(open|close|high|low|adjclose) [CASEwise]

fm(#) first month (from 1 to 12)

fd(#) first day (from 1 to 31)

fy(#) first year

lm(#) last month (from 1 to 12)

ld(#) last day (from 1 to 31)

ly(#) last year

frequency(d|w|m) frequency of the data: d for daily; w for weekly; m for monthly

price(open|close|adjclose|high|low) Type of price: open, close, high, low, and adjclose (adjclose means adjusted for dividends and stock split)

casewise specifies casewise deletion of observations in case there is no match of periods.
The default is to use all the observations for each variable.

Description

returnsyh collects and integrates stock prices from Yahoo Finance, and also calculates simple and continously compounded returns for each ticker. The stock symbols or tickers must be
equal to those used in Yahoo Finance (finance.yahoo.com)

Remarks

Check the "Also See" Menu for related commands.

Examples

Collects online monthly stock data (adjusted prices) from Yahoo Finance from Jan 2012 to Dec 2015. Returns are calculated automatically and the return variables will start with r_*

. returnsyh AAPL MSFT GE GM WMT XOM, fm(1) fd(1) fy(2012) lm(12) ld(31) ly(2015) frequency(m) price(adjclose)

Stored results

returnsyh stores results in r() in the following scalar and macro:

Scalars

r(numtickers): Number of tickers with online data that could be brought from Yahoo Finance

Macros

r(tickerlist): Contains a list of the tickers brought from Yahoo Finance

Author

Carlos Alberto Dorantes, Tecnológico de Monterrey, Querétaro Campus, Querétaro, México.
Email: cdorante@itesm.mx