Skip to content

Commit 5ecab19

Browse files
authored
Merge pull request #718 from kdcro101/master
fix for futures
2 parents 48a538c + 4f2fbfb commit 5ecab19

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pandas_datareader/stooq.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ def _get_params(self, symbol, country="US"):
4747
elif symbol_parts[1].lower() == "pl":
4848
symbol = symbol_parts[0]
4949
else:
50-
if symbol_parts[1].lower() not in ["de", "hk", "hu", "jp", "uk", "us"]:
50+
if symbol_parts[1].lower() not in [
51+
"de",
52+
"hk",
53+
"hu",
54+
"jp",
55+
"uk",
56+
"us",
57+
"f",
58+
]:
5159
symbol = ".".join([symbol, "US"])
5260

5361
params = {

pandas_datareader/tests/test_stooq.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ def test_stooq_sp500():
2626
assert f.shape[0] > 0
2727

2828

29+
def test_stooq_clx19f():
30+
f = get_data_stooq("CLX19.F", start="20190101", end="20190115")
31+
assert f.shape[0] > 0
32+
33+
2934
def test_get_data_stooq_dax():
3035
f = get_data_stooq("^DAX")
3136
assert f.shape[0] > 0

0 commit comments

Comments
 (0)