Bloomberg - Matlab connection, multiple securities: balanced sample
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Respuestas (1)
Tejas
el 24 de Oct. de 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 comentarios
Ver también
Categorías
Más información sobre Bloomberg Desktop en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!