weixin_39616503
weixin_39616503
2020-12-28 17:30

Possible Suggestion for Faster Runtime

Anyone wanna change it so that it only downloads new data saving the old yahoo finance data? What I mean is storing the mean volume, number of data points, as well as the variance and just updating it depending on the day? This will probably decrease runtime to less than a few seconds. I can try to implement it too if there's enough interest.

UPDATE: I wrote a proof of concept it runs faster amortized. Enough changes needed to be made so I rewrote the main script. Its on my github if anyone is curious. Just a heads up though its very scuffed. File storage is in json so if anyone can fork my code to turn it into csv would be perfect. Runtime is still largely gated by yfinance download speed.

该提问来源于开源项目:SamPom100/UnusualVolumeDetector

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39873356 weixin_39873356 4月前

    I don't know python but I've been trying to get a threadpool working with the progress bar too but this sounds good

    点赞 评论 复制链接分享
  • weixin_39640883 weixin_39640883 4月前

    even i was thinking in same line. i was thinking to store data as dictionary with date as key for my testing. however If someone has already stated working on it and/or have better suggestions we can work together. though seems like simple enough job. i might post something by tomorrow if i do manage to complete it by then.

    点赞 评论 复制链接分享
  • weixin_39897392 weixin_39897392 4月前

    How about you add specific functionality where users can only watch a certain stock for such anomalies.

    点赞 评论 复制链接分享
  • weixin_40005373 weixin_40005373 4月前

    How about you add specific functionality where users can only watch a certain stock for such anomalies.

    The point of a script like this would be to find random stocks that have surged based on no publicly-available news. It doesn't really make sense to just watch a particular stock in this context.

    点赞 评论 复制链接分享
  • weixin_39897392 weixin_39897392 4月前

    Yeah that makes sense. My bad.

    点赞 评论 复制链接分享
  • weixin_40005373 weixin_40005373 4月前

    Yeah that makes sense. My bad.

    I did see a suggestion to omit certain tickers which as a denylist would be a lot harder to setup but would certainly increase the speed (for instance nobody is gunna pump and dump Amazon stock lol)

    点赞 评论 复制链接分享
  • weixin_39897392 weixin_39897392 4月前

    I see the point with that but I do not think we should skip big stocks either. As the upcoming 4 to 1 split for AAPL will probably lead to such anomaly and hence skipping the major stocks can be pretty bad.

    点赞 评论 复制链接分享
  • weixin_39616503 weixin_39616503 4月前

    Just found out there's this repo's creator also made website that displays the information. So I'm closing this issue as it's not very relevant anymore.

    点赞 评论 复制链接分享

相关推荐