Bloomberg - Matlab connection, multiple securities: balanced sample
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Tejas
2024년 10월 24일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Bloomberg Desktop에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!