Stock Market Analysis & Markowitz Efficient Frontier on Python | Python # 11

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 151

  • @vahidmoosavi3097
    @vahidmoosavi3097 Před 2 lety +22

    Great tutorial! A minor point: I think the formula you use for return is not correct. The ratio should be (p2-p1)/p1.

    • @AhmadBazzi
      @AhmadBazzi  Před 2 lety +2

      I was waiting for someone to actually point it out. I'm pinning this comment for visibility.

    • @vahidmoosavi3097
      @vahidmoosavi3097 Před 2 lety

      @@AhmadBazzi glad I didn’t disappoint you! ;)

    • @7vrda7
      @7vrda7 Před 2 lety

      Would that be: returns = (stocks.shift(1)- stocks) / stocks ?

    • @karimaelouahmani7078
      @karimaelouahmani7078 Před 2 lety

      @@7vrda7 Yes I presume, or (stocks.shift(1)/stocks)-1

    • @neptunefinance
      @neptunefinance Před 2 lety

      BE CAREFUL, you can compute like that with stocks only because you don't have negative values or 0. If the initial value is negative, and the final value is more negative, then the return will be positive. In such a case, the positive return represents a loss rather than a profit. If the initial value is zero, then no return can be calculated.
      Ahmad, what you've done is not a problem at all, you can use Rlog=ln(Vf/Vi), also knows as force of interest.
      For example, if a stock is priced at 3.570 USD per share at the close on one day, and at 3.575 USD per share at the close the next day, then the logarithmic return is: ln(3.575/3.570) = 0.0014, or 0.14%.
      working with ln is good because you just have to divide by t to get the logarithmic rate of return : rlog=ln(Vf/Vi) / t.
      so Rlog = rlog*t under an assumption of reinvestment.
      For example, if the logarithmic return of a security per trading day is 0.14%, assuming 250 trading days in a year, then the annualized logarithmic rate of return is 0.14%/(1/250) = 0.14% x 250 = 35%

  • @wildabedolla7853
    @wildabedolla7853 Před 3 lety +161

    Convex Optimization guru !

  • @merylparmer3752
    @merylparmer3752 Před 3 lety +11

    I love how you put Python with this one 🙏🏻

  • @kamrynmiguel8455
    @kamrynmiguel8455 Před 3 lety +8

    Amazing lecture 👌🏻

  • @elinorlyng8727
    @elinorlyng8727 Před 3 lety +3

    Excellent stuff with no BS 🙏🏻

  • @danishzehaenarmy4071
    @danishzehaenarmy4071 Před 2 lety

    This is really helpful for my situation right now, I will make some research and start right away, but do not know the amount for a startup now

  • @darrinthomas2566
    @darrinthomas2566 Před 3 lety +1

    5:34 awesome stuff man

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      Glad you liked it, Darrin. For the meantime, make sure you subscribe to the channel here
      czcams.com/users/AhmadBazzi

  • @brunellapostiglione2
    @brunellapostiglione2 Před 3 lety

    21:23 I love the colors of your frontier.

  • @chithru_27
    @chithru_27 Před 2 lety

    @2 the top for the sake of civilization, it’s better to focus on producing assets, things produced out of thin air that sucks up a lot of financial commitment isn’t good for us in the long run. I think that’s also part of his point too.

  • @walterkeith1580
    @walterkeith1580 Před 3 lety +1

    I really love how you make lessons look more should be awarded prizes for that talent you got !

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      Thank you very much, appreciate it

  • @animation_king5644
    @animation_king5644 Před 2 lety

    Bitcoin is a as any other currency. Like gold or paper banknotes. They don't have a value on their own, but are important for trading. You can trade with Bitcoin and there are countries that legalised Bitcoin as offical currency alongside their own (you can buy for groceries with Bitcoin). I understand Warren's point of view, because he's right on principle. But I will still choose to have some Bitcoin as I will choose to have some paper banknotes ;)

  • @netofigueira5512
    @netofigueira5512 Před 3 lety

    to get annual expected return you should multiply mean log returns by number of days in a year right? or, in that case, multiply it by the number of days in the period selected

  • @meerudu4928
    @meerudu4928 Před 2 lety

    Exactly unlike Tulip big corporations can transfer billions of dollars and only pay a few cents in fees compared to them transfering by bank and paying a huge fee. So bitcoin do have its utility.

  • @736939
    @736939 Před 3 lety +1

    Please create the series (and playlist) for the stock market analysis

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety +1

      Excellent remark, Sam. I had the same idea and would definitely create this over the weekend. Stay tuned 🙏🏻

  • @gregoriopelham4356
    @gregoriopelham4356 Před 3 lety

    underrated you are definitely

  • @jonathanquind4524
    @jonathanquind4524 Před 3 lety +1

    I just shared it with my colleagues 👌🏻

  • @katepustynnikova1986
    @katepustynnikova1986 Před 3 lety

    Ahmad, you are amazing!!! Great tutorial, thank you!

  • @neptunefinance
    @neptunefinance Před 2 lety

    .shift(1) shift to the back not the front right ?

  • @janayboerger6750
    @janayboerger6750 Před 3 lety +1

    Excellent lecture, thanks for responding to my request.

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      My pleasure .. Glad you enjoyed it :)

  • @canarese
    @canarese Před 3 lety

    For the same set of stocks and same date range, I am getting a different set of sharpe ratio and different weights. I wonder what went wrong. I used both 'Close' and ''Adj Close', but both sharpe ratio (max) and weights are widely different. I wonder why?

  • @AdityaGupta-xg7ez
    @AdityaGupta-xg7ez Před rokem

    Hi Ahmad , I hope you are doing well could you also please teach the code to integrate the plot SML , CAL , CML line on this very specific efficient frontier graph code tutorial you have provided , thank you so much in advance

  • @cubicman2903
    @cubicman2903 Před 2 lety

    She's an expert trader, amazing professional

  • @johannariffle5585
    @johannariffle5585 Před 3 lety +11

    I love SKIPPY ❤️😍🥪

  • @FocusedMindset1
    @FocusedMindset1 Před 2 lety

    His argument could also refer to art, rolex, wine etc... it does not produce anything but prices are still going up

  • @ammarmazrui2837
    @ammarmazrui2837 Před 3 lety

    when i hit shift+enter after entering the symbol its not showing any output. It just creates a different line.

  • @albertaalvin3453
    @albertaalvin3453 Před 3 lety +1

    Great job as for sharing the lesson.

  • @kimberleecrick9872
    @kimberleecrick9872 Před 3 lety +1

    Underrated ‼️

  • @suemagdaleno9433
    @suemagdaleno9433 Před 3 lety +1

    Such an underrated

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      Glad you think so Sue. Make sure you subscribe to the channel here
      czcams.com/users/AhmadBazzi

  • @7vrda7
    @7vrda7 Před 2 lety

    Nice job ! Thank you for the tutorial

  • @raghebalghezi9532
    @raghebalghezi9532 Před 3 lety +1

    Thank you for great work as usual! Skippy Peanut Butter should pay you for advertising.

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety +1

      That's funny haha .. I should be thanking them for the great product !! Thanks for leaving a comment and subscribing to the channel. It is very much appreciated, Ragheb🙏

    • @clarissalefebvre2784
      @clarissalefebvre2784 Před 3 lety

      They did of course @ragheb !

  • @zando3345
    @zando3345 Před rokem

    It works also with short positions?

  • @irenasuggs3128
    @irenasuggs3128 Před 3 lety +1

    I love you and your lectures 📕❤️

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      Make sure you like and subscribe to receive future notifications about the channel !!

  • @gloryths
    @gloryths Před 2 lety

    Pure class. As always.

  • @23yle
    @23yle Před 3 lety

    Great session Mr can this be generalized to 5 or maybe 10 stocks?

  • @bhadvaDIDAS
    @bhadvaDIDAS Před rokem

    You just saved my ass.... thannk you !!!

  • @louisethibodeaux3693
    @louisethibodeaux3693 Před 3 lety

    Damn hes the best on CZcams

  • @IssifuAdama
    @IssifuAdama Před rokem

    Hi Ahmad, i am trying to use datareader in python but i am getting this error ''ModuleNotFoundError: No module named 'pandas_datareader' '' can you please help me?

  • @danesmith1640
    @danesmith1640 Před rokem

    @Ahmed I am having an issue where VS Code is saying there is a size limit. I have changed all file size and download columns to have no constraints but it will still not work. Do you have any suggestion on how I can. get this to work?

  • @baileylinch7139
    @baileylinch7139 Před 3 lety +1

    Thanks Ahmad 👍🏻

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      You're most welcome Bailey. Glad you liked it 🙏

  • @adalbertokupiec9760
    @adalbertokupiec9760 Před 3 lety

    Love your tutorials

  • @neelkumar4332
    @neelkumar4332 Před 2 lety

    👍 thanks for watching👆👆👆

  • @twbasketchick
    @twbasketchick Před 2 lety

    What if I want to do this without short selling constraints?

  • @Aloysa
    @Aloysa Před 2 lety

    I've never heard or seen any of her clients complain of Lost....I think she's just too perfect

  • @effiehargraves2038
    @effiehargraves2038 Před 3 lety +1

    Thank you

  • @amyluu5532
    @amyluu5532 Před 2 lety

    i just needed some help please. For the sharpeRatio it keeps coming up as invalid syntax

  • @alzheimancer
    @alzheimancer Před 2 lety

    Your fomular for computing returns is wrong. The correct way is "returns = (stocks - stocks.shift(1))/stocks.shift(1)"

  • @bittuj123
    @bittuj123 Před 3 lety

    Thank you Ahmad for this amazing lecture, I am using the same tickers and the date range but still I got different optimal weights. Can you please elaborate why this could be? I could not figure it out. thanks

    • @user-gv6gk8vd7h
      @user-gv6gk8vd7h Před 2 lety

      You get different weights bacause our sharp ratios array is based on randomly generated portfolios from which we get one with maximum sharp ratio value, so result can be different running same code...

  • @NoMoneyVlog_22
    @NoMoneyVlog_22 Před 2 lety

    Buffet doesn't understand. He's looking at it as gold. Gold never became a worldwide means of exchange. People stopped using gold and started using bank notes that listed the amount of gold they were worth (like checks).

  • @dravenpamela647
    @dravenpamela647 Před 3 lety +1

    Can we do implement it on MATLAB ? Thanks

  • @2512greg
    @2512greg Před 2 lety

    I don't know why but when i write this line of code :expectedReturn[k] = np.sum( meanLogRet = w ) i have this error : _sum_dispatcher() got an unexpected keyword argument 'meanLogRet' i have already install numpy i don't how to do it please can you help me ?

  • @marsenicourbachie1071
    @marsenicourbachie1071 Před 3 lety

    Perfect explanation 🤩

  • @ziddi_boy__007____l9
    @ziddi_boy__007____l9 Před 2 lety

    That's true, most people today are seeing a lot of failures in forex and crypto sector due to poor orientations and bad experts.

  • @ishu3m332
    @ishu3m332 Před 2 lety

    The greatest investors of their time will of course defend their investment. After all they decide how much is your production worth and crypto is threating their power.

  • @closertogod6
    @closertogod6 Před 3 lety +1

    Love the highlights part, amazing visuals, thanks for sharing.

  • @ilciavo
    @ilciavo Před 3 lety +1

    Ok let me get some Peanut butter first! :) Can you make a video about the GameStop scandal?

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety

      Haha, sounds like a great plan Leo !! I need to research more stuff about the incident, but definitely would consider it for future videos. Thanks for the great idea !!

  • @maryrosebain5609
    @maryrosebain5609 Před 3 lety +1

    Got hungry after this one 🤤

  • @sayednab
    @sayednab Před rokem

    where is the code for this project, thanks

  • @fuhat1040
    @fuhat1040 Před 2 lety

    moudle not found

  • @thecosmicgay5551
    @thecosmicgay5551 Před 2 lety

    People of amsterdam made mistake with tulip in 17th century, and the same mistake is still in the making since then. Isnt it amazing....

  • @isabelradulova475
    @isabelradulova475 Před 3 lety

    Please continue the MATLAB tutorial

  • @woolmetal1101
    @woolmetal1101 Před 2 lety

    It is normal to say, ,Bitcoin does not work as it affect his business

  • @HealthyCartoons
    @HealthyCartoons Před 3 lety

    is it the code available?

  • @carmonobyrne5984
    @carmonobyrne5984 Před 3 lety +1

    Please share with us the code thanks 🙌🏻

    • @AhmadBazzi
      @AhmadBazzi  Před 3 lety +1

      I will not be providing code so that you could watch the entire series, run into errors, and report them here. I think that way we could all learn together and the community could help you further with upcoming errors.

  • @Raj_khot
    @Raj_khot Před 2 lety

    Because a lot of investors are confused about how the traders use their money

  • @Jerrycatlove
    @Jerrycatlove Před 2 lety

    Bitcoin has gone up 8.9 million percent while the dollar has dropped 50 percent. Which one is worthless?

  • @editornp6612
    @editornp6612 Před 2 lety

    Trust me ,a couple of hours of reading is worth the opportunity that you might get. If you finished it and don’t buy the idea. I think you can now safely say that you know enough.

  • @asimraza8448
    @asimraza8448 Před 2 lety

    What I don’t understand is why governments permit cryptocurrency to be used as a currency. If people think it’s valuable, then trade it like pork bellies or copper. But I thought governments want currencies to be transparent and stable, which crypto isn’t.

  • @Manlikejj.__
    @Manlikejj.__ Před 2 lety

    Buffett also said facebook stock is useless.

  • @abmazz9151
    @abmazz9151 Před 2 lety

    I'm happy today because of Mrs Maria Jones

  • @landjgaming9329
    @landjgaming9329 Před 2 lety

    Everybody does the same, governmentd, politicians .....

  • @AXFEP69
    @AXFEP69 Před 2 lety

    I remember friends calling me crazy when I started but now I shut up them with my four figure weekly returned

  • @lynnelafon8935
    @lynnelafon8935 Před 3 lety +1

    👍🏻

  • @as_nirwal_gamrs2223
    @as_nirwal_gamrs2223 Před 2 lety

    Warren Buffett vs Michael Saylor discussion. 👍If you agree.

  • @woolmetal1101
    @woolmetal1101 Před 2 lety

    He said the same thing about gold.

  • @bingomusickenya
    @bingomusickenya Před 2 lety

    She's honest, anyone can start investing now. What sap

  • @spikerkoxu4940
    @spikerkoxu4940 Před 3 lety +1

    Damn but you’re an electrical engineer, how on earth do you know finance ? 😲

    • @ilciavo
      @ilciavo Před 3 lety +1

      "Last night" XD czcams.com/video/iRALBW4hBZ0/video.html

  • @ultraninja8096
    @ultraninja8096 Před 2 lety

    457

  • @AkKa-sx6bz
    @AkKa-sx6bz Před 2 lety

    What I've always thought about this scam

  • @Venithasansaka2009
    @Venithasansaka2009 Před 2 lety

    013

  •  Před 2 lety

    2856

  • @wilhelmwilhelm1251
    @wilhelmwilhelm1251 Před 2 lety

    Everythin is a vector

  • @gadaatube7357
    @gadaatube7357 Před 2 lety

    You can join our VIP offers,,

  • @jidnyeshgaming2863
    @jidnyeshgaming2863 Před 2 lety

    +17

  • @suijthborkar8736
    @suijthborkar8736 Před 2 lety

    But he has invested in a crypto exchange company ... Strange 🌸🌸🌸

  • @music_lyrical1929
    @music_lyrical1929 Před 2 lety

    if buffet wont take your crypto, i wont take your crypto.

  • @user-vs6rl4tr7m
    @user-vs6rl4tr7m Před 2 lety

    Tell me you don’t understand the value of decentralized currency in an age where your assets can be frozen for writing on the sidewalk with chalk…

  • @animation_king5644
    @animation_king5644 Před 2 lety

    And then he bought…a lot!

  • @Yusufhanafi_Dex
    @Yusufhanafi_Dex Před 2 lety

    Wow I' m just shock someone mentioned expert Mrs Maria jonesthought I' m the only one trading with her

  • @sahil71729
    @sahil71729 Před 2 lety

    Says the guy who spinkles 1000's on his raisin bran.

  • @SebastianKottayam
    @SebastianKottayam Před 2 lety

    I am having a laughing fit. Because multimillionaires don't know the value of Bitcoin and how to multiply it. When I listened to this conversation I was right when I said you don't invest in it you multiply it. And if you know what Bitcoin is for you can sell it right and multiply it right and it's all in a legal way. LMAO! I'm hysterical knowing that multimillionaires don't know that Bitcoin is worth millions if you know how to Buy it and sell it.... Interesting who knew the greats can't figure it out. See this is why you should be careful how you treat people because they will know how to do something you don't know how to do.

  •  Před 2 lety

    I really appreciate all your efforts for the 5btc you send to my wallet you really amaze me sir

  • @ammarshasivari9820
    @ammarshasivari9820 Před 2 lety

    Imagine if he did for 5 years... Hahaha

  • @woolmetal1101
    @woolmetal1101 Před 2 lety

    I can't make any sense out of bitcoin.

  • @subhadipgaming9469
    @subhadipgaming9469 Před 2 lety

    Cryptocurrency is a very good option if you would like to trade online.

  • @dorjankrasniqi8744
    @dorjankrasniqi8744 Před 3 lety

    :)

  • @ishu3m332
    @ishu3m332 Před 2 lety

    *This message has been endorsed by the U.S federal reserve.”

  • @BagusChannel54912
    @BagusChannel54912 Před 2 lety

    Every business on this planet is a pyramid scheme so I'm not sure what people mean by that. I don't expect to make the same amount of money as a new hire than the people who's been working in the same position more than 10 years or my boss. I don't think people understand the term Pyramid Scheme and what it means.

  • @slmicrotech3160
    @slmicrotech3160 Před 2 lety

    I invest with Mrs. Johnson Brina, too, she charges a 20% commission on profit made after every trading session which is fair compared to the effort she put in to make huge profit.

  • @modelworkzseo
    @modelworkzseo Před 3 lety

    The video effects are cool. THE AUDIO EFFECTS ARE ANNOYING!! Like sentences with all caps. Just unnecessary.

  • @dontae_cutz1501
    @dontae_cutz1501 Před 2 lety

    when he makes the pool of people analogy its not too people in the pool is over a billion.. warren buffet is as good as gary vee at chatting shit when it come to protecting there interest. neither care about your investments unless they are making your money!