Use Excel to graph the efficient frontier of a three security portfolio

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 259

  • @Secretsofsociety
    @Secretsofsociety 10 місяців тому +4

    This is such an important concept that so many of my friends who trade and invest don't understand at all. So many keep going for small-mid caps that swing wildly and over the course of two years ends up under performing QQQ

    • @DavidJohnk
      @DavidJohnk  10 місяців тому +2

      Actually, in that short video is the central concept that won Markowitz the Nobel Prize!

  • @richardaristegui8930
    @richardaristegui8930 Рік тому +20

    WOW! I'm taking a Portfolio Risk Managment class right now and this video summed up the first couple weeks of the class! Thank you so much for this great example. It really illistrates everything I have now been exposed to and see practical reasons for learning all the building blocks. I really enjoyed the video and played with the spreadsheet for hours looking up different stocks to come up with better mix of stocks with the current financial situation. Really interesting!!! Thanks!!!

    • @DavidJohnk
      @DavidJohnk  Рік тому +5

      Thanks! Please note I made an error on the correlation matrix, you don't have to take the square root.

  • @4tomop
    @4tomop 11 місяців тому +5

    This was just the refresher i needed to help me better understand what Portfolio Visualizer tool is doing. Thank you!

    • @DavidJohnk
      @DavidJohnk  11 місяців тому +2

      I'll have to check out that tool

  • @LeoCavick
    @LeoCavick Рік тому +4

    I've just finished a Portfolio Management course and your video really sums up everything, thanks

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Glad it was helpful!

    • @DavidJohnk
      @DavidJohnk  4 місяці тому

      Glad it was a good summary for you!

  • @saadk72510
    @saadk72510 2 роки тому +11

    this is the best video out there for efficient frontier in excel

    • @DavidJohnk
      @DavidJohnk  2 роки тому +2

      Thanks for the positive feedback!

  • @Davinder_Kaur55
    @Davinder_Kaur55 Рік тому +3

    HI DAVID, I liked your video. You explained everything in one video and did not waste time on one point. Please also post other videos related with optimization methods.

  • @spencerpencer
    @spencerpencer 2 роки тому +4

    Great video! One thing I noticed is that this is implicitly the efficient frontier in the case where short-selling is not allowed. Note the bottom portion of your graph tails off to become kind of linear. To get the frontier with short-selling, you can specify the min argument of the RANDARRAY function to be negative (e.g. -1) as the default argument is 0. This will allow negative numbers into your portfolio weights. It will also produce a bunch of outlier portfolios, but all you have to do is change the scale on the axes to see the hyperbola.

  • @charis3832
    @charis3832 9 місяців тому +1

    Excellent demonstration professor. What I wouldn't do, is to make yearly returns in the way you did it @ 20:10. We are talking about simple compounding for up to 1 year, so I'd recommend x252

  • @prathameshdusane1441
    @prathameshdusane1441 10 місяців тому +1

    your this video is so helpful for me but please can you tell me how to you use rand between instead of rand array because i have older version of excel

  • @RakanXYZ
    @RakanXYZ 6 місяців тому

    You are a wizard! that monte carlo trick, is a life saver.. i've gotta go through this again!

    • @DavidJohnk
      @DavidJohnk  4 місяці тому

      Ha, glad it was useful!

  • @peteryu7366
    @peteryu7366 9 місяців тому

    Thx for sharing this! One of the most useful videos on UA-cam!

  • @falinoluiz5962
    @falinoluiz5962 Рік тому +1

    I can't express how much love I have towards you right now

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Ha, glad it helped!

    • @falinoluiz5962
      @falinoluiz5962 Рік тому +1

      @@DavidJohnk When using the =SQRT(VARCOVAR/MMULT(TRANSPOSE(STDDEV),STDDEV)), I get #NUM! error in the correlation matrix because of negative numbers. Is the square root function necessary?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      @@falinoluiz5962 Hi, you don't have to sqrt. Sorry, I pointed the error out in the description above, but it's hard to see!

  • @mohammadabusufian7340
    @mohammadabusufian7340 Рік тому +2

    It is an excellent tutorial. Many many thanks for the outstanding effort.

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Thanks for the positive feedback!

  • @Ghaith7702
    @Ghaith7702 10 місяців тому +1

    hello, could you please explain why you didn't use the normal sharp ratio ?
    where we subtract the risk free rate and why did you subtract the expected return from the daily
    returns ? also can i subtract the risk free rate in this example ?

    • @DavidJohnk
      @DavidJohnk  10 місяців тому +1

      No reason other than I didn't want to go find it (the risk-free rate). It didn't really matter in this example.

    • @Ghaith7702
      @Ghaith7702 10 місяців тому

      @@DavidJohnk thank you

  • @gonzalocrs
    @gonzalocrs 11 місяців тому +1

    Hello! Great video, sums up the whole portfolio construction essential concepts. I’d like to know why some people use the log of the returns before proceeding to calculate everything you did and some don’t. Really appreciate it!

    • @DavidJohnk
      @DavidJohnk  10 місяців тому

      Good question! log returns assume continuous compounding. That has properties which are useful that periodically compounded returns don't. Both work for demonstration purposes.

  • @niranviki6194
    @niranviki6194 2 роки тому +3

    To be honest I would have learnt atleast 15 things in this one video

  • @golf_echo_november
    @golf_echo_november Місяць тому

    Thank you for this wonderful and very clear guide to a very complex topic to deal with!

  • @exploringeconomics8221
    @exploringeconomics8221 Рік тому +2

    thank you sir, this is the best video on this topic.

  • @DavidJohnk
    @DavidJohnk  2 роки тому +1

    You're welcome, glad it helped! Check out my latest video that has Lambda functions for portfolio calculations.

  • @7adadoz
    @7adadoz 2 роки тому +2

    at first I said that this video was too long, but as I watched i was immersed that i didn't want it to end -not really xD. anyways, it was an excellent explanation. wish you had to went deeper at the end regarding which point is the best? i mean it depends on the investor willingness of taking the extra risk right.. thanks again

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      Ali, this video just brushes on finding the efficient frontier. You might want to do some additional research on something called the Capital Allocation Line.

    • @7adadoz
      @7adadoz 2 роки тому

      @@DavidJohnk I will read about CAL more, thanks for the reply David. Hope you have a nice day

  • @frankhuang5095
    @frankhuang5095 2 роки тому +7

    Such a great lecture. Thank you David!

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      You're very welcome, glad it helped

  • @AntonioGarcía-e3h
    @AntonioGarcía-e3h Рік тому +2

    Thank you very much for the great help provided in this video. But I have a question, in the Sharpe ratio calculation, why the risk free return is not introduced? I understand that the Sharpe formula is: Asset return - risk free return / standard deviation. Thank you very much for your answer!

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Hi, I didn't subract it because it was negligible during the period i was using. Technically you should.

  • @pinakikkkm
    @pinakikkkm 2 роки тому +2

    Thank you such a detailed step by step explanation. Could you also explain how to create a Capital allocation line in case of three or more security portfolio. Thank you.

    • @DavidJohnk
      @DavidJohnk  2 роки тому +4

      Great question, I've actually been thinking of producing a video that does that. Keep an eye out for it by subscribing to my channel and enabling notifications if you haven't already.

    • @pinakikkkm
      @pinakikkkm 2 роки тому

      @@DavidJohnk Sure, Thank you very much!

  • @DM2039-f5e
    @DM2039-f5e Рік тому +1

    Thank you! You are very generous with your knowledge. God bless you!

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Hi David, thanks for the positive feedback!

  • @harrym7025
    @harrym7025 2 роки тому +3

    Amazing explanation! much appreciated!

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      Thanks for the positive feedback!

  • @RonnieSportz
    @RonnieSportz 8 місяців тому +1

    I'm not familiar with the modified Sharpe. Is it basically just the ratio without subtracting the return of a risk-free asset in the numerator?

    • @DavidJohnk
      @DavidJohnk  8 місяців тому

      Yes, I called it that because I didn't want to spend time getting the risk free rate.

    • @RonnieSportz
      @RonnieSportz 8 місяців тому

      @@DavidJohnk My frontier looks inverted for some reason. In. stead of trailing upward and to the right, it trails downward and to the right. Any ideas? I used same stocks daily return for 1 year (2023-2024)

  • @jorgechaflagranda7661
    @jorgechaflagranda7661 2 роки тому +1

    Great video David and the plot was a lot of ilustrative.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      Thanks for the positive feedback Jorge!

  • @adelramadan123
    @adelramadan123 7 місяців тому +1

    Great video! I just have a question, would it be possible to know the portfolio composition of each of the risk/return profiles generated in the data table? Thank you

    • @DavidJohnk
      @DavidJohnk  7 місяців тому

      Yes, absolutely. Just add the columns on the data table.

  • @mrnatnatwarlal1972
    @mrnatnatwarlal1972 Рік тому +1

    This is Excellent Video Sir!!! Thank you!!!

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Glad it helped, thanks for the positive feedback.

  • @juselara02
    @juselara02 2 роки тому +1

    Amazing video! This helped me alot for my Master. Thank you so much!

  • @shhasaan812
    @shhasaan812 9 місяців тому +1

    If I buy a share in a new company, how do I distribute the percentages of weights again with the old shares?

    • @DavidJohnk
      @DavidJohnk  9 місяців тому

      You would buy/sell shares of stocks to achieve desired individual security weights in the portfolio according to number of shares * market price/share of each. If you have a $900 portfolio and purchase an additional share of a new stock worth $100/share, the total portfolio will now be $1000, and the weight of the new stock will be 10%. It's actually pretty simple; picture a pie chart with each security, the amount of money in percent a slice of the pie.

  • @hareezhilmi5583
    @hareezhilmi5583 2 роки тому +3

    This is by far, the most understandable efficient frontier explanation with step by step video.
    Anyway, i am exploring the Efficient Frontier concept with regards to oil & gas industry application; where, the expected return is not at daily rate as stock prices and is accessed at NPV at different scenarios.
    Do you think its a good idea to bring in the model for oil & gas industry application?
    Appreciate any thoughts.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      I could work, it doesn't have to be daily in frequency.

  • @shreyat6681
    @shreyat6681 Рік тому +1

    Thank you!!!! So helpful for my investments and portfolio management class!

  • @williamrivera162
    @williamrivera162 3 роки тому +1

    Very instructive video and easy to understand. Thanks you so much for the link, this make more understood.

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      Thanks, glad it was useful.

  • @skarthi146
    @skarthi146 10 місяців тому +1

    Thank you so much for your video.

  • @dragonsl8r
    @dragonsl8r 2 місяці тому +1

    hey there! Using analysis toolpak on Excel to carry out the correlation matrix I get quite different results from your method of doing it (as well as the method without square rooting it), is there a preferred way to do it/any reason why to pick one over the other?

    • @DavidJohnk
      @DavidJohnk  2 місяці тому

      It might differ because one is calculated based on samples and the other population.

  • @MarkVank
    @MarkVank 2 роки тому +1

    Excellent video

  • @pierrebertin7979
    @pierrebertin7979 Рік тому +1

    HI, i choose 91 days timeframe, and it gave me negative returns ? also what time frame is the best to use ? is it based on the time i've been investing so far? or the time im planning in investing.

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Hi Pierre, when selecting your securites, it's best to use those with positive historical returns if you want a positive result. Time frame is irrelevent pertaining to your question. Hope that helps!

  • @oliverhunt5750
    @oliverhunt5750 2 роки тому +2

    Thank you so much! Amazing video

  • @waschbaer1
    @waschbaer1 2 роки тому +1

    David - at minute 10:40 - why do you square the CORRELATION formula ?

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      I take the square root at 10:40, not square. That ^1/2 means square root in the formula. Hope that helps!

    • @waschbaer1
      @waschbaer1 2 роки тому

      @@DavidJohnk Thank you very much for the fast answer. Mathematically i still do not understand why you take the square root in the formula ? Thanks again.

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      @@waschbaer1 You know what, you're correct! I was doing the formula from memory and made a mistake, you don't have to take the square root, that's an error. Thanks, I made a note on the description, as you don't really need it for the portfolio optimization part.

  • @kyrisaphiris
    @kyrisaphiris 3 роки тому +1

    Really great video and pleasure to watch and listen. When I tried it however, my graph looked more like a blob and nothing like the nice hyperbola you arrived at.

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      Interesting, did you try the three securities I used? It always works for me, but it could be something about the securities you used ...

    • @kyrisaphiris
      @kyrisaphiris 3 роки тому +1

      @@DavidJohnk Thanks for replying! I did it with eighteen securities. I then tried by splitting into two lots of nine; all three attempts produced a more-or-less circular blob; none had any clear hyperbolic edge of any sort! (I then made up some data for four securities and that did work, so at least the method worked for me - just not the actual portfolio I wanted to analyse, for some reason!).

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      @@kyrisaphiris with that many securities you would have to plot millions of points.

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      Not very doable on Excel

    • @kyrisaphiris
      @kyrisaphiris 3 роки тому +1

      @@DavidJohnk So that's what it was! Thank you so much for letting me know.

  • @bayarbayar3099
    @bayarbayar3099 7 місяців тому +2

    Thank you so much sir! But i am having a little problem drawing the efficient frontier, i followed your calculations step by step optimizing my portfolio. Then, when i drew my efficient frontier it didn't form a nice arc shape, they just piles up randomly. Could you please help me fix it 🙏😊

    • @DavidJohnk
      @DavidJohnk  7 місяців тому

      Are you using securities that have a positive return over the period? Sometimes that effects results. You might also try different securities to see if it improves the graph. Sorry I can't be more help; it's difficult when I can't see your file.

  • @junal27
    @junal27 7 місяців тому +1

    Thank you, excellent presentation

  • @garywedderburn6978
    @garywedderburn6978 2 роки тому +2

    Thanks for the video, really useful! What's the difference between your correlation and the correlation in the Data Analysis tool? I seem to get different results.

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      I made a mistake in the video ... it's pointed out in the first paragraph of my description: "Additionally, you don't have to take the square root when calculating the correlation matrix, that was an error on my part sorry!"

    • @garywedderburn6978
      @garywedderburn6978 2 роки тому +1

      @@DavidJohnk Many thanks! Sorry i missed that comment in the description. I can see that ties up perfectly when i make that change now. Thanks again!

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      @@garywedderburn6978 No problem, I would re-record the video but it's getting too many views!

  • @shotamodebadze6495
    @shotamodebadze6495 Рік тому +1

    Mr. David. I developed an excel sheet for 15 stocks, but my chart does not fit the effective frontier design. for 3 stocks it is ok but why number of stocks influence on design on chart?

    • @DavidJohnk
      @DavidJohnk  Рік тому

      I would have to see your spreadsheet to be sure, but you could increase the number of trials and see what it does.

    • @shotamodebadze6495
      @shotamodebadze6495 Рік тому

      I tried 1 000 000 rand, for 5 stocks and received design like head of fish :), design is reasonable but without uppear tail part :)

    • @shotamodebadze6495
      @shotamodebadze6495 Рік тому

      let me describe issue. At first I thought also that was because of number of random itterations. I started to fit model to your exact stoks and timeline. I received same design as ypurs. then I changed figiures to weeks rather than days, and design has changed but not so much. but when I increase number of stocks is changing too. lat me know please, if you will have any new model in the future with many stocks and you find reasoning about issue. thanks a lot.

  • @최승호-t9l
    @최승호-t9l Рік тому +1

    Hey David! Thank you for your kind explanation. It helped me a lot.
    Can I ask you a question?
    I want to know why you made this "X" value and calculated it with this value. I thought I was just paying for Daily. What does this "X" mean?
    I'd really appreciate it if you could give me an answer. Have a nice day!

    • @DavidJohnk
      @DavidJohnk  Рік тому

      It's the daily returns in excess of the return's arithmatic average. It's used for calculating the variance-covariance matrix. Hope that helps!

  • @signal4friends488
    @signal4friends488 2 роки тому +3

    Hi David, very good video - I struggle in the moment with a negativ value in the varcovar matrix and this results in a problem with the calculation of the Correl Matrix due the squareroot calculation. As a fact in my own example I check with the Excel function "Correl" the relationship between two stocks and it is negativ. Hope you can help me with your expertise...

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      Hello, sorry about the problems in the correlation matrix, you don't have to take the square root there. It was an error on my part. Sorry again!

    • @andrewwoolard4778
      @andrewwoolard4778 Рік тому

      @@DavidJohnk Was dealing with the same problem as @signal4friends488, thank you for the tip! Everything seems to work now. Phenomenal video!

  • @janorhanheptek5024
    @janorhanheptek5024 2 роки тому +1

    Thank you sir, helped me a lot with my Masters thesis.

  • @aliahramli7443
    @aliahramli7443 2 роки тому +2

    Thank you so much! this video helped me so much for my final year project. May I know whether it is possible to plot a tangent line that would cross the efficient frontier in excel? Im trying to find the most optimum portfolio

  • @FahimAhmed-rv1fv
    @FahimAhmed-rv1fv 9 місяців тому +1

    the trick with the data table is not working for me. can you help me

    • @DavidJohnk
      @DavidJohnk  9 місяців тому

      You might try a different computer. Not sure what the problems is, sorry. Maybe try it with less trials for testing purposes.

  • @pbgauthier5487
    @pbgauthier5487 Рік тому

    God bless people like you, cheers

  • @manuelzevallos7245
    @manuelzevallos7245 Рік тому +1

    Does this model includes correlation between the assets?

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Yes but in the video, I made an error. Don't take the square root when calculating the correlation matrix.

  • @Bob3D2000
    @Bob3D2000 2 роки тому +1

    Thanks. What do you do if one (or more) business was started during the period of your data? This would mean one or more of the data columns has missing values down to a certain row. How do you deal with this in the variance covariance matrix in particular?
    In this scenario, this business would have the same value (0 - average return) for many rows in the X section. This means this business has a very low variance, so the solver will put a big weight on this business, which is not correct.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      I don't know how you would accomodate missing data, I would probably drop that security from consideration for that reason.

  • @wongchungsheng4772
    @wongchungsheng4772 Рік тому +1

    May I know is there possible to draft a "efficient frontier" when the expected return of stock becomes negative?

    • @DavidJohnk
      @DavidJohnk  Рік тому

      I've never tried it, but it should be, I would think that stock with a 100% weight would take you negative on the y-axis.

  • @nachomartinezescoda
    @nachomartinezescoda 2 роки тому +2

    I want to have a teacher like you 😁

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      Ha, thanks for the positive feedback!

  • @ThePandaPalace
    @ThePandaPalace Рік тому +1

    Great video. Once the efficient frontier is generated, and the appropriate portfolio is selected, how do you determine what weighted portfolio equals that data point? example: let's say out of 10,000 randomly generated data points, you select data point 31. How do you then determine exactly what weights are required for each security to ensure you create a portfolio that would apply to data point 31?

    • @stylianosartsidakis
      @stylianosartsidakis Рік тому

      use solver again and put constraints for the sd and the ER of that point

    • @susigan
      @susigan 11 місяців тому

      Thank you Sir. @@stylianosartsidakis I can use Solver in Bothe risk and Return after find data points? ( i supposed i cant "reset all" , i need to put 2 rules? beside = 100% ) - My plot dont have same format as yours, is more like a ball , this is because i made a mistake somewhere , or depend of data ? Thanks again apreciatted

  • @danahalrum
    @danahalrum Рік тому +1

    is it the same procedure if it was monthly return instead of daily return?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Yes, you would probably want 5 or 6 years to get enough observations.

    • @danahalrum
      @danahalrum Рік тому +1

      Thanks !!

  • @yigao1782
    @yigao1782 3 роки тому +1

    Beautiful demonstration.

  • @options.trader.
    @options.trader. Рік тому +1

    Hi David. I used your excel but Data Table dosent work in my notebook. I dont know which could be the problem. Do you have any idea? So i can do the graph as you did it. Thank you very much.

    • @DavidJohnk
      @DavidJohnk  Рік тому

      Hi, not sure what the problem could be, sorry.

  • @carsonhughes2436
    @carsonhughes2436 Рік тому +1

    I followed along with everything but I used a 20-stock portfolio instead of 3. instead of using daily returns i used monthly returns since 1/1/2020. everything worked great until i got to graphing the efficient frontier. the graph is quite literally zero correlation and shows no efficient frontier. Any way to troubleshoot?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      20 stocks won't work well for that, you would need many more points. You could try maximizing your portfolio return at different levels of risk and plotting those points. Hope that makes sense!

    • @carsonhughes2436
      @carsonhughes2436 Рік тому +1

      @@DavidJohnk i appreciate the advice! I'll let you know if it works!

  • @henriksteins6189
    @henriksteins6189 7 місяців тому +1

    I'm using excel on Mac, when trying to produce the randarray time series following exactly your steps I only generate zeros, how do I solve this problem? :)

    • @DavidJohnk
      @DavidJohnk  7 місяців тому

      I'm not an Apple guy, hopefully someone else can help.

  • @hanaeziouziou5298
    @hanaeziouziou5298 9 місяців тому +1

    hello Sir would this work for like 40 securities? Thank you!

    • @DavidJohnk
      @DavidJohnk  9 місяців тому +1

      It might not work on Excel, that's quite a few securities.

    • @hanaeziouziou5298
      @hanaeziouziou5298 9 місяців тому +1

      @@DavidJohnk Hello again Sir, fortunately it worked, except for the Randarray function but I guess my excel version is the problem...yet, I really thank you ! Your video was extremely helpful

    • @DavidJohnk
      @DavidJohnk  9 місяців тому +1

      Try =rand() in each cell

  • @kvenukk
    @kvenukk 2 роки тому +1

    Well explained and demonstrsted... Thank you!!!

  • @DrMohammedFHasan
    @DrMohammedFHasan Рік тому +1

    Magnificent, but one thing please, why you’re not using (Ln) to calculate the return?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Thanks! I've used continuous (ln) returns in the past, but % return is simpler understand for the beginner.

  • @radwamohammed2606
    @radwamohammed2606 Місяць тому

    Are these calculations is used also for portfolio with 5 assets , or it changes ?

  • @Ghostalitta
    @Ghostalitta 2 роки тому +1

    What a great way to plot efficient frontier that’s very intuitive and best explanation, just a question: Is there a way to plot the “result line/efficient frontier line” only by excel?

    • @DavidJohnk
      @DavidJohnk  2 роки тому +2

      You can use solver to find the maximum return at intervals starting from the minimum variance portfolio. Hope that makes sense.

  • @dhananism4850
    @dhananism4850 Рік тому +1

    Very helpful. I wonder whether it is possible to also model the MAD version in this paper Konno, H., & Yamazaki, H. (1991). Mean-absolute deviation portfolio optimization model and its applications to Tokyo stock market. Management science, 37(5), 519-531. in excel?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Glad it was interesting. The MAD version you mention is easier for larger optimization problems, I'll take a look.

    • @dhananism4850
      @dhananism4850 Рік тому

      @@DavidJohnk Wonderful

  • @sannwailhyan5113
    @sannwailhyan5113 2 роки тому +1

    I am having error when calculating correlation 4 of the slot show #NUM error

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      See my comment in the description, you don't have to take the square root. That might be the problem.

  • @mr.muhammadasif7016
    @mr.muhammadasif7016 3 роки тому +1

    Very useful and understandable video. Thank you

  • @ridasalihi4702
    @ridasalihi4702 Рік тому +1

    when we calculate the sharp ratio we can utilise the Risk free rate ?

    • @DavidJohnk
      @DavidJohnk  Рік тому

      For sure!

    • @ridasalihi4702
      @ridasalihi4702 Рік тому

      thankyou , and we will work with the annual expected return not the daily? sharp ratio= (Annula return-RF)/ annual Standard Deviation)

  • @스탠리-f6f
    @스탠리-f6f 2 роки тому +1

    I love you so much 사랑해요ㅎㅎㅎㅎㅎ 알라뷰~~~~ 덕분에 공부 잘 했습니다!

  • @SeanRing
    @SeanRing 3 роки тому +1

    Excellent tutorial. Thank you!

  • @marcogasser5478
    @marcogasser5478 2 роки тому +2

    Hi David, thank you so much! Very useful video. I have a question: I received a negative VARCOVAR for some investments. My excel then had a problem to calculate the correct correlation. Can I take the absolut value of VARCOVAR or is this the wrong way to fix this problem?

    • @DavidJohnk
      @DavidJohnk  2 роки тому +5

      Hi Marco, I had put that I made a mistake on calculating the correlation matrix (I noted this in the video comment section), you don't have to take the square root! So sorry about that.

    • @marcogasser5478
      @marcogasser5478 2 роки тому +1

      ​@@DavidJohnk Hi David, perfect my correlation matrix works perfect now. Great work which you provided, thanks a lot :)

  • @inalchannelbaru
    @inalchannelbaru 2 роки тому +1

    Hi David, thanks for the explanations,
    is it possible to generate a random draw if we allow a short position on one or more stock, and the total weight still equal to 1 ?

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      Yes, I did it right here: ua-cam.com/video/IRa64LEERhE/v-deo.html

  • @sagauer
    @sagauer 2 роки тому +1

    I've seen different models where they've annualized the E(r) and stddev, in your model you are averaging the daily returns, is that correct?

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      That's correct, no need to annualize as long as everything is daily frequency. You could also do weekly, monthly etc.

    • @sagauer
      @sagauer 2 роки тому

      @@DavidJohnk thank you!

  • @johnperucki8689
    @johnperucki8689 2 роки тому +1

    What is a good way to graph the efficient frontier including portfolios with short positions? I messed around with the random array min and max but the plot gets zoomed out so quickly

    • @johnperucki8689
      @johnperucki8689 2 роки тому

      Also- when I try to maximize the sharpe ratio (risk free asset in calculation) while allowing short positions in the solver I get an absurd portfolio composition, is that correct for this problem?
      Note- I get the same maximized E[R]/SDp value as you so I entered the formula in correctly

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      I think you're on the right track, randomly allow negative holding weights.

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      @@johnperucki8689 I'm not sure about that John. Normally when you include the risk-free asset you move along the capital market line. I need to make a video on that. By the way, I modified the Sharpe ratio by not including the risk-free rate in the numerator.

    • @johnperucki8689
      @johnperucki8689 2 роки тому +1

      Thank you so much for the video and for responding! These are the best finance lectures on UA-cam!

  • @jandietrich1594
    @jandietrich1594 2 роки тому +2

    Hi David, as you've mentioned, your expected return is based on past performance. Do you have any advice on how to efficiently (low effort) incorporate any assumption about future performance into the model? Nontheless thank you for the great lecture.

    • @lotuskillerlp4736
      @lotuskillerlp4736 2 роки тому +3

      you mean to include implied volatility? Would be interested too... Especially if you consider that we dont have normal distribution of returns which is a key assumption for the model

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      @@lotuskillerlp4736 That might be a good addition to the model!

  • @rishabhchauhan8948
    @rishabhchauhan8948 Рік тому

    Absolutely gem of a video❤

  • @addagudurianand4506
    @addagudurianand4506 2 роки тому +1

    Incredibly done Sir!!

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      Thanks!

    • @sudhirsharma8222
      @sudhirsharma8222 Рік тому +1

      @@DavidJohnk what is X matrix

    • @DavidJohnk
      @DavidJohnk  Рік тому

      @@sudhirsharma8222 It's each securities average return subtracted from it's periodic return. You need it to calculate the varcovar matrix.

  • @cinemania3558
    @cinemania3558 2 роки тому +1

    Should we not be considered the beta factor ?

    • @DavidJohnk
      @DavidJohnk  2 роки тому +1

      Good question, this video demonstrates how diversification can lower risk overall portfolio risk, portfolio beta could be considered also.

  • @dawidlewicki8022
    @dawidlewicki8022 3 роки тому +1

    thank you for the tutorial. what if the stock pays annual dividends ? the stock return considering just the stock prices doesnt show the complete picture, if there arent any dividends included, right ? so how do i it with a given annual dividend yield ?

    • @DavidJohnk
      @DavidJohnk  3 роки тому +2

      You're correct you should definitely take dividends, and also stock splits into account! Finance.yahoo.com has historic price data available in the form of "adjusted close" which takes that into account.

  • @vriendenclubfloret3717
    @vriendenclubfloret3717 3 роки тому +1

    Why do you call it sharpe ratio when you don't work with the risk free rate which is crucial for the sharpe ratio?

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      I thought I called it a "modified Sharpe ratio" for that reason. Sorry for the confusion.

  • @eccentricsilence8231
    @eccentricsilence8231 Рік тому +1

    I'm getting negative expected returns because of the recession for the past 3 months in the 3 bank stocks I selected. The frontier is a straight line.

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      Yes it works better if you pick stocks that have postive returns over your sample period, good point!

  • @Maurice181
    @Maurice181 Рік тому +1

    Thanks for this..!

  • @nicolasbarrold6964
    @nicolasbarrold6964 9 місяців тому +1

    what about the capital allocation line?

    • @DavidJohnk
      @DavidJohnk  9 місяців тому

      I need to make a updated video with that included

  • @ahmadtariq80
    @ahmadtariq80 8 місяців тому

    quick question, why didn't you use the Correlation or Covariance formula straight away rather than going through the detailed formulae?

    • @DavidJohnk
      @DavidJohnk  4 місяці тому

      Good question, just showing how it's done using matrix algebra. I was going to show both ways, but the video get's too long (too much information).

  • @rasmusfreltoft6716
    @rasmusfreltoft6716 2 роки тому +1

    Is there a limit to the number of Assets in a portfolio when using this method? I am analyzing 65 assets and it looks like after 5-6 assets the graph converges to a circle.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      With that many assets, you would have to plot many more points, probably beyond the power of Excel. I'm not sure solver could handle it, but you could maximize portfolio return at incremental levels of risk to plot the efficient frontier.

  • @MuhammadWaleedSajid-d6o
    @MuhammadWaleedSajid-d6o Рік тому +1

    Hi, I'm working on google sheets. I don't normally have an extensive use of excel therefore I never needed to download it. But I surely will after this video. I've followed step by step process and had success at every point up until now. since google sheets do not have a What-If analysis data table option. I was wondering if there's a workaround to populating trial table automatically on Google Sheet. I have been trying to find a way, but I'm very confused. Can anyone share a solution if they are facing similar hurdle. Thank You!

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      I don't know too much about Google Sheets, I don't think it has a solver-like tool either though.

  • @mikozhou104
    @mikozhou104 3 роки тому +1

    My Whatif Analysis datatable started to show the same return and risk numbers after a few hundreds of random sets, what could be the reason? I have changed iteration setting in options but still doesn't work. Thank you!

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      I'm not sure ... I just checked mine and the same thing happens after several thousand! I might have to do with the power of the computer? I even pressed F9 to force manual calculations and id didn't fix it. Interesting! Please, let me know if you figure it out.

    • @mikozhou104
      @mikozhou104 3 роки тому +1

      @@DavidJohnk Thanks for checking on this! I ended up reducing the number of trials to 5000, options setting - auto calculation, iteration enabled for max 10000 times with max change 0.1. It worked but it could be the power of the computer too as I left it running overnight. Thanks again for the video.

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      @@mikozhou104 Thanks for the update!

  • @DavidJohnk
    @DavidJohnk  9 місяців тому

    =rand() in each cell you want a uniformly distributed number between 0 and 1.

  • @Nick6363
    @Nick6363 3 місяці тому

    Why is your Sharpe Ratio that is being used in solver under 1? I successfully followed your model and have the same problem.

  • @richardscerbak2732
    @richardscerbak2732 2 роки тому +1

    Hi, I tried the same method for making an Efficient Frontier with 7 securities. I also generated 10000 trials but the graph doesn't look like yours Efficient Frontier with that curve on the left side. I just want to ask if this method doesn't work for more than 3 securities.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      With more securities, you would need many more points. You can try maximizing the portfolio return at several levels of risk starting at the minimum variance portfolio. That would give you the outline of the efficient frontier. Hope that makes sense!

  • @ЭЛДЭВОЧИРЭнхжаргал

    Very useful video, thank you sir

    • @DavidJohnk
      @DavidJohnk  3 роки тому

      You're welcome, glad it helped!

  • @aristotelispapamentzelopou8231
    @aristotelispapamentzelopou8231 2 роки тому +3

    Amazing demonstration and great excel tips. About the excess return, is it a valid way to calculate it? I would calculate it as the stock return above a risk free return as reference instead.

    • @lucassavosardaro3451
      @lucassavosardaro3451 2 роки тому +1

      Excess return in portfolio management is the return above or below the average return. It is needed to calculate covariance and variance.

    • @aristotelispapamentzelopou8231
      @aristotelispapamentzelopou8231 2 роки тому

      @@lucassavosardaro3451 thank you for the reply. About the first sentence of your comment I can’t recall seeing it somewhere but I guess this can be a type of benchmark

  • @rafaeldavid5812
    @rafaeldavid5812 2 роки тому +1

    Hi Sir, Thanks for the quality of the video. However I don't have in my Excel the Randarray Function. Do you have any alternative please?
    Thank you in advance.

    • @DavidJohnk
      @DavidJohnk  2 роки тому

      You can use the =rand( ) in each individual cell

  • @Sehsailvids
    @Sehsailvids Рік тому

    hey can you put the link to the excel sheet itself please

  • @hoa8021
    @hoa8021 2 місяці тому +1

    Your video is helpful

  • @jakubosobka4414
    @jakubosobka4414 Рік тому

    Is using simple average for calculating average daily returns really a proper way to do it?
    Isnt using log returns or geometric mean a proper way for that?

    • @DavidJohnk
      @DavidJohnk  Рік тому +1

      I agree, ln or geo mean are more proper. I'll be re-recording this (using ln returns) in the near future with some interesting updates, keep an eye out for it!

    • @jakubosobka4414
      @jakubosobka4414 Рік тому

      @@DavidJohnk great, thank you, Sir! Subbed :)

  • @mrnatnatwarlal1972
    @mrnatnatwarlal1972 Рік тому

    I am very green field - basic understanding of markets etc. Accumulated stocks over a period of time. I have 34 stocks in the portfolio. I saw this video and calculated my portfolio's Std Dev and Expected return and Mod Sharpe Ratio. Since I have certain weighted stocks in my portfolio already, the choice of weights can now be made better. So I set up the random array and the Data Table as you did. But the problem is - if I have to pick a risk/reward combination on the efficient frontier, it is hard for me to grab the weightage of stocks. Because the random generator is kicking in somehow and changing the weights.
    I guess my question is - how do you get the weightage values corresponding to a risk/return point on the efficient frontier? Thanks in advance for your response.

    • @Bram-bc3fy
      @Bram-bc3fy Рік тому +2

      I think you should use solver to solve for a specific return/std. An other thing you can do is just try to create the portfolio for wich the sharp ratio (re/std) is optimal. This means that for every x more risk you take on you will get the maximum possible extra return.

  • @CheekFleek
    @CheekFleek Рік тому

    I used this method in sheet, the frontier turns out curved.When I tried to assimilate this in Excel offline, my capm come out as linear line instead of curved line. I increased the decimal places, still no changes. Help,please.