Uploaded by Magnus Elefsen

FDA Assignment (4)

advertisement
Financial Data Analysis Assignment
Data Analysis on the S&P 500 and the Russell 2000
Magnus Elefsen 20203531
Jonathan Stampe Bernt 20203236
October 2023
The calculations in this assignment are performed in Rstudios, which is submitted as an appendix.
1
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
1.1 Data collection of the S&P 500 and Russell 2000 indices
For easier comparison we have plotted the two indices in the same graph, and added the dates on the x-axis.
What appears in the two plots is that the SP500 tends to be more extreme in its fluctuations i.e, more
volatile. An example of this observed behavior is in 2020 when both indices took a large hit, but the SP500
index at a larger scale.
One thing that is important to keep in mind is that the two indices are traded on different scales. SP500
is more than double the value of Russell2000, which is important when comparing the two charts like this.
The nominal volatility is greater in SP500, while the percentage probably would indicate that the Russell is
more extreme in its fluctuations. One thing that can be interpreted comfortably from the plot is that the
recovery from the great crash in 2020 was different in the two. It is observable that the recovery of SP500
is much steeper and larger than Russell 2000, which recovered slower and gained less value.
Figure 1: Price history of S&P 500 and Russell 2000.
2
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
1.2 Calculation of Log-Returns
Log returns are defined as:
ln
Pt
Pt−1
(1)
Essentially, the difference between calculating the logarithmic and simple returns, is that for the logaritmic, we calculate the inverted of the price change (in accordance with (1)). The logarithmic returns is
calculated by taking the natural logarithm of the difference in the investment’s value in time t and time
t-1 [1]. In Rstudios the command “diff” is used in the calculation, for all datapoints, leaving us with the
logarithmic difference in yesterday’s adjusted close price, and today’s i.e, the log-returns. Log returns are
mean reverting, which means that the log returns eventually will return to their mean. This is also visible
two graphs of the log returns in SP500 and Russell 2000 respectively.
(a) Log-returns of SP500
(b) Log-returns for Russell 2000
Figure 2: Plot of log returns of the two indices
The graph for SP500 from the start of 2016 until the end of 2022 shows that the log returns are often
close to zero, and when it spikes it is rarely more than five percent in either direction. One exception was the
start of 2020, the log returns surpassed minus ten percent, while few days after, gained more then five percent.
The graph of log returns for Russell 2000 appear similar, with the majority of returns around zero, yet
with larger deviations from zero than SP500. Visually speaking, the line appears ”thicker” around zero. The
visualization of the returns also reveals that the log returns in Russell 2000 took even larger hits during the
spring 2020 at around 15 percent. Overall the two graphs show that there is more volatility in Russell 2000
than in SP500, given the larger fluctuations in log returns.
When comparing the two graphs of log returns to the graph in question 1.1 it is clear that a graph of
price changes does not show the volatility in returns, but only the price development over time. Although
3
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
both the price time series graph and the log return graphs show major movements in SP500 and Russell
2000 when in early 2020, the log return graphs allow for a better evaluation of the behavior of returns, which
essentially is what we care about as investors.
1.3 Calculation of moments
For all the values provided, please note that they are multiplied by 100, meaning that the values are in percentages.
Mean
Standard deviation
Skewness
Kurtosis
S&P 500
0.03667713
1.22016
-0.8614867
18.95529
Russell 2000
0.02628664
1.542558
-1.055202
15.23359
Table 1: Moments
Mean
The averages in the log-returns for both the Sp500 and Russell 2000 indices indicate a slightly positive value.
Essentially this means that on average, the log-returns for this examined period are slightly positive for both
indices. The average log-return for the SP500 index is however greater than the Russell 2000, which supports
the arguments provided in question 1.1 regarding more deviation in Russell 2000.
Standard deviation
The standard deviation of the SP500 index at 1.22% indicates that most observations are close to the mean
value. Looking at a normal distribution for reference, about 68% of the data is within one standard deviation
of the mean [2]. For the SP500 standard deviation at 1.22%, the log returns tend to be within -1.22% and
+1.22% of the mean. For the Russell 2000, we found the standard deviation to be 1.54%, which indicates
more variability of the log returns i.e, more volatility, as they are more spread out from the mean.
Skewness
As provided in the calculations from table 1 the skewness of the two distributions is negative. The tail on the
left side of the distribution is longer than the right i.e, the log returns are clustered on the right side of the
mean return of 0.03%. The skewness of Russell 2000 is more pronounced than the one of SP500, indicating
an even longer left tail.
Kurtosis
As the distribution of both distributions are greater than 3, which is the benchmark, the log returns of
both SP500 and Russell 2000 are lepotokurtic[3]. As the kurtosis of both indices are at extreme levels, this
indicates that the investor might experience extreme returns. This makes sense, as the examined dataset
includes 2020, which was characterized by extreme volatility in returns.
4
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
1.4 Expectation of zero returns?
To test, if one should expect zero returns on average a t-test is conducted. The null-hypothesis is that the
average return will be equal to zero, and the alternative hypothesis is that the average is different from zero:
H0 : µ = 0
(2)
H1 : µ ΜΈ= 0
(3)
The p-value for SP500 is 0.2073, which is a lot higher than the significance level of 0.05. Therefore, we can’t
reject the null-hypothesis. This shows us that the results we got do not provide enough evidence to conclude
that the average of the log returns are statistically different from zero.
The p-value for Russell 2000 is 0.4746, which is also higher than the significance level of 0.05 and therefore
we can’t reject the null-hypothesis. Again, this tells us that our results do not provide enough evidence to
conclude that the average of the log returns are statistically different from zero.
1.5 Riskiness of the two indices - a historical perspective
In answering the question regarding which index is more risky, the answer is based on volatility in the two.
The assumption is that more volatility = more risk. This means that we must calculate the volatility of the
two indices and compare to find the more risky one.
Essentially, the volatility is defined as the variation from the mean, which is captured by the variance,
hence variance could be used as a measurement of volatility. More commonly though is the standard deviation, which is calculated by squaring the variance, making the interpretation of the data easier.
In the table below, we have calculated the historical standard deviation of the two indices, for the years
2018, 2020 and 2022.
2018
2020
2022
S&P 500
0.8189883
1.217674
1.22016
Russell 2000
1.03113
1.52306
1.542558
Table 2: Historical standard deviation for the two indices
To answer the question regarding which index is more risky, the picture becomes clear when evaluating
the standard deviations provided in the table. For all time periods, the Russell 2000 index has more standard
deviation, which implies that it is the more risky index.
5
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
1.6 Correlation coefficient between log returns in S&P 500 today
and 1 day ahead
The correlation between SP500 log-returns today and SP500 log-returns 1 day ahead is calculated to be
-0,17. This shows that there is a weak negative correlation between the two variables. This tells us that if
SP500 is rising today, then there is a tendency that it will drop tomorrow and vice versa.
We have tested if this correlation is statistically significant by conducting Pearson’s Product-moment correlation, which gives us the following results: The p-value, which is a measure of statistical significance, is
1.778e-13, which is much lower than the typical significance level of 0,05. This tells us that the correlation
of -0,17 between SP500 log-returns today and SP500 log-returns one day ahead is statically significant.
1.7 Correlation coefficient between log returns in Russell 2000 today and 1 day ahead
The calculated correlation between Russell 2000’s log-return today and Russell 2000’s log-return tomorrow
is -0,12, which shows that there is a negative correlation between Russel 2000’s log-return today and Russel
2000’s log-return tomorrow like in the SP500’s correlation.
This correlation has been tested using Pearson’s Product-moment correlation, which showed that the pvalue is 3.973e-07, which is lower than the significance level of 0,05. Therefore, the correlation of -0,12
between Russell 2000’s log return today and Russel 2000 log-return tomorrow is statistically significant.The
correlation between SP500’s log-return today and its log-return tomorrow is -0,17 and for Russell 2000 it is
-0,12. This shows that the two correlations are very close to each other. This means that there is a small
indicator for both indices, that says if the indices rise today, it will drop tomorrow and vice versa. Because
the correlation for SP500 is a bit further from zero than the correlation for Russell 2000 it tells us that SP500
is a bit more predictable than Russell 2000.
1.8 Predictability of log-returns in Russell 2000 using log-returns
of the S&P 500 today
To tell if the SP500 log-returns today help predicting the log-returns of the Russel 2000 tomorrow a linear
regression model will be used, which has been computed in Rstudios.
The linear regression model showed that R-squared is 0.02516, which indicates that there is a very weak
connection between the two variables. In other words SP500 log-returns only explain a small part of the
variation in Russell 2000’s log-returns. The p-value is 2.196e-11, which means that the relationship between
SP500’s log-returns today and Russell 2000’s log return tomorrow is statistically significant, but as the Rsquared showed the relationship between the variables is very weak. The R-squared is so low that it is not
possible to state that the value of SP500 log-returns today help predict the log-returns of the Russell 2000
tomorrow.
6
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
1.9 Realized measure of volatility in S&P 500 log-returns
For the volatility plot, we see the development of the realised volatility for the period 2016-2022. When
comparing this graph to the log-returns, we find a relationship between extreme returns and increased
volatility. The fact, that volatility cannot be a negative value, the volatility graph differs from the log
return graph in the sense, that one cannot interpret, in which direction the volatility has been. The general
takeaway would be, that it is observable that in periods of low volatility, the log-returns tends to be more
narrow around zero, and in periods of increased volatility, we observe spikes in log-returns.
Figure 3: Realized volatility in SP500
1.10 Realized measure of volatility in Russell 2000 log-returns
The differences in the volatility of log returns of Russell 2000 and log returns of Russell 2000 is mainly the
same as the SP500. The main point is that it is spiking in 2020, where covid broke out.
Comparing the volatility graphs of SP500 and Russell 2000 it is observed that Russell 2000 is more volatile
than SP500, which especially shows in the largest spike, where Russell 2000 volatility was over 8% and SP500
volatility was around 7%. At the same time it is observed that the smaller spikes of volatility in Russell 2000
is larger than the smaller spikes in the SP500. Therefore, this tells us that the Russell 2000 is more volatile
than SP500.
7
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
Figure 4: Realized volatility in SP500
1.11 Expectation of zero volatility in S&P 500 on average?
The p-value of the t-test is 2.2e-16, which is a very small number close to zero. This indicates that we should
reject the null-hypothesis being that one should expect zero volatility on the SP500 on average, because the
p-value is lower than our significance level of 0.05.
Volatility is a natural part of the stock market, because the stock market fluctuates based on economical-,
political- and other market events. Investors has to be aware of these events when doing their investment
decisions, because otherwise it will affect their return negatively
8
Financial Data analysis assignment
October 2023
Magnus Elefsen (20203531)
Jonathan Stampe Bernt (20203236)
References
[1] Douglas Turatti. Lecture 1, slide 28. Aalborg University Business School, 2023.
[2] Empirical rule: Definition, formula, example, how it’s used. ://www.investopedia.com/terms/e/empiricalrule.asp.
[3] Douglas Turatti. Lecture 2, slide 24. Aalborg University Business School, 2023.
9
Download