New datasets: Dow Jones, BTC-USD, ETH-USD, EUR-USD, EUR-GBP, GBP-USD

This commit is contained in:
Petrônio Cândido 2018-09-06 14:11:03 -03:00
parent 770719bc98
commit 6dab043406
6 changed files with 198 additions and 0 deletions

34
pyFTS/data/Bitcoin.py Normal file
View File

@ -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

34
pyFTS/data/DowJones.py Normal file
View File

@ -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

32
pyFTS/data/EURGBP.py Normal file
View File

@ -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

32
pyFTS/data/EURUSD.py Normal file
View File

@ -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

34
pyFTS/data/Ethereum.py Normal file
View File

@ -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

32
pyFTS/data/GBPUSD.py Normal file
View File

@ -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