Skip to content

Commit aca61e4

Browse files
committed
ALFRED/FRED now works with Python 3.10
1 parent d6df26e commit aca61e4

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ individual data providers)
115115

116116
# Release Notes
117117

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

139140
# Coding log
140141

142+
* 17 Feb 2024
143+
* Fixed ALFRED/FRED wrapper so now compatible with Python 3.10
141144
* 01 Dec 2023
142145
* Remove fxcmpy dependency (package no longer exists?)
143146
* Added type hinting in ioengine.py

findatapy/conf/time_series_categories_fields.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fx-implied-vol,bloomberg,daily,BGN,close,1-Jan-95,1D
2121
fx-implied-vol,bloomberg,daily,TOK,close,1-Jan-95,1D
2222
fx-implied-vol,bloomberg,daily,LDN,close,1-Jan-95,1D
2323
fx-implied-vol,bloomberg,daily,10AM,close,1-Jan-09,1D
24+
fund-indices,bloomberg,daily,LOC,close,1-Jan-80,1D
2425
base-depos,bloomberg,daily,NYC,close,1-Jan-95,1D
2526
base-depos,bloomberg,daily,TOK,close,1-Jan-95,1D
2627
base-depos,bloomberg,daily,LDN,close,1-Jan-95,1D

findatapy/conf/time_series_tickers_list.csv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,14 @@ events,bloomberg,daily,USD-US CPI Urban Consumers MoM SA,NYC,"close,actual-relea
357357
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,,,,
358358
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,,,,
359359
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,,,,
360+
fund-indices,bloomberg,daily,Barclay Trader Indexes CTA,LOC,close,BARCCTA Index,LOC,,,
361+
fund-indices,bloomberg,daily,Barclay US Managed Futures Industry BTOP 50,LOC,close,BARCBTOP Index,LOC,,,
362+
fund-indices,bloomberg,daily,Newedge CTA Index,LOC,close,NEIXCTA Index,LOC,,,
363+
fund-indices,bloomberg,daily,HFRX Macro/CTA Index,LOC,close,HFRXM Index,LOC,,,
364+
fund-indices,bloomberg,daily,HFRX Macro: Currency Index,LOC,close,HFRXCUR Index,LOC,,,
365+
fund-indices,bloomberg,daily,HFRX Global Hedge Fund Index,LOC,close,HFRXGL Index,LOC,,,
366+
fund-indices,bloomberg,daily,S&P500,LOC,close,SPX Index,LOC,,,
367+
fund-indices,bloomberg,daily,Parker Global Currency Manager Index,LOC,close,CEXTI2 Index,LOC,,,
360368
crypto,bitcoincharts,tick,XBTPLN_abucoins,LOC,"close,volume",abucoinsPLN,LOC,,,
361369
crypto,bitcoincharts,tick,XBTEUR_bc,LOC,"close,volume",bcEUR,LOC,,,
362370
crypto,bitcoincharts,tick,XBTILS_bit2c,LOC,"close,volume",bit2cILS,LOC,,,

findatapy/market/datavendorweb.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,9 +2285,11 @@ def get_series(self, series_id, observation_start=None,
22852285
if root is None:
22862286
raise ValueError('No data exists for series id: ' + series_id)
22872287
data = {}
2288-
for child in root.getchildren():
2288+
for child in root.iter():
22892289
val = child.get('value')
2290-
if val == self.nan_char:
2290+
if val is None:
2291+
float('NaN')
2292+
elif val == self.nan_char:
22912293
val = float('NaN')
22922294
else:
22932295
val = float(val)
@@ -2431,9 +2433,11 @@ def get_series_all_releases(self, series_id, observation_start=None,
24312433
raise ValueError('No data exists for series id: ' + series_id)
24322434
data = {}
24332435
i = 0
2434-
for child in root.getchildren():
2436+
for child in root.iter():
24352437
val = child.get('value')
2436-
if val == self.nan_char:
2438+
if val is None:
2439+
val = float("NaN")
2440+
elif val == self.nan_char:
24372441
val = float('NaN')
24382442
else:
24392443
val = float(val)

findatapy/market/ioengine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,8 @@ def read_parquet(self, path: str,
997997
convert_to_s3fs=True)
998998

999999
return pd.read_parquet(self.sanitize_path(path),
1000-
storage_options=storage_options)
1000+
storage_options=storage_options,
1001+
)
10011002
else:
10021003
return pd.read_parquet(path)
10031004

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
tickers, using configuration files. There is also functionality which is particularly useful for those downloading FX market data."""
66

77
setup(name='findatapy',
8-
version='0.1.31',
8+
version='0.1.32',
99
description='Market data library',
1010
author='Saeed Amen',
1111
author_email='saeed@cuemacro.com',

0 commit comments

Comments
 (0)