Comments (6)
Glad hearing from you! 👍🏼
Sure you can implement multiprocessing
. Please go through Contributing Guidelines to get started.
My primary observation is Majority of the time consumed by yfinance
module to for downloading stock data depending on the network speed and it's internally using multiple threads by default.
If you successfully implement multiprocessing, please try to post time consumed difference between new code and existing single core just for comparison.
from screeni-py.
Currently, the code uses a single-core to do the screening. but we can run it in parallel to make it faster.
I changed file screenipy.py to use all cores using themultiprocessing
module.
Can I make PR?
I will create a new file named screenipy_parallel.py so that your original code does not break.
Also while posting PR, please modify your code in screenipy.py
file and send PR to new-features
branch.
This will automatically run the test cases before merging. Feel free to add more test cases in test
folder if required.
from screeni-py.
@swarpatel23
Here are some timing details that I observed for each iteration (Running on Core-i5 (2.4GHz)):
- Data Fetching time for each stock (Network Dependent) = 0.25 to 0.5 Sec For this call
- Data Processing/Analysis time for each stock = 0.125 Sec From this to this
So it would be great if you can run analysis and fetching as 2 different processes and the Fetching should feed the received data to the analysis process while fetching for the next stock code.
from screeni-py.
The approach that I tried is that stock symbols are equally distributed among all processes.
I ran code with option 1: Screen stocks for Breakout or Consolidation
For sequential code, it took: 26 minutes 54 seconds
For parallel code, it took (8 processes): 4 minutes 35 seconds
The problem that I have is that because processes do not share a state so "screenCounter" does not work as expected.
from screeni-py.
The time difference measured by you seems like a fantastic improvement.
Before we merge, Can you please look at multiprocessing.Value
to fix screenCounter
issue? With Value
instances of variable can be shared with multiple processes.
Looking forward to merge #44 👍🏼
from screeni-py.
After further development for using multiprocessing
on Windows with pyinstaller
, the binaries released for #44 in 2d4299d (v1.14)
from screeni-py.
Related Issues (20)
- Intraday Live Scanner HOT 2
- ERROR ! HOT 4
- # Live Intraday Scanner Issue HOT 4
- Facing issue in connection of your github HOT 3
- [ConnectionError - HTTPSConnectionPool] Error while scanning any option - Can't reach GitHub domain HOT 10
- Unable to run nifty prediction HOT 1
- Can you please give intraday scan for stocks too HOT 4
- Inappropriate Signals HOT 5
- Not a bug.. facing some issue .. please help HOT 11
- Hyperlink not opening HOT 2
- [Bug] Incorrect logic for the "weak down" trend in screener.py:findTrend HOT 3
- Economic times market chart or investing.com chart instead of trading view chart. HOT 1
- After market data access HOT 1
- Code update HOT 1
- Unknown Result for watchlist stocks HOT 2
- it does not scan the stocks of NSE. result is 0 scanned stocks. there is no error shown HOT 1
- Question About Nifty Prediction Model HOT 2
- Error for tensorflow on Mac M2 HOT 3
- Not giving any Scan results for NIFTY Stocks HOT 11
- Nifty model doesnt give same accuracy HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from screeni-py.