Closed Thread
Results 1 to 8 of 8

Markowitz efficient frontier

  1. #1
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Markowitz efficient frontier

    Hi, i'm trying to plot the Markowitz efficient frontier in Excel. I have returns and other data for 20 stocks.

    I use solver to find the optimal weights of the 20 stocks for the the lowest variance portfolio.

    I need to then find the weights of the stocks from this point to the highest possible return portfolio.

    Finding the portfolio with the smallest variance and with the highest return is fine with solver, i just use the min and max functions.

    How do i find the points in between?


    For example, the return on my minimum variance portfolio is 1, the return on my max return portfolio is 100. Right now, i would need to run optimizer with minimum variance for the returns of 2,3,4....all the way to 99 to find those points.

    Any shortcuts or add ins?


    Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Markowitz efficient frontier

    Hi,

    Does the attached help?

    Regards
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Re: Markowitz efficient frontier

    Due to the file being from the new Office it doesn't let me go out of design mode. I can't really try anything out but yeah i want to do what this sheet is doing.

    I assume you or whover worked on the sheet has written a macro or something to make solver run for the different conditions.

    Any help for how i can do this?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Markowitz efficient frontier

    Hi,

    Does this .xls version help. The macros don't use Solver although clearly Yazann Romahi from the Cambridge University Investment Club who wrote the code clearly intended to do so.

    The iterative methods builds arrays of values as it iterates through the number of times you plug in, and then plots the xyScattergraph.

    ....looks like the forum is not accepting attachments just at the moment. I'll attach it later.

    Rgds

  5. #5
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Re: Markowitz efficient frontier

    I suppose what i'm really asking is how can i get solver to go through a list of target values and give me results without me having to manually change the figures after each calculation.

  6. #6
    Forum Contributor
    Join Date
    03-13-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    136

    Re: Markowitz efficient frontier

    Quote Originally Posted by thedon_1 View Post
    I suppose what i'm really asking is how can i get solver to go through a list of target values and give me results without me having to manually change the figures after each calculation.
    This was literally the first code I ever wrote and as it is a work in progress it hasn't been cleaned up. Being very new to any kind of programming it is also messy as heck but it will hopefully give you some ideas. You will need to set up your worksheet to place the different arrays where they are located in the code but it does a pretty good job of working through all of the constraints. It loops through all of the efficient portfolios with mean returns from min to max in .1% increments.

    Please Login or Register  to view this content.
    Last edited by jerseyguy1996; 11-13-2009 at 04:27 PM.

  7. #7
    Registered User
    Join Date
    02-10-2010
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Markowitz efficient frontier

    Hey does any one know how to include transaction i.e brokerage costs to determine the new efficient portfolio .
    Assume there are 20 stocks and a brokerage rate is known and common for both buying and selling .

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Markowitz efficient frontier

    cloudedthought,

    Your post does not comply with Rule 2 of our Forum RULES.

    Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1