Historical data for Bloomberg with metadata
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I would like to know if is it posible to download through matlab bloomberg api some metadata. I'll give you and example:
% Establece conexión con Bloomberg
c = blp;
c.DataReturnFormat = 'table';
myAsset = 'AAPL UW Equity';
% Set Bloomberg options
period = {'monthly','non_trading_weekdays','previous_value'};
currency = 'USD';
fromdate = datestr(Dates(1,1), "mm/dd/yyyy");
todate = datestr(Dates(end,1), "mm/dd/yyyy");
BloombergTicker = myAsset;
Data = history(c,BloombergTicker, 'RETURN_COM_EQY',fromdate,todate,period,currency)
using excel api, I can request some metada in the next way:
=BQL("aapl us equity", "return_com_eqy().period_end_date, return_com_eqy().revision_date")
would it be posible to do the same through the matlab API?
Thank you
0 comentarios
Respuestas (1)
Shaunak
el 24 de Mzo. de 2025
Hi Maite,
You can use the “getdata” function to retrieve similar results and then perform additional post-processing in MATLAB.
For example, to achieve a similar result to your Excel API command, you could use:
% Establish connection with Bloomberg
c = blp;
c.DataReturnFormat = 'table';
% Define asset and fields
myAsset = 'AAPL US Equity';
fields = {'RETURN_COM_EQY', 'PERIOD_END_DATE', 'REVISION_DATE'}; % Check if these fields are available
% Retrieve data
try
Data = getdata(c, myAsset, fields);
disp(Data);
catch ME
disp('Error retrieving data:');
disp(ME.message);
end
You may refer to the following link for further information about the getData function:
Ver también
Categorías
Más información sobre Bloomberg B-PIPE en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!