+ All Categories
Home > Documents > instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple...

instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple...

Date post: 31-Jan-2018
Category:
Upload: phungque
View: 218 times
Download: 0 times
Share this document with a friend
18
How to Obtain the Optimum Portfolio? Accessing Remote Desktop Connection For Windows (1). You can click “Remote Desktop Connection” in the ‘Accessories” of “All Programs” in your computer: (2) Type in “scotty.uwo.ca” for “Computer”. (3) And log in with your UWO email address and password. You have already been added to the permission list of this webpage. For Mac *If you are using Mac, you may need to download “Microsoft Remote Desktop” from App Store. (1) Click the “Remote Resources”
Transcript
Page 1: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

How to Obtain the Optimum Portfolio?

Accessing Remote Desktop Connection

For Windows(1). You can click “Remote Desktop Connection” in the ‘Accessories” of “All Programs” in your computer:

(2) Type in “scotty.uwo.ca” for “Computer”.

(3) And log in with your UWO email address and password. You have already been added to the permission list of this webpage.

For Mac*If you are using Mac, you may need to download “Microsoft Remote Desktop” from App Store.

(1) Click the “Remote Resources”

Page 2: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

(2) And type “scotty.uwo.ca” on URL, and log on with your UWO email address

(3) Then, click the King’s

Page 3: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

I. Where to get the data?

A. Risky Assets(1). To make a Portfolio selection, you may need two or more of Risk Assets, e.g. stock price.

(2). To obtain stock price, you may go to http://ca.finance.yahoo.com. This Canadian site of Yahoo Finance is the most user-friendly place to download the stock prices.

(3). At the upper left corner, you will see a Square Box beside ‘Look UP’. Here you type in the name of the company whose stock prices you would like to see.

For example, you type in ‘Apple Inc.” And you will be taken to the page for the Apple Inc. stock and its listing name is AAPL.

Page 4: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

(4). In the Left side panel under the title of “More on AAPL”, you will see ‘Historical Prices”. Clicking it, you will be taken to historical data of the Apple Inc. stock price.

(5). You will have to set “Data Range” of your interested period of time: For simplicity, let’s set the Five Year period from March 1, 2011 to March 1, 2016, and set “monthly”.

Page 5: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

*At the end of the displayed data, you may click “Download to Speadsheet”. You may use “Currency in the USD” (your next asset’s price should be also denominated in the same currency for a fair comparison). The file will be downloaded to your computer in the “…CSVformat”, which is essentially an Excel file.*If you download this data while you are using the remote desktop, the file will be stored on the “Download” folder.

(6). The data in the file is in the order of the newest to the oldest dates. Thus, we should reverse the order by clicking Colum A or the very column of the dates; clicking “Sort”; clicking “Sort Oldest to Newest”; and finally clicking “sort” when the Sort Warning Sign box shows whether “Expand the selection” or “Continue with the current selection”.

*There are a few different prices to be displayed in the excel file: “Open”, “High”, “Low”, “Close”, and the “Volume” and “Adj Close”. The last one is the “Adjusted Close Price with Dividends and Splits”. If you do not have this column, you can still just use the “Close” price. The differences between the

Page 6: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

two may not be large if there is no stock split. In the case of Apple Inc. stock, there was a split in June 6, 2014. Thus it is safe to use the “Adj Close” whenever it is available.

*For international diversification, you may combine one domestic (U.S. or Canadian) and one international stock(Chinese, Japanese, or of any country: For instance, use the “topforeignstocks.com” webpage, and find an international company whose stocks are listed outside of the western world but are being sold in the U.S. Exchanges- http://topforeignstocks.com/foreign-adrs-list/the-full-list-of-chinese-adrs/ ). (4). Then down it in Spreadsheet from. The right side column “adjusted price” is the one we want, because it is converted and includes dividend and shares. Note here, the original data you get is in the inversed chronological order, and you need to convert this to normal chronological order.

(5). Make a column of percent changes in the spreadsheet.

Percent Change = (Adjusted closet – Adjusted closet-1)/ Adjusted closet-1

We will multiply by 100 later.

In excel, type a formula “ =(G3-G2)/G2 “ on H3 cell and, double click the lower right of the cell.

B. Free risk assets

(1). In the portfolio selection, we need a free risk measurement to check our risk assets risk ratio (computer will do this by using “Modern portfolio theory”). The risk-free asset is the asset which pays a risk-free rate. In practice, short-term Government securities (such as US treasury bills) are used as a risk-free asset, because they pay a fixed rate of interest and have exceptionally low default risk.

(2). Here we use the Treasury bill. You can see this in US Federal Reserve website. http://www.federalreserve.gov/releases/h15/data.htm . Among different T-bill rates, I use the 3-month T-bills monthly data in secondary market. Note here, the rate they give is the annual return rate; we need to convert to monthly return rate (consistent with monthly stock price).Choose T-bill rate of the period corresponding to the latest data period of today.

Page 7: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

For one thing, these rates are annualize rates, and we should get monthly rate of returns.For simplicity, in order to get monthly rate on T-bills, divide above annual t-bill rate by 12.Remember this number as you will use this number as RF in the Shazam command; For example, three month T-bills rate in the secondary market is given as 0.05%, then monthly rate of return is 0.05/12. Later in the Shazam Command line of GNR1 RF = XXX, you have to replace XXX with 0.05/12.

II. Run Shazam Program

Run Shazam Program(1) You will use “SHAZAM professional” and “SPSS Data” for this project. The first one is the software program for optimization. The second is a kind of your assigned hard drive for storing data and result graph, and its location is “Y”. If you save the data with the name of “data1.txt”, it can be called up with the name of “Y:\data1.txt”, or “Y:\(name of datafile.txt)”. You click on “SHAZAM Professional” to use it.

*Also, you can use online version of shazam, but it is not usually stable.http://shazam.econ.ubc.ca/runshazam An example of how to use the command of PORTFOLIO is given inhttp://shazam.econ.ubc.ca/intro/fin2.htm.Its command options are given inhttp://shazam.econ.ubc.ca/ref/portfolio.htm

(2). The Shamam program can read only text file for data or command. It is

Page 8: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

best to make a data file and a command file of text format, and to save them and store them in the Scotty.uwo.ca: Convert your excel data file and command file into text files (you can do so with your Excel or Word programs), and then go to “Computer” first, and then “SPSS Documents 500MB Quota (Y:)” folder, and save both files inn this folder. As you have saved the commands into a command file, you can always edit the commands and do not have to type the command all the time in the interactive mode of Shazam running.

A good name for the data file would be, for example, portfolio_data.txt, and a good one for the command file would be porfilo_com.txt.

And save this file on (SPSS Documents 500MB Quota) on Y:/.

(3). Get the t-bill rate during the period, and take the average. The average will be the t-bill rate which is a risk free rate.

Page 9: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

(4). Put and run the Command:For example, if we want to set a portfolio with IBM and APPLE stock, and

using 3-month T-bill as a risk free asset. SAMPLE and READ are data-related commands to bring

the data from yourcomputer file to the Shazam program. GENR is the command to (generate

or) transform thefraction into a percentage. By now you have already got the percentage

changes of the two stockprices as given in the above Section A. 6. The key command here is

“PORTFOLIO”.  And you need to make sure that you save your SHAZAM file on Y:/. Otherwise, the software cannot create graphs.Let’s have a look at each line of the example, and the explanation is given

after * sign as shown below: 

SAMPLE 1 239*1990 to 2009 monthly total 240, but percent change is 239.READ (Y:\portfolio_data.txt) IBM Apple / SKIPLINES=1* Convert to percentagesGENR IBM=100*IBMGENR Apple=100*Apple* Set a risk-free rate of return, and convert it to percentage. We use the Jun 2007 Tbill rate as the risk-free measurement, because after Jun 2007, the financial crisis happened and the Tbills rate were not very normal.GEN1 RF =T-bill rate*The code below is the portfolio code. PRINT IBM Apple*To make sure SHAZAM read your data setPORTFOLIO IBM Apple / INRATES RISKFREE=RF EQUALW PFRONT GRAPHDATA GRAPHLINESTOP

**It would be best to download this entire instruction to “SPSS Documents 500MB Quota (Y:)”, so you can cut and paste the above command for Shazam with appropriate changes in the sample number(1st line) , data names(2nd,3rd,4th,6th and 7th line), and T-bill rate(5th line).You can cut, paste, and edit, and save it in the txt file within the Word program in “SPSS Documents 500MB Quota (Y:)”  

Page 10: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

III. How to understand the output?A. GraphWe will present the graph of this case a little later, which takes up a special

form.  We will use the general shape of graph first only for explanation:(Ignore the multiple assets shown here.  They are from a different question

taken up in the manual of Shazam.  We are focusing only on Z, M, A. (1). “M” = Minimum Variance or Minimum Risk Portfolio (of Risky Assets only)

(2). “A” = Equal Weight (of Risky Assets) Portfolio

(3). “Q”: Optimal-risk portfolio = Market Portfolio = Tangent PortfolioThe optimal-risk portfolio is the tangent portfolio, which means the

extension of the risk free interest rate or Capital Marker Line is tangent to the efficient frontier.

Mathematically, out of all the possible lines from various points on the efficient frontier to the point on the vertical axis denoting the risk free

Page 11: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

interest rate, the line of extension from this point has the highest slope.    This slope is called ‘Sharpe Ratio’ given as Rate of Return Difference / Risk Difference between the risk free asset(on the vertical axis) and the tangent point. The return difference is E(rp ) – RF.  The risk difference is equal to p (risk of the portfolio of risk assets of the tangency point) – zero (no risk for risk free T bills) = p   Thus the Sharpe Ratio is defined as E(rp ) – RF/p.

The computer’s algorithm looks interactively for the largest value of Sharpe Ratio: It computes the Sharpe Ratio for each point along the efficient frontier by a certain interval and compares them. (for actual output of the computational procedure, refer to the endnote)

 (4). Efficient FrontierEvery possible asset combination can be plotted in risk-return space, and the

collection of all such possible portfolios defines a region in this space. The line along the upper edge of this region is known as the efficient frontier (sometimes "the Markowitz frontier"). Combinations along this line represent portfolios (explicitly excluding the risk-free alternative) for which there is lowest risk for a given level of return. Conversely, for a given amount of risk, the portfolio lying on the efficient frontier represents the combination offering the best possible return.

In fact, there are 2 efficient frontiers.  In case where there is no Capital Market or no access to Risk Free Asset(T-

Bill), and thus there are only risky assets.  The Efficient Frontier is the upper part of the red curve.

In case where there are risk free assets as well as risky assets, then the straight blue line is the efficient frontier. It is also called the Capital Market Line.

 

The Optimal Portfolio of Risky Assets is given as “RISKFREE=ZERO”. This means that in this Portfolio there is zero % of Risk-free Assets and there are all Risky Assets (their combination)

This optimal-risky portfolio is not the overall (including risky and risk- free) Optimum Portfolio , which includes the Optimal Portfolio of Risky Assets and Risk-free assets, and can be obtained with the given Risk Appetite, Preference Function or Indifference Curve of the investor. In another word, this Optimal Portfolio of Risky Assets does not dominate any points of portfolio along the efficient frontier when there is no reference to Risk-free assets.

Page 12: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

However, this Optimal Portfolio of the risky assets is the very best one among all possible

combinations of risky assets if and only if it is combined with risky assets.

In another word the new efficient frontier coincides with capital market line which includes the Optimal Portfolio of risky assets, which is located at the tangent line of Capital Market of previous arched efficient frontier. All points on the Capital Market line or new Efficient Frontier can be obtained by mixing/combining the Risk-free assets and the Optimal Portfolio of risky assets at different weights.

5. Portfolios below the Efficient Frontier are not efficient, because for the same risk one could achieve a greater return. Portfolios above this curve are impossible.Now let’s look at the print out of the result of our question:EFFICIENT PORTFOLIOS        MINIMUMVARIANCE   RISKFREE=ZERO     RETURN=ZERO       ACTUALMEAN      0.91633           1.0168           0.44409E-15       1.1071

Page 13: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

VARIANCE  68.441            75.947           692.55            95.499STDEV     8.2729            8.7147           26.316            9.7724SHARPE    0.86828E-01       0.93957E-01     -0.75241E-02       0.93029E-01PORTFOLIO WEIGHTS IBM       0.86039           0.67058          2.5912         0.50000APPLE     0.13961           0.32942         -1.5912         0.50000 The most important result is the “Risk-free=Zero”.   It does mean that the weight of the risk free asset or T-Bill is set to be equal to zero; it does not mean that the rate of return of the risk free asset is set to be equal to zero.   This is the Optimum Portfolio of Risky Assets only. Eventually, what will be the Optimum Portfolio or the Best combination of Risk Free Assets and the above Q at what ratios depends on the preference of the investor. That is the overall Optimum Portfolio. It is not what you, as the fund manger, chooses but your clients will choose for themselves. Thereby they reveal their risk preference.

•If we use the Dec 2009 T-bills rate as the risk free measurement, i.e., in the code it is “GEN1 RF=100*(Tbill:239)”. It will give you a risk free line that passes through zero. However, it is not a normal case, since it is during the financial crisis and the T-bills return rate drop dramatically.

Page 14: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

Instead, we can use the T-bills rate at Jun 2007(“RF=100*(Tbill:209)), which is just before the financial crisis. You can see the difference from the graph.

Page 15: instruct.uwo.cainstruct.uwo.ca/economics/370b-570/Portfolio...  · Web viewIn the case of Apple Inc. stock, there was a split in June 6, 2014. ... (T-Bills) in the final portfolio

Once again, the general case would look like:

 Endnotes•Computations of Sharpe Ratios along the Efficient Frontier of the Risky Assets only.•The actual output for our exercise looks like:

(The first number is the percentage of risk free asset(T-Bills) in the final portfolio and the last column shows the corresponding Sharpe ratio)

Note: You can see here that when there is no risk free asset, or zero percentage of composition of risk free assert –“Risk-free = Zero” and thus the portfolio has only a combination of risky assets only, the Sharpe Ration is the largest at 0.093957.


Recommended