Hello @mortada; thanks for a really great library! I noticed an interesting issue -- I think FRED has a limitation on vintage dates for a query (I believe it's 2000). I ran into this when trying to call get_series_all_releases with series_id='DFF' (Effective Fed Funds Rate, published daily). As is, there wasn't a good way to get around it since the realtime_start and realtime_end parameters are class variables instead of being passed in. I believe the code just errors out (i.e. it doesn't even provide a partial data set) .
Here is my proposal for a solution; see if it makes sense:
Allow realtime_start and realtime_end to be arguments (defaulted to None so it doesn't break anyone's code)
If the arguments are not None, update self.realtime_start and self.realtime_end to new values
Run get_series_vintage_dates on the series_id and see if there are more than 2,000 values within the self.realtime_start and self.realtime_end values
If not, return the dataset with new values.
If > 2,000... I am not 100% certain what the best way to handle it would be. I'm biased towards taking the most recent 2,000 values, but perhaps that wouldn't be the best/ most consistent behavior?
If you agree with the idea, I'm happy to code it up and submit a pull request! Thank you.
Hello @mortada; thanks for a really great library! I noticed an interesting issue -- I think FRED has a limitation on vintage dates for a query (I believe it's 2000). I ran into this when trying to call
get_series_all_releases
withseries_id='DFF'
(Effective Fed Funds Rate, published daily). As is, there wasn't a good way to get around it since therealtime_start
andrealtime_end
parameters are class variables instead of being passed in. I believe the code just errors out (i.e. it doesn't even provide a partial data set) .Here is my proposal for a solution; see if it makes sense:
realtime_start
andrealtime_end
to be arguments (defaulted to None so it doesn't break anyone's code)self.realtime_start
andself.realtime_end
to new valuesget_series_vintage_dates
on theseries_id
and see if there are more than 2,000 values within theself.realtime_start
andself.realtime_end
valuesIf you agree with the idea, I'm happy to code it up and submit a pull request! Thank you.