2018-09-06 21:11:03 +04:00
|
|
|
"""
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2018-09-06 22:31:45 +04:00
|
|
|
def get_data(field='avg'):
|
2018-09-06 21:11:03 +04:00
|
|
|
"""
|
|
|
|
Get the univariate time series data.
|
|
|
|
|
2018-09-06 22:31:45 +04:00
|
|
|
:param field: dataset field to load
|
2018-09-06 21:11:03 +04:00
|
|
|
:return: numpy array
|
|
|
|
"""
|
|
|
|
dat = get_dataframe()
|
2018-09-06 22:31:45 +04:00
|
|
|
return np.array(dat[field])
|
2018-09-06 21:11:03 +04:00
|
|
|
|
|
|
|
|
|
|
|
def get_dataframe():
|
|
|
|
"""
|
|
|
|
Get the complete multivariate time series data.
|
|
|
|
|
|
|
|
:return: Pandas DataFrame
|
|
|
|
"""
|
2018-11-07 16:37:00 +04:00
|
|
|
df = common.get_dataframe("EURUSD.csv", "https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos",
|
|
|
|
sep=",")
|
2018-09-06 21:11:03 +04:00
|
|
|
|
|
|
|
return df
|
|
|
|
|