Photo by Immo Wegmann on Unsplash
- According to the JPM analysis of currency volatility, EUR/USD is predicted to hold at 1.08 in December 2023.
- For comparison, ING’s adjusted EUR/USD forecasts projecting the pair to trade at:
- $1.00 by Q2, Q3 and Q4 2023.
- $1.02 in Q1 2024
- $1.10 by Q4 2024.
- Let’s invoke FB Prophet (FBP) to check these forecasts.
Input Data
Let’s set the working directory
import os
os.chdir(‘YOURPATH’)
os. getcwd()
and read the input data
import pandas_datareader.data as web
import datetime
import pandas as pd
pd.set_option(‘display.max_columns’, None)
pd.set_option(‘display.max_rows’, None)
from pandas_datareader import data as pdr
import yfinance as yfin
yfin.pdr_override()
yfin.pdr_override()
start_date = “2003-01-1”
end_date = “2023-07-19”
btc = pdr.get_data_yahoo(“EURUSD=X”, start_date, end_date)[‘Close’]
print(btc.tail())
[*********************100%***********************] 1 of 1 completed Date 2023-07-13 1.114455
2023-07-14 1.122347
2023-07-17 1.122776
2023-07-18 1.123760
2023-07-19 1.122889
Name: Close, dtype: float64
Let’s convert Series btc to Dataframe df, apply reset_index and rename the 2 columns
df = btc.to_frame().reset_index()
df = df.rename({‘Date’: ‘ds’, ‘Close’: ‘y’}, axis=’columns’)
FBP Forecast
Let’s define the FBP model and perform fitting with daily_seasonality=True
mx = Prophet(daily_seasonality=True)
mx.fit(df)
Let’s perform the 1Y FBP forecast with periods=365
future = mx.make_future_dataframe(periods=365)
forecast = mx.predict(future)
and plot the results
pd.options.display.max_columns = None
figure1 = mx.plot(forecast)
figure2 = mx.plot_components(forecast)



Conclusions
- We have seen how we can design a 1Y EUR/USD prediction model using FB Prophet with only a few lines of Python code.
- Our results show that EUR/USD is predicted to hold at 1.08+/-0.07 in December 2023. This is consistent with the JPM‘s forecasts.
- As for EUR/USD trends in the second half of 2023, JPM is neutral on the euro, whereas our prediction is bearish on the euro in the same period of time.
Your message has been sent
Make a one-time donation
Make a monthly donation
Make a yearly donation
Choose an amount
Or enter a custom amount
Your contribution is appreciated.
Your contribution is appreciated.
Your contribution is appreciated.
DonateDonate monthlyDonate yearly
Leave a comment