Description Usage Arguments Details Value Note Author(s) See Also Examples
When a stock changes its ticker symbol, this function can be used to change the name of the ticker associated with the data stored on disk.
1 | ChangeTicker(old.ticker, new.ticker, base_dir = "/mnt/W/")
|
old.ticker |
character string. The ticker the stock used to have |
new.ticker |
character string. The ticker the stock has now |
base_dir |
the base directory that contains at least some of the following subdirectories: BID, ASK, TRADES, BAT, BAM. |
This will load all data stored for old.ticker
and change the
column names to use the new ticker. Then it will save a copy of the data
under the new ticker. For now, nothing is deleted, but in the future
an argument may be added to allow for that.
called for side-effect
This does not do anything with the .instrument
environment.
You should update your instruments separately (e.g. change the primary_id
to the new.ticker
and add old.ticker
as an identifier of the
new instrument with add.identifier
Garrett See
reqTBBOhistory
,
instrument_attr
and
add.identifier
for updating the
.instrument
environment (see note section)
1 2 3 4 5 6 | ## Not run:
# If you have data stored on disk for ERTS,
# this will save a copy of it in the EA directories
ChangeTicker("ERTS", "EA", "/mnt/W/")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.