Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Pulling Financial Data Error
조회 수: 1 (최근 30일)
이전 댓글 표시
Greetings,
The script below uses the DataFeed Toolbox to pull a list of historical securities data. I would like to access the entire historical data set for particular securities. However, I am not sure how to figure out which data is the first entry. IN addition, if you try to simply pull all data from say 1900 until now in the hope of capturing that first data (for most this statement holds true), you obtain the following error message:
Error using yahoo/fetch (line 387)
Unable to return historical data for given security.
Error in RunningAlpha2 (line 25)
d1 = fetch(c,TickerNameNYSE(j),{'Open', 'Close', 'Volume'},BeginDate,
EndDate);
The error was with ticker TWC. I stopped the runs there. The code is listed here:
clear all;
strNYSE = 'TWC'; % I left that last one with the error.
TickerNameNYSE = strread(strNYSE,'%s');
% Find number of Tickers in 'TickerName'
S = size(TickerNameNYSE)*[1;0];
formatOut = 'mm/dd/yyyy';
BeginDate = '01/01/1950';
EndDate=datestr(now,formatOut);
c = yahoo;
format short g;
cnt = 0;
for j=1:S
j
clearvars dLAV
d1 = fetch(c,TickerNameNYSE(j),{'Open', 'Close', 'Volume'},BeginDate, EndDate);
L = size(d1)*[1;0];
dLAV(1:L) = 0;
for k=1:L-1
dLAV(k) = log(d1(k+1,3)/d1(k,3));
end
end
I would be very thankful if anyone could provide some direction on how to mitigate this error.
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!