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

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 리포지토리로 가십시오.