Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

The Ministry of Education of Azerbaijan Republic

Group project

Statistical estimations concerning to stock prices.

Members:
Leyla Mehti
Mammadov Elgun
Mammadov Zaur
Mammadova Zemfira
Rustamov Faxri

Baku, 2021
To start with we chose S&P 500 index and selected two companies that
produce and sell the same type of product which is soda. These two companies
are Coca-Cola and PepsiCo that compete in the same sector. The data range was
chosen for the one year from 1 December 2020 till 1 December 2021. Using the
daily closing prices of the stocks we calculate returns of both stocks and do our
further analysis to answer the questions below:

a) Construct a relative frequency and a percent frequency distribution as well as


Cumulative frequency distribution

In order to answer this question we should first find relative frequency and the
turn to percentage frequency. Later we will be able to calculate our cumulative
frequency.

In order to find the relative frequency, we should find the number of classes, the
width of the classes, and then find the frequency in those classes. First we
should find the number of classes. Our sample size is N at it is equal to 253. In
order to find the number of classes(bins), we use turge's Rule which is
K=1+3.22logN. Using that formula we know that there are 9 classes. Then we
find class width taking max and min values from the sample. Using the formula
(max - min)/n of classes we find that class width are 0.66% for Coca-Cola and
0.69% for PepsiCo. Now we can find the frequency for both companies and the
results are shown below:

Table 1. Calculations for Coca Cola.


Number of
classes Class interval Frequency Relative Percentage Cumulative
1 -2.72% -2.06% 1 0.0009 0.09% 1
2 -2.05% -1.40% 6 0.0056 0.56% 7
3 -1.39% -0.73% 15 0.0139 1.39% 22
4 -0.72% -0.07% 43 0.0398 3.98% 65
5 -0.06% 0.59% 102 0.0944 9.44% 167
6 0.60% 1.26% 189 0.1748 17.48% 356
7 1.27% 1.92% 234 0.2165 21.65% 590
8 1.93% 2.59% 244 0.2257 22.57% 834

2
9 2.60% 3.26% 247 0.2285 22.85% 1081
Total 1081 1 100.00%

Table 2. Calculations for Pepsi Co.


Number of
classes Class interval Frequency Relative Percentage Cumulative
1 -3.88% -3.20% 1 0.0014 0.14% 1
2 -3.19% -2.51% 3 0.0043 0.43% 4
3 -2.50% -1.82% 3 0.0043 0.43% 7
4 -1.81% -1.13% 9 0.0129 1.29% 16
5 -1.12% -0.44% 24 0.0344 3.44% 40
6 -0.43% 0.25% 65 0.0931 9.31% 105
7 0.26% 0.94% 141 0.2020 20.20% 246
8 0.95% 1.63% 213 0.3052 30.52% 459
9 1.64% 2.33% 239 0.3424 34.24% 698
Total 698 1 100.00%

In order to find relative frequency, we sum up all frequencies and we get 1081
for Coca-Cola. Then we divide each of the frequencies by the total number and
get our relative frequency. The same process is done for the Pepsi Co. In order
to find percentage frequency, we multiply our relative frequency by 100%.
Cumulative frequency is calculated by summing up the current frequency and
the following frequency.

b) Prepare a histogram. Interpret the histogram, including a discussion of the


general shape of the histogram

We are using excel tools to create histograms for frequencies. Below you can
see the graphs with relative frequency for both companies.

Table 3. Histogram for Coca-Cola.

3
In case of Coca-Cola we can see that starting from the sixth class the values
appear more frequently. If we look at the table 1, we can see that in the classes
6,7,8,9 the intervals are positive which means in these classes we have positive
returns. Here we can say that we had positive returns more frequently rather
than negative returns.

Table 4. Histogram for PepsiCo.

In case of PepsiCo we can see that starting from the seventh class the values
appear more frequently. If we look at the table 2, we can see that in the classes
7,8,9 the intervals are positive which means in these classes we have positive

4
returns. Here we can say that we had positive returns more frequently rather
than negative returns.

c) From the data that we got about PepsiCo and Coca Cola we can find the
required information. The expected value, or mean return, of all the potential
returns of assets in a portfolio. A mean return shows what amount of money a
stock can return on a monthly basis. By using Excel, we have found that for
PepsiCo our mean is 0.04 percent and for Coca Cola it is 0.01 which basically
means that for every month 0.04 % profit from our portfolio that we invest in
PepsiCo and 0.01 % of profit form Coca Cola. So, that result give us a better
understanding of best asset allocation. We can say that if we invest into
PepsiCo, we can earn more future revenue than Coca Cola. Since some returns
are negative, in the excel file geometric mean shows error and we are not able to
interpret it. The interquartile range is the difference between the first and third
quartiles. This range contains 50% of the data. On the below chart and excel
data its calculation is clearly highlighted. The results are so close to each other.
For PepsiCo the result means that the middle 50% of the values in the sample
have a 1.05 percent spread and for Coca Cola, the percentage is 1.07. Portfolio
variance is simply a risk assessment. The formula aids in determining if the
portfolio's risk level is acceptable. Essentially, sensible investors want to
maximize profits while reducing risk. With the help of data, we have found that
the risk level of each portfolio is the same for the investor – it is 0.01 percent.
That time investors were indifferent between these two assets. For getting
further information about risk of portfolio Standard deviation is used. This is
another popular way for measuring the risk of an investment. Standard deviation
is used to calculate market volatility or the spread between asset prices. The
results we obtained from our data show that the risk rates in both portfolios are
very close to each other. Thus 0.907% and 0.964% - low standard deviations
indicate that prices are stable, implying that investments are low risky. The

5
directional link between the returns of two assets is calculated using covariance.
A positive covariance indicates that asset returns move in the same direction,
whereas a negative covariance indicates that they move in the opposite
direction. Thus, when the returns on stock PepsiCo increase, so do the returns
on stock Cola because we got positive correlation between them and it is about
0.01%. Although the correlation coefficient has little potential to anticipate
stock market returns for individual stocks, the statistical measurement may be
useful in anticipating the amount to which two stocks move in relation to each
other. Like the above, correlation indicates that both stocks are moving in the
same direction, that there is a positive relationship between them, and we found
that correlation between them is 68.61 percent.

Average 0,04%
Varience 0,01%
Std dev 0,9085%
Covariance 0,01%
Correlation 68,61%
Coef. Of Var 22,34
Geo mean #NUM!
IQR-1 -0,45%
IQR-2 0,60%
IQR 1,05%
Percantials 25 percent -0,45%
Percantials 50 percent 0,04%
Percantials 75 percent 0,60%

Average 0,01%
Varience 0,01%
Std dev 0,9664%

Coef. Of Var 140,44


Geo mean #NUM!
IQR -0,48%
IQR 0,59%
IQR 1,07%
Percantials 25 percent -0,48%
Percantials 50 percent 0,06%
Percantials 75 percent 0,59%

6
d) Assume that a sample mean of each company stock return is 10 units bigger
than population mean. (State α=0.05) Find z-score and state to reject or accept
null hypothesis

H0: u>10

Ha: u<10

The level of significance is 0.05 (5%) that is our alpha=0.05

As, our hypothesis is directional (because it specifies the direction of the tested
relationships stating that one variable is to be larger or smaller), we will do our
procedures for one-tailed test. Afterwards, we will determine the critical value
(for rejection zone) in the normal distribution. In order to find critical value, we
looked at z-table, and found that the value is 1.65. Thus, if the value of our
statistical test is greater than 1.65, we will reject null hypothesis:

7
Our next step is to calculate z-statistic (z-score) via using formula: sample mean
minus population mean (indicated in the null hypothesis) divided by standard
deviation.

For PepsiCo’s stock returns:

Thus, our z-score is equal to: (0.04-10)/0.907= -10.98. Thus, since our z score is
less than critical value of 1.65, we do not reject null hypothesis.

For Coca-Cola’s stock returns:

Thus, our z-score is equal to: (0.01-10)/0.964= -10.36. Thus, since our z score is
less than critical value of 1.65, we do not reject null hypothesis.

e) Assume that we do not have any information concerning to population


variance but sample standard deviation of each company stock return 5 units
bigger than population variance which was previously stated. Use population
mean and sample mean of a data which was 10 units bigger than population
mean. (Accepted sample mean at paragraph e) (State α=0.05) Find t-test and
state to reject or accept null hypothesis. (20 Points)

Answer:

The null hypothesis usually assumes that there is no difference in the sample
means and the hypothesized mean (comparison mean). The purpose of the T
Test is to test if the null hypothesis can be rejected or not.

Null hypothesis: H 0: μ = 5

Alternative hypothesis: H a: μ > 5

In order to find t value we will use following formula:

(x̄ – μ)
t=
s

8
 x̄ = Observed Mean of the Sample
 μ = Theoretical Mean of the Population
 s = Standard Deviation of the Sample

Pepsi CO.

In this calculation, Our Mean is 0.04, the Theoretical Mean of the Population is
equal to Observed Mean of the Sample minus 5 units. Standard Deviation of the
Sample is equal to 0.907 and the sample size is 253.

Then,

(x̄ – μ) 0.04−(0.04−5) 5
t= = = =5.5126
s 0.907 0.907

As we can see t value is bigger than 5, so we reject H0

f) Coca –Cola Company:

For this company, Our Mean is 0.01, the Theoretical Mean of the Population is
equal to Observed Mean of the Sample minus 5 units. Standard Deviation of the
Sample is equal to 0.907.

(x̄ – μ) 0.01−(0.01−5) 5
t= = = =5.1867
s 0.964 0.964

For Coca-Cola, the situation is also same, we reject H0 because 5.1867 > 5.

In order to solve this problem, we will use z score formula. By using a


sample of 60 day score we found that our z score for PepsiCo is 0.87 and -0.87.
From that results we can find its probability by using normal distributed table.
So, probabilities are 0.8078 and 0.1922. Now, we need to subtract from them
each other and turn into percentage. The result means that 61.56 percentage
probability that a sample of 60 days stock prices will provide a sample mean

9
within 0.50$ of the population mean. Now we must do the same calculations for
the Coca-Cola company. After getting the outcome we see that 99.68%
probability that a sample of 60 days stock prices will provide a sample mean
within 0.50$ of the population mean for Coca Cola company.

PepsiCo Calculation Coca Cola Calculation


Mean 158.7 Mean 54.87
Std dev 4.43(0.57) Std dev 1.28(0.17)
Z1 0.87 Z1 2.94
Z2 -0.87 Z2 -2.94
Prob1 0.8078 Prob1 0.9984
Prob2 0.1922 Prob2 0.0016
Diff of 0.6151 Diff of 0.9968
Prob Prob
Percent 61.51 Percent 99.68

10
References:
1. One-Sample z-test (cliffsnotes.com)
2. Statistics - T-Distribution Table (tutorialspoint.com)
3. t-Test Formula | How to Calculate t-Test with Examples & Excel Template (educba.com)

11

You might also like