EVOLUTION-MANAGER
Edit File: getSymbols.yahoo.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Download OHLC Data From Yahoo Finance</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for getSymbols.yahoo {quantmod}"><tr><td>getSymbols.yahoo {quantmod}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Download OHLC Data From Yahoo Finance </h2> <h3>Description</h3> <p>Downloads <code>Symbols</code> to specified <code>env</code> from ‘finance.yahoo.com’. This method is not to be called directly, instead a call to <code>getSymbols(Symbols,src='yahoo')</code> will in turn call this method. It is documented for the sole purpose of highlighting the arguments accepted, and to serve as a guide to creating additional getSymbols ‘methods’. </p> <h3>Usage</h3> <pre> getSymbols.yahoo(Symbols, env, return.class = 'xts', index.class = 'Date', from = "2007-01-01", to = Sys.Date(), ..., periodicity = "daily", curl.options = list()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>Symbols</code></td> <td> <p> a character vector specifying the names of each symbol to be loaded</p> </td></tr> <tr valign="top"><td><code>env</code></td> <td> <p> where to create objects. (.GlobalEnv) </p> </td></tr> <tr valign="top"><td><code>return.class</code></td> <td> <p> class of returned object </p> </td></tr> <tr valign="top"><td><code>index.class</code></td> <td> <p> class of returned object index (xts only) </p> </td></tr> <tr valign="top"><td><code>from</code></td> <td> <p> Retrieve data no earlier than this date. (2007-01-01)</p> </td></tr> <tr valign="top"><td><code>to</code></td> <td> <p> Retrieve data through this date (Sys.Date())</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p> additional parameters </p> </td></tr> <tr valign="top"><td><code>periodicity</code></td> <td> <p> periodicity of data to query and return. Must be one of "daily", "weekly", "monthly". ("daily") </p> </td></tr> <tr valign="top"><td><code>curl.options</code></td> <td> <p> options passed to <code>curl::handle_setopt</code> </p> </td></tr> </table> <h3>Details</h3> <p>Meant to be called internally by <code>getSymbols</code> (see also). </p> <p>One of a few currently defined methods for loading data for use with <span class="pkg">quantmod</span>. Essentially a simple wrapper to the underlying Yahoo! finance site's historical data download. </p> <h3>Value</h3> <p>A call to getSymbols.yahoo will load into the specified environment one object for each <code>Symbol</code> specified, with class defined by <code>return.class</code>. Presently this may be <code>ts</code>, <code>zoo</code>, <code>xts</code>, or <code>timeSeries</code>. </p> <p>In the case of xts objects, the indexing will be by Date. This can be altered with the <code>index.class</code> argument. See <code>indexClass</code> for more information on changing index classes. </p> <h3>Warning</h3> <p>As of quantmod 0.4-9, <code>getSymbols.yahoo</code> has been patched to work with changes to Yahoo Finance, which also included the following changes to the raw data: </p> <ul> <li><p> The adjusted close column appears to no longer include dividend adjustments </p> </li> <li><p> The close column appears to be adjusted for splits twice </p> </li> <li><p> The open, high, and low columns are adjusted for splits, and </p> </li> <li><p> The raw data may contain missing values. </p> </li></ul> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>References</h3> <p> Yahoo Finance: <a href="https://finance.yahoo.com">https://finance.yahoo.com</a> </p> <h3>See Also</h3> <p><code><a href="getSymbols.html">getSymbols</a></code>, <code><a href="setSymbolLookup.html">setSymbolLookup</a></code> </p> <h3>Examples</h3> <pre> ## Not run: # All 3 getSymbols calls return the same # MSFT to the global environment # The last example is what NOT to do! ## Method #1 getSymbols('MSFT',src='yahoo') ## Method #2 setDefaults(getSymbols,src='yahoo') # OR setSymbolLookup(MSFT='yahoo') getSymbols('MSFT') ######################################### ## NOT RECOMMENDED!!! ######################################### ## Method #3 getSymbols.yahoo('MSFT',env=globalenv()) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>quantmod</em> version 0.4.20 <a href="00Index.html">Index</a>]</div> </body></html>