Skip to content

Commit 9b8cc79

Browse files
committed
Removed unused code
1 parent 9ba8332 commit 9b8cc79

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

quantflow/data/fed.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@
66
import pandas as pd
77
from fluid.utils.http_client import AioHttpClient
88

9-
URL = (
10-
"https://www.federalreserve.gov/datadownload/Output.aspx?"
11-
"rel=H15&series=bf17364827e38702b42a58cf8eaa3f78&lastobs=&"
12-
)
13-
14-
maturities = [
9+
MATURITIES = (
1510
"month_1",
1611
"month_3",
1712
"month_6",
@@ -23,7 +18,7 @@
2318
"year_10",
2419
"year_20",
2520
"year_30",
26-
]
21+
)
2722

2823

2924
@dataclass
@@ -52,7 +47,7 @@ async def yield_curves(self, **params: Any) -> pd.DataFrame:
5247
params.update(series="bf17364827e38702b42a58cf8eaa3f78", rel="H15")
5348
data = await self._get_text(params)
5449
df = pd.read_csv(data, header=5, index_col=None, parse_dates=True)
55-
df.columns = ["date"] + maturities # type: ignore
50+
df.columns = list(("date",) + MATURITIES) # type: ignore
5651
df = df.set_index("date").replace("ND", np.nan)
5752
return df.dropna(axis=0, how="all").reset_index()
5853

quantflow/data/fiscal_data.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,6 @@
66

77
from quantflow.utils.dates import as_date
88

9-
URL = (
10-
"https://www.federalreserve.gov/datadownload/Output.aspx?"
11-
"rel=H15&series=bf17364827e38702b42a58cf8eaa3f78&lastobs=&"
12-
)
13-
14-
maturities = [
15-
"month_1",
16-
"month_3",
17-
"month_6",
18-
"year_1",
19-
"year_2",
20-
"year_3",
21-
"year_5",
22-
"year_7",
23-
"year_10",
24-
"year_20",
25-
"year_30",
26-
]
27-
289

2910
@dataclass
3011
class FiscalData(AioHttpClient):

0 commit comments

Comments
 (0)