Está en la página 1de 36

Portfolio Management and

Support System
Report of Multi-Disciplinary Project

Submitted to
Dr. Wasim A. Khan

Group Members
Abdul Arsalan Siddiqui
Danish Iqbal Allahwala
M. Salman Shahab
Syed Mohsin Mazher
Syed Umair Saleem
PREFACE
This report has been prepared for Dr. Wasim A. Khan as fulfillment of a partial
requirement for our ‘MIS Project’. The objective of preparing this report is to give an
insight of the different aspects of our project which we would be trying to cover and
methodology we would be applying to prepare our project.

For our project we would be following the ‘Portfolio Management Theory’ based on
an article written by Harry Markowiz titled ‘Portfolio selection’, which describes how
to combine assets into efficiently diversified portfolios.

A portfolio is a collection of investments that an investor has made in different


propositions. For this purpose a detail study of risk and return of a portfolio is
necessary. This report has been prepared to provide a basic understanding of the
process of formation of a portfolio with an overall objective of maximizing returns
and minimizing risks.

In this report we would be looking at the different variables involved in the


preparation of a portfolio consideration of which would allow us to analyze the effects
of each variable on the individual stocks in the portfolio. The concept of
diversification would be applied here that is how much to invest where keeping in
mind the expected return and the individual risks involved so be able to maximize the
return and minimize the risk of the portfolio.

As a requirement of our project we would be to take into consideration the rate of


return of individual stocks and the risk associated with them, also important is the
understanding and application of the variance and correlation of each stock. Making
use of the information gained through these variables we would be able to optimize a
portfolio which would eventually lead to an efficient portfolio. Other factors that
would be having a bearing over the preparation of an optimized portfolio would be the
risk taking propensity of individual investors and the individual security weight in the
investment portfolio. With proper analyses and application of all these factors and
variables we should be able to achieve optimized portfolio.

The use and application of the variables and the methodology described in this report
are not to be taken as the best option to optimize a portfolio. The theories discussed
are not perfect and complete – no theory is. The content of this report only directs us
towards one of the applicable options of optimizing a portfolio. Therefore we have
started from a basic level so as to be able to cover as many options as possible and
avoid unnecessary complications in our project. However, an elementary knowledge
of how the markets works and familiarity with the terms used in the report would be
helpful in understanding the project.

2i
ACKNOWLEDGMENTS
The contribution of several individuals towards the preparation of the project and
compilation of this report is highly appreciated.

First of all we would like to thank Dr. Wasim A. Khan our project instructor for
providing us with an opportunity to work on this project, and for his help and
guidance at every stage of this report. The teachings of Mr. Ahmed Raza our course
instructor for ‘Quantitative methods in Business research’ have been very helpful in
understanding and stating the subject matter of this report and in the interpretation and
formulation of optimization problem.

We would also like to thank Mr. Syed Akbar Ali – Head Research Analyst at MCB
Asset Management and Mr. Imran Khan – Head of Research at First capital
Investments for their valuable time and sharing their expert opinion and the
knowledge of the market with us. Their contributions are highly appreciated.

3ii
TABLE OF CONTENT
EXECUTIVE SUMMARY ........................................................................................... 7
PROBLEM DEFINITION ............................................................................................ 8
PROPOSED SOULUTION........................................................................................... 9
2.1 MODULE I: INVESTMENT SUPPORT SYSTEM (ISS) ................................. 9
2.2 MODULE II: INVESTMENT DECISION SUPPORT SYSTEM (IDSS) ......... 9
2.3 MODULE III: - RETURN AND INVESTMENT MONITORING (RIM) ...... 10
KARACHI STOCK EXCHANGE ............................................................................. 11
3.1 INTRODUCTION OF KSE-100 INDEX ......................................................... 11
3.1.1 Calculation Methodology ........................................................................... 11
3.1.2 Calculating the KSE-100 ............................................................................ 11
3.1.3 Calculating the KSE-100 Index.................................................................. 12
3.2 INTRODUCTION OF KSE-30 INDEX ........................................................... 12
3.2.1 Free-Float Methodology............................................................................. 13
3.2.2 Base Period................................................................................................. 13
3.3 KSE 30 INDEX LISTED COMPANIES .......................................................... 14
PORTFOLIO DEVELOPMENT AND MANAGEMENT ......................................... 15
4.1 PORTFOLIO THEORY.................................................................................... 15
4.2 BASIC COMPUTATION REGARDING PORTFOLIO MODEL .................. 15
4.2.1 Return Calculation...................................................................................... 15
4.2.2 Covariance and Calculation of Portfolio Variance .................................... 16
4.2.3 Correlation Matrix ...................................................................................... 17
4.3 BASIS TO DEVELOP A WELL DIVERSIFIED PORTFOLIO ..................... 17
4.3.1 Correlation Coefficient ............................................................................... 17
4.3.2 Dissimilar Price Movements ...................................................................... 17
4.3.3 Diversification ............................................................................................ 17
4.3.4 Effective Diversification ............................................................................ 18
4.3.5 Efficient Frontier ........................................................................................ 18
4.3.6 Efficient Portfolio....................................................................................... 18
4.3.7 Expected Return ......................................................................................... 18
4.3.8 Risk............................................................................................................. 19
4.3.9 Risk Tolerance............................................................................................ 19
4.3.10 Standard Deviation ................................................................................... 19
4.3.11 Variance Reduction .................................................................................. 19
4.4 OUTCOME OF A WELL DIVERSIFIED PORTFOLIO ................................ 20
4.4.1 Asset Allocation ......................................................................................... 20

4iii
4.4.2 Investment Policy Statement ...................................................................... 20
4.4.3 Optimal Portfolio........................................................................................ 20
4.4.4 Passive Management .................................................................................. 20
2.4.5 Re-Optimization ......................................................................................... 21
SYSTEM DESIGN ..................................................................................................... 22
5.1 USE CASE DIAGRAM .................................................................................... 22
5.2 DATA FLOW DIAGRAM ............................................................................... 23
5.2.2 Level 0 DFD ............................................................................................... 23
5.2.3 Detailed DFD ............................................................................................. 24
5.2.3.1 Detailed DFD of ISS ........................................................................... 24
5.2.3.2 Detailed DFD of Portfolio Calculation ............................................... 25
5.2.3.3 Detailed DFD of Buy/Sell Call Generation......................................... 25
5.3 UML ACTIVITY DIAGRAM .......................................................................... 26
5.3.1 Activity Diagram ISS ................................................................................. 26
5.3.2 Activity Diagram IDSS .............................................................................. 27
5.4 ENTITY RELATIONSHIP DIAGRAM ........................................................... 28
5.4.1 ERD Description ........................................................................................ 28
5.4.1.1 Stock .................................................................................................... 28
5.4.1.2 Sector................................................................................................... 29
5.4.1.3 Price..................................................................................................... 30
5.4.1.4 Beta_n_Return ..................................................................................... 30
5.4.1.5 Portfolio............................................................................................... 31
5.4.1.6 PLP ...................................................................................................... 31
5.4.1.7 Bought_ Stocks ................................................................................... 32
5.4.1.8 Sell_Call .............................................................................................. 32
5.4.1.9 Buy_Call.............................................................................................. 33
5.5 LAYOUT OF FRONTEND .............................................................................. 34
THE PORTFOLIO SELECTION PROBLEM ........................................................... 35
6.1 PROBLEM FORMULATIONS ........................................................................ 35
6.1.1 Minimize Variance Subject To Given Return ............................................ 35
6.1.2 Maximize Return Subject To Given Variance ........................................... 35
6.2 COMBINING THE MODELS.......................................................................... 35
6.2.1 Balancing Risk and Return......................................................................... 35

5iv
TABLE OF FIGURES

Figure 5.1: Use Case Diagram of the System ............................................................. 22


Figure 5.2: Context Level DFD of the System............................................................ 23
Figure 5.3: Level 0 DFD of the System ...................................................................... 24
Figure 5.4: Detailed DFD of ISS ................................................................................. 24
Figure 5.5: Detailed DFD of Portfolio Calculation ..................................................... 25
Figure 5.6: Detailed DFD of Buy/Sell Call Generation .............................................. 25
Figure 5.7: Activity Diagram ISS ............................................................................... 26
Figure 5.8: Activity Diagram IDSS............................................................................. 27
Figure 5.9: Entity Relationship Diagram .................................................................... 28
Figure 5.10: Layout of Frontend ................................................................................. 34

v6
EXECUTIVE SUMMARY
The objective of this project is to develop an application software, that uses the
historic price data of 30 companies listed on KSE, in order to develop an Optimal
Portfolio of stocks based Mean Variance Optimization Model that maximizes the
return to an investor while satisfying his/her risk taking propensity.

The project is concerned about developing an application that facilitates the investor
in the selection of optimal combination of assets on their investment portfolio so that
they can maximize return on their investments with a given level of risk assumed. The
basis of the software is the Mean Variance Optimization Method.

The project is executed in two phases; first phase includes the complete understanding
of the problem and proposing different solutions. Then different solutions are
analyzed in order to get the best possible solution. Once a solution is selected a
complete system design is developed including the hardware and software design.

First phase of the project includes:

• Understanding portfolio management and development technique


• KSE indices basic understanding and calculation methodology
• Understanding the optimization model
• Modules and their description of proposed system (PMSS)
• Collection of price data of 30 stocks for last five years
• Preparation of database design
• Data entry in the designed database (backend on Microsoft Access)

Second phase of the project is the implementation of the designed database,


development of a frontend application, connecting the frontend to the database and
the coding of the model. Testing of the entire system will commence on the
completion of the implementation process.

Second phase of the project will include:

• Calculation of basic inputs to the portfolio calculation model i.e. β, and


covariance
• Designing of frontend
• Coding of optimization model
• Interface development for integration of backend and frontend
• Testing

7
PROBLEM DEFINITION
“To develop an application software, that uses the historic price data of 30 companies
listed on KSE, in order to develop an Optimal Portfolio of stocks based Mean
Variance Optimization Model that maximizes the return to an investor while
satisfying his/her risk taking propensity”

The project is concerned about developing an application that facilitates the investor
in the selection of optimal combination of assets on their investment portfolio so that
they can maximize return on their investments with a given level of risk assumed. The
basis of the software is the Mean variance optimization method.

Portfolio theory assumes that for a given level of risk, investors prefer higher returns
to lower returns. Similarly, for a given level of expected return, investors prefer less
risk to more risk. It is standard to measure risk in terms of the variance, or standard
deviation, of return. We measure return as the average annual rate. Therefore, we
want to develop an efficient portfolio, that is, one in which there is no other portfolio
that offers a greater return with the same or less risk, or less risk with the same or
greater expected return.

As many of us can imagine, all of the stocks traded in the stock market do not move
together. In general the market has been moving up, but at the same time there are
stocks that are losing value. There are some stocks that tend to move together, some
that move in opposite directions, and others that seem to have no relation to one
another. This tendency to move together or opposite can be measured by covariance
(or if scaled, correlation). By using the covariance, we can measure the variability or
risk in our portfolio. To reduce the volatility of the entire portfolio, it makes sense to
include some stocks that move in opposite directions1.

1
http://www-new.mcs.anl.gov/otc/Guide/CaseStudies/port/introduction.html

8
PROPOSED SOULUTION
The software we are going to develop under this project will be comprise of three
modules and will work as described below.

2.1 MODULE I: INVESTMENT SUPPORT SYSTEM (ISS)

The module start working with the calculation of beta of individual stock, then it takes
input from the user regarding sectors of interest in which he intends to invest.

After getting the input from the user, system will automatically retrieve data like
target price, beta, current market price and data regarding return potential.

Then the system will match return potential with the return cushion (As per business
rule) to identify the sectors which has require return potential.

After selecting companies with the required return potential the system will calculate
the beta of portfolio (proposed) with different combination of stock and calculate the
return of those portfolios with beta close to 1.

For the no. of proposed portfolio the system will also perform some additional
calculations to select the best portfolio for investment. These checks include:

• Market capitalization
• Free float of individual stock in the portfolio
• Value traded
• Impact cost

Exceptions and Options

• User can also rate the companies in sector according to preference


• User can also restrict system to not include certain companies in the analysis.
• Re-optimization

2.2 MODULE II: INVESTMENT DECISION SUPPORT SYSTEM (IDSS)

• The system will help the investor/manager to monitor the stock prices in order
to make decision regarding selling and buying of the stock. The system will
generate a sell call/ buy call after analyzing certain sets of a data daily with a
frequency of 3 to 5 runs per business day.
• System calculates the difference between the weight of the bought stocks and
weight of the stock in the optimal portfolio and with the weightage of the
stock defined by the user to generate a sell call.
• If the difference between the target price and the current market price of the
stock is reduced to a certain level given by user system will generate a sell call
to offload the investment.
• System will also generate a buy call if the user includes a certain stocks in
prospective list of purchasing (PLP). The buy call only triggers when the
return potential is greater than or equal to return cushion and the stock name is
entirely in the PLP.

9
• System will also generate sell call for the whole portfolio with preference
given to those stocks which close to their target price if the index hits below a
certain level to minimize losses.

2.3 MODULE III: - RETURN AND INVESTMENT MONITORING (RIM)

This module of the software will build record of the stocks that have been purchased
by the investor and also calculate the return of individual stock and portfolio on every
sale proceeds. This system will also calculate the return generated from the Fixed
Income Investment (Idle Cash).

Prospective List of Purchasing

This list includes the name of the stocks recommended by Module I to be invested in
and also the priority rating .It also provides details about the investment that one can
make in particular stocks.

Stock on Portfolio: (SoP)

The system will have an updated list of SoP when the purchase is made or any sale of
stocks is done. This list will provide the investor a quick report of the investment and
the weights of investment in the individual sector.

Sell Call and Buy Call

Sell call and buy call generated by the system is update to the list called TBS i.e. to be
sol if the sell call is generated and to the list called TBP i.e. to be purchased if the buy
call is generated. These lists will provide quick information to the user
(investor/broker) in order to select the stocks for buying and selling.

10
KARACHI STOCK EXCHANGE
This is the market place where financial investment (normally of long term nature)
can be acquired or disposed off. The stock exchange (also referred to as stock market)
is where shares and bonds issued by business entities (companies) are traded. There is
sub category called the money market which is normally the market for acquiring and
disposing of financial investments. Financial investments are normally represented by
certificates generally referred to as security.

3.1 INTRODUCTION OF KSE-100 INDEX

The KSE-100 index comprises of 100 companies selected on the basis of sector
representation and the highest market capitalization. The KSE-100 index was
introduced in November 1999 with the base value of 1000 points. These 100 listed
companies capture around 80% of the total market share. One company from each
sector is selected on the basis of largest market capitalization and the remaining 66
companies are selected on the basis of largest market capitalization in descending
order. The primary objective of the KSE100 index is to have a benchmark by which
the stock price performance can be compared to over a period of time. In particular,
the KSE 100 is designed to provide investors with a sense of how the Pakistan equity
market is performing

3.1.1 Calculation Methodology

In a very layman term, the KSE-100 index is a basket of price and the number of
shares outstanding. Thus, the value of basket is regularly compared to a starting point
or a base period. To make the computation simple, the total market value of base
period has been adjusted to 1000 points. For making other to understand this
computation we take an example.

Taking stock A’s share price of Rs. 20 and multiplying it by its total common shares
outstanding of 50 million in the base period provides a market value of one billion
Rupees. This calculation is repeated for stocks B and C with the resulting market
values of three and six billion Rupees, Respectively. The three market values are
added up, or aggregated, and set equal to 1000 to form the base period value. All
future market values will be compared to base period market value in indexed form.

3.1.2 Calculating the KSE-100

Step 1
Table 1.1: The Base Period Day 1

Stock Share Price Number of Shares Market Value


(in Pak Rs.) (in Rs.)
A. 20.00 50,000,000 1,000,000,000.00
B. 30.00 100,000,000 3,000,000,000.00
C. 40.00 150,000,000 6,000,000,000.00
Total Market Capitalization = 10,000,000,000.00

Note: Base Period Value/Base Divisor = Rs. 10,000,000,000.00 = 1000.00

11
3.1.3 Calculating the KSE-100 Index

Step 2
Table 1.2: Index Value as on Day 2

Stock Share Price Number of Shares Market Value


(in Rs.) (in Rs.)
A. 22.00 50,000,000 1,100,000,000.00
B. 33.00 100,000,000 3,300,000,000.00
C. 44.00 150,000,000 6,600,000,000.00
Total Market Capitalization 11,000,000,000.00

11,000,000,000.00
Index = ————————————— = 1.10 * 1000 = 1100
10,000,000,000.00

Thus, the formula for calculating the KSE-100 Index is:

Sum of Shares Outstanding x Current Price


——————————————————— x 1000
Base Period Value

Or

Market Capitalization
————————————— x 1000
Base Divisor

The KSE100 Index calculation at any time involves the same multiplication of share
price and shares outstanding for each of the KSE100 Index component stocks. The
aggregate market value is divided by the base value and multiplied by 1000 to arrive
at the current index number.

3.2 INTRODUCTION OF KSE-30 INDEX

The primary objective of the KSE-30 Index is to have a benchmark by which the
stock price performance can be compared to over a period of time. In particular, the
KSE-30 Index is designed to provide investors with a sense of how large company’s
scrips of the Pakistan’s equity market are performing. Globally, the Free-float
Methodology of index construction is considered to be an industry best practice and
all major index providers like MSCI, FTSE, S&P, STOXX and SENSEX have
adopted the same.

KSE-30 Index is calculated using the “Free-Float Market Capitalization”


methodology. In accordance with methodology, the level of index at any point of time
reflects the free-float market value of 30 companies in relation to the base period. The
free-float methodology refers to an index construction methodology that takes into

12
account only the market capitalization of free-float shares of a company for the
purpose of index calculation.

3.2.1 Free-Float Methodology

Free-Float means proportion of total shares issued by a company that are readily
available for trading at the Stock Exchange. It generally excludes the shares held by
controlling directors/sponsors/promoters, government and other locked-in shares not
available for trading in the normal course.

Free-Float calculation can be used to construct stock indices for better market
representation than those constructed on the basis of total market capitalization of
companies. It gives weight for constituent companies as per their actual liquidity in
the market and is not unduly influenced by tightly held large-cap companies. Free-
Float can be used by the Exchange for regulatory purposes such as risk management
and market surveillance.

Free-Float Calculation Methodology:

Total Outstanding Shares XXX


Less: Shares held by Directors/sponsors XXX
Government Holdings as promoter/acquirer/controller XXX
Shares held by Associated Companies (Cross holdings) XXX
Shares held with general public in Physical Form XXX

Free-float XXX

3.2.2 Base Period

The base period of KSE-30 Index is June 2005 and the base value is 10,000 index
points. This is indicated by the notation 2005 = 10,000. The calculation of KSE-30
Index involves dividing the free-float market capitalization of 30 companies in the
Index by a number called the Index Divisor. The Divisor is the only link to the
original base period value of the KSE-30 Index. It will keep the Index comparable
over a period of time and will also be the adjustment point for all future corporate
actions, replacement of scrips etc.

13
3.3 KSE 30 INDEX LISTED COMPANIES

Table 1.3: KSE 30 Index Listed Companies

Index Outstanding Market


S. No. Symbol Shares Capt.
Weights (%)
(million) (million)

1 Pak PetroleumXB 12.85 189.03 36605.11


2 Oil and Gas Dev.XD 12.29 370.83 35017.85
3 Fauji Fertiliz 10.52 299.63 29962.66
4 Pak Oilfields 8.41 98.45 23972.54
5 P.S.O. SPOT 7.76 78.99 22115.88
6 Engro Chemical 7.44 117.47 21196.32
7 P.T.C.L.A 7.07 639.06 20130.3
8 Hub PowerXD 6.25 830.34 17819.17
9 Fauji Fert Bin Qasim 2.89 360.93 8221.92
10 UniLever XD 2.86 3.49 8157.67
11 D.G.K.Cement 2.32 167.94 6596.66
12 National Refin.SPOT 1.87 27.11 5314.04
13 Sui South Gas 1.77 222.28 5045.87
14 Shell Pakistan 1.54 14.18 4399.85
15 ICI PakistanXD 1.49 33.47 4250.12
16 Nishat Mills 1.45 88.2 4119.75
17 Attock Refinery 1.36 27.46 3869.59
18 Sui North Gas 1.34 121.24 3808.09
19 Indus MotorXD 1.31 26 3726.28
20 Pioneer Cement 1.08 121.15 3077.25
21 Fauji Cement 1.05 432.95 2987.35
22 Attock Petroleum 1 10.6 2840.16
23 Pak Suzuki 0.7 23.73 1988.4
24 Abbott (Lab) 0.62 15.96 1755.89
25 Bosicor Pakistan 0.59 194.79 1694.68
26 BOC (Pak) 0.57 9.22 1631.89
27 Maple Leaf Cem. 0.54 205.48 1528.79
28 Thal Limited 0.45 10.08 1279.73
29 Pak RefineryXD 0.39 10.74 1112.14
30 Kohat Cement 0.24 32.31 687.45

14
PORTFOLIO DEVELOPMENT AND MANAGEMENT
4.1 PORTFOLIO THEORY

“If two portfolios have the same expected return, the one with the lower volatility will
have the greater compound rate of return.” Both risk is reduced and compound rates
of return are enhanced simultaneously2. Modern portfolio theory enables an investor
to classify, estimate, and control both the kind and amount of expected risk and return
as measured statistically. It is also called “Modern Portfolio Theory” or “Portfolio
Management Theory”. Holding securities that tend to move in concert with each
other does not lower one’s risk. In other words, the average risk of a portfolio is not
the average of the individual component investments of the portfolio if all of their
prices move in tandem or in concert with each other. Therefore, what may be
perceived to be a low risk portfolio could actually be a high-risk portfolio and vice
versa. Diversification reduces risk only when assets are combined whose prices move
inversely or at different times in relation to each other.3

4.2 BASIC COMPUTATION REGARDING PORTFOLIO MODEL

4.2.1 Return Calculation

In our application various return are to be calculated that will serve as the input to the
application in order to calculate the return on the portfolio.

1. Total Return (annual rate of return of individual stock)

Total Return represents one of the easiest estimations, which also includes
dividends as part of our considerations. The formula for calculating total
return is:

Total Return = [(End-of-the-Year Investment Value - Beginning-of-the-Year


Investment Value) + Dividends] / Beginning-of-the-Year Investment Value

Example: An investor purchased a stock for Rs. 6000. At the end of the year
the stock is worth Rs. 7500. Therefore, he has an unrealized gain of Rs. 1,500.
He was paid dividends of Rs. 260. So, total return is calculated as follows:

Total Return = [(7,500 - 6,000) +260] / 6,000 = 0.293

Therefore, the stock of John has a total return of 29.30%.

2. Simple Return

Simple return calculations are executed after you have sold the investment.
The formula you use to calculate it is:

Simple Return = (Net Proceeds + Dividends) / Cost Basis – 1

2
“Portfolio Selection,” H. Markowitz, Journal of Finance, March, 1952, pp. 77-91
3
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990

15
The Total Return of individual stocks will help in calculating the return of
optimal portfolio and also in the selection of the optimal portfolio as it serve as
an input to the portfolio optimizer model.

Simple return is used in the calculation of return on the individual stocks held
for specific period in the firm’s investment portfolio.

3. Expected Return of portfolio

Portfolio return is just the weighted average of the returns of the individual
securities in the portfolio.

Rp= WA * rA+ WB * rB

In our application weight of individual securities are decided by the portfolio


optimizer which in turn returns the overall portfolio return based on the above
calculation.

4.2.2 Covariance and Calculation of Portfolio Variance

The calculation of the portfolio expected return is a fairly straightforward. But the
calculation of the standard deviation and variance of the portfolio is more
complicated, because portfolio variability (standard deviation) is not the weighted-
average of the variability of the individual assets. Diversification reduces the
variability of the portfolio, because the prices of different assets vary differently. The
decrease in price of one asset is compensated by the price growth for another.

For calculation of the variance σ² and the standard deviation σ of the portfolio return,
we first calculate the covariance between assets A and B. Covariance is the measure
of how much returns of two assets vary together. This is distinct from variance, which
measures how much a single asset varies.

The formula for the covariance is4:

σ AB = E(RA - rA)(RB - rB)

It follows from the formula above, that the covariance of an asset with itself σ11 is its
variance σ1².

The coefficient of correlation is a dimensionless measure and can be expressed as the


standardized covariance. The correlation coefficient varies between -1 and +1.
The correlation coefficient formula is5:

ρAB = σ AB /σAσB

The correlation coefficient ρ12 and the covariance σ12 are positive, if the returns of
assets move in the same direction (in most cases). Correlation and covariance are

4
http://learning.mazoo.net/archives/001380.html
5
http://learning.mazoo.net/archives/001380.html

16
negative, when returns move in the opposite directions. If the returns are independent
then the correlation coefficient is 0.

General case of N assets6:

4.2.3 Correlation Matrix

A Correlation matrix describes correlation among M variables. It is a square


symmetrical MxM matrix with the (ij)th element equal to the correlation coefficient
r_ij between the (i)th and the (j)th variable. The diagonal elements (correlations of
variables with themselves) are always equal to 1.00. Correlation (often measured as a
correlation coefficient) indicates the strength and direction of a linear relationship
between two random variables.

4.3 BASIS TO DEVELOP A WELL DIVERSIFIED PORTFOLIO

4.3.1 Correlation Coefficient

Correlation coefficients quantify the probability of two or more investments moving


in the same direction at the same time. Values range from +1 to -1. A correlation
coefficient of +1 implies that the returns of the assets will move in lockstep with each
other, although not necessarily by equal increments (i.e., they can start at different
levels). A measure of -1 means they move in opposite directions to each other. By
combining asset classes having low correlation, volatility can be lowered for
portfolios while enhancing risk-adjusted rates of return.7 The use of low and/or
negative correlation provides a powerful tool in providing “effective diversification”.

4.3.2 Dissimilar Price Movements

Some investments have historically shown a pattern of moving dissimilarly, either in


time, in degree, or in direction. When such investments are combined into asset
classes they become a proven tool to effectively diversify away many risks, reduce
volatility, and simultaneously increase expected compounded rates of return.

4.3.3 Diversification

Diversification is a prudent method to manage investment risk. However, not all


diversification is effective. If all investments were to decrease in value at the same
time, that type of diversification would be ineffective.

6
http://learning.mazoo.net/archives/001380.htm
7
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990, pp.
11-18.

17
4.3.4 Effective Diversification

While all diversification is good, certain types of diversification are better. This was
the premise of Harry Markowitz’s Nobel Prize winning theory. He showed that to the
extent that securities in a portfolio do not move in concert with each other, their
individual risks can be effectively diversified away. Diversification among securities
that move together is ineffective diversification. Effective diversification reduces
portfolio price fluctuations and smoothes out returns. Generally, anything that reduces
price fluctuations increases compound returns.8

Effective diversification requires that chosen and combined assets that are measured
statistically to have dissimilar price movements.

4.3.5 Efficient Frontier

Once expected returns, standard deviation and correlation coefficients (dissimilar


price movements) have been determined, “optimal” portfolios can be created. These
portfolios lie on a graph line called the “efficient frontier,” which represents the asset
mix with the highest expected returns for each given level of risk. By plotting every
portfolio representing a given level of risk and expected return, we are able to trace a
line connecting all the efficient portfolios. This line forms the efficient frontier. In
dimensions of expected return and standard deviation, the efficient frontier is a
continuum of efficient portfolios.9 Rational and prudent investors restrict their choice
of a portfolio to those which appear on the efficient frontier and to the specific
portfolio that represents their own risk tolerance level.

4.3.6 Efficient Portfolio

A portfolio that offers the maximum level of expected return for any level of risk or
alternatively a portfolio that has the minimum level of risk for any level of expected
return.10 The combination is arrived at mathematically, taking into account the
expected rate of return and standard deviation of returns for each security as well as
the similarity or dissimilarity of price movements (and their magnitude) between
securities in the portfolio.11 Only by selecting investments that have dissimilar price
movements one can diversify away risk, reduce volatility, and increase compounded
rates of return at the same time. Harry Markowitz, called portfolios that have
dissimilar price movement diversification “efficient portfolios.” This strategy is
based on the “Modern Portfolio Theory” concept.

4.3.7 Expected Return

This is a term of specialized use. It is generally understood to mean the statistically


achievable return (based on historical data and future probability assumptions) over a
sufficiently long time horizon. Expected returns are theoretical returns; they are not

8
“Building an Investment Plan” Dimensional Fund Advisors, Inc., August, 1991, p. 6.
9
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990, pp.
19-20.
10
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990,
p.19.
11
Dictionary of Finance and Investment Terms, Third Edition, Barron’s Educational Series, 1991.

18
estimated returns and are in no way returns for the investments that comprise the
portfolio.12 The success of the strategy is highly dependent upon the assumptions
made to calculate the expected return. The expected rate of return is what the prudent
investor attempts to maximize at his selected level of risk.

4.3.8 Risk

Risk is the possibility of financial loss and/or uncertainty of future rates of return. Its
derivation comes from the fact that the future cannot be accurately forecasted. The
less certain we are that an asset’s actual return will be close to its expected return, the
more risk that asset carries. Historical variance or volatility (risk) of an investment
can be statistically measured using standard deviations. The return of an investment is
set according to its perceived risk lower the risk the lower the return. Harry
Markowitz showed that to the extent a diversified portfolio has assets that do not
move in concert with each other, risk can be diversified away while maintaining and
actually increasing return.13

4.3.9 Risk Tolerance

Each investor has his own risk tolerance. It is the trade-off between risk the investor is
willing to take to receive a specified expected rate of return in light of his financial
condition, objectives and needs. Investor risk levels range from defensive to
aggressive. Investors will tolerate slightly higher risks for higher expected rates of
return along a utility curve.

4.3.10 Standard Deviation

A key component of any investment plan is to understanding and measuring risk.


Investment risk can be measured using standard deviations to signify the volatility in
terms of past performance. Standard deviations describe how far from the mean the
performance has been, either higher or lower. The higher the standard deviation of
return, the higher the risk involved with the investment. To compute the standard
deviation for a combination of assets, we must also account for the interaction of price
movements between each asset.

4.3.11 Variance Reduction

Markowitz showed that for a given expected return, reducing a portfolio’s variance
increases the compound rate of return. For example, a $100 portfolio that is up 20% in
one period and unchanged in a second period has $120 after the two periods. If we
reduce the portfolio’s variance to zero (up 10% the first period and up 10% the second
period) we maintain our average rate of return (of 10%) but end up with $121 after
the two periods, increasing our compounded rate of return. “Modern Portfolio
Theory” is based on the following concept:
“If two portfolios have the same expected return, the one with the lower volatility will
have the greater compound rate of return.”14

12
Dictionary of Finance and Investment Terms, Third Edition, Barron’s Educational Series, 1991.
13
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990
14
”Portfolio Results Enhanced--Using Markowitz increases returns without added risk,” Joseph N.
Papp, Pension & Investments, February 18, 1991.

19
4.4 OUTCOME OF A WELL DIVERSIFIED PORTFOLIO

4.4.1 Asset Allocation

Well diversified portfolio will return the weights of the individual securities that have
to be included in to the investment portfolio in order to minimize risk and maximize
the return on investment. Allocation of investment funds among categories of assets,
such as cash equivalents, stocks and fixed-income investments is also the subject of
asset allocation that is considered by the prudent investor. Asset allocation affects
both risk and returns and is a central concept in personal financial planning and
investment management. The extent to which investments chosen for allocation move
dissimilarly, it will determine whether the allocation of assets provides effective
diversification or not.

4.4.2 Investment Policy Statement

The process that defines in statement form, the investor’s financial objectives, the
amount of funds available for investment, the investment methodology and the
strategy that will be used to reach those objectives. The strategy is customized and
matched to investors’ individual needs, objectives and chosen risk tolerance levels.

4.4.3 Optimal Portfolio

After all efficient portfolios have been identified; the particular portfolio that is most
suitable to the investor is the optimal portfolio. “Most suitable” refers to the portfolio
that best represents the balance between investor’s stated risk tolerance and the related
expected return. Normally investors will accept moderately higher levels of risk for
higher expected rates of return. Those portfolios that fit within the range of their risk
and reward criterion can be placed on a curve, called the utility curve or indifference
curve (and sometimes the risk tolerance curve). In practice, however, expected utility
curves can be somewhat indeterminate because seldom can most investors quantify
their acceptable levels of risk as it relates to expected return. The optimal asset mix is
defined as that point along the efficient frontier that is tangent to one’s desired utility
curve, or risk tolerance curve. “The optimal portfolio is that portfolio that has the
highest expected return that matches up with the risk and related return of the utility
curve for a specific investor” 15

4.4.4 Passive Management

The process of buying and holding a well-diversified portfolio is called passive


management16 because there is not a continual process of securities selection and/or
timing schemes that create constant trading activity (which drives up costs and often
reduced returns), there is considerable work involved if dissimilar price movement
diversification is used. Thousands of investments must be evaluated through computer
analysis of historical data to select those securities that will provide the most effective
diversification and highest yield for a given level of risk. Portfolios generated must
also be re-balanced periodically to bring them back in line with the efficient frontier.
15
Asset Allocation for Institutional Portfolios, Mark P. Kritzman, CFA, Business One Irwin, 1990
16
Fundamentals of Investments, Second Ed., Gordon Alexander, William Sharpe, Jeff Bailey, Prentice
Hall, 1993

20
The concept of passive management provide the basis to develop a software program
to automate the process of developing the optimal portfolio that can be easily fine
tuned with the help of the software like PMSS.

2.4.5 Re-Optimization

This is an analysis and adjustment performed at regular intervals to return the


investment portfolio to its most efficient frontier. The prices of some assets or asset
classes will fluctuate more than others. Periodically asset classes should be brought
back to the most desirable and efficient proportions (weights given to individual
securities) to maintain the highest return at the investor’s chosen risk level.

21
SYSTEM DESIGN
The steps followed to design the PMSS (Portfolio Management and Support System)
are as follows:

• Development of Use Case Diagram in which we identified the major modules


or processes and the users or actors that will be interacting with those
processes
• Creating a Data Flow Diagram to understand the flow of data through the
system
• Creating UML Activity Diagrams of individual Processes to understand the
hierarchy and flow of system
• Developing an Entity Relationship Diagram from which the database of the
system is created
• Designing frontend of the system

5.1 USE CASE DIAGRAM

A use case diagram is a type of behavioral diagram and its purpose is to present a
graphical overview of the functionality provided by a system in terms of actors (i.e.
users), their goals, and any dependencies between them. The main purpose of a use
case diagram is to show what system functions are performed for which actors.

In PMSS there are three actors that interact with the system; investor who is the actual
user of the system, KSE (Karachi Stock Exchange) that provides all the primary data
and broker who performs the physical buying and selling of shares when the system
tells him to do so. Use case diagram of PMSS is given below.

Figure 5.1: Use Case Diagram of the System

22
5.2 DATA FLOW DIAGRAM

A data flow diagram (DFD) is a graphical representation of the "flow" of data through
an information system. There are three levels of DFD’s:

• Context Level DFD


• Level 0 DFD
• Detailed DFD

5.2.1 Context Level DFD

This level shows the overall context of the system and its operating environment and
shows the whole system as just one process. The entities here are the real world
organizations, people or systems that interact with the system in any way.

A Context Level DFD of PMSS is given below:

Figure 5.2: Context Level DFD of the System

5.2.2 Level 0 DFD

This level shows all major processes, data stores, external entities and the data flows
between them. The purpose of this level is to show the major high level processes of
the system and their interrelation. A level 0 diagram must be balanced with its parent
context level diagram, i.e. there must be the same external entities and the same data
flows, these can be broken down to more detail in the level 0.

A Context Level DFD of PMSS is shown in figure 5.3:

23
Figure 5.3: Level 0 DFD of the System

5.2.3 Detailed DFD

This level is a decomposition of all the processes shown in level 0 diagram as such
there should be a level 1 diagram for each and every process shown in a level 0
diagram. Since our system has three major processes as shown in Level 0 DFD, each
of those processes will be shown in a separate detailed DFD.

5.2.3.1 Detailed DFD of ISS

Figure 5.4: Detailed DFD of ISS

24
5.2.3.2 Detailed DFD of Portfolio Calculation

Figure 5.5: Detailed DFD of Portfolio Calculation

5.2.3.3 Detailed DFD of Buy/Sell Call Generation

Figure 5.6: Detailed DFD of Buy/Sell Call Generation

25
5.3 UML ACTIVITY DIAGRAM

Activity diagram tells us the working of modules in the system. There are only two
activity diagrams of the system because the third module is just for monitoring and it
does not perform any calculation and is running on the backend of the system.

5.3.1 Activity Diagram ISS

Figure 5.7: Activity Diagram ISS

26
5.3.2 Activity Diagram IDSS

Figure 5.8: Activity Diagram IDSS

27
5.4 ENTITY RELATIONSHIP DIAGRAM

Figure 5.9: Entity Relationship Diagram

5.4.1 ERD Description

The entities in the above mentioned ER diagram are described below:

5.4.1.1 Stock

This entity depicts the real world object of ‘Organization’. In this table all the
information pertaining to a company whose shares is traded in the market are stored.
It stores the basic data of individual companies.

The attributes of Stock are:

28
Stock_ID

This is the primary key or the unique identifier of the table. ‘Stock_ID’ is just a
number allocated to each company for the purpose of uniquely identifying them.

Stock_Name

This attribute stores the name of the company.

Shares_Outstanding

Every company in the stock market issues shares which are commonly known as
outstanding shares. The total number of shares that a company issues in the open
market for trading purpose is stored in this attribute.

Market_Cap

Market capitalization is the total number of outstanding shares multiplied by the


current market price of the share. It is the actual value of the company in terms of its
shares. ‘Market_Cap’ stores an organization’s market capitalization.

Traget_Price

This is the fair value or actual value of the company’s share in the market. This is
calculated on the basis of current and future earnings of the company. It is the actual
value a company’s share should have if the market was fully efficient (i.e. any
information about the company is incorporated in its share’s price as soon as the
information comes).

Sector_ID

This is a foreign key in the ‘Stock’ table. ‘Sector_ID’ comes from the table ‘Sector’
which stores the names and ID’s of the sectors to which companies trading in the
stock market belong to.

Stock_Weight
This is the total amount that can be invested in a particular company’s stock. It is
stored as a percentage.

5.4.1.2 Sector

Sector_ID

This is the primary key or the unique identifier of the table ‘Sector’. ‘Sector _ID’ is
just a number allocated to each sector for the purpose of uniquely identifying them.

Sector_Name

This attribute stores the name of the sector.

29
5.4.1.3 Price

Stock_ID

‘Stock_ID’ is not just a foreign key that comes from the table ‘Stock’ but it is also a
part of the primary key that uniquely identifies each and every record in the table.
‘Stock_ID’ along with ‘Price_Date’ composes the composite primary key of the table.

Price_Date

As mentioned above it is a part of primary key of the table and it stores the date on
which the price of the stock was taken.

Price

This is the most important attribute of the database which stores the historical per
share price of a company’s stock from January 1, 2004. All the calculation of beta and
return potential are based upon this attribute.

Turnover

This attribute stores the daily quantity of shares being traded in the market of
individual companies since January 1, 2004.

5.4.1.4 Beta_n_Return

Stock_ID

‘Stock_ID’ is not just a foreign key that comes from the table ‘Stock’ but it is also a
part of the primary key that uniquely identifies each and every record in the table.
‘Stock_ID’ along with ‘BnR_Date’ composes the composite primary key of the table.

BnR_Date

As mentioned above it is a part of primary key of the table and it stores the date on
which the beta of the stock was calculated. It is important to store the date to keep
track of the change in beta of the stock because beta is the measure of risk of
individual stock compared to the market and it can change with the changing prices of
the stock and the market index due to high volatility of the market.

BnR_Beta

It stores the beta of individual stock which is the relationship of stock with the market.
It tells us about the movement of stock in comparison to the market.

BnR_ReturnPotential

This attribute stores the return a stock can give us if we buy it on the particular date. It
is shown as a percentage and calculated as the percentage change between the market
price on that date and the target price of the company’s stock.

30
BnR_Variance

Variance of the stock is the measure of its variability from the mean or par value. This
value is stored in ‘BnR_Variance’ and it helps us measure the highs and lows of a
stock.

BnR_CoVariance

Covariance is the measure of relationship between a stock and market and this helps
us in calculation of beta and standard deviation of the portfolio we intend to propose.
The value of covariance is stored in ‘BnR_CoVariance’.

5.4.1.5 Portfolio

Portfolio_ID

This is just a number used to uniquely identify the records in the table.

Portfolio_Number

This is like a serial number the system will give to each portfolio that it will generate.
This is important to keep track of all the portfolios the investor (i.e. user of the
system) has.

Portfolio_Date

This attribute holds the date on which the portfolio is generated.

Portfolio_StockID

This is the same number that we gave to each of our stocks in the stock table. The
reason that this ‘Portfolio_StockID’ is stored in the table is to tell us the stocks that
the system included in the proposed portfolio.

Portfolio_StockWeight

This attribute stores the weight (in percentage) that each stock in the portfolio has.

5.4.1.6 PLP

PLP_ID

This is the primary key or the unique identifier of the table. ‘PLP_ID’ is just a number
allocated to each company for the purpose of uniquely identifying them.

PLP_PortfolioNum

This is the primary key that comes from the table ‘Portfolio’. This attribute holds the
ID’s of bought portfolios so that they can be sold in future.

31
PLP_StockID

‘PLP_StockID’ is a foreign key stored in this table that comes from the table ‘Stock’.
‘PLP_StockID’ is stored to give the system some flexibility and it gives the investor
to add his favorite stocks in the PLP so that they can be monitored individually and as
soon as they show some potential of future profits they can be bought.

5.4.1.7 Bought_ Stocks

Stock_ID

This is the primary key or the unique identifier of the table. ‘Stock_ID’ is just a
number allocated to each company for the purpose of uniquely identifying them. In
‘Bought_Stocks’ the stocks that are bought by the investor are kept.

Bought_Price

‘Bought_Price’ stores the prices on which each of the stocks was bought.

Bought_Quantity

This attribute tells us the quantity or number of shares of the particular stocks that
were bought by the investor.

5.4.1.8 Sell_Call

SellCall_ID

This is just a number used to uniquely identify the records in the table.

SellCall_Date

‘SellCall_Date’ is the date on which the sell call was generated. ‘Sell_Call’ as the
name suggests generates an order to sell shares to the broker automatically.

SellCall_PortfolioNum

This attribute stores the number of portfolio of which the stock was a part. It is a
foreign key that comes from the table portfolio.

SellCall_StockID

This attribute stores the ID of the stock to be sold.

SellCall_Price

As the name suggests ‘SellCall_Price’ stores the price at which the stocks are being
sold.

32
SellCall_Quantity

It stores the number of shares that are sold by the broker due to the generation of sell
call.

5.4.1.9 Buy_Call

BuyCall_ID

This is the primary key or the unique identifier of the table. ‘BuyCall_ID’ is just a
number allocated to each company for the purpose of uniquely identifying them.

BuyCall_Date

‘BuyCall _Date’ is the date on which the buy call is generated. ‘Buy_Call’ as the
name suggests generates an order to buy shares to the broker automatically.

BuyCall_StockID

This attribute stores the ID of the stock to be bought.

BuyCall_Price

It stores the price at which the stocks are being bought.

BuyCall_Quantity

It stores the number of shares that are bought by the broker due to the generation of
buy call.

33
5.5 LAYOUT OF FRONTEND

Figure 5.10: Layout of Frontend

34
THE
HE PORTFOLIO SELECTION PROBLEM
6.1 PROBLEM FORMULATIONS

If you understand the concept of efficient portfolios, we are now ready to talk about
problem formulations. We will first talk about two commonly used formulations that
may not produce efficient portfolios. The first is to minimize variance subject to
achieving
ieving a specified level of return and the other is to maximize return subject to
achieving a specified level of variance. Let the portfolio have an expected return of
z = rTw and variance of .

In model 1, r* is the minimal acceptable return.


In model 2, is the
he maximal acceptable variance.

6.1.1 Minimize Variance Subject To Given Return

The model of the first can be given as follows:

6.1.2 Maximize Return Subject To Given Variance

The model of the second can be given as follows:

These models will not necessarily give efficient portfolios. The first model will
provide a portfolio having the smallest standard deviation for a specified minimum
level of return. However, there may exist a portfolio having a greater return and an
equivalent
lent standard deviation. In such a case, the portfolio returned by the model
would not be efficient. These can happen only if the matrix Q is not strictly positive
definite.

6.2 COMBINING THE MODELS

6.2.1 Balancing Risk and Return

Each investor is willing to take a certain amount of risk to earn another dollar in
returns. As the total return goes up, the investor is less and less willing to risk more to
earn just one more dollar. Each investor has a certain utility for money, which
determines exactly how much risk he is willing to take in order to obtain an expected
amount of money. We assume that this utility can be measured by a utility function,
u(x). One commonly
monly used utility function is:

35
u(x) = 1 - exp(-kx), where k > 0 is a riskk aversion constant. This function describes
the relationship between risk
r and return for an investor.

We assume that the return vector is normally distributed with mean r and covariance
matrix Q. Therefore, z is also normally distributed with mean z = rTw and variance
. The expected value of utility can then be computed as

Since f(x)=1-exp(-x) is a strictly increasing function in x,, maximizing utility is


equivalent to maximizing

Now, given a covariance matrix, Q,, a vector of expected returns, r, and a risk-
aversion parameter, k,, we can select a portfolio that maximizes expected utility by
solving the following optimization problem:

The optimal portfolio is determined by solving for the weighting parameter, w.

36

También podría gustarte