-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/finviz screener #6586
base: develop
Are you sure you want to change the base?
Feature/finviz screener #6586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, and thanks for the PR! This one is definitely on the radar of "things to add", so it's really nice to see someone taking the initiative.
I'm going to bring up some high-level things, and am open to collaborating on the details of the implementation. Please don't take anything personally, or as an obligation to commit, the effort in submitting is very much appreciated nonetheless.
Everyone will appreciate a diverse, robust, screener that is easy-to-use, repeatable, and reliable. Let's work towards making it a reality.
Don't worry about linters and tests right now.
The main challenge to overcome is that nobody will know how to use it, and they will not be likely to figure it out on their own.
The good news is that most of the dirty work has already been done by the finvizfinance
library . Integrating and communicating that to the user will still require a lot of mapping behind the scenes to make it plug-and-play smooth for them.
What we need to do is break down the 'possibilities' into digestible pieces that can be reliably known and configured by the end user.
- A template will be necessary.
- Choices should be validated by the model (can be accomplished by defining Literal types), eliminating any guess work and providing the user with actionable information for how they can adjust/correct their choices.
The finvizfinance
library gives us entry points for the "category" of metrics to screen from:
- overview
- performance
- valuation
- technical
- ownership
You have overview
exposed, but the above can be parameterized as a top-level parameter whose value will have an impact on the availability of other parameters, as well as the content of the returned data.
Consequently, the returned data model needs to reflect all possibilities - similar to the groups
model, which is a bit less dense than the stock screener outputs are.
From there the parameters can be broken down into two basic groups:
- global
- category
To start, let's just isolate the global choices.
At the architecture level, we need to ensure that:
- The provider inherits from the existing standard model and maps to the existing
EquityScreener
Provider Interface model in the Finviz Provider definition.- There are existing parameters, for other providers, that can also be mapped to known accepted values from Finviz - 'exchange', 'marketcap', 'volume', 'industry', 'sector', all come to mind. These should all be explicitly defined as
Optional[Literal['value1', 'value2', 'value3', etc.]
with a default value ofNone
. - Additional global choices should be defined similarly.
- There are existing parameters, for other providers, that can also be mapped to known accepted values from Finviz - 'exchange', 'marketcap', 'volume', 'industry', 'sector', all come to mind. These should all be explicitly defined as
When these considerations are addressed, the next logical steps will become much more apparent. This type of function is a complex integration, and there aren't very many shortcuts to apply other than leveraging the work accomplished by the other libraries in the chain.
We can divide and conquer, thoughts?
Sure...no problem...yes difficult to see how user can use it as it should b
exposed via some routers..and should also be in line with existing fmp
screener..but fmp screener accepts en mktcap > 10000 where finviz has
predefined options . Let me have a thought..based on your comments above
and will report back. Thanks
…On Tue, 16 Jul 2024, 04:46 Danglewood, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Hello, and thanks for the PR! This one is definitely on the radar of
"things to add", so it's really nice to see someone taking the initiative.
I'm going to bring up some high-level things, and am open to collaborating
on the details of the implementation. Please don't take anything
personally, or as an obligation to commit, the effort in submitting is very
much appreciated nonetheless.
Everyone will appreciate a diverse, robust, screener that is *easy-to-use*,
repeatable, and reliable. Let's work towards making it a reality.
Don't worry about linters and tests right now.
*The main challenge to overcome is that nobody will know how to use it,
and they will not be likely to figure it out on their own.*
The good news is that most of the dirty work has already been done by the
finvizfinance library
<https://github.com/lit26/finvizfinance/blob/master/finvizfinance/constants.py>.
Integrating and communicating that to the user will still require a lot of
mapping behind the scenes to make it plug-and-play smooth for them.
What we need to do is break down the 'possibilities' into digestible
pieces that can be reliably known and configured by the end user.
- A template will be necessary.
- Choices should be validated by the model, eliminating any guess work
and providing the user with actionable information for how they can
adjust/correct their choices.
The finvizfinance library gives us entry points for the "category" of
metrics to screen from:
- overview
- performance
- valuation
- technical
- ownership
You have overview exposed, but the above can be parameterized as a
top-level parameter whose value will have an impact on the availability of
other parameters, as well as the content of the returned data.
Consequently, the returned data model needs to reflect all possibilities -
similar to the groups model
<https://github.com/OpenBB-finance/OpenBB/blob/develop/openbb_platform/providers/finviz/openbb_finviz/models/compare_groups.py>,
which is a bit less dense than the stock screener outputs are.
From there the parameters can be broken down into two basic groups:
- global
- category
To start, let's just isolate the global choices.
At the architecture level, we need to ensure that:
- The provider inherits from the existing standard model and maps to
the existing EquityScreener Provider Interface model in the Finviz
Provider definition.
- There are existing parameters
<https://docs.openbb.co/platform/reference/equity/screener>, for
other providers, that can also be mapped to known accepted values from
Finviz
<https://github.com/lit26/finvizfinance/blob/master/finvizfinance/constants.py>
- 'exchange', 'marketcap', 'volume', 'industry', 'sector', all come to
mind. These should all be explicitly defined as Optional[Literal['value1',
'value2', 'value3', etc.] with a default value of None.
- Additional global choices should be defined similarly.
When these considerations are addressed, the next logical steps will
become much more apparent. This type of function is a complex integration,
and there aren't very many shortcuts to apply other than leveraging the
work accomplished by the other libraries in the chain.
We can divide and conquer, thoughts?
—
Reply to this email directly, view it on GitHub
<#6586 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPNCDSXU4ALYQYFK45OWYTZMSJRPAVCNFSM6AAAAABK33CMQKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCNZZGE2TAMRRGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@deeleeramone |
Nasdaq has a similar filter setup as
Finviz has just one more category, 'nano', otherwise it's pretty much the same. 2 - Need to somehow 'fit' an extra parameter which will allow to leverage all the other possibilities available from finviz (and which are not avaiable in FMP). perhaps, as a start, i can start by having a look at what you have in your group model... I'll start with something and report back pls feel free to add / comment / dispute rgs I can work on some logic for preset integrations that can function as an override to any hard-coded params. |
Hello 1 -
you were suggesting that eg FinvizEquityScreenerQueryParams should incorporate parameters from both - somehow - ? i guess that would make sense as, as i have seen, atm FMP and Nasdaq QueryParams are quite different and introducing a third screener with completely brand new parameters will just confuse everyone ? 2 -
Reason why i m asking is because my planned usage of OBB is not 'interactive'. I am planning to setup a server which runs uvicorn / obb REST, and have a separate process which calls OBB REST api to retrieve the data. Kind regards |
sorry i m off for a week. thought to let you know i case you dont see any replies from me.i'll pick up this in Aug. |
Not meaning to steal your thunder, but I opened a new PR that incorporates your requirements and contribution to the effort, #6601. An entry point for Presets are all read on run time, so there is no need to reload the Python interpreter. Both, presets and filters_dict, will raise actionable errors from bad key/values. I appreciate your contribution to the community, and would love to include some of your favourite presets in the library defaults. Try it out and let me know if it accomplishes your requirements. |
Great!! Sure I will try it out once back as I have at least 6 custom
presets .....thanks for bringing it through!!
Kind regards
…On Mon, 29 Jul 2024, 18:27 Danglewood, ***@***.***> wrote:
sorry i m off for a week. thought to let you know i case you dont see any
replies from me.i'll pick up this in Aug. rgds
Not meaning to steal your thunder, but I opened a new PR that incorporates
your requirements and contribution to the effort, #6601
<#6601>. An entry point for
filters_dict is provided, as well as presets, so there is quite a bit of
flexibility in operation.
Screenshot.2024-07-29.at.9.22.21.AM.png (view on web)
<https://github.com/user-attachments/assets/e24ce7f3-af29-439b-95fc-e5ba51845e2d>
Presets are all read on run time, so there is no need to reload the Python
interpreter. Both, presets and filters_dict, will raise actionable errors
from bad key/values.
I appreciate your contribution to the community, and would love to include
some of your favourite presets in the library defaults. Try it out and let
me know if it accomplishes your requirements.
—
Reply to this email directly, view it on GitHub
<#6586 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPNCDWT7INICMRFJ4JEUZ3ZOZUPZAVCNFSM6AAAAABK33CMQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGM4DEMZQGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Pull Request Template for OpenBB Developers
Finviz Screener:
Why?
What? (1-3 sentences or a bullet point list):
Impact (1-2 sentences or a bullet point list):
Testing Done: