Bloomberg - Matlab connection, multiple securities: balanced sample
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
how do I import multiple securities into a single timetable environment. Now it gives me basically a cell arry structure of 3 timetables:
c=blp;
s={'USBEGDPF Index';'EUBEGDPF Index';'JPBEGDPF Index'};
f={'LAST_PRICE'};
fromdate='01/31/1995';
todate='03/30/2020';
period='quarterly';
c.DataReturnFormat = 'timetable';
[d,sec]=history(c,s,f,fromdate,todate);
I would like to have them in one timetable, and also be able to include a time series which may have NANs.
Many thanks,
Bjoern
1 Commento
Risposte (1)
Tejas
il 24 Ott 2024
Hello Bjoern,
To create a timetable that includes data for multiple securities, the 'synchronize' function can be used to combine multiple timetables into one. For more details on how this function works, refer to this documentation: https://www.mathworks.com/help/matlab/ref/timetable.synchronize.html.
Here are the steps to use this function:
- Start by initializing a variable named 'combinedTimetable' to store the combined timetable data.
[d,sec]=history(c,s,f,fromdate,todate);
combinedTimetable = d{1};
- Use the 'synchronize' function to concatenate the timetable data.
for i = 2:length(d)
combinedTimetable = synchronize(combinedTimetable, d{i}, 'union');
end
0 Commenti
Vedere anche
Categorie
Scopri di più su Bloomberg Desktop in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!