model dynamics in foreign exchange markets
TRANSCRIPT
Institute of Mathematics, Academic Sinica
Final Project Report
Using Dimension Reduction Techniques
to Model Dynamics in Foreign Exchange Markets
Author:
黃大維
國立清華大學 計量財務金融學系
蔡秉軒
國立交通大學 應用數學系
陳範恩
國立臺灣大學 電機工程學系
August 14, 2015
Data Description and Motivation
Most of theories about foreign exchange markets focus on relationships among exchange rates,
interest rates, and price levels of two countries. However, it is reasonable to assume there are some
common factors and linkages among FX rates of different countries, and thus I would like to present a
factor analysis of exchange rates. Then, I would like to test the arbitrage pricing model, a famous
model to analyze returns in finance using factor analysis, for the international foreign exchange market.
I download daily returns of foreign exchanges of 16 countries from 2014/05/21 to 2015/05/22. The
data source is the TEJ profile database. In the data set, there are 16 columns (countries) and 240 rows
(days). A sample of the first 5 rows and 5 columns is presented in table 1. The goal is to present a
factor analysis of the data set.
Table 1: Sample of the Data Set
日期 ARS 阿根廷披索 BRL 巴西雷阿爾 CAD 加幣 MXN 墨西哥披索 INR 印度盧比
2014/5/21 0 0 0 0.001548 0
2014/5/22 0 0.004515 0 -0.00387 -0.00445
2014/5/23 0 0 0 -0.00155 0.00137
2014/5/26 0 0 0 0.000777 0.003757
2014/5/27 0 0.008969 0 -0.00078 0.00544
Explorative Data Analysis
Before starting to do the factor analysis, I conduct some explorative data analysis first. To learn
more about daily returns, a heat map is shown in figure 1. Here I exclude the record of CHF at
2015/01/15 on the heat map to get a clear figure. (Note that the unusual return was caused by the
significant change of SBC’s policy.) I also exclude the Rusiian Ruble since it is extremely volatile due
to the sanctions from the Western countries. From the plot, one can find an interesting thing. Since
some of the countries such as Taiwan and Thailand have a relatively fixed exchange policy, they seemed
to be less volatile comparing with other countries.
To check whether a factor analysis is suitable for the data set, I also present the heat map of
correlation matrix in figure. One can find that all the variables are positive correlated, and the four
currencies AUD/CAD/GBP/EUR have correlations larger than 0.4, so it is not bad to conduct a factor
analysis. Note that all currencies are positive correlated with each other since exchange rates are all
1
Figure 1: Heat Map for Daily Return Data
based on US dollar. To further check the adequacy of factor analysis, I also calculate the KMO
measure of sampling adequacy (MSA) and conduct the Bartlett’s test of sphericity, and since the
MSA= 0.89 and the p-value is less than 2.2 × 10−6 (i.e. the correlation matrix is not a unit matrix), it
is reasonable to do a factor analysis.
Figure 2: Heat Map of Correlation Matrix
2
Theoretical Aspect of the Arbitrage Pricing Theory
Our target is estimating the expected return of a currency. Formulated by Ross (1976), the
arbitrage pricing theory (APT) assumes the rate of return on any security is a linear function of m
factors, that is,
Ri − E(Ri) = li1F1 + li2F2 + · · · + limFm + εi,
where Fj’s and εi’s satisfy the assumption of the orthogonal factor model, and the expected return
E(Ri)’s are all constants. The matrix form is R− E(R) = LF + ε, where Rp×1 is the vector of asset
returns. Note that to analyze the return data, we have i = 1, 2, · · · , 16.
For a portfolio with weight vector wp×1, the portfolio return is
Rportfolio = wR = wE(R) + wLF + wε,
where we assume wε ≈ 0. Then, the portfolio return can be decomposed as a constant return wE(R)
plus a risk premium term wLF. If we select the weight w such that wLF = 0, or equivalently
wL = 0,then Rportfolio = wE(R). In theoretical aspect of security market equilibrium, wE(R) = 0
must holds in this case by the no arbitrage condition.
Thus, in market equilibrium, there exists a weight w such that wL = 0 and wE(R) = 0. The
above result guarantee us to write down the arbitrage pricing model E(R) = λ01p×1 + LΛ, where
Λ = [λ1 λ2 · · · λp]′. Here, most scholars assume λ0 to be the risk-free interest rate Rf , and I set it
as zero for since the foreign exchange trade is actually a zero-sum game. Here, each λi is called the
”market risk premium of factor i”, and the coefficient lij is called the sensitivity of security i for the
risk factor i. To test the APT, we still need to estimate E(R). One can rewrite the factor model
R− E(R) = LF + ε as E(R) = R− LF− ε. Hence, we can approximate the cross-sectional expected
return by E(R) ≈ R− LF.
Empirical Test for the Arbitrage Pricing Theory
Now, I would like to summarize the steps to test the arbitrage pricing theory empirically. Assume
the model R16×249 − E(R) = L16×mFm×249 + ε16×249.
1. Decide the number m of factors. Use principle factor solution and maximum likelihood
estimation to get the estimate L̂ of the coefficients matrix L. Apply the Varimax criteria to get a
rotated factor loading matrix. Comparing the result of different methods.
3
2. Use the regression method to get the factor score F̂, and then derive the proxy of expected return
R∗ = R− L̂F̂. Note that each element R∗it is the estimated expected return of security i at time t.
3. To get the market risk premium Λ, we run the Fama-MacBeth cross-sectional regression
Rt = Λ0t + L̂Λt + εt,
where Λ0t is the vector of intercepts, and Rt is the tth column of R. Note that the risk-free rate
is assumed to be zero in foreign exchange rate market.
4. To test the arbitrage pricing theory, we need to test
(1) whether Λ0 = 0 (no abnormal returns),
(2) whether the residuals are white noises, and
(3) whether the fitted value R̂t from the regression is close to real value Rt.
Besides testing the arbitrage pricing theory, there are two things we can notice. First, we are
interested in the explanation of factors since the meaning represents the linkage of exchange rates of
different currencies. The second thing is that whether Λt is time-invariant.
Results of the Analysis
Step 1: Construct the Market Factor Model
The first step is to construct the foreign exchange market factor model R− E(R) = LF + ε. From
the Hotelling’s T 2 test, the p-value is 0.5896, which suggests that we can directly do the factor analysis
without eliminating the sample mean.
Parallel analysis (PA) is a Monte-Carlo based simulation method that compares the observed
eigenvalues with those obtained from uncorrelated normal variables. A factor or component is retained
if the associated eigenvalue is bigger than the 95th of the distribution of eigenvalues derived from the
random data. The parallel analysis scree plot is shown below, and it suggests that the number of
factors m = 3, so we extract three factors from the return data.
4
Figure 3: Parallel Analysis Scree Plot
The result of principle factor solution (using correlation matrix) is shown in table 2. From the
loadings with varimax factor rotation, one can see a very clear clustering phenomena. The first group
includes currencies of well-developed country such as JPY, SGD, NZD, AUD, EUR, GBP, and CHF.
The second group including MXN, ZAR, BRL, INR, CAD, RUB, and THB. They are all developing
countries with strong economic growth, but their currencies are easily attacked by international
speculative funds. The third group contains only two countries, Taiwan and Korea. These two countries
have very similar foreign exchange policy, and their major country to export is United States. Note
that the proportion of variance explained by PA1, PA2, and PA3 are 18%, 18%, and 9%, respectively.
Table 2: Factor Loadings from Principle Factor Solution
CurrencyPFS (No Rotation) PFS (After Rotation)
Specific VariancePA1 PA2 PA3 PA1 PA2 PA3
JPY.日圓 0.5879 0.4837 0.0075 0.6798 0.0073 0.3428 0.42
SGD.新加坡元 0.6629 0.2706 0.0985 0.6436 0.2249 0.2398 0.48
NZD.紐西蘭幣 0.7104 0.1318 0.2062 0.6414 0.3695 0.1292 0.44
AUD.澳幣 0.7349 -0.0191 0.2574 0.5909 0.5043 0.0567 0.39
EUR.歐元 0.5117 0.1392 0.1870 0.5060 0.2351 0.0698 0.68
GBP.英鎊 0.3777 0.1435 0.1332 0.3956 0.1421 0.0658 0.82
CHF.瑞士法郎 0.2931 0.2928 0.0302 0.3818 -0.0339 0.1601 0.83
MXN.墨西哥披索 0.6997 -0.4070 -0.0615 0.1904 0.7546 0.2308 0.34
ZAR.南非蘭特 0.7609 -0.3139 -0.0088 0.3104 0.7266 0.2309 0.32
BRL.巴西雷阿爾 0.5262 -0.3721 -0.1309 0.0651 0.6117 0.2326 0.57
INR.印度盧比 0.5580 -0.2772 -0.2035 0.1094 0.5541 0.3325 0.57
CAD.加幣 0.5733 -0.1453 0.1855 0.3762 0.4920 0.0260 0.62
RUB.俄羅斯盧布 0.2650 -0.3342 0.1584 0.0477 0.4370 -0.1175 0.79
THB.泰銖 0.5480 -0.0099 -0.0689 0.3239 0.3534 0.2745 0.69
KRW.韓元 0.6683 0.3732 -0.3557 0.5008 0.1163 0.6694 0.29
TWD.台幣 0.5876 0.0804 -0.3418 0.2791 0.2894 0.5540 0.53
5
Table 3 presents factor loadings and specific variances estimated from the maximum likelihood
estimation (using correlation matrix). Note that the group behaviour are very similar with the result
from principle factor solution. The specific variance of each country is also close to the result from
principle factor solution. Note that the proportion of variance explained by FA1, FA2, and FA3 are
19%, 19%, and 8%, respectively.
Table 3: Factor Loadings from Maximum Likelihood Estimation
CurrencyMLE (No Rotation) MLE (After Rotation)
Specific VarianceML1 ML2 ML3 ML1 ML2 ML3
MXN.墨西哥披索 0.7055 0.4345 -0.1419 0.7990 0.1670 0.2010 0.29
ZAR.南非蘭特 0.7615 0.3417 -0.0180 0.7521 0.3212 0.1676 0.30
BRL.巴西雷阿爾 0.5284 0.3374 -0.1931 0.6165 0.0673 0.2139 0.57
INR.印度盧比 0.5576 0.2473 -0.1620 0.5639 0.1472 0.2420 0.60
CAD.加幣 0.5600 0.1586 0.0939 0.4718 0.3441 0.0804 0.65
RUB.俄羅斯盧布 0.2358 0.3466 0.1245 0.4016 0.0644 -0.1607 0.81
JPY.日圓 0.5960 -0.4423 0.1483 0.0350 0.6826 0.3252 0.43
NZD.紐西蘭幣 0.7001 -0.0563 0.3062 0.3779 0.6633 0.0667 0.41
SGD.新加坡元 0.6579 -0.1983 0.2010 0.2541 0.6395 0.1975 0.49
AUD.澳幣 0.7144 0.0689 0.2922 0.4832 0.6052 0.0266 0.40
EUR.歐元 0.5026 -0.0607 0.1985 0.2582 0.4729 0.0739 0.70
CHF.瑞士法郎 0.2824 -0.2704 0.1537 -0.0381 0.4021 0.1156 0.82
GBP.英鎊 0.3753 -0.1060 0.1406 0.1477 0.3771 0.0889 0.83
THB.泰銖 0.5433 -0.0120 0.0300 0.3387 0.3751 0.2020 0.70
KRW.韓元 0.7048 -0.4583 -0.2748 0.1370 0.5065 0.7121 0.22
TWD.台幣 0.6004 -0.1334 -0.2822 0.3161 0.2817 0.5278 0.54
Step 2: Derived the Expected Returns
The second step is to derive the estimated expect return R∗. Here I compare R∗ with standardized
returns since I use the correlation matrix to do the factor analysis. The time series plots of estimated
expected returns and real returns of 16 currencies are shown below. The black lines are the real
standardized returns, the red line are expected returns estimated from principle factor solution, and the
red line are expected returns estimated from the MLE. Note that the maximum in sample root mean
square error among 16 variables is 1.788859. This result suggest that under the assumption of factor
model, the foreign exchange market is not in equilibrium.
6
Figure 4: Estimated and Real Returns for the 16 Currencies
Step 3: Fama-MacBeth Regression
The Fama-MacBeth regression is an empirical method to test the arbitrage pricing theory and
predict the future return. I run the cross-sectional regression Rit = λ̂0t + λ̂1tli1 + λ̂2tli2 + λ̂3tli3 + εit
with 16 countries from t = 1 to t = 249. Note that each specific risk premium λ̂i is estimated from the
previous factor analysis.
The first question is that whether or not the abnormal return λ̂0t is zero. The plots of p-values of
sample t test for λ0 = 0 are shown below. For the principle factor solution, there are 45 days having
significant abnormal returns, and there are 44 out of 249 days for the maximum likelihood estimation.
In general, we cannot reject the arbitrage pricing model.
7
Figure 5: P-values for testing λ0t = 0
Next, I test the white noise assumption. The p-values of portmanteau test are shown in table 4.
Since the test result from PFS and the result from MLE are very similar, I only present the PFA case.
Approximately half of residuals are serial correlated, which suggest that there are some improvements
we can do for modeling returns. However, there are still half of currencies having uncorrelated
residuals, so the evidence is not strong enough to reject the arbitrage pricing theory.
Table 4: P-values of Portmanteau Test (Box-Ljun Test for Serial Correlation)
Lag 1 Lag 5 Lag 10 Lag 15 Lag 20
BRL 巴西雷阿爾 0.274 0.630 0.792 0.667 0.664
CAD 加幣 0.001 0.024 0.046 0.083 0.078
MXN 墨西哥披索 0.918 0.399 0.246 0.021 0.033
INR 印度盧比 0.886 0.941 0.940 0.911 0.823
JPY 日圓 0.325 0.402 0.041 0.115 0.129
KRW 韓元 0.142 0.205 0.035 0.001 0.000
SGD 新加坡元 0.005 0.006 0.012 0.087 0.085
THB 泰銖 0.458 0.718 0.835 0.483 0.452
TWD 台幣 0.885 0.009 0.001 0.003 0.007
RUB 俄羅斯盧布 0.508 0.196 0.008 0.001 0.000
EUR 歐元 0.000 0.000 0.000 0.000 0.000
GBP 英鎊 0.027 0.072 0.010 0.019 0.006
CHF 瑞士法郎 0.139 0.140 0.087 0.049 0.007
AUD 澳幣 0.005 0.044 0.171 0.301 0.225
NZD 紐西蘭幣 0.036 0.345 0.381 0.109 0.138
ZAR 南非蘭特 0.470 0.338 0.434 0.252 0.034
Number of Rejecting H0 6 5 8 6 7
8
The root mean square errors of currencies from the two model is shown in table 5. It is obvious
that the regression with λi estimated by principle factor solution outperforms the result with λi
estimated by MLE. A reasonable explanation is that returns do not follow a multivariate normal
distribution, and thus the MLE assumption is violated. (The distribution of returns are mostly
thick-tailed and skewed.)
Table 5: Root Mean Square Errors of estimations from Fama-MacBeth Regression
Currency BRL 巴西雷阿爾 CAD 加幣 MXN 墨西哥披索 INR 印度盧比 JPY 日圓 KRW 韓元 SGD 新加坡元 THB 泰銖
PFS 0.007 0.005 0.004 0.004 0.004 0.005 0.004 0.004
MLE 0.011 0.007 0.006 0.004 0.005 0.005 0.004 0.003
Currency TWD 台幣 RUB 俄羅斯盧布 EUR 歐元 GBP 英鎊 CHF 瑞士法郎 AUD 澳幣 NZD 紐西蘭幣 ZAR 南非蘭特
PFS 0.003 0.011 0.007 0.008 0.010 0.004 0.005 0.005
MLE 0.003 0.021 0.008 0.008 0.015 0.007 0.008 0.008
The time series plots of estimated λi are shown in the following figure. There are two important
observations. First, each λi is actually time-dependent. Second, they all have similar features of
financial returns - thick tails, volatility clustering, and so on. This is reasonable because we regard each
λi as a specific risk premium, which is also a type of financial returns.
Figure 6: Estimated λ1, λ2, and λ3
9
Conclusion and Discussion
In this homework assignment, I use the daily return data in New York foreign exchange market to
present an empirical test of arbitrage pricing theory. The main findings are shown below.
1. From the orthogonal factor model, one can find three common factors of FX returns. The first
common factor represents returns of well-developed country such as JPY, SGD, NZD, AUD,
EUR, GBP, and CHF. The second factor captures market dynamic of currencies of developing
countries such as MXN, ZAR, BRL, INR, CAD, RUB, and THB. The third common factor
measures the foreign exchange rate movements of Taiwan and Korea. The first and second factors
explain approximately 18-19% of the total variance, while the third factor explains approximately
7-8% of the total variance.
2. The estimated expect return R∗ = R− L̂F̂ has significant difference from the real standardized
return (with maximum RMSE approximately 1.78 and minimum 1.21. This result suggests that
the foreign exchange market is not in equilibrium. This result may derive from the intervention
from the central bank of each country.
3. There is no strong evidence that could reject the arbitrage pricing theory. On the other hand, the
Fama-MacBeth regression suggests us to use the principle factor solution instead of MLE under
normality assumption to construct the arbitrage pricing model. Finally, each λi is
time-dependent with stylized facts of financial returns, and thus it is reasonable to interpret each
λi as a specific market risk premium.
In future research, one can focus on applying the arbitrage pricing model to predict returns of
foreign exchange rates. The main problem is the way to forecast the unobserved factor loadings and
the market risk premiums.
Citation of the Source
The data set is downloaded from the TEJ database(台灣經濟新報資料庫). Each student or
faculty can get a free access to this database.
10
References
1. Fama, E. F., and MacBeth, J.D. ”Risk, Return, and Equilibrium: Empirical Tests.” Journal of
Political Economics (1973): 607 - 636.
2. Florin Dan Pieleanu. ”Empirical Testing of the APT Model with Pre-Specifying the Factors in
the Case of Romanian Stock Market.” International Journal of Advances in Management and
Economics (2012) 1(2): 27 - 41.
3. Huberman, G., and Zhenyu, W. ”Arbitrage Pricing Theory.” Staff Report, Federal Reserve Bank
of New York (2005) 216.
4. Roll, R., and Ross, S. A. ”An empirical investigation of the Arbitrage Pricing Theory.” Journal of
Finance (1980) 35(6): 1073 - 1103.
5. Ross, S. A. ”The Arbitrage Pricing Theory of capital asset pricing.” Journal of Economic Theory
(1976) 13(4): 341 - 360.
6. Yli-Olli, P., and Virtanen, I. ”Some Empirical Tests of the Arbitrage Pricing Theory Using
Transformation Analysis.” Empirical Economics (1992) 17: 507 - 522.
11