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

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

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

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

  • @vicksgaming4u
    @vicksgaming4u Год назад +2

    first time ever saw a RUclipsr 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

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

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

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

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

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

  • @nate2262
    @nate2262 4 года назад +13

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

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

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

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

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

    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.

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

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

  • @user-ol7bq4ly1l
    @user-ol7bq4ly1l 3 года назад +5

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

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

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

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

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

  • @devinteran2958
    @devinteran2958 2 года назад +2

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

  • @secretpanda0072
    @secretpanda0072 4 года назад +3

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

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

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

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

  • @nssandhu4401
    @nssandhu4401 8 месяцев назад +1

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

    • @RichardMoglen
      @RichardMoglen  8 месяцев назад

      Glad it was helpful!

    • @nssandhu4401
      @nssandhu4401 8 месяцев назад

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

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

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

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

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

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

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

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

    Very powerful ideas behind this approach. Great content!

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

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

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

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

  • @johngalt9758
    @johngalt9758 4 года назад +1

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

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

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

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

  • @patcharaphanjearsavaswatta6149

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

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

      I download that info from Marketsmith

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

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

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

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

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

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

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

  • @justtohost3431
    @justtohost3431 2 года назад +1

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

  • @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. :-)

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

  • @nguyenduyta7136
    @nguyenduyta7136 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

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

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

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

  • @cecilwang6494
    @cecilwang6494 2 года назад +1

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

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

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

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

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

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

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

      Thanks Caleb for the help

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

      @@CalebOsemobor Thank you sir!

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

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

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

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

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

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

    Hi Richard,
    How long should it take a web developer to make a stock screener ?

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

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

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

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

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

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

    Thanks , this gives a real head start

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

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

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

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

  • @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:
      ruclips.net/video/z0_pozAJZ3M/видео.html
      ruclips.net/video/WvvyZEVsGHQ/видео.html

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

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

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

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

  • @noelthomas1314
    @noelthomas1314 4 года назад +2

    Richard im a huge fan, but is the excel sheet necessary?Because my computer is kind of outdated.

    • @RichardMoglen
      @RichardMoglen  4 года назад +4

      Hi Noel, no not at all. You could instead define an array of stocks in the python program:
      list= ["AAPL","MSFT","FB"]
      for i in list:
      ...
      let me know if you have any questions!

    • @eagleeye4723
      @eagleeye4723 4 года назад

      @@RichardMoglen instead of that can we pull all the Yahoo Gainers of the day? Like Web Scrapping and use those stocks for day trading?

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

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

  • @sundaresann4749
    @sundaresann4749 4 года назад +1

    Its really a quality channel. Keep going!

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

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

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

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

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

      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

  • @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 :)

  • @olujai2618
    @olujai2618 4 месяца назад

    Where to get the updated excel?

  • @rhard007
    @rhard007 4 года назад

    Hi Richard, I am a bit confused about the way you utilized the if/else code. If all those conditions have to be met, wouldn't you need to use IF/ELIF to check that multiple statements are true?

    • @RichardMoglen
      @RichardMoglen  4 года назад

      With how this code is structured they work them same way.

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

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

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

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

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

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

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

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

    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

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

    were you filming this underwater?

  • @jackguyer1883
    @jackguyer1883 4 года назад +3

    This is great stuff, man! I've really enjoyed it so far. Question for you: Since this video is from about three months ago, is the data that we use from the Excel sheet not useful for the current market? In other words, should I try to get newer data before making my investing decisions?

    • @RichardMoglen
      @RichardMoglen  4 года назад +1

      Yeah the data I share is delayed. I get updates weekly from MarketSmith: marketsmith.investors.com/ms-platform/?src=A00587A&refcode=RM_Links

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

      @@RichardMoglen The problem is after the 3 weeks for 19.99 its 149.88 a month fee for their site.

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

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

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

    Hey Richard seems like i'm getting a bug related to "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead."
    Is there any work around with this?

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

  • @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 :)

  • @jaxnaturals
    @jaxnaturals 7 дней назад

    Why are you using SMA instead of EMA?

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

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

    Where/how did you get the data to make the excel sheet to pull the rsi rating

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

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

  • @sitinoraini5143
    @sitinoraini5143 4 года назад +1

    hi Richard i am a big fan of you, do you have guide how to export the ticker info into excel? i search this out and found that yahoo had disabled the export function? is it true?

    • @RichardMoglen
      @RichardMoglen  4 года назад

      Thanks Siti, could you elaborate on the problem? Is the code I write no longer working? did you use the yf override?

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

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