Skip to content

Add optional Adanos sentiment to Toolkit#210

Open
alexander-schneider wants to merge 2 commits into
JerBouma:mainfrom
adanos-software:codex/adanos-market-sentiment
Open

Add optional Adanos sentiment to Toolkit#210
alexander-schneider wants to merge 2 commits into
JerBouma:mainfrom
adanos-software:codex/adanos-market-sentiment

Conversation

@alexander-schneider

@alexander-schneider alexander-schneider commented Apr 28, 2026

Copy link
Copy Markdown

Summary

  • add optional Adanos market sentiment as a native Toolkit.get_sentiment(...) method
  • back the Toolkit method with a dedicated financetoolkit/sentiment_model.py model module
  • use the Toolkit tickers plus configured start_date and end_date when collecting sentiment
  • remove the previous external dataset helper/example approach

Validation

  • uv run python -m pytest tests/test_sentiment_model.py tests/test_toolkit_sentiment.py -q
  • uv run ruff check financetoolkit/sentiment_model.py financetoolkit/toolkit_controller.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.py
  • uv run ruff format --check financetoolkit/sentiment_model.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.py
  • python3 -m py_compile financetoolkit/sentiment_model.py financetoolkit/toolkit_controller.py tests/test_sentiment_model.py tests/test_toolkit_sentiment.py
  • git diff --cached --check

@JerBouma

Copy link
Copy Markdown
Owner

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.

@alexander-schneider

Copy link
Copy Markdown
Author

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.

@alexander-schneider

Copy link
Copy Markdown
Author

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:

  • sentiment overview across tickers
  • sentiment history
  • per-stock sentiment detail
  • market sentiment
  • source selection across Reddit, X, News, and Polymarket

If this direction fits better, I can further align the naming or method surface with the rest of FinanceToolkit.

@JerBouma

Copy link
Copy Markdown
Owner

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

@alexander-schneider alexander-schneider changed the title Add optional Adanos external sentiment dataset helpers Add optional Adanos sentiment to Toolkit Apr 30, 2026
@alexander-schneider

Copy link
Copy Markdown
Author

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 Toolkit.get_sentiment(...), backed by a dedicated financetoolkit/sentiment_model.py model module. The method uses the Toolkit tickers plus its configured start_date and end_date, accepts an Adanos API key via parameter or ADANOS_API_KEY, and supports source selection across reddit, x, news, polymarket, or all sources. I also updated the README and added targeted tests for the model and Toolkit method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants