Add optional Adanos sentiment to Toolkit#210
Conversation
|
The external datasets functionality is purely meant for historical and fundamental datasets which can then be used with all other 200+ functionalities within the Finance Toolkit. This functionality seems to be something that will not be called anywhere within the Finance Toolkit and therefore it doesn't make much sense to add it as an external enhancement. Instead, I'd advise to create separate functionality that the user can call with his Adanos API key if desired, ideally being able to access all functionalities Adanos has to offer. |
|
Small correction to my previous comment: you are right that the external_datasets path is not the right fit here. I am reworking this into a dedicated optional Sentiment controller instead. |
|
Thanks again for the direction. I reworked the PR accordingly. This no longer extends the external_datasets functionality. Instead, it introduces a dedicated optional Sentiment controller for Adanos, so users can call it directly with their own API key. Current scope:
If this direction fits better, I can further align the naming or method surface with the rest of FinanceToolkit. |
|
Hi @alexander-schneider, so what I would envision is it to become a function inside the toolkit_controller.py where you can add it as function just like there exists something like get_income_statement. The idea would then be to have a "_model" available which collects the data given an API key provided. This way users can directly see the sentiment based on the tickers they have inputted including the corresponding start and end date. See how the toolkit is structured here: https://github.com/JerBouma/FinanceToolkit/blob/main/CONTRIBUTING.md |
|
Thanks, this makes sense. I reworked the PR to match the existing Toolkit/MVC structure described in CONTRIBUTING.md. The previous external dataset helper approach is removed now. Sentiment is available directly from the main Toolkit via |
Summary
Toolkit.get_sentiment(...)methodfinancetoolkit/sentiment_model.pymodel modulestart_dateandend_datewhen collecting sentimentValidation
uv run python -m pytest tests/test_sentiment_model.py tests/test_toolkit_sentiment.py -quv run ruff check financetoolkit/sentiment_model.py financetoolkit/toolkit_controller.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.pyuv run ruff format --check financetoolkit/sentiment_model.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.pypython3 -m py_compile financetoolkit/sentiment_model.py financetoolkit/toolkit_controller.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.pygit diff --cached --check