Skip to content

feat: add optional adanos market sentiment custom data example#9380

Closed
alexander-schneider wants to merge 3 commits into
QuantConnect:masterfrom
alexander-schneider:codex/adanos-custom-sentiment
Closed

feat: add optional adanos market sentiment custom data example#9380
alexander-schneider wants to merge 3 commits into
QuantConnect:masterfrom
alexander-schneider:codex/adanos-custom-sentiment

Conversation

@alexander-schneider
Copy link
Copy Markdown

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

Summary

This PR adds an optional Python custom data example for consuming structured Adanos market sentiment snapshots in LEAN.

It includes:

  • a new Algorithm.Python/AdanosMarketSentimentAlgorithm.py example
  • a project entry in QuantConnect.Algorithm.Python.csproj
  • focused PythonDataTests coverage for the new custom data type

Why

LEAN already has strong support for custom data via AddData<T> / PythonData, and this change keeps the integration in that example-oriented path rather than introducing a new core data provider.

Adanos is used here as structured alternative data for equities:

  • current buzz score
  • bullish percentage
  • sentiment score
  • simple activity / coverage counts

Design notes

  • The example is strictly optional and parameter-driven.
  • No requests are made unless adanos-api-key is provided.
  • The example now exits early outside live mode, because querying a current REST endpoint in a historical backtest would introduce look-ahead bias. The intended historical workflow is to persist daily snapshots first and then replay them from a local file or ObjectStore.
  • The core LEAN data feed and provider stack are untouched.

Parameters

  • adanos-api-key – required to enable requests
  • adanos-source – one of news, reddit, x, polymarket
  • adanos-lookback-days – lookback window passed through to the stock sentiment endpoint

Validation

Added focused tests in Tests/Python/PythonDataTests.cs for:

  • request header propagation
  • structured payload parsing
  • unsupported source fallback
  • found=false null handling

@AlexCatarino
Copy link
Copy Markdown
Member

Hi @alexander-schneider,
Do you represent Adanos? If you do, contact us at support@quantconnect.com. This dataset is better suited to /datasets than to this repository. Otherwise, we could find a place for it in the Docs, or you could place a working example in /strategies.

@alexander-schneider
Copy link
Copy Markdown
Author

Thanks, wrote you an email :)

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