我目前正在开发一个电子表格,它通过VBA下载Bloomberg数据,以连接到Bloomberg,并使用以下代码获取数据:
Set myBlpObject = New BlpData
myBlpObject.SubscriptionMode = ByRequest
With myBlpObject
.ReverseChronological = True
.Periodicity = bbActualDaily
.DisplayNonTradingDays = AllCalendar
.NonTradingDayValue = "B"
.ShowHistoricalDates = True
End With
'Security = Array("DAX Index", "SX5E Index", "SXXE Index", "nky index", "spx index")
Security = slice
vtfields = Array("PX_LAST")
vtstart = "03.01.2017"
vtende = "06.08.2017"这很有效,但我得到了每个非交易日的最后一个可用结转的值。
我的问题是,我如何才能在非交易日获得0的值?此部分.NonTradingDayValue = "B“的正确填充值是什么?
我真的很感谢你能提供的任何帮助。
发布于 2017-08-22 22:31:05
简单地说,你不能。
在Bloomberg API参考中,nonTradingDayFillMethod只有两个元素值: PREVIOUS_VALUE或NIL_VALUE。
如果尝试在VBA中执行相同的操作,则只能根据附着的图像进行选择。

https://stackoverflow.com/questions/45819923
复制相似问题