I'm working currently on a spreedsheet which downloads Bloomberg data via VBA to conect to Bloomberg and to get the data I use the following code:
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"
This works quite well but I get for each non trading day the last available value carried Forward...
My question is how can I get for the non trading days a value of 0 instead ? What is the correct fill for this part .NonTradingDayValue = "B" ?
I really appreciate any help you can provide.
Simply, you can't.
From Bloomberg API reference, the nonTradingDayFillMethod has just two element values: PREVIOUS_VALUE or NIL_VALUE.
If you try to do the same in VBA, the only choices available are as per the attached image.