Report
Report
INTERNATIONAL UNIVERSITY
DEPARTMENT OF MATHEMATICS
1 Introduction 5
2 Methodology 7
2.1 Stepwise Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Ordinary Least Squares method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Ordinary Least Squares method for Simple Linear Regression . . . . . . . . 8
2.2.2 Ordinary Least Squares method for Multiple Linear Regression . . . . . . . 8
2.2.3 Ordinary Least Squares assumptions . . . . . . . . . . . . . . . . . . . . . 10
2.3 Hypothesis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.1 t-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.2 White’s test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.3 Durbin-Watson test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.4 Jarque Bera test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 Data Analysis 17
5 Conclusion 27
6 Teammate Evaluation 29
6.1 Ton Nu Trieu Man - MAMAIU20037 . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 Tran Viet Hang - MAMAIU18079 . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3 Le Trong Tan - MAMAIU20032 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Bibliography 30
1
Contents
2
List of Figures
3
List of Figures
4
Chapter 1
Introduction
The COVID-19 pandemic exerts a catastrophic impact on the global economy. A major concern
in a crisis is the influence on business which consequently determines the unemployment, debt
level, financial markets, etc in a country. It is difficult to identify economies that have evaded the
detrimental effects of COVID-19. However, some nations have seen a smaller decline in economic
growth than others. Therefore, knowing the prospective economic indicators can help to afford
economic remedies.
Gross Domestic Product (GDP) has been used as one of the valid measures to assess a country’s
level of wealth. By its definition, ”GDP measures the monetary value of final goods and services
- that is, those that are bought by the final user - produced in a country in a given period of time
(say a quarter or a year)” (Callen, 2019). The GDP growth rate is frequently seen as a sign of
the economy’s overall health. In general, growth in GDP is seen as a positive indicator of the
health of the economy. It is influenced by various macroeconomic indicators such as consumption,
investment, government spending, exports, imports, etc. The decision-maker and the analyst’s
subjective judgment will have a role in how these parameters are chosen.
For the above reasons, it is very important to understand the GDP as well as which indicators
determine it. This paper aims to investigate the determinants of quarterly GDP in the US by
mainly applying Multi-linear Regression with the Ordinary Least Square (OLS) method. Data for
this research project is extracted from Federal Reserve Economic Data, which are macroeconomic
indicators recorded from the first quarter of 1980 to the third quarter of 2022. The implementation
of the methodology on the dataset would previously consider five assumptions of the OLS method
so that the dataset can be treated as trustworthy.
Through that, it also measures the level of influence of these determinants as well as estimates
the implicit GDP in the next several quarters. Finally, the result and findings from this research
could introduce some implications and suggestions for further studies. It could be employed as
5
Chapter 1. Introduction
a reference for researchers and investors to understand the future prospects of the US economy,
thus, make investment decisions. In other words, the findings in this study could assist their
decision-making for investment strategies or development plans. The research aims to answer the
following research questions:
2. How do the attributes contribute to the GDP in the US and what is the importance of the
attributes?
6
Chapter 2
Methodology
7
Chapter 2. Methodology
Yi = β0 + β1 Xi + ϵi
where
• Y = β0 + β1 X is the population regression line also called the population regression function
The solution of the proposed problem is the solution of the following optimization problem:
minimize: n n
X X
minimize: SS = (ϵi )2 = (yi − β0 − β1 xi )2 .
i=1 i=1
The derivatives of SS with respect to β0 and β1 are taken, then the solutions would be obtained
as the following:
n
X
xi Yi − nx̄Ȳ
i=1
β1 = n
X
x2i − nx̄2
i=1
β0 = Ȳ − β1 x̄
8
Chapter 2. Methodology
• Yi is the ith observation in the dependent variable. Observations on the k regressors are
denoted by X1i , X2i , ..., Xki andϵi is the error term.
• The average relationship between Y and the regressors is given by the population regression
line
• β0 is the intercept; it is the expected value of Y when all X ′ s equal 0. βj , j = 1, ..., k are
the coefficients on Xj , j = 1, ..., k. β1 measures the expected change in Yi that results from
a one unit change in X1i while holding all other regressors constants.
The Multiple Linear Regression problem can be written in the matrix form:
y = Xβ + ϵ
where y and ϵ are n × 1 vectors of the response variables and the errors of the n observations, and
X is an n × p matrix of regressors, also sometimes called the design matrix, whose row i is xTi and
contains the ith observations on all the explanatory variables.
Similarly to the Simple Linear Regression problem, the solution of the generalized problem would
be implied by solving:
n
X
minimize SS = (yi − xTi β)2 = (y − Xβ)T (y − Xβ)
i=1
That is:
β̂ = (X T X)−1 X T y
The goodness-of-fit of the OLS regression is commonly assessed by the coefficient of determination
R2 :
X
(ŷi − ȳ)2 ESS
2
R =X =
(yi − ȳ)2 T SS
where:
X
• TSS is the total sum of squares for the dependent variable, TSS = (yi − ȳ)2
9
Chapter 2. Methodology
X
• ESS is the estimated sum of squares for the dependent variable, ESS = (ŷi − ȳ)2
X
• TSS = RSS + ESS, RSS = ϵˆi 2
i
2
In that case, R will always be a number between 0 and 1, with values closer to 1 indicating a
better degree of fit.
E(ϵi ) = 0
The exogeneity assumption is critical for the OLS theory. If it holds then the regressor variables
are called exogenous. If a constant term is included in the regression equation, this assumption
will never be violated. First, R2 , defined as ESS/TSS can be negative, implying that the sample
average, ‘explains’ more of the variation in y than the explanatory variables. Second, and more
fundamentally, a regression with no intercept parameter could lead to potentially severe biases in
the slope coefficient estimates.
10
Chapter 2. Methodology
Assumption of Homoscedasticity
The error term has the same variance σ 2 in each observation. When this requirement is violated
this is called heteroscedasticity, in such case a more efficient estimator would be weighted least
squares. If the errors have infinite variance then the OLS estimates will also have infinite variance
(although by the law of large numbers they will nonetheless tend toward the true values so long
as the errors have zero mean). In this case, robust estimation techniques are recommended.
V ar(ϵi ) = σ 2 < ∞
This assumption will be tested by using the White’s test in this paper.
Assumption of Non-autocorrelation
The errors are uncorrelated between observations: E(ϵi ϵj |X) = 0, or Cov(ϵi , ϵj ) = 0 for i ̸= j
This assumption may be violated in the context of time series data, panel data, cluster samples,
hierarchical data, repeated measures data, longitudinal data, and other data with dependencies.
In such cases generalized least squares provides a better alternative than the OLS.
cov(xi , ϵi ) = 0
11
Chapter 2. Methodology
or xi are non-stochastic. Fortunately, the OLS is consistent and unbiased even in the case of
stochastic xi .
ϵ|X ∼ N (0, σ 2 In )
This assumption is not needed for the validity of the OLS method, although certain additional
finite-sample properties can be established in case when it does (especially in the area of hypoth-
esis testing). This condition can be tested by the Jarque-Bera test.
In addition, if the assumptions 1-4 hold, then the estimators determined by OLS will have a
number of desirable properties, and are known as best linear unbiased estimators (BLUE). That
is:
• ‘Linear’ – β̂ with βi are linear estimators – that means that the formulae for βi are linear
combinations of the random variables (in this case, y).
• ‘Unbiased’ – on average, the actual values of β̂ and will be equal to their true values.
• ‘Best’ – means that the OLS estimator has minimum variance among the class of linear
unbiased estimators; the Gauss–Markov theorem proves that the OLS estimator is best by
examining an arbitrary alternative linear unbiased estimator and showing in all cases that
it must have a variance no smaller than the OLS estimator.
An implicit assumption of Autocorrelation that the explanatory variables are not correlated with
one another would be under the consideration in this paper. The assumption verification can
employ variance inflation factors (VIF). However, in this project, the authors have excluded pairs
of highly correlated features, and VIF would not be calculated in this paper.
2.3.1 t-test
This project aims to test whether an independent variable has significant impact on the target, or
the dependent variable, thus the paper would consider the following hypothesis test for coefficients
of each independent variable: H0 : βi = 0 vs Ha : βi ̸= 0 for each i = 0, 1, 2, .... t-test would be
applied in this paper as it is primarily used with samples with limited information, and, thus, the
12
Chapter 2. Methodology
Consider the sample where n is the sample size, x̄ and Ȳ are the sample means, S is the sample
n n
X
2
X SxY
standard deviation, Sxx = (xi − x̄) , SxY = (xi − X̄)(Yi − Ȳ ). Denote B =
i=1 i=1
Sxx
r
(n − 2)Sxx
· (B − βi ) ∼ Tn−2
SS
This process would omit factors with insignificant variables (with the assumption that its coef-
ficient equals zero) by eliminating those with high p-value (larger than the level of significance).
The remaining factors from this process would be estimated confidence intervals for each.
For α significance level, the confidence interval of the coefficient of individual factor would be
obtained as following:
s s !
SS SS
B− tα/2,n−2 , B + tα/2,n−2
(n − 2)Sxx (n − 2)Sxx
The error term of our regression model is homoskedastic if the variance of the conditional distri-
bution of ϵi given Xi , V ar(ϵi |Xi = x) is a constant for all observations in the sample
If instead there is dependence of the conditional variance of ϵi on Xi , the error term is said to be
heteroskedastic.
V ar(ϵi |Xi = x) = σi2 , ∀i = 1, 2, ..., n
White’s test
White’s test is a statistical test for homoscedasticity. The hypothesis test would be as following:
H0 : σi2 = σ 2 , ∀i = 1, ..., n vs Ha : ∃i ∈ [1, n], σi2 ̸= σ 2
13
Chapter 2. Methodology
• Assume that the regression model estimated is of the standard linear form, e.g.
yt = β1 + β2 x2t + β3 x3t + ϵt
This approach is known as a Lagrange Multiplier (LM) test, which centers around the value of
R2 for the auxiliary regression. If one or more coefficients in an auxiliary model is statistically
significant, the value of R2 for that equation will be relatively high, while if none of the variables
is significant, R2 will be relatively low. The LM test would thus operate by obtaining R2 from
the auxiliary regression and multiplying it by the number of observations, T.
T R2 ∼ χ2 (m)
where m is the number of regressors in the auxiliary regression (excluding the constant term).
For the LM test, if the χ2 -test statistic is greater than the corresponding value from the statistical
table then reject the null hypothesis that the errors are homoscedastic. In other words, the null
hypothesis would be rejected for any significance level larger than the p-value.
The Durbin-Watson test aims to detect the autocorrelation between error terms. Consider a
regression of the time t error on its previous value:
ut = ρut−1 + vt
14
Chapter 2. Methodology
and DW ≈ 2(1 − ρ̂), where p̂ is the estimated correlation coefficient that would have been ob-
tained from ut = ρut−1 + vt , −1 ≤ p̂ ≤ 1. Thus, test statistic DW would take values from 0 to 4,
0 ≤ DW ≤ 4.
Consider:
• p̂ = 1, then DW = [Link] corresponds to the case where there is perfect positive autocorre-
lation in the residuals.
• p̂ = −1, then DW = [Link] corresponds to the case where there is perfect negative autocor-
relation in the residuals.
The null hypothesis is of normality, and this would be rejected if the residuals from the model
were either significantly skewed or leptokurtic/platykurtic (or both).
15
Chapter 2. Methodology
16
Chapter 3
Data Analysis
The data is collected quarterly from the Federal Reserve Bank’s website with time ranging from
Q1 1980 to Q3 2022 (n = 171). There is 1 dependent variable (GDP) and 19 independent variables
whose description will be shown in detail below.
• MMMFFAQ027S : Money Market Funds; Total Financial Assets, Level (Millions of Dollars)
• BOGZ1FL072052006Q: Interest Rates and Price Indexes; Effective Federal Funds Rate (Per-
cent), Level
• ROWFDIQ027S : Rest of the World; Foreign Direct Investment in U.S.; Asset (Current
Cost), Transactions (Millions of Dollars)
• FGCCSAQ027S : Federal Government; Consumer Credit, Student Loans; Asset, Level (Mil-
lions of Dollars)
• FGLBAFQ027S : Federal Government; Net Lending (+) or Borrowing (-) (Financial Ac-
count), Transactions (Millions of Dollars)
• LES1252881600Q: Employed full time: Median usual weekly real earnings: Wage and salary
workers: 16 years and over (CPI Adjusted Dollars)
17
Chapter 3. Data Analysis
• LREM64TTUSQ156S : Employment Rate: Aged 15-64: All Persons for the United States
(Percent)
• A067RL1Q156SBEA: Real Disposable Personal Income (Percentage change from the pre-
ceding period)
Since some of the variables in the data set have different units, it is better to standardize data
before making any visualization so that we could recognize the pattern as well as the trend of
GDP and all macroeconomic factors more clearly and accurately.
18
Chapter 3. Data Analysis
Figure 3.2: U.S GDP & Macroeconomic Factors Trend from 1980 to 2022
Overall, the GDP of the US witnessed a slight increase from Q1 1980 (2.7 trillion dollars) to Q3
2022 (25.6 trillion dollars). The majority of macroeconomic factors also experienced an upward
trend as GDP went up over time. While MMMFFAQ027S, ASTMA, BOGZ1FL594090005Q,
FGCCSAQ027S, BOGZ1FA895050005Q, GFDEBTN increased slowly, LES1252881600Q,
LREM64TTUSQ156S, RSAHORUSQ156S, CCUSMA02EZQ618N increased but showed small
fluctuations over time. In contrast, BOGZ1FL072052006Q, NROU, GGSAVE, NETEXP, M2V
decreased slightly between 1980 and 2022. It is interesting that there were some volatile variables,
which are TLAACBQ158SBOG, ROWFDIQ027S, FGLBAFQ027S and A067RL1Q156SBEA.
19
Chapter 3. Data Analysis
Figure 3.3: U.S GDP & Macroeconomic Factors Histogram from 1980 to 2022
20
Chapter 4
4.1 Results
Feature selection process is conducted and obtains the results as follows.
This project considers the log-scale of the historical data and aims to run the regression with in-
dependent variables, thus highly correlated features would be eliminated from the data set (using
the featurewiz package in Python). Features with correlation higher than 0.7 would be excluded
21
Chapter 4. Results and Discussion
From the obtained results, macroeconomics indicators which can contribute to the OLS Regression
with p-value less than 1% remained after the Stepwise Regression. The p-values of Noncyclical
Rate of Unemployment, Employment Rate: Aged 15-64: All Persons for the United States, and
Currency Conversions: US$ Exchange Rate: Average of Daily Rates: National Currency:usd for
the Euro Area (19 Countries) are 3.75684×10−134 , 5.60041×10−12 , and 6.80781×10−5 , respectively.
In other words, for 1% significance level, the hypothesis testing on each features is rejected, or
these features can contribute to the regression with 1% level of significance.
Figure 4.3: Result of the Stepwise Regression (features with estimated p-value smaller than 1%)
Figure 4.4: OLS Regression result, considering results of the Stepwise Regression
Using 70% of the collected data for the train data set, the model demonstrated the coefficient of
determinant R2 = 0.993. The movement of GDP in the United States in this regression would
follow an equation:
22
Chapter 4. Results and Discussion
• The Employment Rate: Aged 15-64: All Persons for the United States: β2 ∈ (0.054, 0.154)
• The Currency Conversions: US$ Exchange Rate: Average of Daily Rates: National Cur-
rency:usd for the Euro Area (19 Countries): β3 ∈ (0.570, 0.982)
The implied mean squared error (MSE) and mean absolute error (MAE) on train and test data
set:
However, for the α = 1% level of confidence (t0.005,169 = 2.61), the OLS assumptions are not
all satisfied on this data set, and assumptions 1-4 do not all hold, thus the estimator β̂ is not
considered as BLUE. In particular:
23
Chapter 4. Results and Discussion
1. The assumption of Strict exogeneity is satisfied because the model has added a constant.
3. The assumption of Non-autocorrelation is not satisfied due to the low level of Durbin-Watson
test statistic, in this case, of 0.040.
5. The assumption of Normally Distributed Residuals is satisfied by using the Jarque-Bera test
- that is, the Jarque Bera is 0.274 and Prob(JB) is 0.872.
Regarding the multicollinearity between variables, as mentioned, all pairs of features have corre-
lation lower than 0.7, thus, the problem would not occur.
The authors expected the Noncyclical Rate of Unemployment to be negative and the Employment
Rate to be positive. The former, in contrast to the latter, would negatively impact GDP growth
- that is, a drop in unemployment rate would correlate with the heightened level of productivity,
thereby the factor if decreasing would make increments to the GDP.
Regarding the Currency Conversions (USD/EUR), the expected output is a positive estimator.
In the short-term, the appreciation of USD might decrease the demand on products made in the
U.S., thereby adversely impacting the U.S. GDP. Despite the fact, in the contemporary situation,
the increased level of exchange rate in the United States has been considered as a result from an
underlying shock, rather than the demand on products - that is, the widening of the monetary
policy gap between the Federal Reserve and the ECB. In particular, the Federal Reserve started
hiking interest rates in March; this was followed by further, faster hikes. The ECB, however, was
slower to act, only announcing its first rate-hike in July 2022.
The obtained estimator β̂ does not hold the assumption of Homoscedasticity and Non-autocorrelation.
In this case, OLS estimators will still give unbiased (and also consistent) coefficient estimates.
However, the estimators are inefficient - that is, they no longer have the minimum variance among
the class of unbiased estimators (for the Homoscedasticity problem) and the standard error esti-
mates could be wrong (for the autocorrelation problem). Hence, the estimators obtained by the
24
Chapter 4. Results and Discussion
Figure 4.6: Interest rates in Europe and the U.S (Source: [Link], Data: Koyfin)
OLS method, in this case, can be considered as inefficient. For further studies, the method of
Generalized Least Square (GLS) is suggested, in order to tackle Heteroskedasticity. For the auto-
correlation problem, GLS is also a suggested remedy, but, as mentioned, the issue can be violated
for time-series data, which is in this case. Therefore, GLS should be under careful consideration
in further studies regarding the autocorrelation problem.
25
Chapter 4. Results and Discussion
26
Chapter 5
Conclusion
This paper provided empirical analysis on the impact of several macroeconomic indicators on the
Gross Domestic Product using the OLS method, and verifying the assumptions of the method
on the obtained estimator. The authors also discussed the compatibility of the obtained results
with the theories of economics and the contemporary situations in the U.S. The coefficients are
demonstrated to be inefficient, with serious problems of Heteroskedasticity and autocorrelation.
Thus, some further research is needed to study the movement of GDP.
27
Chapter 5. Conclusion
28
Chapter 6
Teammate Evaluation
• Trong Tan has been a supportive teammate who devoted to both research and teamwork
activities. He has assisted all other members and completed his tasks carefully and thor-
oughly. Our project can consider many new aspects thanks to his contribution regarding
the socio-economic and statistical knowledge. For his huge contribution, I would definitely
rate 5/5.
• Viet Hang is a wise member of our group. Her contribution has built up much of our team’s
strategy to study the real-world applications of the theories. Our work, thus, could proceed
faster and discover many more aspects. She also put efforts into studying the problem and
methods. Her contribution worth 5/5.
Regarding the efficiency of teamwork, we all realized that our work could go smoothly with
participation of all members in the team. Each individual task, thereby, could be analyzed be the
whole team, thus, become well-rounded. We also prioritized the effective communication among
the team - that is, all updates about the project and progress are informed to all members, and
we are all available to make changes if necessary.
29
Chapter 6. Teammate Evaluation
• Trieu Man demonstrated a deep and thorough comprehension of the topic from the be-
ginning. She handled tasks related to coding excellently thanks to her advanced skills in
Python - a programming language. She was also diligent and hard-working to meet the tight
deadline of the project. I would give her a 5/5.
• Trong Tan’s efforts to keep the entire team informed of all the tasks were greatly appreciated.
He was agile, supportive and always brings positive energy to lighten up our group’s spirit
whenever we had to face a problem arising from the collected data. I would give him a 5/5.
I think that my team worked well together to achieve the goal of this research project. Each
individual took full responsibility for his/her task to complete it on time.
• Man has excelled in this project. She is extremely motivated and hard-working and displays
a deep and thorough understanding of the research topic. She approaches the topic with
critical thought and careful work and tries her best to figure out ways to deal with the
complexity of data. I would give her a 5/5.
• Hang is a dedicated member of our group. She shows a good level of understanding of our
topics and statistics concepts. Besides, she always helps others in the groups if needed. I
would also give her a 5/5.
I believe that my team effectively collaborated to accomplish the objective of this research project.
Everyone was responsible for their job and worked together to effectively fix any issues that could
have arisen. We should update the members on the progress of the work often so that everyone is
aware of what is happening, this is one thing I would change.
30
Bibliography
[1] Brooks, C., 2021. Introductory econometrics for finance. 3rd ed. [ebook] Available at:
[Link]
[3] “Could the euro collapse?, Paid for and posted by [Link].” 2022. Reuters.
[Link]
[4] “How currency appreciations affect growth, World Economic Forum.” 2015. The World Eco-
nomic Forum.
[Link]
wth/.
31