如何从 Bloomberg API 获取交易假期
我正在使用 Bloomberg Java api 下载交易数据。我需要有人告诉我是否存在可以返回交易假期列表的函数。我翻阅了手册但没有找到。如果没有这样的东西,有什么好方法可以创建一个吗?谢谢。
I'm using Bloomberg Java api to download trading data. I need somebody to tell me if there exists a function which can return a list of trading holidays. I looked through the manual but couldn't find one. If there's no such a thing, is there a good way that I can create one? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
对于给定的证券,彭博 API 将使用 DS853 (CALENDAR_CODE) 告诉您适当的日历代码。给定日历代码,我不相信彭博社提供了下载假日日历的方法。您可能需要使用第三方供应商,例如财经日历。
The Bloomberg API will tell you, for a given security, the appropriate calendar code using DS853 (CALENDAR_CODE). Given a calendar code, I do not believe that Bloomberg provides a way to download a holiday calendar. You may need to use a third party vendor such as Financial Calendar.
Python实现如下。请注意,我们对阿姆斯特丹使用日历“AM”,将复活节的第二天标记为国定假日。
The Python implementation is as follows. Note that we are using calendar "AM" for Amsterdam, marking the second day of easter as a national holiday.
我在获得接受的答案时遇到了问题。结果发现不需要 SETTLMENT_CALENDAR_CODE。以下工作有效:
响应:
I had issues getting the accepted answer to work. Turned out the SETTLEMENT_CALENDAR_CODE isn't needed. The following worked:
Response:
彭博社假期数据有时会缺失。您可以尝试专门从事假期数据交易的服务,例如 TradingHours.com。
https://www.tradinghours.com/docs/3。 x/enterprise/market-holidays.html
The Bloomberg holiday data is lacking sometimes. You could try a service that specializes in trading holidays data like TradingHours.com.
https://www.tradinghours.com/docs/3.x/enterprise/market-holidays.html