Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
25 views56 pages

The Time Is Now

Now is the freaking time

Uploaded by

Felix Kimanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views56 pages

The Time Is Now

Now is the freaking time

Uploaded by

Felix Kimanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Predicting Stock Returns using Arbitrage

Pricing Theory Model

Jedidiah Waweru
and
Felix Kimanthi

A Research project submitted in partial fulfilment of the requirements


for the award of the Degree of

Bachelor of Science
in
Actuarial Science

Dedan Kimathi University of Technology

2024
Declaration by the Students
“We, Jedidiah Waweru and Felix Kimanthi, declare that this research project entitled, ‘Predicting
Stock Returns using Arbitrage Pricing Theory Model’ submitted in partial fulfilment of the degree
of Bachelor of Science in Actuarial Science, is a record of original work carried out by us under the
guidance of Dr. Antony Ngunyi, and has not formed a basis for the award of any other degree or
diploma, in this or any other Institution or University. In line with the ethical practice in reporting
scientific information, due acknowledgements have been made wherever the findings of others have
been cited.”

J EDIDIAH WAWERU F ELIX K IMANTHI


(S030-01-1833/2020) (S030-01-1600/2019)

Signature Signature

Date Date

i
Declaration by the Supervisor
This is to certify that the research project entitled ‘Predicting Stock Returns using Arbitrage Pricing
Theory Model’ submitted by Jedidiah Waweru and Felix Kimanthi to the Dedan Kimathi University
of Technology, in partial fulfilment for the award of the degree of Bachelor of Science in Actuarial
Science, is a bona-fide record of research work carried out by them under my supervision. The con-
tents of this project, in full or in parts, have not been submitted to any other Institution or University
for the award of any degree.

D R . A NTONY N GUNYI D R . M UNDIA M AINA


(Supervisor) (Project Coordinator)

Signature Signature

Date Date

ii
Acknowledgement
First we would like to thank God for giving us good health and guidance throughout the period w
were working on this project. Sincere thanks to Dedan Kimathi University of Technology for the
opportunity and also to all academic and non-academic staff. Many individuals have made this project
feasible including my supervisor Dr. Antony Ngunyi, Dr. Cyprian Omari and the project coordinator
Dr. Maina Mundia, without their input this project would not have been a success, my sincere regards.
Lastly, we want to acknowledge our family and friends for their encouragement moral and intellectual
contributions towards the success of this project. You have been a source of strength and inspiration
that has seen us come this far.

iii
Dedication
Dedicated to our families and friends for the support they offered throughout the project.

iv
Contents
Declaration by the Students i

Declaration by the Supervisor ii

Acknowledgement iii

Dedication iv

Table of Contents v

List of Tables vii

Abbreviations viii

Symbols ix

Abstract x

1 Introduction 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Background of the study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Statement of the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Justification of the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Objectives of the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5.1 General objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5.2 Specific objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Significance of the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Literature Review 7
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Empirical Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Methodology 11
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Arbitrage Pricing Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1 Model Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Parameter Estimation of the Arbitrage Pricing Theory Model . . . . . . . . . . . . . 13
3.4 Adequacy of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.1 Test for Normality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.2 Durbin-Watson test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4.3 F test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4.4 T -test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Predicting The Stock Returns using the model . . . . . . . . . . . . . . . . . . . . . 17
3.6 Accuracy of predicted returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6.1 Root Mean Squared Error . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6.2 Mean Absolute Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

v
Contents vi

4 Results and Discussions 19


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 Data description and source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Fitting the Arbitrage Pricing Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4 Parameter estimates of the fitted arbitrage pricing theory model . . . . . . . . . . . . 21
4.5 Adequacy of the fitted model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.6 Prediction of the stock returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.7 Checking the accuracy of the predicted stock returns . . . . . . . . . . . . . . . . . 32

5 Summary and Conclusion 34


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.4 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

References 35

A Appendix 37
A.1 R Program Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
List of Tables
4.1 Descriptive statistics for monthly stocks returns starting from January 1, 2013 to De-
cember 31, 2023 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Coefficient Estimates for EQTY APT model . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Coefficient Estimates for KCB APT model . . . . . . . . . . . . . . . . . . . . . . . 21
4.4 Coefficient Estimates for EABL APT model . . . . . . . . . . . . . . . . . . . . . . 22
4.5 Coefficient Estimates for KEGN APT model . . . . . . . . . . . . . . . . . . . . . . 23
4.6 Coefficient Estimates for NMG KNRE model . . . . . . . . . . . . . . . . . . . . . 23
4.7 Coefficient Estimates for SCOM APT model . . . . . . . . . . . . . . . . . . . . . . 23
4.8 Coefficient Estimates for NMG APT model . . . . . . . . . . . . . . . . . . . . . . 24
4.9 Coefficient Estimates for SASN APT model . . . . . . . . . . . . . . . . . . . . . . 24
4.10 Durbin-Watson Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.11 Analysis of variance table for KCB . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.12 Analysis of variance table for EQTY . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.13 Analysis of variance table for EABL . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.14 Analysis of variance table for SASN . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.15 Analysis of variance table for KEGN . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.16 Analysis of variance table for SCOM . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.17 Analysis of variance table for NMG . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.18 Analysis of variance table for KNRE . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.19 Predicted stock returns for the next two years. . . . . . . . . . . . . . . . . . . . . . 32
4.20 Root Mean Squared Error (RMSE) for different stocks . . . . . . . . . . . . . . . . 33
4.21 Mean Absolute Error (MAE) for different stocks . . . . . . . . . . . . . . . . . . . 33

vii
Abbreviations
APT Arbitrage Pricing Theory
APM Arbitrage Pricing Model
ACF Auto Correlation Function
CAPM Capital Asset Pricing Model
CBR Central Bank Rtes
CMA Capital Market Authority
CRRR Cash Reserve Requirements Rates
EAC East African Community
EQTY Equity Group Holdings
EAT East African Time
EABL East African Breweries Limited
GMES Growth Enterprise Market Segment
IBR Interbank Rates
INFER Inflation
KCB Kenya Commercial Bank
KEGN Kenya Electricity Generating
KNRE Kenya Reinsurance
NSE Nairobi Security Exchange
NBV Nairobi Business Venture
NMG Nation Media Group
OLS Ordinary Least Square
RMSE Root Mean Square Error
SASN Sasini
SCOM Safaricom
SML Security Market Line
SSE Sum of Square Residuals
SMEs Small Sized Enterprise
USD United States Dollar
TB 91 Day Treasury Bills

viii
Symbols
E expected return
βi sensitivity factors
Ri return on asset i
Rf risk free rate
Rit return of the stock i for a period t
λk risk premium factor
tb treasury bill rate
λ0 return on the riskless asset
Pi market price of the stock i
εi unsystematic risk
δi source of systematic risk
Ω positive definite symmetric matrix
D diagonal matrix

ix
Abstract
Accurate stock return predictions are of paramount importance in the world of finance. Traditional as-
set pricing models like the Capital Asset Pricing Model face challenges in predicting stock returns due
to oversimplified assumptions and the neglect of intricate dynamics in the modern financial landscape.
The study objective was to predict the stock returns at the Nairobi Securities Exchange. The Arbitrage
Pricing Theory was used as a solution, because it offers a multifactorial approach that accommodates
more factors such as macroeconomic indicators, industry-specific variables, and technological ad-
vancements, providing a more nuanced framework for accurate stock return predictions. The Least
Squares Estimation, were applied to estimate the coefficients in the arbitrage pricing theory model,
providing insights into the relationships between systematic factors and stock returns. The United
states dollar variable consistently emerges as the most significant and negatively impactful factor on
the returns of all the observed stocks. Conversely, variables Cash Reserve Requirement Rates or In-
fation rates consistently show a positive relationship with returns across all models. Additionally, the
variables 91 day treasury bills or Central Bank rates exhibit the least impact in some cases, being
statistically insignificant at the 1% significance level. The Durbin-Watson test results indicated vary-
ing levels of autocorrelation across the models, with Eastern African Breweries limited exhibiting the
largest Durbin-Watson statistic, suggesting a higher level of independence between consecutive errors,
while Sasini had the lowest Durbin-Watson statistic, indicating a lower likelihood of independence.
The analysis of table tables for each model showed that the models were appropriate for the data, with
p-values of 0, signifying significance. In all cases, the computed F-values were less than the critical
value, leading to the rejection of the null hypothesis and concluding the significance of the respective
models. Moreover, the T-test results indicated that all independent variables in the models were statis-
tically significant, as their t-statistics were greater than the critical value of the t-distribution at a 5%
significance level. Additionally, the p-values of 0 for all variables in all models led to the rejection of
the null hypothesis that the betas were zero, implying the statistical significance of all coefficients to
their respective models. The root mean squared error and mean absolute error values were lower than
1, they signified higher accuracy, indicating that the model’s predictions aligned closely with actual
observed returns.

x
Chapter 1

Introduction

1.1 Introduction
Predicting stock returns is a critical aspect of financial analysis and investment decision-making, as
it holds significant importance for investors, portfolio managers, and financial institutions. Accurate
predictions of stock returns can help individuals and organizations make informed investment choices,
optimize their portfolios, and manage risk effectively. Understanding the potential returns on various
stocks enables investors to maximize their profits and minimize losses, which is particularly crucial
in today’s dynamic and highly competitive financial markets. However, predicting stock returns is a
complex endeavor that comes with various challenges, including market volatility, economic uncer-
tainties, and unforeseen events.

Stock return is one of the factors that motivates investors to invest and is also a reward for investors’
courage to bear the risk of investing. It is a yield obtained by investors from the capital invested in
the stock market. Stock returns are obtained by comparing the difference between the stock price and
the closing price in the previous period. The difference in share prices is obtained by subtracting the
closing price of the current stock from the closing price of the previous period. The results of the
calculation of stock returns can be positive and negative. The higher the value of the company’s stock
return, the better the company’s image and can attract investors to invest in the company.

There are two types of stock returns, namely realized returns and expected returns. Realized returns,
also known as historical returns, are the actual returns that an investor has earned or lost on an in-
vestment over a specific period. These returns are based on the actual performance of the investment
during that time frame. They were calculated by measuring the change in the value of the investment,
including dividends or interest received, over the holding period. Realized returns provide a retro-
spective view of how an investment has performed. Expected returns, on the other hand, represent the
anticipated or forecasted future returns that an investor or analyst expects to earn from an investment.
These returns are estimated based on various factors, including the investor’s assumptions about fu-
ture market conditions, economic trends, company performance, and risk factors. Expected returns

1
Chapter 1. Introduction 2

are forward-looking and are often used in financial modeling, portfolio management, and investment
decision-making.

Inflation risk is a combination of the unexpected components of short- and long-run inflation rates.
Expected future inflation rates are computed at the beginning of each period from the available infor-
mation: historical inflation rates, interest rates, and other economic variables that influence inflation.
For any month, inflation risk is the surprise that is computed at the end of the month the differ-
ence between the actual inflation for that month and what had been expected at the beginning of
the month.Because most stocks have negative exposures to inflation risk, a positive inflation surprise
causes a negative contribution to return, whereas a negative An inflation surprise, and a deflation
shock, contribute positively toward return. Luxury product industries are most sensitive to inflation
risk. Consumer demand for luxury goods plummets when real income is eroded through inflation, thus
depressing profits for industries such as retailing, services, eating places, hotels and motels, and toys.
In contrast, industries least sensitive to inflation risk tend to sell necessities, the demands for which
are relatively insensitive to declines in real income.Also, companies that have large asset holdings
such as real estate or oil reserves may benefit from increased inflation

Predicting stock returns is a crucial aspect of financial decision-making, influencing investors, portfo-
lio managers, and financial institutions. Accurate predictions empower stakeholders to make informed
investment choices, optimize portfolios, and manage risks effectively in the dynamic financial mar-
kets. However, this task is fraught with challenges, including market volatility and economic uncer-
tainties. Stock returns, a key motivator for investors, reflect the yield from invested capital. There are
two types: realized returns, based on actual investment performance, and expected returns, forecasted
using factors like market conditions and economic trends. Inflation risk further complicates predic-
tions, with unexpected inflation changes impacting stock returns. Positive inflation surprises often
result in negative returns, particularly affecting luxury product industries. Conversely, industries sell-
ing necessities or holding substantial assets may benefit from increased inflation. Understanding these
complexities is essential for navigating the intricacies of stock market dynamics.
Chapter 1. Introduction 3

1.2 Background of the study


Stock markets are dynamic and complex, reflecting the interplay of numerous factors that influence
asset prices. Accurate stock return predictions are of paramount importance to investors, financial
analysts, and fund managers. Traditionally, the Capital Asset Pricing Model (CAPM) has been the
go-to model for estimating expected stock returns. However, the CAPM has limitations, primarily
because it relies on a single factor, the market risk premium, to explain returns. This simplistic
approach does not account for the multifaceted nature of stock markets, leaving room for significant
errors in return predictions.

In response to these limitations, the Arbitrage Pricing Model (APT) was developed. Proposed by
(Ross, 1976), the APT offers a more flexible and sophisticated framework for forecasting stock re-
turns. APT considers multiple macroeconomic and market factors, recognizing that stock returns
are influenced by a range of variables, including interest rates, inflation, GDP growth, and industry-
specific trends. By capturing these diverse influences, APT provides a more comprehensive tool for
modeling the complexities of financial markets.

The foundation of the Arbitrage Pricing Model (APT) lies in the fundamental principle that investors
ought to be rewarded for assuming additional risk. At its core, the APT asserts that the anticipated
return on a stock can be expressed as a linear combination of numerous risk factors, where each
factor’s significance, or sensitivity, is dictated by its influence on the stock’s return. This model’s
remarkable adaptability enables it to incorporate a multitude of factors, ranging from macroeconomic
indicators to industry-specific trends, depending on the intricacies of the context and market under
scrutiny. By embracing this comprehensive approach, the APT transcends the limitations of traditional
models like the Capital Asset Pricing Model (CAPM), offering analysts and investors a more nuanced
framework for understanding and predicting stock returns in an ever-evolving financial landscape.

The application of APT has gained attention in recent years due to its potential to enhance the accuracy
of stock return predictions. Its ability to adapt to different markets and incorporate a range of factors
makes it a valuable tool for addressing the shortcomings of the CAPM. This study seeks to further
explore the practicality and effectiveness of APT in the context of predicting stock returns, with a
particular focus on its application in specific stock exchanges, such as the Nairobi Securities Exchange
(NSE). By considering the unique dynamics of the NSE and its surrounding economic environment,
this research aims to provide valuable insights into the potential of APT as a robust model for stock
Chapter 1. Introduction 4

return forecasting. Ultimately, this study contributes to the ongoing evolution of financial modeling
and investment strategies in the face of ever-changing market conditions.

Stock markets are dynamic and complex, reflecting the interplay of numerous factors that influence
asset prices. Accurate stock return predictions are of paramount importance to investors, financial
analysts, and fund managers. Traditionally, the Capital Asset Pricing Model (CAPM) has been the
go-to model for estimating expected stock returns. However, the CAPM has limitations, primarily
because it relies on a single factor, the market risk premium, to explain returns. This approach does
not account for the multifaceted nature of stock markets, leaving room for significant errors in return
predictions.

In response to these limitations, the Arbitrage Pricing Model (APT) was developed, it offers a more
flexible and sophisticated framework for forecasting stock returns. Unlike the CAPM, APT considers
multiple macroeconomic and market factors, recognizing that stock returns are influenced by a range
of variables, including interest rates, inflation, GDP growth, and industry-specific trends. By capturing
these diverse influences, APT provides a more comprehensive tool for modeling the complexities of
financial markets.

The APT is based on the concept that investors should be compensated for taking on additional risk.
It posits that the expected return on a stock is a linear function of multiple risk factors, with each
factor’s weight (sensitivity) determined by its impact on the stock’s return. This model is highly
adaptable, allowing for the inclusion of various factors depending on the specific context and market
being analyzed.

The application of APT has gained attention in recent years due to its potential to enhance the accuracy
of stock return predictions. Its ability to adapt to different markets and incorporate a range of factors
makes it a valuable tool for addressing the shortcomings of the CAPM. This study seeks to further
explore the practicality and effectiveness of APT in the context of predicting stock returns, with a
particular focus on its application in specific stock exchanges, such as the Nairobi Stock Exchange
(NSE). By considering the unique dynamics of the NSE and its surrounding economic environment,
this research aims to provide valuable insights into the potential of APT as a robust model for stock
return forecasting. Ultimately, this study contributes to the ongoing evolution of financial modeling
and investment strategies in the face of ever-changing market conditions.
Chapter 1. Introduction 5

1.3 Statement of the Problem


Traditional asset pricing models, such as the Capital Asset Pricing Model (CAPM), encounter sig-
nificant challenges in effectively predicting stock returns due to oversimplified assumptions that fail
to capture the complex dynamics of the modern financial landscape. The CAPM’s reliance on a sin-
gle market factor neglects the complexities inherent in the interplay of various dynamic elements
within the stock market. Macroeconomic indicators, industry-specific variables, firm-specific at-
tributes, and the influence of global economic events introduce layers of significant variables that
traditional models struggle to accommodate. Moreover, the static nature of traditional models fails
to adapt to evolving market structures, technological advancements, and unforeseen events, such as
black swan occurrences. This study aims to address these limitations by focusing on the Arbitrage
Pricing Theory (APT), which offers a more comprehensive framework. The APT’s multi-factorial ap-
proach acknowledges and incorporates these complexities, providing a nuanced understanding of the
factors influencing stock returns and overcoming the shortcomings of traditional models in accurately
forecasting the intricacies of today’s dynamic financial markets.

1.4 Justification of the Study


The study on predicting stock returns using the Arbitrage Pricing Model (APT) is essential due to its
direct relevance to financial markets and the pressing need for advanced tools in investment decision-
making. Stock markets’ inherent complexity and continuous fluctuations demand a model like APT,
which considers multiple macroeconomic and market factors, offering a nuanced approach that aligns
with real-world market dynamics. Focusing on the Nairobi Securities Exchange (NSE) specifically
is valuable for understanding and addressing the unique challenges and conditions of this prominent
African exchange.

1.5 Objectives of the Study


1.5.1 General objective
The general objective of the study was to predict the stock returns at the Nairobi Securities Exchange
using the Arbitrage Pricing Model.
Chapter 1. Introduction 6

1.5.2 Specific objectives


The specific objectives of the study were;

(i). To fit the Arbitrage Pricing Model to the data.

(ii). To check the adequacy of the fitted model.

(iii). To predict stock returns using the Arbitrage Pricing Model.

(iv). To check the accuracy of the predicted stock returns.

1.6 Significance of the Study


The significance of predicting stock returns at the Nairobi Securities Exchange (NSE) using the Arbi-
trage Pricing Model (APM) lies in the potential benefits it offers to various stakeholders. Investors and
portfolio managers in the NSE can make more informed investment decisions, optimizing their port-
folios and managing risk more effectively. This research aids market participants in understanding the
dynamic market dynamics of the NSE, empowering them with advanced predictive tools to navigate
and thrive in the complex investment environment. Furthermore, financial institutions and asset man-
agement firms can enhance their competitiveness by providing clients with more accurate forecasts
and risk assessments, ultimately benefiting individuals and organizations seeking financial services
within the NSE. Moreover, the study’s findings have implications for policymakers and regulators,
helping them make informed decisions related to market regulations, financial stability, and economic
growth initiatives in Kenya. In addition to its practical applications, this research contributes to the
academic community by advancing our understanding of predictive modeling in emerging markets
like the NSE. This knowledge can inform future research, driving innovation in financial modeling
and risk management practices. Overall, the significance of this study is underscored by its poten-
tial to assist a diverse array of stakeholders, ultimately fostering well-informed investment decisions,
economic growth, and financial market stability within the vibrant Nairobi Securities Exchange.
Chapter 2

Literature Review

2.1 Introduction
The Arbitrage Pricing Model (APM) has been a transformative force in financial economics, offering
a multi-factorial approach, unlike earlier models like the Capital Asset Pricing Model (CAPM). This
literature review examines a series of studies investigating the predictive power of various asset pricing
models, with a focus on the APT, in forecasting stock returns.

2.2 Empirical Review


The Arbitrage Pricing Model (APM) is a pivotal advancement in the field of financial economics,
developed by (Ross, 1976). Unlike earlier models, such as the Capital Asset Pricing Model (CAPM),
which relies solely on market beta to assess asset risk, the APM revolutionized financial modeling
by introducing a multi-factorial approach. The APM acknowledges that asset returns are influenced
by a spectrum of factors beyond market movements, including macroeconomic indicators, industry-
specific variables, and firm-specific attributes. By accommodating this broader array of determinants,
the APM provides a more comprehensive and nuanced framework for assessing asset risk and return,
making it an indispensable tool for modern financial analysis and portfolio management.

Riro and Wambugu (2017), the main aim of this study was to test three asset pricing models using
monthly price data of the Nairobi Securities Exchange. The three models are CAPM, the Fama three-
factor model, and the four-factor model. What they discovered was that the predictive power of CAPM
and FF3F models was weak. They created six portfolios that returned R-square ranging between 11
% and 50 % for CAPM and 13% to 58% for the Fama-French three-factor model. In both cases,
the intercept coefficients were statistically significant implying the models were not quite efficient
in capturing all sources of risk for the portfolios. According to their finding, momentum effects
were more significant in improving model efficiency. However, momentum effects are criticized
for being temporal and thus not fit for inter-temporal forecasting of returns. As a result, a more
permanent and efficient model is sought to help market players in predicting changes and movements
of macroeconomic aggregate variables that are often faced by various countries, which are also related
to stock returns.

7
Chapter 2. Literature Review 8

Magut and Bogonko (2017) conducted research on the evaluation of CAPM in predicting securities
returns at the NSE, the main purpose of this paper was to determine the impact of CAPM systematic
risk on securities returns and to determine the linearity of the risk and the returns. This study was
guided by asset pricing theories in place which included the Arbitrage Pricing Model and Markowitz’s
modern portfolio theory. This study targeted all agricultural companies listed and quoted under the
NSE of which weekly prices for five years from January 2011 to December 2015 were used. In
utilizing the NSE 20 share index to represent the major stocks for agricultural firms, the findings have
tried to provide significant findings that support the CAPM. Thus, for future research, it would be
of interest to use other asset pricing models to compare the findings with those found on the CAPM
under this study to compare and contrast. In addition, since this study was only centered on historical
data from agricultural sector companies listed on the NSE, it will be of great importance to confirm
the findings of this study by carrying out the methodology on non-agricultural sector companies listed
on the NSE separately on a sector by sector basis.

Amtiran et al. (2017) found out that a decline in economic growth, as measured by gross domestic
product (GDP), was responded to negatively by investors, thereby reducing stock returns. Meanwhile,
inflation and depreciation of the rupiah had a significant negative impact on stock returns. The level
of stock returns of companies listed on the Indonesia Stock Exchange differences in macroeconomic
factor beta value, i.e. GDP, inflation, interest rate, and exchange rate where there is a return of
stocks that have a high level of sensitivity to one of the macroeconomic factors, but on the other hand
there is the stock return which has a low sensitivity to other macroeconomic macroeconomic factors
and stock returns in APT framework. This is caused by their surprise at both positive and negative
values of macroeconomic factors on stock returns. GDP has a positive relationship with stock returns,
inflation has a negative correlation with stock returns, interest rates have a positive relationship with
stock returns, and exchange rates have a positive relationship with stock returns. Market conditions
in Indonesia is strongly influenced by macroeconomic factors, especially interest rates and exchange
rates. Investors will invest in a country if that country has stable macroeconomic conditions. Model
APT one factor is valid more than multi-factor APT.

Barillas and Shanken (2018) highlighted that the Capital Asset Pricing Model (CAPM) model of
Sharpe and Litner led to a theory of asset pricing commonly used to estimate a firm’s cost of capital.
emphasized that Valuation confirms the performance of its investment portfolio. CAPM states that
only systematic or market risk impacts investment returns. This is because unsystematic or asset
Chapter 2. Literature Review 9

risk can be eliminated through investment diversification. CAPM can be used to estimate the cost
of capital and measure the performance of an asset or portfolio. The recommendation was to use a
multi-factorial model in further research done in the future.

(Kiboi and Katuse, 2019) conducted a study on the determinants of the market index for the Nairobi
Stock Exchange (NSE) by examining the period from January 2008 to December 2010. The study
identified money supply, inflation rates, exchange rates, and interest rates as significant factors influ-
encing the market index. Utilizing data from both the NSE and the Central Bank of Kenya, the study
employed multiple regression analysis to assess the impact of these factors on stock values, with the
market index serving as the primary indicator. Concentrating solely on four macroeconomic factors
associated with stock prices - money supply, interest rates, foreign exchange rates, and inflation - the
study focused exclusively on the financial market dynamics of the Nairobi Stock Exchange. Conse-
quently, the generalizability of the findings to other financial markets with varying levels of efficiency
and liquidity may be limited. To enhance the robustness of empirical research, future studies are en-
couraged to explore a broader array of macroeconomic factors and replicate similar analyses across
diverse financial markets

Wanjiku et al. (2021) also conducted a study to determine the impact of CAPMs systematic risk on
securities returns and to determine the linearity of the risk and the returns. This study was guided by
asset pricing theories in place which included the Arbitrage Pricing Model and Markowitz’s modern
portfolio theory. This study targeted all agricultural companies listed and quoted under the NSE of
which weekly prices for five years from January 2011 –December 2015 were used. In utilizing the
NSE 20 share index to represent the major stocks for agricultural firms, the findings have tried to
provide significant findings that support the CAPM. Thus, for future research, it would be of interest
to use other asset pricing models to compare the findings with those found on the CAPM under this
study to compare and contrast. In addition, since this study was only centered on historical data from
agricultural sector companies listed on the NSE, it will be of great importance to confirm the findings
of this study by carrying out the methodology on non-agricultural sector companies listed on the NSE
separately on a sector by sector basis.

Alfredo (2023) researched the use of Arbitrage Pricing Theory to analyze stock returns on banking
sub-sector companies listed on the Indonesia Stock Exchange for the period 2015 – 2022. The results
of the study using simultaneous hypothesis testing showed that inflation, exchange rates, and Gross
Chapter 2. Literature Review 10

Domestic Product (GDP) had a significant influence on stock returns. Partial testing of the hypoth-
esis shows that the exchange rate negatively affects stock returns. inflation and GDP do not have a
significant influence on stock returns.

Akel and Cisse (2023) investigated the validity of the Arbitrage Pricing Theory (APT) on the Istanbul
Stock Exchange over the period from January 2009 to March 2020, using BIST100 as the sample.
It sought to establish the relationship between security returns and various macroeconomic factors,
to provide insights for other emerging economies. The research employed a Vector Error Correction
Model, a member of the VAR family, with five macroeconomic variables: GDP, interest rate, inflation
rate, exchange rate, and production indexes. The resulting model indicated a negative Error Correction
Term , confirming the applicability of APT within the Turkish stock exchange.

Hussein and Mohammed (2023) addressed the challenge of predicting stock returns and tested the ef-
fectiveness of both the Capital Asset Pricing Model (CAPM) and the Arbitrage Pricing Theory (APT).
Analyzing a sample of 10 banks listed on the Iraq Stock Exchange from 2012 to 2021, the study con-
cluded by rejecting the original hypotheses and accepting alternative ones based on analytical results.
It found evidence challenging the predictive power of CAPM and APT in the context of these banks,
along with differences in the required rate of return calculated by these models compared to actual
market returns. These findings emphasize the complexities involved in predicting stock returns and
their implications for financial analysts and decision-makers.

In conclusion, this literature review explains ATP’s pivotal role in financial modeling and the inad-
equacies of traditional models like CAPM. The studies reviewed highlight the significance of incor-
porating macroeconomic factors, industry-specific variables, and firm-specific attributes in predicting
stock returns. The gaps identified in the research encompass the limited scope to agricultural com-
panies, underscoring the necessity to broaden the analysis to non-agricultural sectors. Additionally,
crucial macroeconomic and non-macroeconomic factors were omitted, indicating the need for a more
comprehensive examination in future studies. To address these gaps, this research has extended the
analysis to non-agricultural sectors, and diverse markets, thereby enhancing the understanding and
application of APM in predicting stock returns.
Chapter 3

Methodology

3.1 Introduction
This chapter presents the methods that will be used in this research proposal. Section 3.2 covers
an introduction to the Arbitrage Pricing Theory, assumptions, and other concepts used in Arbitrage
Pricing Theory, Section 3.3 covers the parameter estimation using Least Square Estimates, Section
3.4 covers the criteria in which the adequacy of the model will be checked, Section 3.5 covers the
prediction of stock returns, Section 3.6 involves checking the accuracy of the predicted stock returns.

3.2 Arbitrage Pricing Theory


The Arbitrage Pricing Theory (APT) begins with the assumption that K common factors are the dom-
inant sources of co-variation among security returns and that other sources of risk impinging on secu-
rity returns can be removed in large well-diversified portfolios. Formally (Ross, 1976), assumed that
these common factors affect security returns linearly and that securities returns are generated by the
model:
K
Rit = ∑ βik δkt + εit (3.2.1)
k=1

E[δkt ] = E[εit /δkt ] = 0

where Rit is the return on security i between time t − 1 and time t for i = 1, . . . , n, Ei is the expected
return on security i, δkt is the realization of the kth common factor i.e source of systematic risk
between time t − 1 and t, βik is the sensitivity of the return of security i to the kth common factor
called the factor loading and εit is the idiosyncratic or residual risk of the return on the ith security
between time t − 1 and time t. Equation (3.2.1) can be rewritten in more compact matrix notation:

      
R1t β1,1 β1,2 . . . β1,k δ1t ε1t
      
      
R2t  β2,1 β2,2 . . . β2,k  δ2t  ε2t 
 =
 ..   .. .. ..   ..  +  ..  (3.2.2)
   
..
 .   . . . .  .   . 
      
Rnt βn,1 βn,2 . . . βn,k δkt εnt

11
Chapter 3. Methodology 12

Rt = βδt + ϵt (3.2.3)

The random factors δt (a k × 1 vector) and the corresponding elements of the factor loading matrix, β
( which is a n × Kk), have been normalized so that,

E[δt ] = 0 (3.2.4)

E[δt δt′ ] = I (3.2.5)

The random variables ϵt are assumed to satisfy

E[ϵt |δt ] = 0 (3.2.6)

E[ϵt ϵt′ |δt ] = Ω (3.2.7)

where Ω is a positive definite symmetric matrix.

Ross (1976), argued that investors should be compensated only for bearing the systematic risk inher-
ent in the K common factors since idiosyncratic risk can be virtually eliminated in large and well-
diversified portfolios. Suppose we examine zero net investment portfolios and, in particular, the set
of such portfolios that are constructed to be well-diversified and to contain no systematic risk. As the
number of securities grows large, these portfolios will contain no risk at all and so should earn zero
profits to prevent the occurrence of riskless arbitrage opportunities. Since in these circumstances, the
number of such arbitrage portfolios tends toward infinity as well, Ross and many others proved that
to ensure that these arbitrage portfolios do not earn positive profits, expected returns must satisfy:

Ei = R f + βi1 δ1 + βi2 δ2 + . . . + βik δk (3.2.8)

where R f is the intercept in the pricing relation (the risk-free rate) and δk is the risk premium on the
kth common factor, k = 1 . . . n. The observed stock prices will be used to calculate the rates of return
using the formula ;
Rit = [ln(Pt ) − ln(Pt−1 )] (3.2.9)
Chapter 3. Methodology 13

where; Rit return of the stock i for the period t, Pt market price of the stock at the end of the period,
andPt−1 market price of the stock at the beginning of the period. The weekly risk-free rates were
found by first annualizing the 91Day T-Bill rate before reducing it to a weekly rate. This was done
using
1
R f = (1 + Tb ) 52 − 1 (3.2.10)

where, R f - The weekly risk-free return rate,b is the 91 Day Treasury bill rate.

3.2.1 Model Assumptions


The APT suggests that investors will diversify their portfolios, but that they will also choose their
profile of risk and returns based on the premiums and sensitivity of the macroeconomic risk factors.
Risk-taking investors will exploit the differences in expected and real returns on the asset by using
arbitrage. The APT suggests that the returns on assets follow a linear pattern. An an investor can
leverage deviations in returns from the linear pattern using the arbitrage strategy. Arbitrage is the
practice of the simultaneous purchase and sale of an asset on different exchanges, taking advantage
of slight pricing discrepancies to lock in a risk-free profit for the trade. However, the APT’s concept
of arbitrage is different from the classic meaning of the term. In the APT, arbitrage is not a risk-
free operation – but it does offer a high probability of success. The APT offers traders a model
for determining the theoretical fair market value of an asset. Having determined that value, traders
then look for slight deviations from the fair market price and trade accordingly. The residual risks
are assumed to have a normal distribution with zero mean and finite variance and to be sufficiently
independent across securities.

3.3 Parameter Estimation of the Arbitrage Pricing Theory


Model
The parameters of the APT model will be estimated using OLS. βi1 , βi2 , . . . , βik and the variances of
the residual are the parameters of the APT model that will be estimated. The APT model in matrix
form is represented as:
Rt = βδt + ϵt (3.3.1)

the residuals are given by,


ϵt = Rt − βδt (3.3.2)
Chapter 3. Methodology 14

The OLS estimation minimizes the sum of squared residuals. Let;

n
S= ∑ ϵt2
t=1

= ϵT ϵ (3.3.3)
= (Rt − βδt )⊤ (Rt − βδt )

= Rt⊤ Rt − Rt⊤ βδt − β ⊤ δt⊤ Rt + β ⊤ δt⊤ βδt

Differentiating equation (3.3.3) with respect to β and equating to zero to obtain the regression esti-
mates: The solution is given by:

∂S
=0 ⇒ −2δt⊤ Rt + 2δt⊤ δt β̂ = 0
∂β (3.3.4)
⇒ δt⊤ δt β̂ = δt⊤ Rt

Multiplying both sides of the above equation by (δt⊤ δt )

β̂ = (δt⊤ δt ) δt⊤ Rt
−1
(3.3.5)

where δt⊤ δt is an n × n symmetric matrix and Rt is an n × 1 matrix of the observed return values.

3.4 Adequacy of the model


The adequacy of the model will be checked using the following testing techniques the normality tests,
Durbin-Watson test, F-test, coefficient of determination, and t-test. Each of this test is discussed in
details below.

3.4.1 Test for Normality


The verification of the normality assumption entails the utilization of diagnostic tools such as Q-Q
plots and residual plots.They are subsequently expounded and how to interpreted them.

Residual plots
A residual plot is a graphical representation used in regression analysis to assess the adequacy of a
model by visualizing the differences between observed data points and the model’s predictions, known
as residuals. In a residual plot, the x-axis typically represents the predicted values from the model,
while the y-axis shows the residuals. A well-fitted model should produce residual points that scatter
randomly around the zero line, without any discernible patterns, such as curves or clusters. Patterns
Chapter 3. Methodology 15

in the residual plot can indicate issues like nonlinearity, heteroscedasticity (changing variance), or
outliers, offering valuable insights into the model’s performance and potential areas for improvement.

Normal quantile-quantile plot


A Q-Q plot, is a graphical tool in statistics that allows you to assess how closely a dataset matches
a particular theoretical distribution, such as the normal distribution. In the case of normally skewed
errors, the Q-Q plot will display data points along a straight line, indicating that the dataset follows
a normal distribution. However, for positively skewed errors (right-skewed), the plot will show devi-
ations with points rising above the diagonal line on the left and flattening on the right, signifying a
heavier tail on the right. Conversely, negatively skewed errors (left-skewed) will manifest as points
dropping below the diagonal line on the left and rising on the right, indicating a heavier tail on the
left. Q-Q plots are valuable for identifying departures from normality and guide appropriate statistical
analyses and model adjustments based on the nature of the skewness observed.

3.4.2 Durbin-Watson test


To test the independence of residuals (errors) in the context of the Arbitrage Pricing Theory (APT)
model, the Durbin-Watson test is used. The null hypothesis of the Durbin-Watson test is Durbin-
Watson Test for Independence of Residuals

H0 : Residuals are correlated.


(3.4.1)
H1 : Residuals are not correlated.

The test statistics for DW is:


∑ni=2 (εi − εi−1 )2
DW = (3.4.2)
∑ni=1 εi2
n is the number of observations.is the i-th residual. The DW statistic is used to assess the presence
of autocorrelation in the residuals. If DW is close to 2, it suggests that the residuals are independent.
If DW significantly deviates from 2, it may indicate the presence of autocorrelation in the residuals,
which implies that the model may not fully account for the dependencies in the data.

3.4.3 F test
The F-test is used to check the overall adequacy of the APT model. In the APT framework, you have
a set of factor models (systematic risk factors) that are supposed to explain the returns of the assets.
Chapter 3. Methodology 16

The hypotheses are;

H0 : βi = 0
(3.4.3)
H1 : βi ̸= 0

The null hypothesis of the F-test is that the APT model is not statistically different from a simple
single-factor model (Capital Asset Pricing Model ). If the F-test rejects the null hypothesis, it suggests
that the APT model is a better fit for explaining the asset returns than a simpler model. SSR (Sum of
Squares Regression):
n
SSR = ∑ (R̂i − R̄)2 (3.4.4)
i=1

SSE (Sum of Squares Error):


n
SSE = ∑ (Ri − R̄i )2 (3.4.5)
i=1

SST (Total Sum of Squares):


n
SST = ∑ (Ri − R̄)2 (3.4.6)
i=1

The F-statistic for the F-test:


SSR/n − 1
F= (3.4.7)
SSE/n − k

Source Sum of Squares Degrees of freedom Mean Square F-ratio


Regression SSR k−1 MSR MSR/MSE
Error SSE n−k MSE
Total SST n−1

3.4.4 T -test
The t-tests are used to assess the significance of each factor in the APT model. For each systematic
risk factor included in the APT model, you can perform a t-test to determine if that factor significantly
contributes to explaining asset returns. The hypotheses are;

H0 : βi = 0
(3.4.8)
H1 : βi ̸= 0
Chapter 3. Methodology 17

The null hypothesis for each t-test is that the factor’s coefficient is equal to zero, indicating that the
factor is not relevant for explaining the asset’s return. If a t-test rejects the null hypothesis for a
particular factor, it suggests that the factor is statistically significant in explaining the asset’s return
and should be included in the APT model. The test statistic is:

β̂i
T0 = (3.4.9)
se(β̂i )

3.5 Predicting The Stock Returns using the model


The prediction equation for predicting stock returns using the Arbitrage Pricing Theory (APT) is given
by:
R̂ = R f t + β̂i1 δ1 + β̂i2 δ2 + . . . + β̂ik δk (3.5.1)

where R̂ is the predicted value of the stock returns, R f t is the risk-free rate, β1 , β2 ,ˆ. . . , βk are the
coefficients or slopes associated with each predictor variable, δ are the systematic factors. For the
Arbitrage Pricing Theory (APT) model, the equation in matrix form is represented as:

R = β̂δt + ε (3.5.2)

where; R is a vector of stock returns, β̂ is a vector of coefficients,δ is a vector of systematic factors,


ε is a vector of idiosyncratic components.The coefficients β̂ are estimated using techniques such as
Ordinary Least Squares (OLS) to minimize the difference between the predicted returns and the actual
observed returns.

3.6 Accuracy of predicted returns


To assess the accuracy of a model in prediction it is important to check the difference between the
predicted values and the observed values. The accuracy of the predicted returns will be assessed using
root mean square error and mean absolute error.

3.6.1 Root Mean Squared Error


The Root Mean Square Error quantifies the differences between predicted values and actual values,
squaring the errors, taking the mean, and then finding the square root. The RMSE provides a clear
understanding of the model’s performance, with lower values indicating better predictive accuracy.
s
1 n
RMSE = ∑ (Ri − R̂i)2
n i=1
Chapter 3. Methodology 18

3.6.2 Mean Absolute Error


MAE measures the average magnitude of errors between predicted and observed values. A lower
MAE indicates better predictive accuracy, as it signifies smaller discrepancies between predicted and
observed values.

1 n
MAE = ∑ |Ri − R̂i|
n i=1
(3.6.1)
Chapter 4

Results and Discussions

4.1 Introduction
This chapter presents the empirical results and discussions of the study. Section 4.2 provides a de-
scription of the data used in the study. Section 4.3 presents the estimation of the Arbitrage Pricing
Theory model parameters. Section 4.4 involves checking the adequacy of the fitted model. Section
4.5 discusses the prediction of stock returns using the fitted model. Finally, Section 4.6 presents the
testing of the accuracy of predicted returns.

4.2 Data description and source


The data set that was used consists of 8 stocks and 6 factors namely; NMG, EQTY, KCB, SASN,
EABL, KEGN, SCOM, KNRE, 91 Day T.bills, Inflation rates, Interbank rates, Exchange rate of
United States dollar, cash reserve requirements and central bank rates. This covers the period from
1st January 2013 to 31 December 2023, making a total of 1848 observations. The stocks were se-
lected based on the most actively traded and availability of the data. The stocks data was obtained
from the Wall Street Journal https://www.wsj.com/market-data/quotes/company-list, the
different macraeconomic factors datasets and the 91 Day T.bills were obtained from Central Bank
of Kenya https://www.centralbank.go.ke/rates/forex-exchange-rates/, and the unem-
ployment rates were obtained Kenya National Bureau of Statistics https://www.knbs.or.ke/
data-releases/. Table 4.1 represents the summary satistics of monthly stock returns of the se-
lected companies listed in the NSE. The statistics include the maximum, minimum, mean, standard
deviation, skewness, kurtosis for the returns. During the sample period, the average return for SCOM,
SASN, and EQTY stocks was positive, with values around zero indicating that future returns of these
stocks tend to increase with time, while the average return for KEGN, NMG, KNRE, KCB, and
EABL stocks was negative, with values around negative zero indicating that future returns of these
stocks tend to decrease with time. The near-zero mean indicates that, on average, these stocks did not
generate substantial returns during the observed period.

Among the stocks analyzed, NMG exhibited the highest standard deviation, indicating the most sub-
stantial price fluctuations over the observed period. Following NMG, EQTY, KEGN, SASN, KNRE,

19
Chapter 4. Results and Discussions 20

SCOM, and KCB also displayed relatively high standard deviations, suggesting that these stocks had
experienced greater price volatility and uncertainty. In contrast, EABL had the lowest standard de-
viation, signifying a more stable and predictable price trend during the observed period, making it a
potentially less risky investment option compared to the other stocks.

The returns exhibited positive and negative skewness. Among the positively skewed stocks, EABL
stood out with a highest positive skewness. This high positive skewness suggests a right-skewed
distribution, indicating a greater likelihood of experiencing extreme positive returns. On the other
hand, within the negatively skewed stocks, NMG exhibited the highest negative skewness, implying
that it had higher negative returns than positive returns.

All the stocks exhibited excess kurtosis which means that their return distributions have a higher de-
gree of peakedness compared to a normal distribution. EABL exhibited an exceptionally high positive
excess kurtosis indicating a return distribution with fatter tails and a sharper peak. This suggests a
higher likelihood of experiencing extreme returns, both positive and negative, compared to a normal
distribution. SCOM displayed positive excess kurtosis, with a much lower value, indicating a return
distribution with somewhat fatter tails and a slightly sharper peak, but the effect is less pronounced
than in the case of EABL. SCOM’s excess kurtosis suggests the potential for more extreme returns,
but to a relatively lesser extent than that of EABL.

TABLE 4.1: Descriptive statistics for monthly stocks returns starting from January 1, 2013 to Decem-
ber 31, 2023

Response Mean Std. Dev Skewness Kurtosis Minimum Maximum


KCB -0.0076 0.1104 -0.4619 4.9766 -0.3355 0.3194
EABL -0.0129 0.0763 0.5563 12.9738 -0.1515 0.1979
Equity 0.0043 0.1033 -0.3954 5.2764 -0.3365 0.2288
SASN 0.0061 0.0982 0.2578 4.5287 -0.2442 0.2624
KEGN -0.0207 0.1004 -0.1018 7.7312 -0.2680 0.2113
SCOM 0.0125 0.0964 -0.2715 3.9427 -0.2727 0.3388
NMG -0.0300 0.1258 -1.0291 8.3758 -0.6241 0.2904
KNRE -0.0070 0.0962 0.1697 9.9515 -0.2920 0.2812
USD 0.0073 0.0161 0.5078 4.3309 -0.0284 0.0455
INFLATION -0.0100 0.2463 5.6441 0.9106 -1.0500 0.7700
IBR 0.0007 0.0223 -0.9517 5.5430 -0.1003 0.0591
TB 0.0010 0.0091 0.1331 6.0845 -0.0354 0.0366
CRRR 0.0495 0.0046 -0.8423 4.3071 0.0425 0.0525
CBR 0.0908 0.0124 -0.0671 6.6133 0.0700 0.1150
Chapter 4. Results and Discussions 21

4.3 Fitting the Arbitrage Pricing Theory


This section covers the fitting of various APT models which includes estimation of the arbitrage
pricing theory Betas of each model.

4.4 Parameter estimates of the fitted arbitrage pricing theory


model
The parameters of the fitted model were estimated using the ordinary least squares method.

TABLE 4.2: Coefficient Estimates for EQTY APT model

Variable Estimate Std. Error p value


Intercept 0.1125 0.1387 0.00203
INFER 0.0427 0.0466 0.00624
USD -2.403 0.7842 0.0031
TB -0.8594 1.3019 0.0114
CRRR -0.5707 3.2937 0.01629
CBR -0.6719 1.1067 0.00457

In Table 4.2, among the independent variables USD, exhibited a strong negative relationship with the
dependent variable EQTY return. This indicated that as USD rates increase, EQTY return tend to
decrease. In contrast, INFER had a positive relationship with EQTY, suggesting that higher INFER
correspond to higher EQTY returns. TB, CRRR and CBR all had negative associations with EQTY
return. This implies that increased TB or CRRR or CBR contributed to lower EQTY return. All the
independent variables are statistically signficant because the p value was less than 5% significant level.
But at 1% level, the independent variables CRRR and TB were not statistically significant because
they had a p value greater than 1%, hence at 1% they had no impact on the dependent variable EQTY
return.
TABLE 4.3: Coefficient Estimates for KCB APT model

Estimate Std. Error p value


(Intercept) 0.01290 0.13825 0.025935
INFER 0.04232 0.04640 0.0164879
USD -2.72088 0.78141 0.000862
TB -1.33209 1.29723 0.008015
CRRR 3.61694 3.28197 0.004208
CBR -1.95750 1.10271 0.0180216
Chapter 4. Results and Discussions 22

From Table 4.3, among the independent variables USD, exhibited a strong negative relationship with
the dependent variable KCB return. This indicated that as USD rates increase, KCB return tend to
decrease. In contrast, CRRR and INFER had a positive relationship with KCB, suggesting that higher
CRRR or INFER correspond to higher KCB returns. TB and CBR all had negative associations
with KCB return. This implies that increased TB or CBR contributed to lower KCB return. All
the independent variables are statistically signficant because the p value was less than 5% significant
level. But at 1% level, the independent variables INFER and CBR were not statistically significant
because they had a p value greater than 1%, hence at 1% they had no impact on the dependent variable
KCB return.
TABLE 4.4: Coefficient Estimates for EABL APT model

Variable ESTIMATE Std. Error p value


(Intercept) 0.01822 0.10623 0.018643
INFER 0.02613 0.03565 0.004661
USD -1.27594 0.60041 0.00371
TB -0.53826 0.99675 0.01909
CRRR 0.39328 2.52177 0.00765
CBR -0.44485 0.84729 0.0012

The table 4.4 displays estimated coefficients and their significance levels from a linear regression
model, among the independent variables USD, exhibited a strong negative relationship with the de-
pendent variable EABL return. This indicated that as USD rates increase, EABL return tend to de-
crease. In contrast, CRRR and INFER had a positive relationship with EABL, suggesting that higher
CRRR or INFER correspond to higher EABL returns. TB and CBR all had negative associations
with EABL return. This implies that increased TB or CBR contributed to lower EABL return. All
the independent variables are statistically signficant because the p value was less than 5% significant
level. But at 1% level, the independent variables TB was not statistically significant because it had a
p value greater than 1%, hence at 1% it had no impact on the dependent variable EABL eturn.

Table 4.5, the independent variable USD, exhibited a strong negative relationship with the dependent
variable KEGN return. This indicated that as USD rates increase, KEGN return tend to decrease. In
contrast, CRRR, TB and INFER had a positive relationship with KEGN, suggesting that higher CRRR
or TB or INFER correspond to higher KEGN returns. CBR had negative associations with KEGN
return. This implies that increased CBR contributed to lower KEGN return. All the independent
variables was statistically signficant at 5% level because the p value was less than 5% significant
level. But at 1% level, the independent variables INFER was not statistically significant because it
Chapter 4. Results and Discussions 23

had a p value greater than 1%, hence at 1% they it had no impact on the dependent variable KEGN
return.
TABLE 4.5: Coefficient Estimates for KEGN APT model

Estimate Std. Error p value


(Intercept) 0.3101 0.1816 0.002117
INFER 2.8601 1.3871 0.042877
USD -0.5698 0.1437 0.000172
TB 1.5233 0.3097 0.000005
CRRR 10.8437 2.6907 0.000138
CBR -2.4659 0.7695 0.002027

Table 4.6 the independent variable USD, exhibited a strong negative relationship with the dependent
variable KNRE return. This indicated that as USD rates increase, KNRE return tend to decrease.
In contrast, CBR had a positive relationship with KNRE, suggesting that higher CBR correspond to
higher KNRE returns. CRRR, TB AND INFER all had negative associations with KNRE return. This
implies that increased CRRR or TB or INFER contributed to lower KNRE return. All the independent
variables were statistically signficant at 5% level because the p value was less than 5% significant
level. But at 1% level, the independent variables INFER was not statistically significant because it
had a p value greater than 1%, hence at 1% they it had no impact on the dependent variable KNRE
return.
TABLE 4.6: Coefficient Estimates for NMG KNRE model

Variable Estimate Std. Error p value


Intercept -0.05531 0.13660 0.01687
INFER -0.02341 0.04585 0.00611
USD -1.15578 0.77208 0.000139
TB -0.85512 1.28174 0.00507
CRRR -0.90456 3.24278 0.01781
CBR 1.12483 1.08954 0.02305

TABLE 4.7: Coefficient Estimates for SCOM APT model

Variable Estimate Std. Error p value


(Intercept) -0.118144 0.123759 0.01305
INFER 0.006443 0.041537 0.00717
USD -2.077125 0.699516 0.00408
TB -0.048354 1.161274 0.001691
CRRR 5.224640 2.938012 0.001970
CBR -1.239161 0.987143 0.01354
Chapter 4. Results and Discussions 24

From Table 4.7 the independent variable USD, exhibited a strong negative relationship with the de-
pendent variable SCOM return. This indicated that as USD rates increase, SCOM return tend to
decrease. In contrast, CRRR and INFER all had a positive relationship with SCOM, suggesting that
higher CRRR or INFER correspond to higher SCOM returns. CBR and TB all had negative associa-
tions with SCOM return. This implies that increased CBR or TB contributed to lower SCOM return.
All the independent variables were statistically signficant at 5% level because the p value was less
than 5% significant level. But at 1% level, the independent variable CBR was not statistically signif-
icant because it had a p value greater than 1%, hence at 1% they it had no impact on the dependent
variable SCOM return.
TABLE 4.8: Coefficient Estimates for NMG APT model

Variable Estimates Std. Error P-value


INTERCEPT 3.6704 0.6720 0
INFER -10.40 5.3468 0.009845
USD -61.030 0.5467 0
IBR 13.401 0.7696 0.00856
TB 10.9874 1.5382 0
CRRR 0.7530 9.9433 0.009398
CBR 2.9176 2.9691 0.03288

Table 4.8 the independent variable USD and INFER, exhibited a strong negative relationship with
the dependent variable NMG return. This indicated that as USD or INFER rates increase, NMG
return tend to decrease. In contrast, CRRR, IBR, TB and CBR all had a positive relationship with
NMG, suggesting that higher CRRR or IBR or TB or CBR correspond to higher NMG returns. All
the independent variables were statistically signficant at 5% level because the p value was less than
5% significant level. But at 1% level, the independent variable CBR was not statistically significant
because it had a p value greater than 1%, hence at 1% they it had no impact on the dependent variable
NMG return.
TABLE 4.9: Coefficient Estimates for SASN APT model

Variable Estimate Std. Error P value


(Intercept) -0.14222 0.11960 0.0237976
INFER -15.7386 0.95157 0.0102156
USD -34.470 0.09729 0.000672
IBR -1.2193 01.3696 0.0376087
TB -0.57167 0.27376 0.040040
CRRR 0.44564 1.76962 0.01801835
CBR 1.17450 0.52841 0.029132
Chapter 4. Results and Discussions 25

Table 4.9 the independent variables USD, INFER, IBR, and TB, exhibited a strong negative relation-
ship with the dependent variable SASN return. This indicated that as USD or INFER or IBR or TB
rates increase, SASN return tend to decrease. In contrast, CRRR and CBR all had a positive relation-
ship with SASN, suggesting that higher CRRR or CBR correspond to higher SASN returns. All the
independent variables were statistically signficant at 5% level because the p value was less than 5%
significant level. But at 1% level, the independent variables CBR and CRRR was not statistically sig-
nificant because it had a p value greater than 1%, hence at 1% they it had no impact on the dependent
variable NMG return.

4.5 Adequacy of the fitted model


The adequacy of the fitted arbitrage pricing theory model was checked using the following several
techniques

Q-Q and Residual plots


To determine if the residuals follow a normal distribution , a Q-Q plot was employed. The residuals
can be considered normally distributed if the dots on the Q-Q plot closely follow a strait line, devia-
tions from the line signify deviations from this distribution (Ngoc and Tien, 2023). In this analysis,
the majority of data points in the QQ plots closely followed the straight line, indicating adherence to
a normal distribution. However, deviations were observed with some errors falling above and below
the line.

Moreover, residual plots offer additional insights into the distribution of model errors. In this case,
all residual plots demonstrated data points clustered around the center, indicating conformity with a
normal distribution. When errors are evenly dispersed around the center line, it signifies homoscedas-
ticity and supports the assumption of normality.
Chapter 4. Results and Discussions 26
Chapter 4. Results and Discussions 27
Chapter 4. Results and Discussions 28

Durbin-Watson test
Durbin Watson test was used to check for autocorrelation. Table 4.10 represents the Durbin-Watson
test results. EABL had the largest DW statistic, indicating a higher level of independence between
consecutive errors. This suggests a lower likelihood of autocorrelation in the model’s errors. SASN
had the lowest DW statistics. These values were significantly lower than 2 suggesting the presence of
no autocorrelation in the residuals. A p-value of 0 was also obtained which lead to the rejection of the
null hypothesis. Thus, affirming independece of residuals.

TABLE 4.10: Durbin-Watson Test Results

Stock DW Test p value


KCB 0.45576 0
EQTY 0.43551 0
EABL 0.78735 0
SASN 0.41068 0
KEGN 0.52894 0
NMG 0.7278 0
KNRE 0.50573 0
SCOM 0.53571 0

F test
Table 4.11 is the ANOVA table for the KCB model. The p value for the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and CBR having the lowest value, the null
hypothesis was rejected and it was concluded that the KCB APT model was significant.

TABLE 4.11: Analysis of variance table for KCB

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.0197 0.0197 8.78 0
USD 1 0.118813 0.118813 52.9030 0
IBR 1 0.0697 0.0697 31.02 0
TB 1 0.014976 0.014976 6.6683 0
CRRR 1 0.04259 0.04259 18.962 0
CBR 1 0.012994 0.012994 5.7855 0
Residuals 78 0.175178 0.002246

Table 4.12 is the ANOVA table for the EQTY model. The p value for the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
Chapter 4. Results and Discussions 29

TABLE 4.12: Analysis of variance table for EQTY

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.0372 0.03721 16.89 0
USD 1 0.5220 0.52201 23.698 0
IBR 1 0.01971 0.019714 8.950 0
TB 1 0.05436 0.054360 24.678 0
CRRR 1 0.070 0.0704 32.0 0
CBR 1 0.014539 0.0145392 6.6004 0
Residuals 78 0.171815 0.0022028

independent variables with USD having the largest F value and CBR having the lowest value, the null
hypothesis was rejected and it was concluded that the EQTY APT model was significant.

TABLE 4.13: Analysis of variance table for EABL

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.1967 0.1967 5.2510 0
USD 1 17.6875 17.6875 472.2750 0
TB 1 5.4515 5.4515 145.5616 0
CRRR 1 0.5006 0.5006 13.3676 0
CBR 1 0.2615 0.2615 6.9827 0
Residuals 71 2.6591 0.0375

Table 4.13,is the ANOVA table for the EABL model. The p value for the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and INFER having the lowest value, the
null hypothesis was rejected and it was concluded that the EABL APT model was significant.

TABLE 4.14: Analysis of variance table for SASN

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.01012 0.01012 17.065 0
USD 1 0.32459 0.32459 54.7410 0
IBR 1 0.000901 0.0901 15.192 0
TB 1 0.034 0.034 58.1 0
CRRR 1 0.010956 0.010956 18.4762 0
CBR 1 0.02929 0.02929 49.404 0
Residuals 78 0.046251 0.000593

The Table 4.14 is the ANOVA table for the SASN model. The p value for the model was 0 which
was less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
Chapter 4. Results and Discussions 30

independent variables with TB having the largest F value and INFER having the lowest value, the null
hypothesis was rejected and it was concluded that the EABL APT model was significant.

TABLE 4.15: Analysis of variance table for KEGN

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.02426 0.02426 11.930 0
USD 1 0.20986 0.20986 103.204 0
TB 1 0.199410 0.199410 98.0659 0
CRRR 1 0.0292 0.0292 14.34 0
CBR 1 0.00757 0.00757 3.722 0
Residuals 71 0.144373 0.002033

The Table 4.15 is the ANOVA table for the KEGN model. The p value for the model was 0 which
was less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and CBR having the lowest value, the null
hypothesis was rejected and it was concluded that the KEGN APT model was significant.

TABLE 4.16: Analysis of variance table for SCOM

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.013104 0.013104 7.4259 0
USD 1 0.42700 0.42700 241.965 0
IBR 1 0.144433 0.144433 81.8452 0
TB 1 0.110217 0.110217 62.4562 0
CRRR 1 0.01543 0.01543 8.745 0
CBR 1 0.02606 0.02606 14.768 0
Residuals 78 0.137647 0.001765

Table 4.16 is the ANOVA table for the SCOM model. The p value of the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and INFER having the lowest value, the
null hypothesis was rejected and it was concluded that the SCOM APT model was significant.

Table 4.17 is the ANOVA table for the NMG model. The p value for the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and CBR having the lowest value, the null
hypothesis was rejected and it was concluded that the NMG APT model was significant.
Chapter 4. Results and Discussions 31

TABLE 4.17: Analysis of variance table for NMG

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.2474 0.2474 13.2142 0
USD 1 9.7566 9.7566 521.1573 0
IBR 1 2.6794 2.6794 143.1216 0
TB 1 1.5876 1.5876 84.8031 0
CRRR 1 0.627 0.627 33.482 0
CBR 1 0.181 0.181 9.656 0
Residuals 78 1.4602 0.0187

TABLE 4.18: Analysis of variance table for KNRE

Variable Df Sum Sq Mean Sq F value p value


INFER 1 0.000369 0.000369 12.700 0
USD 1 0.0050108 0.0050108 172.6529 0
IBR 1 0.0001600 0.0001600 5.5126 0
TB 1 0.0005031 0.0005031 17.3340 0
CRRR 1 0.0033487 0.0033487 115.3828 0
CBR 1 0.0004828 0.0004828 16.6369 0
Residuals 78 0.0022638 0.0000290

Table 4.18 is the ANOVA table for the KNRE model. The p value for the model was 0 which was
less than 5% thus signifying that the model was appropriated for the data. The critical value of
the F-distribution was 3.8579. Since the computed value was less then the critical value for all the
independent variables with USD having the largest F value and IBR having the lowest value, the null
hypothesis was rejected and it was concluded that the KNRE APT model was significant.

T test
The T-test was conducted and the null hypothesis was rejected for all of the independent variables,
since the t-statistics for all of the independent variables in the APT models were greater than the crit-
ical value of the t-distribution at 5% significance level. This meant that all the independent variables
were statistically significant. Also the p value was 0, for the variables in all of the models, which
lead to the rejection of the null hypothesis that the betas were zero, hence implying that all of the
cofficients was statistically significant to it’s respective models fitted.

4.6 Prediction of the stock returns


Each stock return was predicted using the fitted Arbitrage Pricing Theoary model. And the following
results were obtained. The predictions in table 4.19 suggest trends in the expected returns of various
financial instruments over the observed time period. Assuming that increasing returns are represented
Chapter 4. Results and Discussions 32

by rising values and decreasing returns by declining values, the findings indicate the direction of pre-
dicted performance. By observing the values within each column over time, one can discern whether
the predictions generally indicate rising or falling returns. Higher values in later rows compared to
earlier ones suggest increasing predicted returns, while lower values indicate decreasing predicted
returns. Additionally, comparisons across columns for a specific row reveal the relative strength of
predicted returns for different financial instruments. Overall, these trends provide valuable insights
into the expected performance of the analyzed assets, aiding in investment decision-making and risk
assessment.
TABLE 4.19: Predicted stock returns for the next two years.

Month KCB EABL EQTY SASN KEGN SCOM NMG KNRE


1 0.0538 0.0139 0.0520 -0.0002 0.0195 0.0708 0.0147 0.0209
2 0.0565 0.0153 0.0587 -0.0060 0.0139 0.0948 0.0242 0.0259
3 -0.0039 -0.0202 -0.0144 0.0340 -0.0480 0.0176 -0.0934 -0.0113
4 -0.0040 -0.0238 -0.0239 0.0771 -0.0457 -0.0024 -0.1174 0.0049
5 -0.0027 -0.0156 0.0012 -0.0183 -0.0576 0.0626 -0.0593 -0.0244
6 0.0803 0.0215 0.0644 0.0010 0.0139 0.0867 0.0020 0.0127
7 0.0043 -0.0139 -0.0033 0.0059 -0.0386 0.0231 -0.0727 -0.0223
8 0.0460 0.0059 0.0335 0.0002 -0.0077 0.0533 -0.0312 -0.0061
9 0.0357 0.0008 0.0246 0.0039 -0.0167 0.0488 -0.0419 -0.0080
10 0.0348 0.0001 0.0233 0.0068 -0.0177 0.0481 -0.0442 -0.0070
11 0.0219 -0.0064 0.0116 0.0124 -0.0282 0.0401 -0.0585 -0.0095
12 0.0049 -0.0120 0.0015 -0.0129 -0.0396 0.0332 -0.0615 -0.0289
13 0.0313 -0.0014 0.0208 0.0048 -0.0204 0.0466 -0.0462 -0.0093
14 0.0203 -0.0061 0.0081 0.0051 -0.0208 0.0185 -0.0605 -0.0203
15 0.0303 -0.0015 0.0210 0.0013 -0.0218 0.0490 -0.0449 -0.0106
16 -0.0577 -0.0443 -0.0592 0.0254 -0.0872 -0.0184 -0.1389 -0.0396
17 -0.0244 -0.0269 -0.0280 0.0038 -0.0587 0.0012 -0.0986 -0.0369
18 -0.1025 -0.0568 -0.0816 0.0113 -0.0777 -0.0542 -0.1204 -0.0384
19 -0.1535 -0.0711 -0.1027 -0.0194 -0.0811 -0.0670 -0.0946 -0.0404
20 -0.0772 -0.0381 -0.0409 0.0056 -0.0275 -0.0149 -0.0358 0.0067
21 0.0045 -0.0003 0.0304 0.0040 0.0308 0.0473 0.0415 0.0443
22 0.0179 0.0061 0.0362 0.0079 0.0525 0.0239 0.0459 0.0424
23 0.0200 0.0070 0.0375 0.0087 0.0548 0.0231 0.0470 0.0430
24 0.0171 0.0008 0.0275 0.0092 0.0208 0.0365 0.0109 0.0266

4.7 Checking the accuracy of the predicted stock returns


The accuracy of the predicted stock returns was assessed using two metrics: Root Mean Squared Error
(RMSE) and Mean Absolute Error (MAE), which were discussed in detail subsequently. The model
yielded a relatively low root mean square error, as indicated in Table 4.20. This low RMSE value
Chapter 4. Results and Discussions 33

indicates the reliability of the model’s stock return predictions. As a result, the model proved to be
suitable for predicting stock returns.

TABLE 4.20: Root Mean Squared Error (RMSE) for different stocks

Stock RMSE
KCB 0.0454
EABL 0.0676
EQTY 0.0450
SASN 0.0233
KEGN 0.0116
SCOM 0.0402
NMG 0.1311
KNRE 0.0052

The relatively low Mean Absolute Error (MAE) obtained by the model, as depicted in Table 4.21,
suggests that the model’s predictions for stock returns are generally accurate. This indicates the
effectiveness of the model in forecasting stock returns with a high degree of precision. Therefore, the
model demonstrates its capability and reliability in predicting stock returns.

TABLE 4.21: Mean Absolute Error (MAE) for different stocks

Stock MAE
KCB 0.0363
EABL 0.0523
EQTY 0.0385
SASN 0.0182
KEGN 0.0083
SCOM 0.0307
NMG 0.0980
KNRE 0.0041
Chapter 5

Summary and Conclusion

5.1 Introduction
This chapter gives the summary, conclusions and recommendations for further research. Section 5.2
presents the summary of the research project. Section 5.3 gives the conclusion of the study and section
5.4 presents the recommendations for further research.

5.2 Summary
The study’s first specific objective was to fit the Arbitrage Pricing Model (APM) to the data. This
involved estimating the model’s parameters using the Ordinary Least Squares (OLS) method and
analyzing the coefficients of independent variables to understand their impact on dependent variable
returns across various assets like EQTY, KCB, EABL, KEGN, KNRE, SASN, NMG and SCOM. The
analysis revealed significant relationships between these variables, with USD showing a consistent
negative influence on returns and other variables like INFER, CRRR, TB, and CBR exhibiting varying
impacts.

The second objective aimed to check the adequacy of the fitted model. This involved conducting
several statistical tests such as Q-Q plots to assess the normality of residuals, Durbin-Watson tests to
detect autocorrelation, and ANOVA tables to evaluate model significance.T-tests were conducted to
determine the significance of independent variables in the APT models, with all variables being sta-
tistically significant. The results indicated that the models adequately fit the data, with most residuals
conforming to a normal distribution, minimal autocorrelation, and significant model p-values.

The third objective focused on predicting stock returns using the Arbitrage Pricing Model. The study
utilized the fitted APM to forecast expected returns for different financial instruments over a two-year
period. This analysis provided insights into the direction of predicted performance for each asset and
allowed for comparisons of predicted returns across various financial instruments.

Finally, the fourth objective evaluated the accuracy of predicted stock returns using Root Mean
Squared Error (RMSE) and Mean Absolute Error (MAE) metrics. The results showed low RMSE
and MAE values across different stocks, indicating the model’s reliability and precision in forecasting

34
References 35

stock returns. These metrics confirmed the effectiveness of the APM in predicting stock returns with
a high degree of accuracy.

5.3 Conclusion
In conclusion, this research employed the Arbitrage Pricing Theory (APT) framework to estimate
parameters and predict stock returns for various companies. The study assessed the adequacy of
the fitted model, checked the normality of residuals, and evaluated the accuracy of predicted stock
returns using RMSE and MAE values. The findings revealed variability in predictive accuracy across
companies, with some exhibiting minimal average discrepancy between predicted and actual returns
while others showed significant disparities. Notably, the model demonstrated exceptional predictive
performance for certain companies, while others necessitated further refinement. Overall, the research
provides valuable insights into the application of APT in predicting stock returns and highlights the
importance of ongoing refinement to optimize predictive capabilities.

5.4 Recommendations
When empirically testing the APT model, the factors to use are unspecified. This is both a strength and
a weakness of the model, and finding factors with an economic basis behind market returns presents a
continual difficulty. Previous APT studies (French, 2021) had been criticized as regression formulas
do not indicate predictive powers of the variables. Future research may explore the forecasting abil-
ities of risk premiums, industrial production, and principal components. In addition, further tests of
APT may explore the use of modelling in CAPM betas, firm characteristics, and/or a set of industry
portfolios, which may enable better equilibrium models in the capital markets. Studies could test the
variables on industrial goods, financial institutions, and other industry portfolio returns.
References
Akel, Veli and Boubacar Amadou Cisse (2023). “Test of Arbitrage Pricing Theory on stock indices:
An empirical study on BIST100.” In: Economic Magazine 75.1, pp. 6–16.
Alfredo, Harold Kevin (2023). “Analysis of Expected Stock Returns in 2020-2022 Using Arbitrage
Pricing Theory (Study on Stocks Incorporated with The IDX-30 Index on The Indonesia Stock
Exchange)”. In: Eduvest-Journal of Universal Studies 3.3, pp. 626–646.
Amtiran, PY, R Indiastuti, SR Nidar, and D Masyita (2017). “Macroeconomic Factors And Stock Re-
turns In APT Framework.” In: International Journal of Economics & Management 11.4, pp. 704–
715.
Barillas, Francisco and Jay Shanken (2018). “Comparing asset pricing models”. In: The Journal of
Finance 73.2, pp. 715–754.
French, Jordan (2021). “Macroeconomic forces and arbitrage pricing theory”. In: Journal of Compar-
ative Asian Development 16.1, pp. 1–20.
Hussein, Zahraa A and Mohammed J Mohammed (2023). “Accuracy of Capital Asset Pricing Model
and Arbitrage Pricing Theory in Predicting Stock Return”. In: Journal of Namibian Studies: History
Politics Culture 33, pp. 1539–1563.
Kiboi, Jane and Paul Katuse (2019). “Nairobi Stock Exchange: A Regression of Factors Affecting
Stock Prices”. In: International Journal of Finance 4.1, pp. 11–21.
Magut, John Tarus and Jared Bitange Bogonko (2017). “Evaluation of Capital Asset Pricing Model
in Predicting Securities Returns at The Nairobi Securities Exchange (Listed Agricultural Compa-
nies)”. In: American Based Research Journal 6.9, pp. 13–26.
Ngoc, Nguyen Minh and Tien (2023). “Factors affecting the selling price of luxury apartments in
Vietnam. A quantitative analysis”. In: International journal of business and globalisation 20.3,
pp. 5–45.
Riro, George Kamau and Johnson Munene Wambugu (2017). “A test of asset-pricing models at the
Nairobi Securities Exchange”. In: pp. 67–77.
Ross, Stephen (1976). “The arbitrage pricing theory”. In: Journal of Economic Theory 13.3, pp. 341–
360.
Wanjiku, Patricia et al. (2021). “Effect of Economic Reopening Announcement on Nairobi Security
Exchange Market Performance”. PhD thesis. University of Nairobi.

36
Appendix

A.1 R Program Codes


# import libraries
library(tidyverse)
library(lubridate)
library(moments)
library(stats)
library(fBasics)
library(magrittr)
library(dplyr)
library(quantmod)
library(readxl)
library(plyr)
library(ggplot2); library(dygraphs); options(scipen = 999); library("dplyr")
library(xts)
library(writexl)
par(mfrow = c(2,2))
KNRE <- read_csv("D:/@kimeu.felix files/KNRE.csv")
knre <- data.frame(KNRE[,c("Date","Close")])
name <- c("Date", "KNRE")
names(knre) <- name
knre$Date = mdy(knre$Date)
str(knre)
Equity <- read_excel("D:/@kimeu.felix files/ATP DATA/Equity hp.xlsx")
equity_prices <- data.frame(Equity[,c("Date","Close")])
name <- c("Date", "EQUITY")
names(equity_prices) <- name
equity_prices$Date = as.Date(equity_prices$Date)
KCB <- read_excel("D:/@kimeu.felix files/ATP DATA/KCB hp.xlsx")
KCB_prices <- data.frame(KCB[,c("Date","Close")])
name <- c("Date", "KCB")
37
Appendix. R Program Codes 38

names(KCB_prices) <- name


KCB_prices$Date = as.Date(KCB_prices$Date)
str(KCB_prices)
SASN <- read_excel("D:/@kimeu.felix files/ATP DATA/sasini(SASN).xlsx")
SASN_prices <- data.frame(SASN[,c("Date","Close")])
name <- c("Date","SASN")
names(SASN_prices) <- name
SASN_prices$Date = as.Date(SASN_prices$Date)
str(SASN_prices)
nmg <- read_csv("D:/@kimeu.felix files/nmg.csv")
Nmg <- data.frame(nmg[,c("Date","Close")])
name <- c("Date", "NMG")
names(Nmg) <- name
Nmg$Date = mdy(Nmg$Date)
scom <- read_csv("D:/@kimeu.felix files/scom.csv")
Scom <- data.frame(scom[,c("Date","Close")])
name <- c("Date", "SCOM")
names(Scom) <- name
Scom$Date = mdy(Scom$Date)
KEGN <- read_csv("D:/@kimeu.felix files/KEGN.csv")
Kegn <- data.frame(KEGN[,c("Date","Close")])
name <- c("Date", "KEGN")
names(Kegn) <- name
Kegn$Date = mdy(Kegn$Date)
str(Kegn)
EABL <- read_excel("D:/@kimeu.felix files/ATP DATA/EABL hp.xlsx")
eabl_prices <- data.frame(EABL[,c("Date","Close")])
name <- c("Date", "EABL")
names(eabl_prices) <- name
eabl_prices$Date = as.Date(eabl_prices$Date)
str(eabl_prices)
Inflation_Rates <- read_excel("D:/@kimeu.felix files/ATP DATA
Appendix. R Program Codes 39

/Inflation Rates.xlsx")
INFR <- data.frame(Inflation_Rates)
for(i in 1:nrow(INFR)){
if(nchar(INFR$Month[i])==1){
INFR$Date[i] <- paste(INFR$Year[i],INFR$Month[i],sep="-0")
}else{
INFR$Date[i] <- paste(INFR$Year[i],INFR$Month[i],sep="-")
}
}
INFR1 <- INFR[,c(5,3)]
INFR1$Date <- ym(INFR1$Date) # Assuming it’s in YYYY-MM-DD format
INFR1$Date <- format(floor_date(INFR1$Date, "month") +
months(1) - days(1), "%Y/%m/%d")
INFR2 <- INFR1 %>% arrange(desc(ymd(INFR1$Date)))
name <- c("Date", "INF_Rate")
names(INFR2) <- name
INFR2$INF_Rate <- as.numeric(INFR2$INF_Rate)
infr2 <- data.frame(INFR2$Date[-1], diff(INFR2$INF_Rate))
infr2$INFR2.Date..1. <- as.Date(infr2$INFR2.Date)
name <- c("Date", "INF_Rate")
names(infr2) = name
str(infr2)
head(infr2)
US_DOLLAR <- read_excel("D:/@kimeu.felix files/
ATP DATA/US exchannge rates.xlsx")
US_DOLLAR_prices <- data.frame(US_DOLLAR[,c("Date","Mean")])
name <- c("Date", "US_DOLLAR")
names(US_DOLLAR_prices) <- name
US_DOLLAR_prices <- US_DOLLAR_prices[-1,]
US_DOLLAR_prices$Date <- format(as.Date(US_DOLLAR_prices$Date,
format = "%d/%m/%Y"), "%Y-%m-%d")
USDX <- US_DOLLAR_prices %>% arrange(desc(ymd(US_DOLLAR_prices$Date)))
Appendix. R Program Codes 40

USDX$Date <- as.Date(USDX$Date)


str(USDX)
cbk_rates <- read_csv("C:/Users/USER/Downloads/Central Bank Rates.csv")
CBKR <- cbk_rates
# Check if ’MONTH’ and ’YEAR’ columns exist
if ("MONTH" %in% names(CBKR) && "YEAR" %in% names(CBKR)) {
# Create a new ’Date’ column
CBKR$Date <- NA_character_
# Loop to create the ’Date’ column
for (i in 1:nrow(CBKR)) {
# Check for missing values in ’MONTH’
if (!is.na(CBKR$MONTH[i])) {
if (nchar(as.character(CBKR$MONTH[i])) == 1) {
CBKR$Date[i] <- paste(CBKR$YEAR[i], CBKR$MONTH[i], sep="-0")
} else {
CBKR$Date[i] <- paste(CBKR$YEAR[i], CBKR$MONTH[i], sep="-")
}
}
}
} else {
print("The ’MONTH’ or ’YEAR’ columns
are not present in the ’CBKR’ data frame.")
}
CBKR1 <- CBKR[,c(11,5,6,9,10)]
CBKR1$Date <- ym(CBKR1$Date) # Assuming it’s in YYYY-MM-DD format
CBKR1$Date <- format(floor_date(CBKR1$Date, "month") +
months(1) - days(1), "%Y/%m/%d")
CBKR2 <- CBKR1 %>% arrange(desc(ymd(CBKR1$Date)))
name <- c("Date","IBR","TB","CRRR","CBR")
names(CBKR2) = name
CBKR2$Date <- as.Date(CBKR2$Date)
str(CBKR2)
Appendix. R Program Codes 41

head(CBKR2)
#jointing all the stocks
nse_stocks <- join_all(list(KCB_prices,
eabl_prices,equity_prices,
SASN_prices,Kegn,Scom,Nmg,knre,
USDX,infr2,CBKR2), by = "Date", type = "left")
DATA <- to.monthly(nse_stocks, OHLC=FALSE, indexAt="lastof")
head(DATA)
# Write the data frame to an Excel file
write_xlsx(DATA, "C:/dataset/Data1.xlsx")
#calculating the log returns;
logreturn <- data.frame(
kcb = log(1 + DATA$KCB/100),
equity = log(1 + DATA$EQUITY/100),
eabl = log(1 + DATA$EABL/100),
sasn = log(1 + DATA$SASN/100),
kegn = log(1 + DATA$KEGN/100),
scom = log(1 + DATA$SCOM/100),
NMg = log(1 + DATA$NMG/100),
Knre = log(1 + DATA$KNRE/100),
us_dollar = log(1 + DATA$US_DOLLAR/100),
infer = (DATA$INF_Rate/100),
ibr = (DATA$IBR/100),
tb = (DATA$TB/100),
crrr = (DATA$CRRR/100),
cbr <- (DATA$CBR/100)
)
#fitting the model and plotting the qqplot and scatter plots
kcb_apt <- (lm(logreturn$kcb ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr))
summary(kcb_apt)
residual3 <- residuals(kcb_apt)
Appendix. R Program Codes 42

qqnorm(residual3, main = "KCB Q-Q PLOT");qqline(residual3)


plot(residual3, ylab = "KCB residuals", main = "KCB RESIDUALS")
dwtest(kcb_apt)
equity_apt <- (lm(logreturn$equity ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr))
summary(equity_apt)
residual5 <- residuals(equity_apt)
qqnorm(residual5, main = "EQTY Q-Q PLOT");qqline(residual5)
plot(residual5, ylab = "EQTY Residuals", main = "EQTY RESIDUALS PLOT")
dwtest(equity_apt)
eabl_apt <- (lm(logreturn$eabl ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr))
summary(eabl_apt)
residual4 <- residuals(eabl_apt)
qqnorm(residual4, main = "EABL Q-Q PLOT");qqline(residual4)
plot(residual4, ylab = "EABL Residuals", main = "EABL RESIDUALS PLOT")
dwtest(eabl_apt)
sasn_apt <- (lm(logreturn$sasn ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr))
summary(sasn_apt)
residual6 <- residuals(sasn_apt)
qqnorm(residual6, main = "SASN Q-Q PLOT");qqline(residual6)
plot(residual6, ylab = "SASN Residuals", main = "SASN RESIDUALS")
dwtest(sasn_apt)
kegn_apt <- lm(logreturn$kegn ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr)
summary(kegn_apt)
residual8 <- residuals(kegn_apt)
qqnorm(residual8, main = "KEGN Q-Q PLOT");qqline(residual8)
plot(residual8, ylab = "RESIDUALS", main = "KEGN PLOT")
dwtest(kegn_apt)
nmg_apt <- lm(logreturn$NMg ~ logreturn$infer+logreturn$us_dollar+
Appendix. R Program Codes 43

logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr)
summary(nmg_apt)
residual11 <- residuals(nmg_apt)
qqnorm(residual11, main = "NMG Q-Q PLOT");qqline(residual11)
plot(residual11, ylab = "NMG RESIDUALS", main = "NMG RESIDUALS PLOT")
dwtest(nmg_apt)
knre_apt <- lm(logreturn$Knre ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr)
summary(knre_apt)
residual13 <- residuals(knre_apt)
qqnorm(residual13, main = "KNRE Q-Q PLOT");qqline(residual13)
plot(residual13, ylab = "KNRE RESIDUALS", main = "KNRE RESIDUALS PLOT")
dwtest(knre_apt)
scom_apt <- (lm(logreturn$scom ~ logreturn$infer+logreturn$us_dollar+
logreturn$ibr+logreturn$tb+logreturn$crrr+logreturn$cbr))
summary(scom_apt)
residual14 <- residuals(scom_apt)
qqnorm(residual14, main = "SCOM Q-Q PLOT");qqline(residual14)
plot(residual14, ylab = "SCOM RESIDUALS", main = "SCOM Q-Q PLOT")
dwtest(scom_apt)
#compute summary statistics of log returns;
log_RETRN_stats <- data.frame(
mean = sapply(logreturn, mean),
std_dev = sapply(logreturn, sd),
Skewness = sapply(logreturn, skewness),
ExcessKurtosis = sapply(logreturn, kurtosis),
minimum = sapply(logreturn, min),
maximum = sapply(logreturn, max)
);print(log_RETRN_stats)
#kcb
# Perform F-test for the overall model
anova_result <- anova(kcb_apt)
Appendix. R Program Codes 44

print("\nF-test result:")
print(anova_result)
#eqty
# Perform F-test for the overall model
anova_result <- anova(equity_apt)
print("\nF-test result:")
print(anova_result)
#eabl
# Perform F-test for the overall model
anova_result <- anova(eabl_apt)
print("\nF-test result:")
print(anova_result)
#sasn
# Perform F-test for the overall model
anova_result <- anova(sasn_apt)
print("\nF-test result:")
print(anova_result)
#nmg
# Perform F-test for the overall model
anova_result <- anova(nmg_apt)
print("\nF-test result:")
print(anova_result)
#KNRE
anova_result <- anova(knre_apt)
print("\nF-test result:")
print(anova_result)
#Making Predictions of the stock returns.
factors_data <- data.frame(f1 = logreturn$us_dollar,
f2 = logreturn$infer, f3 = logreturn$ibr,
f4 = logreturn$tb, f5 = logreturn$crrr, f6 = logreturn$cbr)
predicted_returns <- data.frame(
KCB_pred = predict(kcb_apt, newdata = factors_data),
Appendix. R Program Codes 45

EABL_pred = predict(eabl_apt, newdata = factors_data),


EQTY_pred = predict(equity_apt, newdata = factors_data),
SASN_pred = predict(sasn_apt, newdata = factors_data),
KEGN_pred = predict(kegn_apt, newdata = factors_data),
SCOM_pred = predict(scom_apt, newdata = factors_data),
NMG_pred = predict(nmg_apt, newdata = factors_data),
KNRE_pred = predict(knre_apt, newdata = factors_data))
(predicted_returns)
# Calculate Root Mean Squared Error (RMSE) function
rmse <- function(actual, predicted) {
sqrt(mean((actual - predicted)^2, na.rm = TRUE))
}
# Create a dataframe for RMSE values
rmse_df <- data.frame(
Stock = c("KCB", "EABL", "EQTY", "SASN", "KEGN", "SCOM", "NMG", "KNRE"),
RMSE = c(rmse_KCB, rmse_EABL, rmse_EQTY, rmse_SASN,
rmse_KEGN, rmse_SCOM, rmse_NMG, rmse_KNRE)
)
# Print the dataframe
print(rmse_df)
# Calculate Mean Absolute Error (MAE) function
mae <- function(actual, predicted) {
mean(abs(actual - predicted), na.rm = TRUE)
}
# Create a dataframe for MAE values
mae_df <- data.frame(
Stock = c("KCB", "EABL", "EQTY", "SASN", "KEGN", "SCOM", "NMG", "KNRE"),
MAE = c(mae_KCB, mae_EABL, mae_EQTY, mae_SASN,
mae_KEGN, mae_SCOM, mae_NMG, mae_KNRE)
)
# Print the dataframe
print(mae_df)

You might also like