INTRO:_ We examine euro FX data from the Fed Reserve FRED database. Our synthetic time-series, which takes us far back as 1971, give additional perspective to observe the cross-rates against U.S. dollar and Japanese yen.
Dependencies:
- Linux, bash [not crucial, cross-platform prefered]
- Python: matplotlib, pandas [recommend Anaconda distribution]
- Modules: yi_1tools, yi_plot, yi_timeseries, yi_fred
CHANGE LOG
2015-05-16 Code review and revision.
2014-10-09 First version using template dated 2014-09-28.
# NOTEBOOK settings and system details: [00-tpl v14.12.21]
# Assume that the backend is LINUX (our particular distro is Ubuntu, running bash shell):
print '\n :: TIMESTAMP of last notebook execution:'
!date
print '\n :: IPython version:'
!ipython --version
# Automatically reload modified modules:
%load_ext autoreload
%autoreload 2
# 0 disables autoreload.
# Generate plots inside notebook:
%matplotlib inline
# DISPLAY options
from IPython.display import Image
# e.g. Image(filename='holt-winters-equations.png', embed=True) # url= also works
from IPython.display import YouTubeVideo
# e.g. YouTubeVideo('1j_HxD4iLn8', start='43', width=600, height=400)
from IPython.display import HTML # useful for snippets
# e.g. HTML('<iframe src=http://en.mobile.wikipedia.org/?useformat=mobile width=700 height=350></iframe>')
import pandas as pd
print '\n :: pandas version:'
print pd.__version__
# pandas DataFrames are represented as text by default; enable HTML representation:
# [Deprecated: pd.core.format.set_printoptions( notebook_repr_html=True ) ]
pd.set_option( 'display.notebook_repr_html', False )
# MATH display, use %%latex, rather than the following:
# from IPython.display import Math
# from IPython.display import Latex
print '\n :: Working directory (set as $workd):'
workd, = !pwd
print workd + '\n'
:: TIMESTAMP of last notebook execution: Tue May 19 17:03:53 PDT 2015 :: IPython version: 2.3.0 :: pandas version: 0.15.0 :: Working directory (set as $workd): /home/yaya/Dropbox/ipy/fecon235/nb
from yi_1tools import *
from yi_plot import *
from yi_timeseries import *
from yi_fred import *
# Daily frequency:
eurusd = getfred( d4eurusd )
# Note that the synthetic preprend back to 1971 is only for monthly data.
plotfred( eurusd )
The 2006 support for EURUSD as of Oct 2014 was around 1.24. Its breach requires us to know the resistance from the synthetic euro series.
# Monthly frequency (daily frequency is not available):
eursyn = getfred( m4eurusd )
:: EURUSD synthetically goes back monthly to 1971.
plotfred(eursyn, 'EURUSD synthetic')
:: Finished: plotdf-EURUSD_synthetic.png
The support from 1985 implies the euro could easily descend to the 1.06 level based on the synthetic series composed of the mean between DEM and FRF (converted at their official euro rates).
"On 22 January 2015, Mario Draghi committed the ECB to a QE quantitative easing program worth at least 1.1 trillion euros to counter the threat of a deflationary spiral. The ECB president shrugged off determined opposition led by German officials with a pledge to buy 60 billion euros every month through September 2016 in a once-and-for-all push to put more cash into circulation and revive inflation. To assuage critics, the region’s 19 national central banks will make 80 percent of the purchases and take on any risk they carry."
# Define the day before QE-EU:
qeeu = '2015-01-21'
# What is the EURUSD low since QE-EU announcement?
# On the day before, on 2015-01-21, the rate was 1.1584.
stats( eurusd[qeeu:] )
Y count 83.000000 mean 1.106006 std 0.029410 min 1.052400 25% 1.079750 50% 1.114500 75% 1.133350 max 1.158400 :: Index on min: Y 2015-03-13 dtype: datetime64[ns] :: Index on max: Y 2015-01-21 dtype: datetime64[ns] :: Head: Y T 2015-01-21 1.1584 2015-01-22 1.1414 2015-01-23 1.1279 2015-01-26 1.1290 2015-01-27 1.1370 2015-01-28 1.1342 2015-01-29 1.1308 :: Tail: Y T 2015-05-07 1.1283 2015-05-08 1.1241 2015-05-11 1.1142 2015-05-12 1.1240 2015-05-13 1.1372 2015-05-14 1.1368 2015-05-15 1.1428 :: Correlation matrix: Y Y 1
As of 2015-05-16: the EURUSD low post-QE-EU is 1.0524 on 2015-03-13 -- which a 9% decline in less than two months.
syntrend = trend( eursyn )
:: regresstime slope = 0.000783027874247
plotfred( syntrend )
# Detrend:
plotfred( eursyn - syntrend )
tailvalue( syntrend )
1.3243276659569534
October 2014: Looking at the detrended series, a deviation of -0.3 (i.e. -3000 pips) is plausible from the trend. Thus the statistically 1.3280 - 0.3 = 1.0280 is realistic. Given ECB implicitly wants the euro to weaken (LSAP not yet in effect, as of October 2014), we see the long-term support between 1.03 and 1.06.
May 2015: Given QE announcement in January, 1.0524 definitively is the technical support dating back to 1985. The uptrend is unbroken, however, ...
Though monetary policy is the primary reason for weakening euro, Greece is expected to face default conditions beginning the start of 2016, intensifying into the summer of 2016. The euro crisis will be revisited as Grexit is a possibility on the horizon.
# Forecast monthly for next 24 months:
holtfred( eursyn )
Forecast 0 1.124100 1 1.065482 2 1.038455 3 1.011428 4 0.984401 5 0.957374 6 0.930347 7 0.903320 8 0.876293 9 0.849266 10 0.822239 11 0.795212 12 0.768185 13 0.741158 14 0.714131 15 0.687104 16 0.660077 17 0.633050 18 0.606023 19 0.578996 20 0.551969 21 0.524942 22 0.497915 23 0.470888 24 0.443861
# Look at geometric return since 2006:
georet( eurusd[t06:] )
[-0.37, 0.12, 9.95, 256]
October 2014: Interestingly the annual geometric return post-US-Great-Recession is positive at 0.62% (which does not seem so in the charts visually). The volatility for EURUSD going back to 2006 is 10%.
May 2015: The annual geometric return on EURUSD as FX has become negative at -0.55% due chiefly to QE-EU. That does not include negative rates on euro deposits! The one-year ahead forecast is 0.7662 which means the long-term trend will be broken.
Let's derive the long-term synthetic rates for EURJPY.
# We retrieve the monthly frequency:
usdjpy = getfred( m4usdjpy )
# Since monthly eursysn is expressed in terms of EURUSD:
eurjpy = todf( eursyn * usdjpy )
plotfred( eurjpy, 'EURJPY synthetic' )
:: Finished: plotdf-EURJPY_synthetic.png
The EURJPY trend since 1995 looks sideways, bouncing between 90 and 170.
# Verify trend claim:
ej95trend = trend( eurjpy['1995-01-01':] )
:: regresstime slope = -0.00246059121507
# The plot is uninteresting, just a straight line along 129.50 !
# Look at the slope and the std for confirmation:
ej95trend.describe()
Y count 245.000000 mean 129.483756 std 0.174381 min 129.183564 25% 129.333660 50% 129.483756 75% 129.633852 max 129.783949
So basically the EURJPY range is 130 ± 40 since 1995. This is only apparent by observing the synthetic time-series.
It has large width, ± 31% -- but the 130 level provides "fair" benchmark (cf. IMF assessment) for quick comparison.
# Euro strength against the yen on a scale of 100:
int((tailvalue( eurjpy ) - 90) / 0.80)
# 2014-12-22: 71 One month prior to QE-EU, EURJPY = 146.83
# 2015-01-21: 58 One day prior to QE-EU, EURJPY = 136.52
# 2015-04-01: 51 Two months after QE-EU, EURJPY = 130.80
# 2015-05-18: 55 Four months after QE-EU
55
georet( eurjpy[t06:], 12 )
[-0.39, 0.24, 11.23, 12]
Surprisingly, the answer seems to be: neither, i.e. equally fast, from solely the FX viewpoint. Japan though embarked on its QE program many years ago, and still has not reversed that policy. Japan seems on its way out of economic misery whereas Europe seems to be under economic suppression.
From the viewpoint of carry trades, the short side has to be the euro, simply because of the negative deposit rates. One is paid to go short!
The US is only country among the three major FX countries considering a upward hike in rates. Thus fundamentally the long side would be the dollar.
May 2015: EU has just begun their QE, and there is the possibility of Grexit looming -- all which indicate further weakening of the euro. The euro against the dollar may test the synthetic lows registered during the 1980's [All-time EURUSD low: 0.62 circa Feb 1985].
May 2015: Given 130 as fair EURJPY benchmark, Euro becomes a buy against the yen as it approaches 90 yen.