Yahoo Finance and Quandl data downloader

バージョン 1.131 (545 KB) 作成者: Artem Lensky
YahooFinance/Quandl data downloader
ダウンロード: 6.9K
更新 2021/3/7
The toolbox contains two functions:
(a) getMarketDataViaYahoo()
% INPUT:
% symbol - is a ticker symbol i.e. 'AMD', 'BTC-USD'
% startdate - the market data will be requested from this data
% enddate - the market data will be requested till this date
% interval - the market data will be returned in this intervals
% supported intervals are '1d', '5d', '1wk', '1mo', '3mo'
%
% OUTPUT:
% data - is a retrieved dataset returned as a table
data = getMarketDataViaYahoo('AMD', '1-Jan-2018', datetime('today'), '5d'); % Downloads AMD share historic price
(b) getMarketDataViaQuandl()
% INPUT:
% set_name - is a dataset name e.g. 'WIKI/AAPL'
% startdate - the market data will be requested from this data
% enddate - the market data will be requested till this date
% collapse - the market data will be returned in this intervals
% supported intervals are 'daily', 'weekly', 'monthly', 'quarterly', 'annual'
% key - user's api key
%
% OUTPUT:
% data - is a retrieved dataset returned as a table
opec_orb_raw = getMarketDataViaQuandl('OPEC/ORB', '1-Jan-2018', date(), 'weekly'); % Downloads historic OPEC basket price from Quandl
For a complete list of free datasets provided by Quandl check https://www.quandl.com/search?filters=%5B%22Free%22%5D
Examples:
(a) Yahoo Finance
disp('Request historical YTD Bitcoin price and plot Close, High and Low');
initDate = '1-Jan-2018';
symbol = 'BTC-USD';
btcusd = getMarketDataViaYahoo(symbol, initDate);
btcusdts = timeseries([btcusd.Close, btcusd.High, btcusd.Low], datestr(btcusd(:,1).Date));
btcusdts.DataInfo.Units = 'USD';
btcusdts.Name = symbol;
btcusdts.TimeInfo.Format = "dd-mm-yyyy";
plot(btcusdts);
legend({'Close', 'High', 'Low'});
(b) Quandl
dataset = 'LBMA/GOLD';
initDate = '1-Jan-2018';
lbma_gold_raw = getMarketDataViaQuandl(dataset, initDate, date(), 'daily');
lbma_gold_ts = timeseries(lbma_gold_raw.("EURO(AM)"), datestr(lbma_gold_raw.Date));
lbma_gold_ts.DataInfo.Units = 'USD';
lbma_gold_ts.Name = dataset;
lbma_gold_ts.TimeInfo.Format = "dd-mm-yyyy";
figure, plot(lbma_gold_ts);

引用

Artem Lensky (2024). Yahoo Finance and Quandl data downloader (https://github.com/Lenskiy/Yahoo-Quandl-Market-Data-Donwloader/releases/tag/v1.131), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2018a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
謝辞

ヒントを与えたファイル: Yahoo! Finance Data Loader

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
1.131

See release notes for this release on GitHub: https://github.com/Lenskiy/Yahoo-Quandl-Market-Data-Donwloader/releases/tag/v1.131

1.130

.

1.13

Added Big Mac example

1.12

* removes rows with missing values

1.11

The function has been updated according to the new Yahoo interface.

1.03

Data older than 1970 can now be downloaded.

1.02

Seems crumb value is not required anymore, hence now the function continues even if crumb is not found.

1.01

Thanks to Christian, Xiang Chen Fixed, Ryan Hendry for pointing out the bug. The most recent sample was not loaded. The problem was in two slightly different formats data is returned by Quandl and Yahoo. The bug is fixed.

0.934

Fixed a bug

0.933

.

0.932

Fixed a bug in getMarketDataViaQuandl()

0.931

.

0.93

fixed bug in getMarketDataViaQuandl()

0.92

Added Quandl data downloader

0.91

404 error has been dealt with

0.9

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。