How to build a Stock Recommendation System with Python - Part I: Database Setup [MySQL]

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

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

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

    THE BEST THING I'VE COME ACROSS

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

      Thank you for your appreciative words mate!

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

    Perfect prononce. Bovespa. Thanks for this top content. You are a hero. Thanks

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

      Obrigado :-D Only language that I am at least slightly familiar with was Russian out of those three. Anyhow, I really appreciate your kind comment :-)

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

    namaste sir and welcome to india , another great video.

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

      Haha :-D Namaste! Thanks for watching and your comment :-)

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

    Really good thx.

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

    quite informative

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

      Thanks for watching and your feedback :-)

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

    You a saver !

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

      Very happy about your comment :-) Thanks a lot!

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

    Woooohooooooooooooooooooo

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

    Thanks you so much, its really helpful and good content. And if my Question is, if I need to update the tables data daily, after initial data loading what is the syntax? Thanks for the content.

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

      Hi mate, thanks a lot for your kind words. Really appreciate them!
      I have covered updating here:
      ruclips.net/video/AuZmsv6dQCM/видео.html

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

      @@Algovibes Thanks.... and it works...

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

    Database create all small letters how to solve this

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

    ok professor, I closed the mysql interface and reopened it a while later. There the "fetching" disappeared. What I don't know is if all the existing records were saved from the url of bovespa and rtsi
    Thanks

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

      Ah, perfect. Just saw your comment :-)

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

    Hello professor, how are you? Look, once your code is executed, the records are recorded in the nifty database, but in bovespa and in rtsi it remains in "fetching" ,can you help me?
    Thanks

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

      I am fine, hope you are good as well! :-)
      Can you elaborate on "fetching"?

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

    Thanks for making video so can you share your python code on any repository so we can get and applies from our site.

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

      Thanks for watching mate :-) I am working on a solution on accessible code in the course of this year. Thank for your patience!

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

    hi Algo, just wanna get some advice of you,.... ive just finished learning basic python, ive made a guessing game, word game and recently coded hangman... i dont know what to do next???... shall i carry on with these small projects, or start learning pandas or something??? your input would be appricated... P.S keep up the good work, you doing a amazing job.

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

      Hey mate, thanks for your comment and your kind words. Really appreciate it! :-)
      You raised a good question which is a tough one as it is really individual.
      I support the idea of coding stuff you are REALLY interested in.
      Speaking for myself I was interested (among others) in capital market topics, so I wrote my master thesis in Python and coded some stuff privately for trading and portfolio monitoring.
      I don't support the "do projects" idea in general as it usually ends up in tutorial purgatory with pre-built stuff where you just copy paste syntax. But of course this is a personal opinion. It just didn't work out for me.
      I would learn Pandas as soon as you are really familiar with the basics and functional programming, maybe also the basics of OOP.
      What exactly you need to learn kind of depends in which direction you want to go.
      For me consistency, challenging myself (still) and also kind of a certain curiosity did the job. Also be aware that getting stuck is pretty normal.
      Hope this is helpful for you!

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

      @@Algovibes thanks for the feedback.

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

    How do we build schema for the balance sheets?

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

      Can you elaborate?

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

    Hi, Any chance to use Sqlite instead of MySql for the same project? and whats the disadvantages of using Sqlite

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

      Sure! I was using sqlite in this one here:
      ruclips.net/video/AuZmsv6dQCM/видео.html
      It would be probably even easier to structure that with sqlite. I was just using MySQL to cover another DBMS and also as I can just take a schema per country index. There is no possibility to use schemas in sqlite.

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

    I want to build a somewhat sophisticated option backtester. EOD data, with which I'm going to start, comes as .csv files for every trading day. So instead of downloading from yf, I'm going to have .csv files. Can you give me some starters or general guidelines about code I can use to import that into a MySQL database?

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

      Sounds like a cool project!
      Ad hoc I would just read in the csvs with pandas and use the to_sql function.
      Videos on this:
      ruclips.net/video/OjMDXTlVOYU/видео.html
      and:
      ruclips.net/video/5bUn-D4eL4k/видео.html
      To make it even more fancy:
      Let the written script execute itself once the csvs are incoming (e.g. with cronjobs):
      ruclips.net/video/uEn1uZtPMzw/видео.html
      Cloud solution:
      ruclips.net/video/kjrC1N8K8MI/видео.html
      Hope this is giving you some ideas!

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

      @@Algovibes I don't intend to maintain the database on a daily basis... I just want to get 15-20 years of data and then spend several months backtesting different option strategies ranging from simple to complex on that. When enough time has passed, maybe I'll get another batch data update and repeat but I'll already have the first 15-20 years of backtesting done so that won't change.
      Thanks for the ideas!

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

    Hello, thank you for the Video! When adding any of the data to the MySQL, all of my characters are changed to lower case. What can I do to ensure the correct case is added to the MySQL?

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

      Welcome, thanks for watching :-)
      Not quite sure what you did as this video is writing numeric data only into the DB. Could you elaborate?

    • @GabrielGonzalez-xf8xp
      @GabrielGonzalez-xf8xp 2 года назад

      Hey mate, I got the same problem, this is the error I get: "UserWarning: The provided table name 'EICHERMOT.NS' is not found exactly as such in the database after writing the table, possibly due to case sensitivity issues. Consider using lower case table names.
      warnings.warn(msg, UserWarning)". Were you able to solve the issue?

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

      @@GabrielGonzalez-xf8xp Did some digging. I think it is because your underlying OS is case-insensitive; presumably Windows, like me?

    • @GabrielGonzalez-xf8xp
      @GabrielGonzalez-xf8xp 2 года назад

      @@bdcash Yeah, I'm using windows, it could be that, thanks for look into it. I guess if its lowercase or uppercase doesn't matter anyway

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

      @@GabrielGonzalez-xf8xp I added.lower() to purposely send to the database as lower case, to get rid of the error messages.

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

    What do you think could cause the error?? :
    def schemacreator(index):
    engine = sqlalchemy.create_engine('mysql://root:xxxxxx@localhost:3306/')
    ----> 3 engine.execute(sqlalchemy.schema.CreateSchema(index))
    AttributeError: 'Engine' object has no attribute 'execute'

  • @bryan-9742
    @bryan-9742 2 года назад +1

    awesome video!! I love how yours comes out so clean. even in the ones I completed I got:
    C:\Users\user\anaconda3\lib\site-packages\pandas\io\sql.py:1444: UserWarning: The provided table name 'VTBR.ME' is not found exactly as such in the database after writing the table, possibly due to case sensitivity issues. Consider using lower case table names.
    on every "sucessful" pull

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

    Thanks a lot for taking the time! Very useful and well explained. I'm just struggling a bit to fetch the data for SPY and CAC40. Everything worked pretty smoothly with Nifty50 but then I used, instead of Bovespa and RST, SPY and CAC40. I received a warning: ""C:\Users\username\anaconda3\lib\site-packages\pandas\io\sql.py:1333: UserWarning: The provided table name 'WFC' is not found exactly as such in the database after writing the table, possibly due to case sensitivity issues. Consider using lower case table names. warnings.warn(msg, UserWarning)". I did check the symbols on yahoo and they are exactly as I wrote in the codes. Not sure if you had this issue. Anyway, don't expend a lot of time on this issue, I'll find a solution. Thanks again for the video!

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

      Update on the previous email. Everything worked like a charm. After turn off and turn on MySql, the data was available and the program and stopped fetching the data. That didn't work before just refreshing the data. Thanks again Algovibes!

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

      Thank you very much for sharing your problem. Will be helpful for others for sure! :-)

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

      Daniel have you found the solution? i have the same problem

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

      @@CaioPelegrinelle Fala Caio! Just turning off and on MySql. Or you can try to restart your pc.