From e03c79a1e0fdc33b11e3eb8d128742010d7c4f34 Mon Sep 17 00:00:00 2001 From: "T.J. Alumbaugh" Date: Wed, 31 Jan 2024 06:53:05 -0700 Subject: [PATCH] pct_change specifies fill_method='pad' - Don't rely on default argument for `fill_method` as it was deprecated in Pandas 2.1. --- ogusa/macro_params.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ogusa/macro_params.py b/ogusa/macro_params.py index 6ee1b4d7..a52c30a4 100644 --- a/ogusa/macro_params.py +++ b/ogusa/macro_params.py @@ -107,7 +107,9 @@ def get_macro_params(): # find g_y macro_parameters["g_y"] = ( - fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="Q").mean() + fred_data_q["GDP Per Capita"] + .pct_change(periods=4, freq="Q", fill_method="pad") + .mean() ) # # estimate r_gov_shift and r_gov_scale