How To Build a Stock Screener | Python For Finance Episode 3

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2024

ความคิดเห็น • 366

  • @wes3357
    @wes3357 4 ปีที่แล้ว +10

    Three vids down, six to go. I've been troubleshooting along the way finding my errors. You have done such an incredible service by posting these tutorials. Thanks again.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +2

      Glad you find them helpful Wes!

  • @larz4437
    @larz4437 4 ปีที่แล้ว +3

    Just started reading Mark Minervini's "Trade like a stock market wizard" and this program is really going to come in handy. I'll have to go over the code and video a few times to make sure I understand everything but huge thanks for your time and effort in creating this!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      My pleasure! Thanks for watching!

  • @vicksgaming4u
    @vicksgaming4u ปีที่แล้ว +2

    first time ever saw a TH-camr explained each an everything really loved ur way of teaching ❤

    • @RichardMoglen
      @RichardMoglen  ปีที่แล้ว

      Thank you so much 😀

    • @vicksgaming4u
      @vicksgaming4u ปีที่แล้ว

      @@RichardMoglen why dont you make more videos on programming for algo in python now a days as will love to watch more about it an learn more

  • @TraderPulse
    @TraderPulse 4 ปีที่แล้ว +2

    15:13 Repetitive, but the way you organize it making so easy to follow is amazing! Glad you didn't choose to skip, because we as the viewer can just do that :)

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Of course, its always best to show more and let the viewer go as past through the process as they want. Have a great weekend!

  • @motorbikedreams
    @motorbikedreams ปีที่แล้ว +1

    Hi Richard ... i have not done coding for 25 years :) Last time i did it, it was Turbo Pascal. So ... not knowing anything about the Python, following your steps i have built my own screener that just ran across 600 stocks and returned 20 for further analysis. Thank you Sir!
    Also ... you planted additional riddle for me ... i could not figure out why my script was pulling only first 5 items from my large list. I was looking for some counter i=5 :) You hid it well .... but i found it :) Thank you again!

    • @RichardMoglen
      @RichardMoglen  ปีที่แล้ว

      Ha, glad you found the video useful!

  • @johnmason9883
    @johnmason9883 3 ปีที่แล้ว +2

    Thanks for the video. This python script saves so much time. I also appreciate the introduction to using yfinance and python. What great tools! Your explanations and timing are just right. You help out people new to programming and don't bore guys that know how to code. Great work!

  • @jitkadyan
    @jitkadyan 4 ปีที่แล้ว +1

    Great Video after paying for many course and good fees i am not able to find such a useful information that you are providing in free , very very thankful to you and hope you will keep it going and will try to spread it as much i can that other benefit it also, thank you again Friend

  • @andrewwhitcomb4857
    @andrewwhitcomb4857 4 ปีที่แล้ว +1

    At around 3:00, it suggested ENPH as the best stock to buy. Note that this stock has doubled since this video has been posted and it's 10/12/2020 now.

  • @k2icc
    @k2icc 2 ปีที่แล้ว

    I went over this today again and it is working great. It will be nice as a Streamlit app, with the indicators plotted on it, for a better visual appeal, and a selection list of the top candidates from the resulting list at least. Very nice.

  • @kevinspaeth5895
    @kevinspaeth5895 2 ปีที่แล้ว

    WOW!! This was great! I am going to have to re-watch this again, for there was many things I missed, while I was taking notes. Very informative and full of good information. Thanks for doing this great presentation.

  • @KM-mc7ve
    @KM-mc7ve 3 ปีที่แล้ว

    Thank you for the nice tutorial. I ran the script and here are my findings.
    Step 1: Run with .head of old data based on your google sheets - done.
    Step 2: Get update from Marketsmith - done.
    Step 3: Run script removing .head based on whole list extracted from step 2 - failed. Solved. I needed to convert file to xls format to satisfy pandas module which does nto read later versions of excel anymore.
    Step 4: Run script removing .head based on whole list extracted from step 2 - failed after 297/4500 iterations. (I think the query portion of the script concerning yfinance and its api times out?).
    Step 5: Rerun script implementing sleeping script after each iteration. - failed again. - Script just hangs.
    Step 6: Reran script after tweaking connection and exception settings to increase robustness:
    Results:
    I got approximately 1300/4500 companies satisfying the 1-7 criteria concerning moving averages and then the RS criteria (condition 8). Does this sound about right? If not, I will go back and have a look where I went wrong.

  • @RichardMoglen
    @RichardMoglen  4 ปีที่แล้ว +24

    For the Tutorial's sake, I was only running the top 5 stocks. To run a complete scan delete the line stocklist=stocklist.head()

    • @markushipp8039
      @markushipp8039 3 ปีที่แล้ว +2

      Appreciate your great work, absolut amazing Richard. When you delete the line stocklist=stocklist.head(), the program runs in an infinite loop. you must insert the number of lines (stocks). eg for 50 stocks stocklist=stocklist.head(50). You are the reason why i will purchase an Raspberry Pi for such funny stuff. You should get a commision from them. THX Markus

  • @brettoski
    @brettoski 4 ปีที่แล้ว

    This is brilliant Richard, I use Finviz as a screener but you can't filter to Mark's requirements exactly on the free version, intend to toy around adding a few custom conditions, definitely above $10, and maybe market cap and average volume.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Great Brett, All you need to do is add some if statements!

  • @secretpanda0072
    @secretpanda0072 4 ปีที่แล้ว +3

    love what you're doing Richard!! thanks again, looking forward to the next video.

  • @user-ol7bq4ly1l
    @user-ol7bq4ly1l 4 ปีที่แล้ว +5

    Never stop making videos, we need you in our mission to beat the suits

  • @devinteran2958
    @devinteran2958 2 ปีที่แล้ว +2

    Great video! I enjoy how easy it is to follow along. Thanks for putting so much time into this.

  • @nate2262
    @nate2262 4 ปีที่แล้ว +13

    Would you be able to show how you made the all stocks excel template?

  • @sd9485
    @sd9485 3 ปีที่แล้ว

    Richard, Your videos are very informative, knowledgeable, and well made. Thanks for sharing all the information.

  • @dustinshaw3355
    @dustinshaw3355 3 ปีที่แล้ว +1

    I subscribed because you said cmin in the last video with a straight face.

  • @Jeffjia1129
    @Jeffjia1129 3 ปีที่แล้ว

    Richard, this is great in addition to your "interview chat". million thanks:)

  • @enzanto
    @enzanto 2 ปีที่แล้ว

    Thank you very much! This video. and all your others has REALLY been profitable! I built a stock screener that runs every day and posts the result in my discord channel. so i know which stocks to take a look at. I don't have _crazy_ numbers yet, but currently beating the market by a fair amount. And that feels great!

  • @ptahX
    @ptahX 4 ปีที่แล้ว

    Types of Programs I'd like to create - A really good custom Stock Options Scanner that can either Scrape data from a public site or pull it through a free APi is my main goal. Awesome video by the way - Thank you for this, liked hit the bell and subscribed !

  • @nssandhu4401
    @nssandhu4401 9 หลายเดือนก่อน +1

    Excellent post. M able to learn python and market in the same video 😊

    • @RichardMoglen
      @RichardMoglen  9 หลายเดือนก่อน

      Glad it was helpful!

    • @nssandhu4401
      @nssandhu4401 9 หลายเดือนก่อน

      @@RichardMoglen m able to print dataframe and it prints values but excel was empty initialy, though a little debugging helped. I printed the exceptions and got the solution.

  • @yaboiiprettyeyez
    @yaboiiprettyeyez 4 ปีที่แล้ว +1

    Very powerful ideas behind this approach. Great content!

  • @johngalt9758
    @johngalt9758 4 ปีที่แล้ว +1

    Thanks for the video Richard. I'm really enjoying this video series on Python For Finance.

  • @aatsw
    @aatsw 4 ปีที่แล้ว +1

    This is awesome. Thanks for explaining and teaching and also providing a neat template for others to expand on. Great work, and please keep it up.

  • @octoeight2088
    @octoeight2088 4 ปีที่แล้ว +1

    Great tutorial Rich! Thanks for taking time out to make this video!

  • @patcharaphanjearsavaswatta6149
    @patcharaphanjearsavaswatta6149 ปีที่แล้ว

    Your videos are very educational. Great works. Thank you so much.

  • @pedroppcc1
    @pedroppcc1 4 ปีที่แล้ว +3

    Great videos man. I'll try to make a program that captures the maximum drawdown and rally and compares them to their median. That way you can set a trailing stop loss/sell limits that don't trigger with volatility but do trigger on good timing

  • @nishadseeraj7034
    @nishadseeraj7034 3 ปีที่แล้ว

    Thanks so much for these videos Bro!.... I am new to trading and relatively new to python and your videos are awesome and great teaching.... looking forward to more.

  • @virgilvoicescu4803
    @virgilvoicescu4803 3 ปีที่แล้ว

    Thanks!

  • @justtohost3431
    @justtohost3431 2 ปีที่แล้ว +1

    Great vid! Thanks for working it out and uploading it!

  • @Ryan_Perrin
    @Ryan_Perrin 4 ปีที่แล้ว +1

    It is a minor thing, and most likely won't affect performance (but maybe readability in my opinion). you could set the condition variables equal to the logic passed as the argument for your if statement. cond1=currentClose>etc...

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Thanks for the suggestion Ryan

  • @joshkristine6189
    @joshkristine6189 3 ปีที่แล้ว +1

    So good man!. It worked. Thanks so much for doing this Richard appreciate it. Have lots to learn on this, I've actually had a few errors when importing the modules, but glad that pip3 install worked fine. :-)

  • @luislazo1708
    @luislazo1708 4 ปีที่แล้ว +1

    This is great Richard. Thank you!! Holy grail set up bounce of 20 day ema would be cool to do on python.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      To back-test? What is the definition of the holy grail setup?

    • @JokerjOkER-du8br
      @JokerjOkER-du8br 4 ปีที่แล้ว

      @@RichardMoglen For mark's definition is similar to the low cheat or 3c break out. I think the holy grail is from Oneal or IBD...

  • @nicolaslupo5021
    @nicolaslupo5021 4 ปีที่แล้ว +1

    Thanks Richard for yours videos! Them are awesome! Cheers!

  • @traderminghan
    @traderminghan 4 ปีที่แล้ว +1

    hi richard! thank u so much for the tutorial! I am looking to create a web app where users can screen for stocks. Python has been amazing, now im looking into how to match the back end and the front end.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Sounds great! Shoot me a link when you get it up

  • @nikeshdubey4129
    @nikeshdubey4129 2 ปีที่แล้ว

    I checked screener and many more stock filters online but either they were not good enough, i always wanted more features or they were charging a hefty amount. In past i had worked in python and R Programming. So I could understand this all very well. Thank you.. you are genius

  • @sundaresann4749
    @sundaresann4749 4 ปีที่แล้ว +1

    Its really a quality channel. Keep going!

  • @michaelmoheb7800
    @michaelmoheb7800 3 ปีที่แล้ว +1

    Thanks Richard! Great video, I wanted to ask how to make the program scan the whole list of stocks and not only the first 5 stocks.

  • @Vasili_Wears_Shorts
    @Vasili_Wears_Shorts 3 ปีที่แล้ว

    Adding this to my 'to-do list'. Sub'd!

  • @jaspindersingh3801
    @jaspindersingh3801 2 ปีที่แล้ว +1

    Hi Richard, your videos are great. Quick question, does yahoo finance or is there a way to create a scanner or an endpoint to scan through all stocks without providing a list of stocks to scan through? I noticed in your videos you are passing a list of stocks or have specific stocks column to iterate over. Thanks in advance.

  • @gilltim5711
    @gilltim5711 2 ปีที่แล้ว

    Looking at these stocks in April 2022, all three of them made huge gains.

  • @NoToBusinessCasual
    @NoToBusinessCasual 3 ปีที่แล้ว +1

    By the way, it would be great if you could covet Point and Figure charts in a similar video. There are plenty of resources to understand how to create them, but I have never come across a good explanation of how to make use of them for possible future stock movement, and moreover how to use them in Python.

  • @crashie9604
    @crashie9604 4 ปีที่แล้ว +1

    Thanks for this video series, this is super helpful for me getting into investing. I do have a couple of questions that i can't seem to fix. I've used the excel sheet you linked to in the description, but the top 5 just prints out "no data on (ticker)". Shouldn't i get the same 2 results as you in the video? Or is it because the data in the sheet you uploaded is more up to date with the current situation and that has caused the stocks to no longer meet our conditions?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      I'm so glad you are enjoying the series!
      What stocks are in the top 5? You shouldn't get the same results, in fact because of the poor conditions very few stocks should meet the criteria. However most stocks on that list should still have data.

    • @crashie9604
      @crashie9604 4 ปีที่แล้ว

      @@RichardMoglen The top 5 is INMH, ENPH, PLMR, VCTR. SEDG. I suspected that might be the case, but this is all new to me so i wasn't sure. Thanks for taking the time to respond!

    • @MarbleComps
      @MarbleComps 3 ปีที่แล้ว

      @@crashie9604 did you ever find out how to solve this? I’m getting the same error message as well!

  • @GodX36999
    @GodX36999 3 ปีที่แล้ว

    Hi Richard, Thank so much for your great share that I’m wishing and dreaming about. I love backtest, stock screen, use model to predict stock price and may be if grab financial index ( ex: ROA, Debt, devidend, eg) Python programming

  • @guzzlea131
    @guzzlea131 4 ปีที่แล้ว +2

    Thanks for the great vids as always richard!!
    I think for the condition flags you could just do cond_2=(moving_average_150 > moving_average_200) etc to set the flags without the if/else statements, right?

  • @koz.b1741
    @koz.b1741 4 ปีที่แล้ว +1

    wish there were more than 1 like button. thanks Richard, you are great
    Is there a way to add the current price to the excel output?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      The current price would be df["Adj Close"][-1]

    • @koz.b1741
      @koz.b1741 4 ปีที่แล้ว

      @@RichardMoglen thanks a lot man

  • @nirsarkar
    @nirsarkar 2 ปีที่แล้ว

    Thanks , this gives a real head start

  • @ryanbogrow1668
    @ryanbogrow1668 4 ปีที่แล้ว

    Love these videos! Keep on making them, they are very helpful and insightful

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Thanks Ryan! Appreciate you taking the time to watch them!

    • @ryanbogrow1668
      @ryanbogrow1668 4 ปีที่แล้ว

      @@RichardMoglen Question - what source do you use for your stock ranking spreadsheet? Where can I download a current version in the future?

  • @thefeds3352
    @thefeds3352 4 ปีที่แล้ว

    Hello Richard,
    I am learning significantly from you...... Thank you for this.
    In this tutorial the code works off of your excel sheet to obtain the IBD RS value. I wish to obtain your thoughts on how to establish this value on stocks that are not in your list.
    I have wrecked my brains with excel to no avail on how to calculate the IBD RS. Initially I would like to calc it against S&P500, but in the future I would like to calc it on economic sectors (Since I have the data) hopefully to bypass indexes that are tampered with.
    Your insights would be very useful to me. Thank you in advance.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Thanks! I get updated sheets from marketsmith every week

  • @cecilwang6494
    @cecilwang6494 2 ปีที่แล้ว +1

    Thank you so much! This helps a lot!!!

  • @johanekman6273
    @johanekman6273 2 ปีที่แล้ว

    Fantastic video. I might have ran into a issue. The code seems to run as it should without any problems according to the text editor but it does not manage to find any stocks that meet the requirements that was set up. So the program does not create an excel file. Have i done something wrong or is it just that it does not make a file if there are no sqreening results?

  • @JomanSofly
    @JomanSofly 2 ปีที่แล้ว

    Thank you Richard. Does IBD have a API to get the RS rating for each stock ???

    • @RichardMoglen
      @RichardMoglen  2 ปีที่แล้ว

      Unfortunately not but you can download the data into a spreadsheet

    • @JomanSofly
      @JomanSofly 2 ปีที่แล้ว

      @@RichardMoglen thanks for the reply. Really ? even without a subscription ?

  • @WillSaxophone01
    @WillSaxophone01 3 ปีที่แล้ว

    Hey Richard, I am getting an error in my code when trying to read a spreadsheet from chart mill, the error is
    Traceback (most recent call last):
    File "C:\Users\avery\Documents\StockScreener.py", line 28, in
    RS_Rating=stocklist["RS_Rating"][i]
    File "C:\Users\avery\Documents\lib\site-packages\pandas\core\frame.py", line 3024, in __getitem__
    indexer = self.columns.get_loc(key)
    File "C:\Users\avery\Documents\lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
    raise KeyError(key) from err
    KeyError: 'RS_Rating'
    Also when I scan your excel sheet it only gives me 4 stocks, is this normal? Thank you

  • @Pablo_M2024
    @Pablo_M2024 2 ปีที่แล้ว

    Hi Richard, great video. One question, maybe you gave the answer but English is not my language I could not understand. It can only be done with 5 stocks? Is there any way to scan the rest of the list? Thanks

  • @johnbroe6116
    @johnbroe6116 4 ปีที่แล้ว +1

    Hey Richard, great videos by the way. I was wondering if you could upload the raw excel sheet with that data every time you make a video from this playlist because it is very helpful but I'm worried it'll be outdated if I keep using it. Thanks!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +2

      Thanks Joe. If you want updated info (such as the RS rating) I suggest getting an IBD online subscription and downloading it from the IBD stock screener.

  • @mohammedalmuqwishi
    @mohammedalmuqwishi 4 ปีที่แล้ว +1

    Hi Richard, Is it possible to code a scanner that can be run over all tickers at live market data?
    I'm trying to understand the tracking process, Is the process required to import all data from API supplier, then my machine will do the filtring OR my filtering codes would be recognized by API supplier and filter it for me before showing up on my screen?
    Thank you

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      With python you could handle a subset of stocks ~100 but It would take too long to cover much more than that. The way I know how to do it you have to download the data and process it yourself.

    • @mohammedalmuqwishi
      @mohammedalmuqwishi 4 ปีที่แล้ว

      ​@@RichardMoglen
      The idea is to make my filtering scan works for only the top 50 of the highest volume, and that changes from time to time! There're tens of live market data suppliers, Any of those would recommend getting the live market data from?

  • @benjiwitkowski6112
    @benjiwitkowski6112 4 ปีที่แล้ว +3

    Love your videos, however having slight trouble. When I try to run "stockscreener.py" it doesn't execute and says at the very end of its process "Excel xlsx file; not supported". Is there a solution to this?

    • @CalebOsemobor
      @CalebOsemobor 4 ปีที่แล้ว +4

      Change the file type on the downloaded spreadsheet to "xls ". Once you do that make sure you update the filetype in the "filePath" as well. Pandas is not supporting "xlsx" because of some issues with Python 3.9. Best of luck!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +2

      Thanks Caleb for the help

    • @benjiwitkowski6112
      @benjiwitkowski6112 4 ปีที่แล้ว +1

      @@CalebOsemobor Thank you sir!

  • @MassiveHellInc
    @MassiveHellInc 2 ปีที่แล้ว

    Why did we ignore the index when appending the exportList at the end after the if conditions? Without it (igonre_index=False) it returns an empty list. But I can’t figure out why.

  • @kingchakho6074
    @kingchakho6074 4 ปีที่แล้ว +2

    can i ask what's your source of getting the latest fundamental data sheet? btw, i really love your python for finance series

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +3

      I download that info from Marketsmith

  • @skybat723
    @skybat723 4 ปีที่แล้ว +1

    hi Richard - amazing video as always--- could you please share the performance stats over 3-4 months of using this technique pls? ofcourse covid runied lot of plans but would be good to know..

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Hi Kiran, this template was created by Mark Minervini, I don't have performance stats related to this method

    • @skybat723
      @skybat723 4 ปีที่แล้ว

      Richard Moglen sorry Richard- perf stats is probably a wrong word -what I meant is if you have been using this technique to buy in the market ,How have you been doing so far?

  • @DiegoMadrigali
    @DiegoMadrigali 4 ปีที่แล้ว

    Amazing. Thanks. Great series. Keep it going!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      Thanks Diego I plan to. Any types of python programs that you would like to see?

    • @DiegoMadrigali
      @DiegoMadrigali 4 ปีที่แล้ว +1

      @@RichardMoglen itd be cool to show an example extracting data from another source/s (different api, excel file, cvs file), append it to the existing data frame and use that data to add different filters

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      @@DiegoMadrigali good ideas!

  • @saltyspades7493
    @saltyspades7493 4 ปีที่แล้ว +1

    Thank you Richard! Can you show a way to connect this to a terminal? That would complete the cycle =)

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      I'm not sure what you mean to a terminal? A broker?

    • @saltyspades7493
      @saltyspades7493 4 ปีที่แล้ว +1

      @@RichardMoglen Yes! my apologies. I've figured out how to connect to a broker called Alpaca, but the authenticating through the command prompt is getting messed up. I was hoping you could show a step-by-step tutorial how to connect this to a broker so we could possibly use this and other things to write programs

    • @hamad.learns
      @hamad.learns 4 ปีที่แล้ว

      Salty Spades check out quantconnect.

  • @KarlsonHobgoblin
    @KarlsonHobgoblin 4 ปีที่แล้ว +1

    Im amazed, really yout should be honored. You got subscribed for sure.
    There is just one question behind and ,maybe i didnt get i right because im not native. The data we are using here "Richard All Stocks" its a one time fixed data sheet right? So the datas are not renew by itself right? The programm runs perfectly...but the data sheet behind how get it updated? Which ressource you used for it?So the Excel File Richard All Stocks is based on what?
    Thanks a lot
    rreally apperciate it

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      Hey Skott thanks! I get that data from Marketsmith and update it every week: marketsmith.investors.com/ms-platform/?src=A00587A&refcode=RM_Links

    • @KarlsonHobgoblin
      @KarlsonHobgoblin 4 ปีที่แล้ว +1

      @@RichardMoglen wish you all great things in Life. Thanks for sharing and spreading your ideas.
      I will work on it.

    • @KarlsonHobgoblin
      @KarlsonHobgoblin 4 ปีที่แล้ว

      1449$ thats though :)...would you say by experience its worth for it? just thinking about if there is any open source ..what i dont think so..pitty :)

  • @rohitmalladi4546
    @rohitmalladi4546 3 ปีที่แล้ว +1

    Hi Richard, thanks for the videos ! Subscribed and liked, really digging your approach....
    Could you help me with a traceback error I'm getting for the line "stocklist = pd.read_excel(filePath)" ... ?
    It denies the permission for my file path. Why is that?

    • @RichardMoglen
      @RichardMoglen  3 ปีที่แล้ว

      Thanks Rohit, make you have defined the filepath correctly

  • @keving7462
    @keving7462 4 ปีที่แล้ว +2

    where did this excel sheet with all the tickers and information come from? I.e. how do I get a more current version or will I need to build it myself.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      I download it from Marketsmith: marketsmith.investors.com/ms-platform/?src=A00587A&refcode=RM_Links

    • @keving7462
      @keving7462 4 ปีที่แล้ว +1

      @@RichardMoglen wow that was fast. Thank you! Videos are great!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      @@keving7462 thanks man!

    • @eleanortay2389
      @eleanortay2389 3 ปีที่แล้ว

      @@RichardMoglen Would you be able to recommend a free website to download similar information as you would have to pay for MarketSmith

  • @mikest8530
    @mikest8530 2 ปีที่แล้ว

    Hi, just wanted to know what packages do I need to run the code. Give me some hours, I am using visual studio. Help

  • @simeongill8552
    @simeongill8552 3 ปีที่แล้ว +1

    Great Series Richard- loving and learning with every video :)
    Just a quick question- how would we add a sleep.time delay to our code so not to overload the finance API ?

    • @RichardMoglen
      @RichardMoglen  3 ปีที่แล้ว

      Thanks! Just put it in the loop each time it gets a new stock

  • @kristanmanohar5730
    @kristanmanohar5730 3 ปีที่แล้ว

    For some reason, an error pops up in the "file path" line. How do I fix this? Like pycharm can't read the excel data

  • @JM-lw6py
    @JM-lw6py 2 ปีที่แล้ว

    I'm learning Python and would like to know if there is a way to program code that scans the us exchanges live for specific signals to alert me when the 20 day moving average crosses the VWAP? Is this possible?

  • @diegomunoz1171
    @diegomunoz1171 4 ปีที่แล้ว

    A little late for the book on my Christmas wish list, but I want to create a python program that can change the world.

  • @djfong
    @djfong 4 ปีที่แล้ว +1

    Thank you for taking the time to write and share this knowledge. You are truly teaching us all 'how to fish.' Question - I am getting that pandas.util.testing is deprecated message (and it looks like you are too). What does this mean, and how would you suggest we adjust for this when we can't use it anymore?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      Thanks for watching! I haven't yet found a way to disable the message. To my knowledge this doesn't affect performance in any way. We don't use that functionality.

  • @andychang6585
    @andychang6585 4 ปีที่แล้ว

    Hi Richard, Thanks for the great videos! They are very informative and you are great at explaining things step-by-step. Keep up the great work and your channel will become successful. I am curious as to where you are getting the source excel spreadsheet? Is that another custom screener or something that is available to the public? I am not sure how much you use options, but a volatility calculator might be a useful idea for a future series. Thanks again.

    • @ValentinLHB
      @ValentinLHB 4 ปีที่แล้ว +3

      Hi Andy, you might want to check out Richard's twitter (@RichardMoglen) where he tweeted about this excel spreadsheet. If I remember correctly the data is from Investor's Business Daily. Hope it helps, I am not sure it is available for free though

    • @andychang6585
      @andychang6585 4 ปีที่แล้ว +1

      @@ValentinLHB Thank you

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Thanks for the nice words Andy. I get the data for my spreadsheet from Marketsmith as Valentin said. A Volatility calculator is a great idea thank you!

  • @Saiyans224
    @Saiyans224 3 ปีที่แล้ว

    Amazing Series Richard!!
    I am new to coding but this series has helped me learn a lot but I get stuck only on one thing that is getting a fundamental sheet for indian market.
    I have check all the videos and all the sites but unable to get RS rating for indian market.
    Could you please help me

    • @rohansarda
      @rohansarda 2 ปีที่แล้ว

      Hi, did you ever manage to get RS rating for indian market? Even I'm struggling to find it :)

  • @soundbeans
    @soundbeans 3 ปีที่แล้ว +1

    Interesting stuff, I am playing with this code now myself after reading Minervini's book.
    Some thoughts:
    You set moving_average_200_20past = 0 if the try/except fails.
    So, if it fails, your condition "if moving_average_200 > moving_average_200_20past" will always be true. Any time that line fails, your stock will pass the test. Because you will have set "moving_average_200_20past" to zero. What if the actual "moving_average_200_20past" was 5 million? And you just couldn't access the data.
    Also, the "within 25% of the 52 week high" condition is not 100% correct. It should be within 25%, but not past it. So you need another condition to say that it should not be greater than the 52 week high. It cannot be gone past the 52 week high, because then the current price will be the 52 week high ( a paradox).

  • @mank511
    @mank511 4 ปีที่แล้ว

    Hello Richard plz make a screener for Indian share market for live scanning of stocks with volume and price action
    .Thank u for videos

  • @mvespolioli
    @mvespolioli 3 ปีที่แล้ว

    How can we get an updated version of the excel sheet?

  • @mateuszchrzastkowski8078
    @mateuszchrzastkowski8078 4 ปีที่แล้ว +1

    great channel Richard

  • @AnkitPatel5
    @AnkitPatel5 4 ปีที่แล้ว +2

    Where do you get the raw excel sheet with all that data? That seems to be the meat of it. Is that exported from IBD somehow?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      Yes I export that from MarketSmith

    • @PeterJavorkai_is_on_fire
      @PeterJavorkai_is_on_fire 4 ปีที่แล้ว

      @@RichardMoglen really great videos! Keep them up, subscribed! I was wondering if there are some other alternatives to get similar data as on the MarketSmith one? I wouldn't invest yet $20 for the three weeks before playing with their data.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      @@PeterJavorkai_is_on_fire So IBD offers several different products. The regular online subscription includes a stock screener which provides a lot of the same data but with less flexibility.

    • @PeterJavorkai_is_on_fire
      @PeterJavorkai_is_on_fire 4 ปีที่แล้ว

      @@RichardMoglen Thank you, will have a look!

  • @brazprop
    @brazprop 4 ปีที่แล้ว +1

    Thank you for a great video, Richard. I really enjoy this finance series. There is one thing I cannot get working, though.
    I would like to create my own input csv file. If I export a portfolio from Yahoo finance, I will have the symbol for the stocks, but what about the RS rating? How do I add that column? Is your input csv file generated from yahoo finance or elsewhere?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      RS rating is only from IBD/Marketsmith. For importing CSV files check out this: pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html

  • @paulnitz8368
    @paulnitz8368 ปีที่แล้ว

    Great video but I ran into insoluble problem with
    stocklist = pd.read_excel(filePath)
    stocklist=stocklist.head()
    Probably something to do with the filepath I entered? Were we to link to the file in Google Docs. ..... Amateur beginner at work here.

  • @hamad.learns
    @hamad.learns 4 ปีที่แล้ว +2

    Richard, thank you very much for this amazing content. Totally support you, and keep it coming! A Question please:
    I find this line pretty confusing:
    df['sma_'+str(sma)] = round(df.iloc[:4].rolling(window = sma).mean(), 2)
    why don't just replace it with something like this?:
    'df['sma_'+str(sma)] = df.rolling(window = sma).mean()['Adj Close']
    Thanks!

    • @hamad.learns
      @hamad.learns 4 ปีที่แล้ว +1

      Sorry, just as a followup question, why have
      for x in smaused:
      sma = x
      Can't we just do :
      for sma in smaused: ?
      :)
      Thanks!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      To answer this question yes I think you can try it out!

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      I'm not familiar with this syntax but let me know if it works. My line may be confusing because I am also rounding the moving average to 2 decimal places

    • @hamad.learns
      @hamad.learns 4 ปีที่แล้ว +2

      @@RichardMoglen yes I think the dif is that you're using iloc to index column, I used column name. Also in the video you had iloc[:4] which indexes up to the third row! That's what confused me at first. Of course it is corrected in the scripts you've been so kind to upload to iloc[:,4] to get the third column. Btw i've also found a way to write the if statements in way that takes less code. Will muck around with it, then post it if it works.
      Thanks man! Looking forward to your upcoming python tutorials !

    • @jesusshuttleworth7280
      @jesusshuttleworth7280 4 ปีที่แล้ว

      @@hamad.learns are you on twitter?

  • @chrismarshall6860
    @chrismarshall6860 3 ปีที่แล้ว +1

    Hi Richard, great video tutorials on Python! When I run the code in cmd It returns that there is "no data" per each stock and also that there is "empty DataFrame". Any ideas on how to fix this? Thanks!

    • @aprofromuk
      @aprofromuk 3 ปีที่แล้ว

      the DF is empty coz there is no data :)

  • @fredh3152
    @fredh3152 4 ปีที่แล้ว +1

    does the Python scanner instant or does it take a couple of minutes? The reason I ask is I use the 1 min chart and I need instant results and TOS which is the scanner I use now is dynamic and sends alerts every 3 min. which is too slow for me so I am looking for alternatives. Thanks

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      It is not instant, it has to do all the calculations for each stock. I would check out TC2000's scanner which is the one I use for real time: t.co/TstyZKXiGW?amp=1

  • @rafaeltrochereyes8952
    @rafaeltrochereyes8952 4 ปีที่แล้ว +1

    a newby question.. Whats the correct way of typing the filePath for MacOS? Ive tried different ways always getting a filenotfound error

  • @nathanroberts5111
    @nathanroberts5111 3 ปีที่แล้ว +1

    Hey Richard, thanks for the tutorial, it was really helpful. Where did you get the data from in the excel?

    • @RichardMoglen
      @RichardMoglen  3 ปีที่แล้ว

      Thanks Nathan, I get that from MarketSmith

  • @shailebhya
    @shailebhya 3 ปีที่แล้ว

    Thanks for the Vedio Richard

  • @denis_fintech
    @denis_fintech 4 ปีที่แล้ว

    Richard where do you get the stock list for the file? is it a stock that is traded in usa?

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว

      I get it from marketsmith: marketsmith.investors.com/ms-platform/?src=A00587A&refcode=RM_Links

  • @Anesthetics1
    @Anesthetics1 4 ปีที่แล้ว +3

    Hows it going Richard, I was curious where you get these excel spreadsheets with this data? Do you use a python scraper to compile these? If so it would be awesome if you could do a video on scraping stocks for these programs. Thanks again for your work, Liked and Subscribed.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +4

      Welcome to the channel! I download these fundamental sheets from MarketSmith: marketsmith.investors.com/ms-platform/?src=A00587A&refcode=RM_Links
      Best source for fundamental data!

    • @tommasoterzano5180
      @tommasoterzano5180 4 ปีที่แล้ว

      @@RichardMoglen yeah but 20$ for 3 weeks...

    • @BSPhamThiVanThanh
      @BSPhamThiVanThanh ปีที่แล้ว

      It is free to download?

  • @bunhinciong8832
    @bunhinciong8832 ปีที่แล้ว

    One question, do you have the tutorial to build the excel file from yahoo finance data? or can somoone info some useful link please

  • @kirandeepatwal6280
    @kirandeepatwal6280 3 ปีที่แล้ว

    According to you what is the best resource for learning python for financial simulations?

  • @gottylicious
    @gottylicious 4 ปีที่แล้ว

    Hi Richard. I'm interested to know how the results from your screener differ from the Mark Minervini screener that's native to Market Smith? Thanks.

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +1

      Hey Richard, They should be nearly identical, although the MarketSmith screen can sample the RS rating straight from their database and has a different time settings

    • @gottylicious
      @gottylicious 4 ปีที่แล้ว

      Thanks@@RichardMoglen . If I want to run this on a list of stocks from, say, Hong Kong or China exchanges but don't have an RS rating, do I need to remove any lines of code? I realise this wouldn't strictly meet Minervini's criteria, but it would be a start! Thanks.

  • @rverm1000
    @rverm1000 4 ปีที่แล้ว

    this is good . i got a stocking trading bot on online. its gaining a little money at a time. the stocks picked dont seem to be doing much of anything. probably becuase the market is going sideways. however screening for stocks to put in its list might help it to make more money.
    Your question was what programs would i like to make? a trading bot,

  • @kevinstamilie8156
    @kevinstamilie8156 3 ปีที่แล้ว +1

    Hello Richard,
    I was wondering how I would be able to gain access to an updated excel sheet.

    • @RichardMoglen
      @RichardMoglen  3 ปีที่แล้ว

      Hey Kevin, I show how to set that up here:
      th-cam.com/video/z0_pozAJZ3M/w-d-xo.html
      th-cam.com/video/WvvyZEVsGHQ/w-d-xo.html

  • @carlosg.320
    @carlosg.320 3 ปีที่แล้ว

    Great video and thank you for explaining the code. If I wanted to only get stocks above a market cap of $2 billion and an RSI (14) of 30, how could I do it? I would appreciate the help. Thank you

  • @dave444
    @dave444 4 ปีที่แล้ว +2

    please make a video on stock trading using machine learning / AI, for example, using LSTM

    • @RichardMoglen
      @RichardMoglen  4 ปีที่แล้ว +2

      That will be a summer project and I will!

  • @Beachlife17
    @Beachlife17 3 ปีที่แล้ว +1

    how would i do this but with more updated quotes? basically i want to select exactly 1 year worth from today, since u r using a file that has that has data already, i want to keep all those columns names and use them, but with up to date information, how would i do this? like where can i get a daily updated file, if it exists?

    • @RichardMoglen
      @RichardMoglen  3 ปีที่แล้ว

      Hi Aaron, you need a marketsmith subscription to access updated data

  • @danielegreco1720
    @danielegreco1720 3 ปีที่แล้ว

    Hi Richard, thank you for all the videos from Italy! I really appreciate this video. I have a question for you: can I automatically fill the excel input file from yahoo finance or whatever other financial website? Otherwise I should fill the file by myself and it will cost me a lot of time. Thank you for your answer

  • @excaliburresumecultureserv1839
    @excaliburresumecultureserv1839 3 ปีที่แล้ว +1

    great videos!!! where can we find the daily stock fundenmental sheet for doing the trading. any source