Everyone would like to make a profit out of the money they have. Unless the sum of money is small, putting it in the bank is not a wise choice. The rate of interest given by the bank is so small that inflation will just eat up most of the profit. The most profitable investment but riskier one is on the stock market. Investing on the stock market is more of an art than a science. An investor will initially take a look at the fundamental data of a company to see how it is performing. You don’t want to put your money in a company that will close in a month.

After identifying potential companies, the next question is how much of each security should one purchase in order to maximize your profit while at the same time minimizing the risk. There is a risk involved when buying such securities. The price per share of a security changes frequently in a day. As an example, if you purchased 100 shares of security A at a price of $1 per share and suppose that on the tenth day the price rose to $1.50. If you decide to sell all your shares on that day, your profit will be $50 or 50% of your initial investment. If however, the price per share declined to $0.9, you will lose $10 or 10% of your initial capital. In this discussion, we consider the closing prices.

**Risk and Expected Return**

How then do we calculate the risk involved in holding shares of a security? The risk depends on how long you are going to keep those shares before selling them.

Table 1 lists the price/share of a traded security for the last 10 days. Assuming you bought 1 share at day 1. If you sell it on day 10, your profit will be 0.6%. Selling it on day 6, your return will be 3.7%. The average return is 0.6%. The risk in investing in this security is represented by the standard deviation .

Let be the return of security and be the fraction of the investor’s fund invested in asset , then the expected value of the portfolio consisting of these assets is give by

where is the number of assets in the portfolio. The variance of portfolio is given by

where is the *covariance* between asset and . The covariance is the expected value of the product of two deviations: the deviations of the returns on asset from its mean and the deviations of asset 2 from its mean.

**Simple Example**

Let us illustrate portfolio optimization using a simple example. Suppose the current interest rates when investing in Treasury Bills is 8%. Treasury Bills are risk free investments in that if you will get 8% more of your initial money at the end of the holding period. The holding period is the length of time your money is in the possesion of the borrower before it matures. Assuming that the inflation rate at the end of the holding period is 3%, the real amount of money you earned in investing in Treasury Bills is .

In order to make more money, we decide to invest some of our money in stocks and bonds which are more risky but the returns are high enough to justify the risk. Let and be two securities of a portfolio with the following parameters:

We assume a . The average return of portfolio is

and the average risk is

where and are the fraction of your money which you invest in security and respectively. We require that , that is , we invest all our allocated money in this two securities.

The table below shows some values of versus for various weights.

Figure 1 shows a plot of risk versus expected return for various combinations of and . The line shown is called the *Capital Allocation Line*. The slope of this line is called the *reward-to-variability ratio* and is give by

The y-intercept of this line is the *risk-free rate*, which in our example

is 8%. The slope is the amount of return you get per unit increase in the amount of risk. The goal of portfolio optimizatio is to find the combinations of $lalex w_a$ and that maximizes this quantity.

Substituting the given values of the risks and expected returns we get the optimization problem we have to solve:

Maximize

subject to

In the next post, we will use genetic algorithms to solve this optimization problem.

boobby,

I posted a comment yesterday, pero, hindi lumabas!!!

Actuallt, we did apply hybrid heuristics to portfolio optimization in the thesis of Sonia Andres, which really perform so well, even fitted a quadratic model to the efficiency frontier, to make the decision making faster!!!

As our kind of project, we can parallelize those hybrid heuristics we did in her thesis. WE can publish such if not in algorithms journal, surely, in actuarial or management science journals. Hindi lang tayo mapili sa journals, basta refereed ng experts for example sa actuarial or management science, kasi more on applications naman tayo, hindi sa theoretically elegant but practically useless mathematical results!!! Kasi extreme computing naman ang ating gagawin, di ba???

Hi Auggie,

I am interested in this project. Do you have the paper so I can read it?

thesis ni sonia andres that you ask Joy to give you a copy. puede natin i-parallelize!!!

Also, even inside the algorithms of the heuristics, we can still further fine tune and tweak. tapos, ibang factor of fine tuning and tweaking pa ang parallelization.

Naku, if you’ll believe me, madami tayong puedeng projects na gagawin even with just portfolio optimization using the financial data of your bank. puede silang yumaman with our computational adventures!!!!

have you talked with joy to give you a xerox of Sonia’s thesis?

Hi Auggie,

Not yet, but i’ll email joy about it.