...t date?
Hi All,
How can I obtain the daily closing price for a stock for specified dates, returning NULL on any specific dates that do not have data?
I'd like to obtain the daily price of several stocks over a set period of time.
Ideally my output will look like this:
Where a day that the latest closing price is not available returns a NULL value.
But, when I run the following code, I get data available for the LAST valid closing price -- which I don't want.
Unfortuneately, my output looks like this, repeating the date/value for 7/1/24:
I've simplified the example and limited the size of the tables above, but this is the code I am using to pull this data on a real stock. The problem is the same as described above.
CODE:
df = rd.get_data(
universe = [ 'A1OS34.SA'],
fields = ['TR.PriceClose.date', 'TR.PriceClose'],
parameters = {
'SDate': '2024-06-01',
'EDate': '2024-08-01',
'Frq': 'D',
'Curn': 'USD'
}
)
display(df)
I appreciate any help folks can provide -- thanks!