Learn R Programming

rusquant (version 1.1.4)

getSymbols.MarketWatch: MarketWatch 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,
  from = "2007-01-01",
  to = Sys.Date(),
  adjust = FALSE,
  period = "day",
  market = NULL,
  countrycode = NULL,
  verbose = FALSE,
  auto.assign = FALSE,
  ...
)

Value

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

Arguments

Symbols

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

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.

Author

Vyacheslav Arbuzov

Examples

Run this code
getSymbols.MarketWatch(Symbols = 'liborusd3m',market = 'interestrate',countrycode = 'mx')
#getSymbols.MarketWatch(Symbols = 'tmubmusd03m',market = 'bond',countrycode = 'bx')

Run the code above in your browser using DataLab