Final Project - Final!
Final Project - Final!
Introduction
One of the most important concepts in economics is Gross Domestic Product (GDP)
which measures a country's economic activity, showing the total value of goods and
services produced over a set time. As an important indicator of the economic
situation, rising GDP usually leads to more wealth which increases consumer
.spending and causes higher corporate profits
Today, a lot of people are focused on predicting the stock markets prices and here in
this project we wanted to inspect the factors that drive the basic of it such as GDP
.growth
The research revolves around 5 key questions, each one designed to address a
different topic. The first and the second questions seek to identify the variations in
GDP growth and stock market returns in the recent decades. The 3rd question revolves
around the relationship between GDP growth and stock market returns. The 4th
question is about the amazing upside that investing in the stock market has. The last
question deals with the correlation that emerging economies that played a pivotal role
.in the last decades like India and China have respective to their GDP
Our analysis went through several decades utilizing data from well – known sources
like the international money fund and various stock indices. The project employes a
range of data science tools including R programming language to conduct a thorough
EDA analysis. All the graphs and calculations in this project were written by us, using
.ggplot2 package and other functionalities in R language
The first question we choose to present is what variation was revolved around
?GDP aggregate growth around the last decades
Our Estimand for this question is going to be the true variation in the GDP growth
.over the past several decades
We used real time data from the international money found for the GDP from an excel
file, then we calculated the growth as the difference between the end of each year and
.the beginning of the period in 1980
:The estimation
All categories have shown a growth in GDP. This indicates a general upward trend in
global economic activity. In addition, all the categories had an average growth which
was close to the median which indicates symmetric distribution. Despite higher
volatility in the USA and emerging markets the global product volatility was still the
lowest, probably because economic downturns in one region may be offset by growth
in another region in the world. Emerging markets have shown higher average growth
rates compared to all other categories since 2000 probably because of the exponential
growth of both India and China that carried the index with them (more on that topic
later in our research). The surprising data from this table was the fact that the USA
was the most volatile despite its advanced economic status. We can see that all the
economies acted kind of the same in the financial crisis in 2008 and in the covid-19
.plague
The second question we are researching is the variation in the stock market
returns in the last decades in the indices S&P 500, MSCI world index and MSCI
?emerging markets index and MSCI ACWI
The Estimand here will be the true variation in these stork indices, the estimator will
be the central measurements and dispersion measurements such as mean, median,
.max, minimum and SD calculated in R
The MSCI World and S&P 500 have similar and lower SDs (around 16.9), indicating
.less volatility, which is typical for developed markets
We can see that the median return in 3 out of 4 indices is bigger than the mean which
indicates a negative skewness. The reason for it is probably that bad years such as
2008 (financial crisis) and 2022 (monetary contraction) are diverting the mean return
to be smaller. However, the MSCI Emerging Markets have a lower median return than
the mean which means that a few good years diverted its mean return to be bigger
(2009). The MSCI Emerging markets index has the highest SD which is consistent
with the typical behavior of emerging markets which tend to be more volatile. For
investors who believe they can identify the golden age of
developing markets, investing in the Emerging Markets index could
prove to be an excellent opportunity, such as in 2009 (91.3%)
The third question we chose to present is what the relationship Between GDP
?Growth and Stock Market Returns if there is any
Answering this question can help investors find the golden age of specific markets
.and help them get more return on their money
Our Estimand here will be the real linear relationship between GDP growth and
market returns, The estimator here will be the linear regression model we used, called
‘lm’ in R. The independent variable here is the GDP growth on the x axis and the
dependent variable is the accumulated return on the y axis. the estimation shown as
:following
We chose to use the Pearson correlation coefficient that helped us to measure the
magnitude of the linear relationship between both variables. The Pearson correlation
coefficient is ranging from 0.83 to 0.93 which indicates a strong positive linear
connection. This means that in the long run when GDP increases the returns on the
indices increase as well. This pattern has been shown in all of the four-stock indices
.while in the emerging markets it was the strongest
Our conclusions out of this are that economic growth drives market returns in all the
markets and that's why investors need to consider economic growth factors and other
macro-economic factors as well while making investments decisions. This conclusion
is highly important especially for investing in emerging markets where you can see
a very high correlation between GDP growth and market returns. This analysis might
be biased though because although we can see a very strong connection between the
variables we don't know if there was a third variable, we didn't investigate such as an
expansionary monetary policy that might have caused to a growth in the GDP and in
.the stock market returns together
In this question we are going to use a dataset containing all the annualized returns of
the S&P 500 since 1929. Our Estimand is going to be the truly expected return of the
S&P 500 over a 10-year period. Our Estimator is going to be the mean of the 10-year
compounded returns calculated from the bootstrap samples. This estimator will take
each bootstrap sample and calculate the compounded return over these 10 years and
then the average of these return will be used to estimate the expected return. The
estimation will be the numerical value that we will get by averaging all the 10 years
compounded return and this will be what investors will expect to get after 10 years
.investment in the S&P 500
The challenge in this examining is that our dataset is finite and without more data it's
hard to assess how reliable our findings are going to be and how much confidence we
have in this data. To find a solution to this problem we are going to use bootstrap
technique that is going to help us build certainty in our data by collecting more data
using resampling with replacement. Bootstrap will generate a new dataset each time
because it will include different data from our original data set each time. For each of
these new datasets we will calculate the mean compounding return for a 10-year
period. After running this procedure 1000 times we will have a distribution of these
mean compounded returns, and this distribution will represent the range of possible
returns we could have got for 10 years periods. From this distribution we will
calculate the confidence intervals that we have to determine how sure we can be to get
.a positive return on our money
The real average returns of the S&P 500 and the distribution of the results after the
:bootstrap are shown in next page
We used histogram plots to see the distribution of our results. We can see that we got a
mean return of 109.91% while the real mean return was 97.5% which emphasize how
important it was to use the bootstrap returns to see different type of results that
present more reliability than the real ones because they have been drawn from a much
bigger dataset. Bootstrap provides a more robust dataset which helped us understand
.the potential outcomes rather than relying only on past performance
After calculating the confidence level for a positive return using R language as the
total numbers of samples that are bigger than 0 as a proportion of the total samples,
we can say that for 10 years horizon of investment there is a certainty of 84% of
gaining a positive return on your money. If we will increase the numbers of years for
investing our confidence level of getting positive return will become much bigger (we
checked it by changing the number of resamples each time) .in addition, there is 95%
certainty of gaining a return between -53.7% to 436.4%. (We calculated it using R
functionality) which shows the amazing upside of investing in the S&P500 for the
.long run
investing in the S&P 500 for the long run (10+ years) has an amazing upside, is
highly rewarding, with almost no risk, and that's why it's highly important for
.young people to invest in it
In this question we are going to check how strong the correlation between India and
China GDP rates to the returns of their stock indices. For this question we are going to
use data that we already have on their stock markets indices and on their GDP growth
.rates
Our Estimand is going to be the strength of the relationship between GDP growth and
stock market returns in countries that experience a huge surge in GDP growth such as
.India and China
Our estimator is going to be the Pearson correlation that quantifies the magnitude of
.the strength of the linear connection between two variables
Both graphs show a strong positive linear connection while India shows a stronger
one with 0.92 than the Chinese one of 0.7. this shows that the GDP growth in India is
closely and connected to the returns of the MSCI India index suggesting GDP growth
.is a very good predictor of the stock market returns in India
In the case of China GDP growth is also a good estimator for the MSCI China index
returns but not as strong as the Indian probably because non - democratic countries
like China are less transparent and less stable than democratic ones such India.
Transparency in economics leads to more reliable data that could lead to a stronger
.correlation between GDP growth and stock market returns
Our conclusion from this is while GDP growth plays a key factor for the returns in the
stock markets returns it's very important to consider a broad range of factors before
investing in an index of a country such as the market structure and the political system
that is practiced in this country. As we saw here China GDP growth rate was 400% in
the last 40 years but still India with 200% of growth gave better returns in their stock
.market in the end
conclusions
In this project we researched GDP growth, stock market returns and the relationship
between them using EDA. Our analysis gave us a valuable insight on the relationship
.and the strong impact of GDP on market performance
Despite the high volatility in the stock markets with emerging markets showing the
highest fluctuations our analysis indicates that these markets show a substantial return
potential. The comparative stability that developed markets like the S&P 500 offer
.with their attractive returns suggests that these markets remain a haven for risk averse
In addition to this, we managed to show using bootstrap that investing for the long run
reduces risk associated with investing in stocks and has an amazing upside and that's
.why it's highly recommended for people to start investing early in life
The significant growth in GDP in countries like India and China highlights the huge
potential for lucrative investments in these regions. The strong correlation that we got
in emerging markets, especially in India illustrates the potential for GDP as a reliable
predictor for market returns which reinforce the importance of considering macro-
economic factors before making investments decisions. However, the types of
government and market structure also play a key role in making investment decision
such in the case of China that showed an amazing GDP growth but almost no return in
.their indices
In conclusion, this research gave us understanding about the integral role that macro-
economic indicators play in making investment decisions. Our knowledge in data
science helped us to uncover and quantify relationships and findings that provide
.empirical evidence to the connection between GDP growth and stock market returns