getSymbols.MarketWatch: MarketWatch Alor data

getSymbols.MarketWatchR Documentation

MarketWatch Alor data

Description

This function retrieves historical financial data for a given symbol from the MarketWatch website and returns it as a data frame or assigns it to an R object.

Usage

getSymbols.MarketWatch(
  Symbols,
  env = globalenv(),
  from = "2007-01-01",
  to = Sys.Date(),
  adjust = FALSE,
  period = "day",
  market = NULL,
  countrycode = NULL,
  verbose = FALSE,
  auto.assign = FALSE,
  ...
)

Arguments

Symbols

A character vector specifying the name of the financial instrument(s) to retrieve.

env

An environment where the data should be loaded.

from

A character string specifying the starting date for the historical data in the format "YYYY-MM-DD".

to

A character string specifying the ending date for the historical data in the format "YYYY-MM-DD".

adjust

A logical value indicating whether to adjust the prices for splits and dividends. The default value is FALSE.

period

A character string specifying the period for which to retrieve the data. The default value is "day".

market

A character string specifying the market where the financial instrument is listed.

countrycode

A character string specifying the country code of the market where the financial instrument is listed.

verbose

A logical value indicating whether to print additional information while running the function. The default value is FALSE.

auto.assign

A logical value indicating whether to assign the data to an R object with the same name as the symbol. The default value is FALSE.

...

Additional arguments.

Value

A data frame or an object of class "xts" containing the historical financial data for the given symbol.

Note

Not for the faint of heart. All profits and losses related are yours and yours alone. If you don't like it, write it yourself.

Author(s)

Vyacheslav Arbuzov

Examples

getSymbols.MarketWatch(Symbols = 'liborusd3m',market = 'interestrate',countrycode = 'mr')
getSymbols.MarketWatch(Symbols = 'tmubmusd03m',market = 'bond',countrycode = 'bx')

arbuzovv/rusquant documentation built on Feb. 1, 2024, 6:39 p.m.