Closed sdittmar closed 1 year ago
This is an intended behaviour - if there's an error or unexpected situation, it should not be silently swallowed.
Datastream
has an attribute raise_on_error
which is set to True by default.
If it is set to False, all errors, such as this one, should result in NaN
being returned in a corresponding field.
See: https://github.com/vfilimonov/pydatastream#note-2-error-catching
If I run get_trading_days() on a SINGLE DAY and one country happens to have a holiday, the code gets a hickup around line 340. I was going to use the function for the current day processing only. I now you intended it as mask for historical data, but it would be great if that "feature" could be added...
You can reproduce the error with the following code:
ds.get_trading_days(['US','UK','FR','SW','IT','NL','BD','BG'], date_from='2022-06-06', date_to='2022-06-06')
Here is the trace: