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!