Skip to main content

Wrapper around Yukka APIs for getting easy access to quantitative insights

Project description

yukka

A Python client for YUKKA Lab's sentiment and financial data APIs. Pull news sentiment, entity resolution, and market data directly into your Python environment.

from yukka import Session, Asset
from yukka.data import stoxx600

with Session() as session:  # reads YUKKA_TOKEN from environment
    bmw = Asset.from_isin("DE0005190003", session.resolver)
    df = session.sentiment(bmw, date_from="2026-01-01")

Installation

pip install yukka

Requires Python 3.13+.

Authentication

A JWT token is required to access the YUKKA APIs. Set it as an environment variable:

export YUKKA_TOKEN="eyJ..."

Or pass it explicitly:

from yukka import Session

session = Session(token="eyJ...")

Contact YUKKA Lab to request API access.

Quick Start

Using a pre-validated universe

The package ships with pre-resolved constituent lists for major indices. No entity resolution needed.

from yukka import Session, Asset
from yukka.data import stoxx600, sp500, ftse100, nasdaq100

# Load STOXX 600 constituents (isin, ric, name, yukka_id, ...)
universe = stoxx600()

# Create assets from YUKKA IDs and fetch sentiment
assets = Asset.from_yukka_id(universe["yukka_id"].to_list())

with Session() as session:
    df = session.sentiment(assets, date_from="2026-01-01", date_to="2026-02-01")

Creating assets from different identifier types

from yukka import Session, Asset

with Session() as session:
    # From YUKKA ID (no API call needed)
    bmw = Asset.from_yukka_id("company:bmw")

    # From ISIN (resolves via Metadata API)
    siemens = Asset.from_isin("DE0007236101", session.resolver)

    # From RIC code (resolves via bundled master file)
    sap = Asset.from_ric("SAPG.DE")

    df = session.sentiment([bmw, siemens, sap], date_from="2026-01-01")

Batch requests

Large entity lists are automatically batched (default 50 per request):

with Session() as session:
    assets = Asset.from_ric(universe["constituent_ric"].to_list())
    df = session.sentiment(assets, date_from="2025-01-01", batch_size=50)

API Reference

Session

High-level entry point. Reads YUKKA_TOKEN from the environment automatically.

Method Description
session.sentiment(assets, date_from, date_to) Fetch daily sentiment counts (positive / neutral / negative)
session.resolver EntityResolver for ISIN → YUKKA ID lookups
session.today Today's date

Returns a Polars DataFrame with columns: date, entity, positive, neutral, negative.

Asset

Immutable representation of a YUKKA entity.

Factory Description
Asset.from_yukka_id(id) From a YUKKA compound key, e.g. "company:bmw"
Asset.from_isin(isin, resolver) From an ISIN via Metadata API lookup
Asset.from_ric(ric) From a RIC code via bundled master file

All factory methods accept a single value or a list.

YukkaClient

Low-level client for direct API access, if you need more control than Session provides.

from yukka import YukkaClient

with YukkaClient.from_token("eyJ...") as client:
    df = client.sentiment(["company:bmw", "company:siemens"], "2026-01-01", "2026-01-31")

Pre-validated universes

from yukka.data import stoxx600, sp500, ftse100, nasdaq100

df = stoxx600()   # STOXX Europe 600
df = sp500()      # S&P 500
df = ftse100()    # FTSE 100
df = nasdaq100()  # NASDAQ 100

Each returns a Polars DataFrame with isin, constituent_ric, constituent_name, and yukka_id columns.

Universe Coverage

Not all index constituents are present in the YUKKA ontology. The table below summarises coverage as of the bundled master file.

Index Total constituents In YUKKA ontology Not in YUKKA ontology
STOXX 600 931 915 16
S&P 500 680 671 9
NASDAQ 100 184 177 7
FTSE 100 126 124 2

Each list contains historical constituents from June 2016 to December 2025.

STOXX 600 — 16 companies not in YUKKA ontology
RIC ISIN Name
SAB.L^J16 GB00BYZTBD95 Abi Sab Group Holding Ltd
AMRZ.S CH1430134226 Amrize AG
CVC.AS JE00BRX98089 CVC Capital Partners PLC
CAN.L FR001400T0D6 Canal+ SA
EMEIS.PA FR001400NLM4 Emeis SA
GALD.S CH1335392721 Galderma Group Ltd
HIAB.HE FI4000571013 Hiab Oyj
LTMC.MI IT0005541336 Lottomatica Group SpA
MFEB.MI NL0015001OJ9 MFE-MEDIAFOREUROPE NV
MICCT.L NL0015002MS2 Magnum Ice Cream Company NV
PUIGb.MC ES0105777017 Puig Brands SA
R3NK.DE DE000RENK730 RENK Group AG
SUNN.S CH1386220409 Sunrise Communications AG
VAR.OL NO0011202772 Var Energi ASA
VSURE.ST GB00BVMN1558 Verisure PLC
VOLCARb.ST SE0021628898 Volvo Car AB
S&P 500 — 9 companies not in YUKKA ontology
RIC ISIN Name
AMCR.N JE00BV7DQ550 Amcor PLC
AMTM.N US0239391016 Amentum Holdings Inc
J.N US46982L1089 Jacobs Solutions Inc
LH.N US5049221055 Labcorp Holdings Inc
PSKY.OQ US69932A2042 Paramount Skydance Corp
Q.N US74743L1008 Qnity Electronics Inc
SOLV.N US83444M1018 Solventum Corp
TEL.N IE000IVNQZ81 TE Connectivity PLC
TKO.N US87256C1018 TKO Group Holdings Inc
NASDAQ 100 — 7 companies not in YUKKA ontology
RIC ISIN Name
ARM.OQ US0420682058 Arm Holdings PLC
GRAL.OQ US3847471014 Grail Inc
LBTYA.OQ BMG611881019 Liberty Global Ltd
LCID.OQ US5494982029 Lucid Group Inc
QVCGA.OQ US74915M6057 QVC Group Inc
SIRI.OQ US8299331004 Sirius XM Holdings Inc
TRI.OQ CA8849038085 Thomson Reuters Corp
FTSE 100 — 2 companies not in YUKKA ontology
RIC ISIN Name
BMEB.L JE00BVSYJW51 B&M European Value Retail SA
PCT.L GB00BR3YV268 Polar Capital Technology Trust PLC

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yukka-0.1.10.tar.gz (259.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yukka-0.1.10-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

Details for the file yukka-0.1.10.tar.gz.

File metadata

  • Download URL: yukka-0.1.10.tar.gz
  • Upload date:
  • Size: 259.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for yukka-0.1.10.tar.gz
Algorithm Hash digest
SHA256 fa20787a73dade3e2a6d72c2ab90046650f75773c9a357c17644c2bd0bf97119
MD5 07277155004256aa8058e6081e83be15
BLAKE2b-256 c53b7a2fab0b71bad18d56f13edab616ac4b6e8138f572fe92efb20aa6bbfd42

See more details on using hashes here.

File details

Details for the file yukka-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: yukka-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 82.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for yukka-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a798ac7ff117da622480bedaa18ba9f40655fe2fe30b7d738b49400157372efe
MD5 dce11178a68d73af688c14e2e52f0442
BLAKE2b-256 6180b994cf0ff3f54f40c3fa27eee568eb092667ae25fe56a462cbcc8781652a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page