Learn R Programming

rusquant (version 1.1.4)

getSymbols.Moex: Get financial data from MOEX Exchange

Description

Retrieves historical data of a stock from Moscow Exchange (MOEX) using its API.

Usage

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

Value

xts object with historical data

Arguments

Symbols

character vector of ticker symbols to retrieve data for

env

environment where data is stored

from

character string specifying the start date (default: '2007-01-01')

to

character string specifying the end date (default: Sys.Date())

adjust

logical flag indicating whether to adjust prices for dividends and splits (default: FALSE)

period

character string specifying the interval of the data ('day', 'hour', '10min', or '1min'; default: 'day')

market

character string specifying the market of the data (default: NULL)

verbose

logical flag indicating whether to print progress messages (default: FALSE)

auto.assign

logical flag indicating whether to automatically assign the resulting data to objects with the same names as Symbols (default: FALSE)

...

Additional arguments.

Author

Vyacheslav Arbuzov

Examples

Run this code
data <- getSymbols.Moex('GAZP', from='2022-01-01', to='2022-01-10', period='day', auto.assign=FALSE)

Run the code above in your browser using DataLab