Description Usage Arguments Details Local Storage Note Examples
Download historical market data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | get_yahoo_data(symbol, from, to, split.adjusted = TRUE,
dividend.adjusted = TRUE)
get_yahoo_splits_and_dividends(symbol, from, to = from)
get_google_data(symbol, from, to = from)
get_finam_data(symbol, from, to = from, period = "day", local = FALSE)
get_iqfeed_data(symbol, from, to = from, period = "day", local = FALSE)
get_moex_options_data(code, from, to = from, period = "tick",
local = TRUE)
get_moex_futures_data(code, from, to = from, period = "tick",
local = TRUE)
get_moex_continuous_futures_data(contract, from, to, frequency, day_exp)
|
symbol |
symbol name |
from, to |
text dates in format |
split.adjusted |
should data be split adjusted? |
dividend.adjusted |
should data be split adjusted? |
period |
candle period |
local |
should data be loaded from local storage? See 'Local Storage' section |
code |
futures or option code name, e.g. |
contract, frequency, day_exp |
same as in |
Use external websites to get desired symbol name for
Finam,
MOEX,
IQFeed,
Yahoo and
Google sources.
data.table
with following data returned:
daily: | date, open, high, low, close, volume, open_interest |
intraday: | date, open, high, low, close, volume |
tick: | time, price, volume, size, bid, ask, tick_id, basis_for_last, trade_market_center, trade_conditions |
See iqfeed specification for details.
Note: from
and to
can be set as text in format "YYYY-mm-dd HH:MM:SS"
.
data.table
with following data returned:
daily: | date, open, high, low, close, volume |
intraday: | date, open, high, low, close, volume |
tick: | time, price, volume |
data.table
with following data returned:
daily: | date, open, high, low, close, adj_close, volume |
splits and dividends: | date, value, event |
data.table
with following data returned:
daily: | date, open, high, low, close, volume |
data can be retrieved from local storage only in order to minimize load on MOEX data servers. See 'Local Storage' section.
It is recommended to store tick market data locally.
Load time is reduced dramatically. It is a good way to collect market data as
e.g. IQFeed gives only 180 days of tick data if you would need more it will
cost you a lot. See store_market_data
for details.
Only IQFeed, Finam and MOEX data supported.
Timestamps timezones set to UTC.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | get_finam_data( 'GAZP', '2015-01-01', '2016-01-01' )
get_finam_data( 'GAZP', '2015-01-01', '2016-01-01', 'hour' )
get_finam_data( 'GAZP', Sys.Date(), Sys.Date(), 'tick' )
get_iqfeed_data( 'MSFT', '2015-01-01', '2016-01-01' )
get_iqfeed_data( 'MSFT', '2015-01-01', '2016-01-01', 'hour' )
get_iqfeed_data( 'MSFT', Sys.Date() - 3, Sys.Date() , 'tick' )
get_google_data( 'MSFT', '2015-01-01', '2016-01-01' )
get_yahoo_data( 'MSFT', '2015-01-01', '2016-01-01' )
get_moex_futures_data( 'RIH9', '2009-01-01', '2009-02-01', 'tick', local = T )
get_moex_options_data( 'RI55000C9', '2009-01-01', '2009-02-01', 'tick', local = T )
get_moex_continuous_futures_data( 'RI', '2016-01-01', '2016-11-01', frequency = 3, day_exp = 15 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.