Skip to content

Commit

Permalink
ALFRED/FRED now works with Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Feb 17, 2024
1 parent d6df26e commit aca61e4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ individual data providers)

# Release Notes

* 0.1.32 - findatapy (17 Feb 2024)
* 0.1.31 - findatapy (01 Dec 2023)
* 0.1.30 - findatapy (12 Oct 2023)
* 0.1.29 - findatapy (14 May 2023)
Expand All @@ -138,6 +139,8 @@ individual data providers)

# Coding log

* 17 Feb 2024
* Fixed ALFRED/FRED wrapper so now compatible with Python 3.10
* 01 Dec 2023
* Remove fxcmpy dependency (package no longer exists?)
* Added type hinting in ioengine.py
Expand Down
1 change: 1 addition & 0 deletions findatapy/conf/time_series_categories_fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fx-implied-vol,bloomberg,daily,BGN,close,1-Jan-95,1D
fx-implied-vol,bloomberg,daily,TOK,close,1-Jan-95,1D
fx-implied-vol,bloomberg,daily,LDN,close,1-Jan-95,1D
fx-implied-vol,bloomberg,daily,10AM,close,1-Jan-09,1D
fund-indices,bloomberg,daily,LOC,close,1-Jan-80,1D
base-depos,bloomberg,daily,NYC,close,1-Jan-95,1D
base-depos,bloomberg,daily,TOK,close,1-Jan-95,1D
base-depos,bloomberg,daily,LDN,close,1-Jan-95,1D
Expand Down
8 changes: 8 additions & 0 deletions findatapy/conf/time_series_tickers_list.csv
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ events,bloomberg,daily,USD-US CPI Urban Consumers MoM SA,NYC,"close,actual-relea
events,bloomberg,daily,USD-Conference Board Consumer Confidence SA 1985=100,NYC,"close,actual-release,survey-median,survey-average,survey-high,survey-low,number-observations,release-dt,release-date-time-full,first-revision,first-revision-date",CONCCONF Index,,,,
events,bloomberg,daily,USD-US Durable Goods New Orders Industries MoM SA,NYC,"close,actual-release,survey-median,survey-average,survey-high,survey-low,number-observations,release-dt,release-date-time-full,first-revision,first-revision-date",DGNOCHNG Index,,,,
events,bloomberg,daily,USD-US Industrial Production MoM 2007=100 SA,NYC,"close,actual-release,survey-median,survey-average,survey-high,survey-low,number-observations,release-dt,release-date-time-full,first-revision,first-revision-date",IP CHNG Index,,,,
fund-indices,bloomberg,daily,Barclay Trader Indexes CTA,LOC,close,BARCCTA Index,LOC,,,
fund-indices,bloomberg,daily,Barclay US Managed Futures Industry BTOP 50,LOC,close,BARCBTOP Index,LOC,,,
fund-indices,bloomberg,daily,Newedge CTA Index,LOC,close,NEIXCTA Index,LOC,,,
fund-indices,bloomberg,daily,HFRX Macro/CTA Index,LOC,close,HFRXM Index,LOC,,,
fund-indices,bloomberg,daily,HFRX Macro: Currency Index,LOC,close,HFRXCUR Index,LOC,,,
fund-indices,bloomberg,daily,HFRX Global Hedge Fund Index,LOC,close,HFRXGL Index,LOC,,,
fund-indices,bloomberg,daily,S&P500,LOC,close,SPX Index,LOC,,,
fund-indices,bloomberg,daily,Parker Global Currency Manager Index,LOC,close,CEXTI2 Index,LOC,,,
crypto,bitcoincharts,tick,XBTPLN_abucoins,LOC,"close,volume",abucoinsPLN,LOC,,,
crypto,bitcoincharts,tick,XBTEUR_bc,LOC,"close,volume",bcEUR,LOC,,,
crypto,bitcoincharts,tick,XBTILS_bit2c,LOC,"close,volume",bit2cILS,LOC,,,
Expand Down
12 changes: 8 additions & 4 deletions findatapy/market/datavendorweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2285,9 +2285,11 @@ def get_series(self, series_id, observation_start=None,
if root is None:
raise ValueError('No data exists for series id: ' + series_id)
data = {}
for child in root.getchildren():
for child in root.iter():
val = child.get('value')
if val == self.nan_char:
if val is None:
float('NaN')
elif val == self.nan_char:
val = float('NaN')
else:
val = float(val)
Expand Down Expand Up @@ -2431,9 +2433,11 @@ def get_series_all_releases(self, series_id, observation_start=None,
raise ValueError('No data exists for series id: ' + series_id)
data = {}
i = 0
for child in root.getchildren():
for child in root.iter():
val = child.get('value')
if val == self.nan_char:
if val is None:
val = float("NaN")
elif val == self.nan_char:
val = float('NaN')
else:
val = float(val)
Expand Down
3 changes: 2 additions & 1 deletion findatapy/market/ioengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,8 @@ def read_parquet(self, path: str,
convert_to_s3fs=True)

return pd.read_parquet(self.sanitize_path(path),
storage_options=storage_options)
storage_options=storage_options,
)
else:
return pd.read_parquet(path)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
tickers, using configuration files. There is also functionality which is particularly useful for those downloading FX market data."""

setup(name='findatapy',
version='0.1.31',
version='0.1.32',
description='Market data library',
author='Saeed Amen',
author_email='[email protected]',
Expand Down

0 comments on commit aca61e4

Please sign in to comment.