Hi.
Using the DatastreamDSWS Python API, I am trying to retrieve historical average daily value traded 5 days using formula: MAV#(X(VA)~USD,5D,C)
I wish to retrieve the value for date '2019-12-31' only but somehow I cannot get a valid value unless I also retrieve for '2019-12-30'. How do I just retrieve for '2019-12-31' without getting an error or NA value?
Example 1 (date range, OK):
get_data(tickers='<AAPL.OQ>', fields=['MAV#(X(VA)~USD,5D,C)'], start='2019-12-30', end='2019-12-31')
Result:
Instrument <AAPL.OQ>
Field MAV#(X(VA)~USD,5D,C)
Dates
2019-12-30 6940878.0
2019-12-31 7728726.6
Example 2 (date range start=end, got error):
get_data(tickers='<AAPL.OQ>', fields=['MAV#(X(VA)~USD,5D,C)'], start='2019-12-31', end='2019-12-31')
Result:
Instrument Datatype Value
0 <AAPL.OQ> MAV#(X(VA)~USD,5D,C) $$ER: 0904,NO DATA AVAILABLE
Example 3 (single date, got NA):
get_data(tickers='<AAPL.OQ>', fields=['MAV#(X(VA)~USD,5D,C)'], start='2019-12-31', kind=0)
Result:
Instrument Datatype Value
0 <AAPL.OQ> MAV#(X(VA)~USD,5D,C) NA
Appreciate your kind guidance. Thank you.