nlalpha-yfinance
Yahoo Finance daily data provider for NLAlpha. The package implements the DataProvider contract from nlalpha-data and registers itself as the yfinance provider.
This is a best-effort convenience provider, not a production market-data service. It is not yet published to PyPI.
Installation
Install the package and its runtime dependencies with your package manager:
pip install nlalpha-yfinance
For local development from this workspace, install the package in editable mode:
pip install -e .
The provider requires Python 3.12 and the yfinance and pandas libraries. The distribution must be installed (editable for development) because the plugin reads its version from distribution metadata.
Discovery
The package exposes an entry point in the nlalpha.data group:
[project.entry-points."nlalpha.data"]
yfinance = "nlalpha_yfinance:YFinancePlugin"
nlalpha-data discovers the plugin through that entry point. The plugin reports availability from the yfinance import alone; it does not make a network request during discovery.
from nlalpha_yfinance import YFinancePlugin
plugin = YFinancePlugin()
provider = plugin.get_provider()
bars = await provider.load_bars("AAPL", "1d", "2024-01-02", "2024-01-31")
Capabilities
| Capability | Declaration |
|---|---|
| Asset classes | stock, etf |
| Daily intervals | 1d, d, day |
| Price adjustment | unadjusted, forward |
| Backward adjustment | Unsupported |
| Reference data | None |
| Realism data | None |
| Calendars | XNYS, XNAS |
| Time semantics | trading_date |
Only daily bars are served. Requests for other intervals fail with an unsupported_capability error.
Price adjustment semantics
An omitted price_adjustment means unadjusted.
| Request | Yahoo parameter | Semantics |
|---|---|---|
unadjusted |
auto_adjust=False |
OHLC prices are split-adjusted but not dividend-adjusted. |
forward |
auto_adjust=True |
OHLC prices are split- and dividend-adjusted, anchored at the last returned observation. |
Yahoo adjusts OHLC only. Volume is the share quantity reported by Yahoo and is not dividend-adjusted. backward adjustment is rejected because Yahoo does not provide a start-anchored series.
Time contract
Each Yahoo daily row becomes a bar with source_timestamp_semantics="trading_date" and an explicit session_date. The canonical datetime is the exchange session close from the mapped NLAlpha calendar. The resolved open_time is the session open; both bounds come from the calendar session, so loaded bars satisfy NLAlpha's artifact delivery contract. The provider does not fabricate an intraday timestamp from the Yahoo index. The source timezone comes from Yahoo exchangeTimezoneName metadata, with America/New_York used only when that metadata is absent.
Exchange mapping
| Yahoo exchange code | NLAlpha calendar |
|---|---|
NMS, NGM, NCM, NAS |
XNAS |
NYQ, NYS, PCX, ASE |
XNYS |
An unknown or missing exchange code fails with unsupported_capability; the provider never guesses a calendar.
Limitations
The provider is daily only and best effort. It depends on Yahoo's public endpoints and may be rate-limited or blocked. There is no availability SLA and no cross-source reconciliation. unadjusted prices are split-adjusted rather than raw exchange prices. Minute bars, fundamentals, and backward adjustment are not supported.
License
AGPL-3.0-or-later. See LICENSE.
Metadata
Release files for nlalpha-yfinance 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nlalpha_yfinance-0.1.1.tar.gz | 25.3 kB | Without provenance | Details for nlalpha_yfinance-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nlalpha_yfinance-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nlalpha_yfinance-0.1.1-py3-none-any.whl |
Total release size: 48.0 kB
Release files / nlalpha_yfinance-0.1.1.tar.gz
| Download URL | nlalpha_yfinance-0.1.1.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
843a12322a360a4fad11acbb2f7ee0e1823f541e6a8d6b27fa6c77957a8361de
|
|
BLAKE2b-256 checksum How to use checksums |
49e2d21bac8356aa75670a3cb7e1fc9a72fa21cf454c04679f43d45a19dcad18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / nlalpha_yfinance-0.1.1-py3-none-any.whl
| Download URL | nlalpha_yfinance-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4f230b94552732fe0d10dbdf7a51a2046167467a89e594786c8ef85aff243bb
|
|
BLAKE2b-256 checksum How to use checksums |
bb77c7d65c057b7d42678510a6d3b79e198c1e5972a5546adad93e8dc8b138ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for nlalpha-yfinance 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.