getSymbols.FI {FinancialInstrument} | R Documentation |
getSymbols method for loading data from split files
Description
This function should probably get folded back into getSymbols.rda in quantmod.
Usage
getSymbols.FI(Symbols, from = getOption("getSymbols.FI.from", "2010-01-01"),
to = getOption("getSymbols.FI.to", Sys.Date()), ...,
dir = getOption("getSymbols.FI.dir", ""),
return.class = getOption("getSymbols.FI.return.class", "xts"),
extension = getOption("getSymbols.FI.extension", "rda"),
split_method = getOption("getSymbols.FI.split_method", c("days", "common")),
use_identifier = getOption("getSymbols.FI.use_identifier", NA),
date_format = getOption("getSymbols.FI.date_format"),
verbose = getOption("getSymbols.FI.verbose", TRUE),
days_to_omit = getOption("getSymbols.FI.days_to_omit", c("Saturday",
"Sunday")), indexTZ = getOption("getSymbols.FI.indexTZ", NA))
Arguments
Symbols |
a character vector specifying the names of each symbol to be loaded |
from |
Retrieve data no earlier than this date. Default '2010-01-01'. |
to |
Retrieve data through this date. Default Sys.Date(). |
... |
any other passthru parameters |
dir |
if not specified in getSymbolLookup, directory string to use. default "" |
return.class |
only "xts" is currently supported |
extension |
file extension, default "rda" |
split_method |
string specifying the method used to split the files,
currently ‘days’ or ‘common’, see
|
use_identifier |
optional. identifier used to construct the
|
date_format |
format as per the |
verbose |
TRUE/FALSE |
days_to_omit |
character vector of names of weekdays that should not be
loaded. Default is |
indexTZ |
valid TZ string. (e.g. “America/Chicago” or
“America/New_York”) See |
Details
Meant to be called internally by getSymbols
.
The symbol lookup table will most likely be loaded by
setSymbolLookup.FI
If date_format is NULL (the Default), we will assume an ISO date as changed
by make.names
, for example, 2010-12-01 would be assumed to be a
file containing 2010.12.01
If indexTZ
is provided, the data will be converted to that timezone
If auto.assign is FALSE, Symbols
should be of length 1. Otherwise,
getSymbols
will give you an error that says
“must use auto.assign=TRUE for multiple Symbols requests”
However, if you were to call getSymbols.FI
directly (which is
NOT recommended) with auto.assign=FALSE
and more than one
Symbol, a list would be returned.
Argument matching for this function is as follows. If the user provides a
value for an argument, that value will be used. If the user did not provide
a value for an argument, but there is a value for that argument for the
given Symbol
in the Symbol Lookup Table (see
setSymbolLookup.FI
), that value will be used. Otherwise,
the formal defaults will be used.
See Also
saveSymbols.days
instrument
setSymbolLookup.FI
loadInstruments
getSymbols
Examples
## Not run:
getSymbols("SPY", src='yahoo')
dir.create("tmpdata")
saveSymbols.common("SPY", base_dir="tmpdata")
rm("SPY")
getSymbols("SPY", src='FI', dir="tmpdata", split_method='common')
unlink("tmpdata/SPY", recursive=TRUE)
## End(Not run)