From 6dab0434062cf4437eb6898c28503acb927b7a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido?= Date: Thu, 6 Sep 2018 14:11:03 -0300 Subject: [PATCH] New datasets: Dow Jones, BTC-USD, ETH-USD, EUR-USD, EUR-GBP, GBP-USD --- pyFTS/data/Bitcoin.py | 34 ++++++++++++++++++++++++++++++++++ pyFTS/data/DowJones.py | 34 ++++++++++++++++++++++++++++++++++ pyFTS/data/EURGBP.py | 32 ++++++++++++++++++++++++++++++++ pyFTS/data/EURUSD.py | 32 ++++++++++++++++++++++++++++++++ pyFTS/data/Ethereum.py | 34 ++++++++++++++++++++++++++++++++++ pyFTS/data/GBPUSD.py | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 198 insertions(+) create mode 100644 pyFTS/data/Bitcoin.py create mode 100644 pyFTS/data/DowJones.py create mode 100644 pyFTS/data/EURGBP.py create mode 100644 pyFTS/data/EURUSD.py create mode 100644 pyFTS/data/Ethereum.py create mode 100644 pyFTS/data/GBPUSD.py diff --git a/pyFTS/data/Bitcoin.py b/pyFTS/data/Bitcoin.py new file mode 100644 index 0000000..e7ccf58 --- /dev/null +++ b/pyFTS/data/Bitcoin.py @@ -0,0 +1,34 @@ +""" +Bitcoin to USD quotations + +Daily averaged index, by business day, from 2010 to 2018. + +Source: https://finance.yahoo.com/quote/BTC-USD?p=BTC-USD +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/72gews5w3c7oaf7by5vp7evsasluia') + + return df + diff --git a/pyFTS/data/DowJones.py b/pyFTS/data/DowJones.py new file mode 100644 index 0000000..dbd54db --- /dev/null +++ b/pyFTS/data/DowJones.py @@ -0,0 +1,34 @@ +""" +DJI - Dow Jones + +Daily averaged index, by business day, from 1985 to 2017. + +Source: https://finance.yahoo.com/quote/%5EGSPC/history?p=%5EGSPC +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/d4hfir3xrelkx33o3bfs5dbhyiztml') + + return df + diff --git a/pyFTS/data/EURGBP.py b/pyFTS/data/EURGBP.py new file mode 100644 index 0000000..749c260 --- /dev/null +++ b/pyFTS/data/EURGBP.py @@ -0,0 +1,32 @@ +""" +FOREX market EUR-GBP pair. + +Daily averaged quotations, by business day, from 2016 to 2018. +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/gvsaeruthnxjkwzl7z4ki7u5rduah3') + + return df + diff --git a/pyFTS/data/EURUSD.py b/pyFTS/data/EURUSD.py new file mode 100644 index 0000000..cba86a9 --- /dev/null +++ b/pyFTS/data/EURUSD.py @@ -0,0 +1,32 @@ +""" +FOREX market EUR-USD pair. + +Daily averaged quotations, by business day, from 2016 to 2018. +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos') + + return df + diff --git a/pyFTS/data/Ethereum.py b/pyFTS/data/Ethereum.py new file mode 100644 index 0000000..a5fdc0b --- /dev/null +++ b/pyFTS/data/Ethereum.py @@ -0,0 +1,34 @@ +""" +Ethereum to USD quotations + +Daily averaged index, by business day, from 2016 to 2018. + +Source: https://finance.yahoo.com/quote/ETH-USD?p=ETH-USD +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/qj4ly7o4rl7oq527xzy4v76wkr3hws') + + return df + diff --git a/pyFTS/data/GBPUSD.py b/pyFTS/data/GBPUSD.py new file mode 100644 index 0000000..8f4c98e --- /dev/null +++ b/pyFTS/data/GBPUSD.py @@ -0,0 +1,32 @@ +""" +FOREX market GBP-USD pair. + +Daily averaged quotations, by business day, from 2016 to 2018. +""" + + +from pyFTS.data import common +import pandas as pd +import numpy as np + + +def get_data(): + """ + Get the univariate time series data. + + :return: numpy array + """ + dat = get_dataframe() + return np.array(dat["Avg"]) + + +def get_dataframe(): + """ + Get the complete multivariate time series data. + + :return: Pandas DataFrame + """ + df = pd.read_csv('https://query.data.world/s/sw4mijpowb3mqv6bsat7cdj54hyxix') + + return df +