Why does Bloomberg give "Invalid Security" error when using getdata with ISIN
26 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2017 年 8 月 8 日
回答済み: MathWorks Support Team
2017 年 8 月 8 日
I am trying to get total return of a security( given ISIN) between a start period and end period.
Given ISIN for Nestle SA is CH0038863350. In excel, I typically combine the ISIN number in following way.
CH0038863350 ISIN and it fetches the required fields.
I am trying to do the same in Matlab but it results in " Invalid Security"
fromdate1= '06/30/2017';
todate1='07/31/2017';
startDate = datestr(fromdate1,'YYYYmmDD');
endDate = datestr(todate1,'YYYYmmDD');
crncy= 'USD';
z= 'CH0038863350 ISIN' ;
StocksYTDret= getdata(c,z,'CUST_TRR_RETURN_HOLDING_PER',...
{'CUST_TRR_START_DT','CUST_TRR_END_DT','CUST_TRR_CRNCY'},...
{startDate,endDate,crncy})
It results in error. Could you tell me what is the best way to get the data as I have 1000+ ISIN numbers to fetch data fronm Bloomberg.
採用された回答
MathWorks Support Team
2017 年 8 月 8 日
According to the Bloomberg API, the security ISINs should be given in the format '/isin/CH0038863350'. Failure to do so will return a struct with an ERROR field of "Invalid Security" and the data will be NaN.
>> z = '/isin/CH0038863350';
>> StocksYTDret = getdata(c,z,'CUST_TRR_RETURN_HOLDING_PER',{'CUST_TRR_START_DT','CUST_TRR_END_DT','CUST_TRR_CRNCY'},{startDate,endDate,crncy})
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import and Network Parameters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!