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

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024

Комментарии • 151

  • @vahidmoosavi3097
    @vahidmoosavi3097 2 года назад +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  2 года назад +2

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

    • @vahidmoosavi3097
      @vahidmoosavi3097 2 года назад

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

    • @7vrda7
      @7vrda7 2 года назад

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

    • @karimaelouahmani7078
      @karimaelouahmani7078 2 года назад

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

    • @neptunefinance
      @neptunefinance 2 года назад

      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 3 года назад +161

    Convex Optimization guru !

  • @merylparmer3752
    @merylparmer3752 3 года назад +11

    I love how you put Python with this one 🙏🏻

  • @kamrynmiguel8455
    @kamrynmiguel8455 3 года назад +8

    Amazing lecture 👌🏻

  • @elinorlyng8727
    @elinorlyng8727 3 года назад +3

    Excellent stuff with no BS 🙏🏻

    • @AhmadBazzi
      @AhmadBazzi  3 года назад +1

      Thank you Elinor 🙏🏻

  • @walterkeith1580
    @walterkeith1580 3 года назад +1

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

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      Thank you very much, appreciate it

  • @gregoriopelham4356
    @gregoriopelham4356 3 года назад

    underrated you are definitely

  • @darrinthomas2566
    @darrinthomas2566 3 года назад +1

    5:34 awesome stuff man

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      Glad you liked it, Darrin. For the meantime, make sure you subscribe to the channel here
      ruclips.net/user/AhmadBazzi

  • @danishzehaenarmy4071
    @danishzehaenarmy4071 2 года назад

    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

  • @brunellapostiglione2
    @brunellapostiglione2 3 года назад

    21:23 I love the colors of your frontier.

  • @katepustynnikova1986
    @katepustynnikova1986 3 года назад

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

  • @kimberleecrick9872
    @kimberleecrick9872 3 года назад +1

    Underrated ‼️

  • @jonathanquind4524
    @jonathanquind4524 3 года назад +1

    I just shared it with my colleagues 👌🏻

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      You ROCK, Jonathan 🙏🏻

  • @janayboerger6750
    @janayboerger6750 3 года назад +1

    Excellent lecture, thanks for responding to my request.

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      My pleasure .. Glad you enjoyed it :)

  • @gloryths
    @gloryths 2 года назад

    Pure class. As always.

  • @suemagdaleno9433
    @suemagdaleno9433 3 года назад +1

    Such an underrated

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      Glad you think so Sue. Make sure you subscribe to the channel here
      ruclips.net/user/AhmadBazzi

  • @albertaalvin3453
    @albertaalvin3453 3 года назад +1

    Great job as for sharing the lesson.

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      My pleasure, Alberta 🙏🏻

  • @7vrda7
    @7vrda7 2 года назад

    Nice job ! Thank you for the tutorial

  • @chithru_27
    @chithru_27 2 года назад

    @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.

  • @meerudu4928
    @meerudu4928 2 года назад

    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.

  • @animation_king5644
    @animation_king5644 2 года назад

    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 ;)

  • @FocusedMindset1
    @FocusedMindset1 2 года назад

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

  • @adalbertokupiec9760
    @adalbertokupiec9760 3 года назад

    Love your tutorials

  • @736939
    @736939 3 года назад +1

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

    • @AhmadBazzi
      @AhmadBazzi  3 года назад +1

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

  • @irenasuggs3128
    @irenasuggs3128 3 года назад +1

    I love you and your lectures 📕❤️

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

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

  • @baileylinch7139
    @baileylinch7139 3 года назад +1

    Thanks Ahmad 👍🏻

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

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

  • @louisethibodeaux3693
    @louisethibodeaux3693 3 года назад

    Damn hes the best on RUclips

  • @cubicman2903
    @cubicman2903 2 года назад

    She's an expert trader, amazing professional

  • @neptunefinance
    @neptunefinance 2 года назад

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

  • @netofigueira5512
    @netofigueira5512 3 года назад

    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

  • @closertogod6
    @closertogod6 3 года назад +1

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

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      I'm glad you found it useful !

  • @Aloysa
    @Aloysa 2 года назад

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

  • @johannariffle5585
    @johannariffle5585 3 года назад +11

    I love SKIPPY ❤️😍🥪

  • @bhadvaDIDAS
    @bhadvaDIDAS Год назад

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

  • @canarese
    @canarese 3 года назад

    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?

  • @ziddi_boy__007____l9
    @ziddi_boy__007____l9 2 года назад

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

  • @neelkumar4332
    @neelkumar4332 2 года назад

    👍 thanks for watching👆👆👆

  • @AdityaGupta-xg7ez
    @AdityaGupta-xg7ez Год назад

    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

  • @effiehargraves2038
    @effiehargraves2038 3 года назад +1

    Thank you

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      You're welcome Effie 🙏

  • @marsenicourbachie1071
    @marsenicourbachie1071 3 года назад

    Perfect explanation 🤩

  • @ishu3m332
    @ishu3m332 2 года назад

    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.

  • @zando3345
    @zando3345 Год назад

    It works also with short positions?

  • @23yle
    @23yle 3 года назад

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

  • @IssifuAdama
    @IssifuAdama Год назад

    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?

  • @raghebalghezi9532
    @raghebalghezi9532 3 года назад +1

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

    • @AhmadBazzi
      @AhmadBazzi  3 года назад +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 3 года назад

      They did of course @ragheb !

  • @ammarmazrui2837
    @ammarmazrui2837 3 года назад

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

  • @twbasketchick
    @twbasketchick 3 года назад

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

  • @danesmith1640
    @danesmith1640 Год назад

    @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?

  • @maryrosebain5609
    @maryrosebain5609 3 года назад +1

    Got hungry after this one 🤤

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      Have you some peanut butter !!

  • @NoMoneyVlog_22
    @NoMoneyVlog_22 2 года назад

    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 3 года назад +1

    Can we do implement it on MATLAB ? Thanks

  • @amyluu5532
    @amyluu5532 2 года назад

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

  • @alzheimancer
    @alzheimancer 2 года назад

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

  • @thecosmicgay5551
    @thecosmicgay5551 2 года назад

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

  • @2512greg
    @2512greg 2 года назад

    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 ?

  • @Raj_khot
    @Raj_khot 2 года назад

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

  • @sayednab
    @sayednab Год назад

    where is the code for this project, thanks

  • @bittuj123
    @bittuj123 3 года назад

    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

    • @Диппер-ш3щ
      @Диппер-ш3щ 2 года назад

      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...

  • @woolmetal1101
    @woolmetal1101 2 года назад

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

  • @isabelradulova475
    @isabelradulova475 3 года назад

    Please continue the MATLAB tutorial

  • @ilciavo
    @ilciavo 3 года назад +1

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

    • @AhmadBazzi
      @AhmadBazzi  3 года назад

      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 !!

  • @fuhat1040
    @fuhat1040 2 года назад

    moudle not found

  • @editornp6612
    @editornp6612 2 года назад

    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.

  • @HealthyCartoons
    @HealthyCartoons 3 года назад

    is it the code available?

  • @AXFEP69
    @AXFEP69 2 года назад

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

  • @asimraza8448
    @asimraza8448 2 года назад

    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.__ 2 года назад

    Buffett also said facebook stock is useless.

  • @abmazz9151
    @abmazz9151 2 года назад

    I'm happy today because of Mrs Maria Jones

  • @carmonobyrne5984
    @carmonobyrne5984 3 года назад +1

    Please share with us the code thanks 🙌🏻

    • @AhmadBazzi
      @AhmadBazzi  3 года назад +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.

  • @bingomusickenya
    @bingomusickenya 2 года назад

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

  • @Jerrycatlove
    @Jerrycatlove 2 года назад

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

  • @landjgaming9329
    @landjgaming9329 2 года назад

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

  • @lynnelafon8935
    @lynnelafon8935 3 года назад +1

    👍🏻

  • @AkKa-sx6bz
    @AkKa-sx6bz 2 года назад

    What I've always thought about this scam

  • @spikerkoxu4940
    @spikerkoxu4940 3 года назад +1

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

    • @ilciavo
      @ilciavo 3 года назад +1

      "Last night" XD ruclips.net/video/iRALBW4hBZ0/видео.html

  • @wilhelmwilhelm1251
    @wilhelmwilhelm1251 2 года назад

    Everythin is a vector

  • @woolmetal1101
    @woolmetal1101 2 года назад

    He said the same thing about gold.

  • @as_nirwal_gamrs2223
    @as_nirwal_gamrs2223 2 года назад

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

  •  2 года назад

    2856

  • @ultraninja8096
    @ultraninja8096 2 года назад

    457

  • @Venithasansaka2009
    @Venithasansaka2009 2 года назад

    013

  • @suijthborkar8736
    @suijthborkar8736 2 года назад

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

  • @jidnyeshgaming2863
    @jidnyeshgaming2863 2 года назад

    +17

  • @music_lyrical1929
    @music_lyrical1929 2 года назад

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

  • @gadaatube7357
    @gadaatube7357 2 года назад

    You can join our VIP offers,,

  • @Yusufhanafi_Dex
    @Yusufhanafi_Dex 2 года назад

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

  • @animation_king5644
    @animation_king5644 2 года назад

    And then he bought…a lot!

  • @subhadipgaming9469
    @subhadipgaming9469 2 года назад

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

  • @user-vs6rl4tr7m
    @user-vs6rl4tr7m 2 года назад

    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…

  • @sahil71729
    @sahil71729 2 года назад

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

  • @woolmetal1101
    @woolmetal1101 2 года назад

    I can't make any sense out of bitcoin.

  • @SebastianKottayam
    @SebastianKottayam 2 года назад

    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.

  •  2 года назад

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

  • @BagusChannel54912
    @BagusChannel54912 2 года назад

    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.

  • @ammarshasivari9820
    @ammarshasivari9820 2 года назад

    Imagine if he did for 5 years... Hahaha

  • @slmicrotech3160
    @slmicrotech3160 2 года назад

    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.

  • @ishu3m332
    @ishu3m332 2 года назад

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

  • @dontae_cutz1501
    @dontae_cutz1501 2 года назад

    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!

  • @modelworkzseo
    @modelworkzseo 3 года назад

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

  • @dorjankrasniqi8744
    @dorjankrasniqi8744 3 года назад

    :)