getSymbols.Finam: Download historical data from Finam.ru

getSymbols.FinamR Documentation

Download historical data from Finam.ru

Description

Download historical data from Finam.ru for one or more stock symbols. The data can be returned as an xts object or assigned to a specified environment. This function uses the Finam.ru export service to retrieve data.

Usage

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

Arguments

Symbols

A character vector of one or more stock symbols.

env

The environment where the data should be assigned. Defaults to the global environment.

from

The start date for the data. Defaults to "2007-01-01".

to

The end date for the data. Defaults to the current date.

adjust

A logical indicating whether to adjust for dividends and splits. Defaults to FALSE.

period

The interval to use for the data. Must be one of "tick", "1min", "5min", "10min", "15min", "30min", "hour", "day", "week", or "month". Defaults to "day".

market

A character vector indicating the market for each symbol. If NULL, the function will attempt to determine the market automatically. Defaults to NULL.

verbose

A logical indicating whether to print progress messages. Defaults to FALSE.

auto.assign

A logical indicating whether to assign the data to an object with the same name as the symbol. Defaults to FALSE.

api.key

character representing the authorization key required for accessing broker/exchange API

user_agent

Header for user agent for Finam

...

additional arguments passed to getSymbols.Finam

Value

returns an data.table object containing the requested data with orders of current account.

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

api_key = 'set_if_use_API'
getSymbols('SBER',src='Finam',from='2023-01-01',api.key = api_key)

rusquant documentation built on Sept. 30, 2024, 9:42 a.m.