pkjmesra / PKScreener

A Python-based stock screener for NSE, India. PKScreener is an advanced free stock screener to find potential breakout stocks from NSE and show its possible breakout values. It also helps to find the stocks which are consolidating and may breakout, or the particular chart patterns that you're looking specifically to make your decisions.
https://github.com/pkjmesra/PKScreener
MIT License
164 stars 69 forks source link

Backtests for 30 days moving windows across the last 250 days of scan period needs to be faster #27

Closed pkjmesra closed 10 months ago

pkjmesra commented 10 months ago

Backtests for 30 days moving windows across the last 250 days of scan period needs to be faster. At this time, it takes 30+ minutes on the new Mac M1 chips and over an hour on 4-proc GitHub Windows servers. It needs to be optimized to finish within 5 minutes on Mac and within 10-15 minutes each on Windows.

pkjmesra commented 10 months ago

https://realpython.com/python-timer/ https://www.nickmccullum.com/python-timer-functions-performance-measurement/

Check-in stocks from each scan result to the repo > Run backtest with no screening option > 0 once for all options > Fetch stocks for the said date from the past > run backtest

pkjmesra commented 10 months ago

It now finishes within 1.5 minutes on the new M1 chips and within a couple of minutes on github actions nodes Fixed b864583