Metadata-Version: 2.5
Name: pit-fundamentals
Version: 0.2.6
Summary: Company fundamentals from official regulator filings — 2.75 million entities across France, Belgium, Denmark, Japan, the US, Taiwan, Korea and New Zealand (registered charities), mostly private companies rather than listed ones. Each figure carries its filing date as each market records it; a later restatement does not replace it. Exportable. Zero dependencies.
Project-URL: Homepage, https://www.tradingagentapp.com/fundamentals
Project-URL: Documentation, https://www.tradingagentapp.com/developers
Project-URL: Licence terms, https://www.tradingagentapp.com/licences/personal
Author-email: WU Capital Limited <tradingagentapp@gmail.com>
License: MIT
Keywords: EDGAR,EDINET,INPI,OpenDART,SEC,TWSE,backtesting,belgium,company-financials,denmark,factor,filing-date,financial-data,france,fundamentals,japan,korea,private-companies,quant,stock-data,taiwan
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# pit-fundamentals

**Company fundamentals from official regulator filings — each figure
dated by its filing, exportable.** Zero dependencies
(pandas optional).

Every figure carries its **filing date** as each market records it (Taiwan:
the general statutory deadline, a proxy); a later restatement does not replace
it. `as_of` queries return only filings dated on or before that day. How each
market dates a filing is on the
[methodology page](https://www.tradingagentapp.com/fundamentals/methodology).

| Market | Source | Coverage |
|---|---|---|
| US | SEC EDGAR (public information) | ~7,000 filers · annual + quarterly · 2014→ |
| Japan | FSA EDINET (Public Data License 1.0 — source attribution required) | 4,955 filers of an annual securities report, listed and unlisted · 2016→ |
| Taiwan | TWSE OpenAPI for current quarters (Open Government Data License v1.0, attribution required) and the MOPS XBRL archive for history from 2013 (not open data) | every listed company · quarterly |
| Korea | FSS OpenDART (public data, 공공데이터; permitted use not restricted) | 2,239 listed companies |
| France | INPI Registre national des entreprises | 1,484,946 companies · annual accounts 2017→ |
| Belgium | NBB Central Balance Sheet Office | 673,826 companies · statutory accounts, private companies included |
| Denmark | Danish Business Authority | 552,782 companies · published annual reports · June 2012→ |
| New Zealand | Charities Register (CC BY 3.0 NZ) | 27,100 registered charities · FY2008→ |

## Install

```bash
pip install pit-fundamentals
```

## 60-second start (no signup — public demo key built in)

```python
import pit_fundamentals as pf

# TSMC's history, each figure with its filing date
rows = pf.fundamentals("2330.TW")

# Apple, from filings dated on or before 2022-01-01
snap = pf.latest("AAPL", as_of="2022-01-01")
print(snap["revenue"])   # FY2021, filed 2021-10-29

# the notices that travel with the data
rows.attribution         # {"TW": "…TWSE OpenAPI… / …MOPS…"}: keep it with every copy
rows.licence             # the licence this data is supplied under
pf.attribution(["TW"])   # ATTRIBUTION.txt, to save beside a file you keep

# pandas users: a source_attribution column on every row, notices in df.attrs
df = pf.to_df(rows)
```

`fundamentals()` returns a list and `latest()` a dict, as before; both also
carry `.attribution`, `.licence`, `.company` and `.full_history`. Dates
(`as_of`, `from_`) take a `datetime.date` or a `"YYYY-MM-DD"` string; any
other spelling raises `ValueError` instead of being read as a different day.

The demo key covers **every company at its most recent reported fiscal year**,
all fields; about 60 named companies keep full history as a worked sample.
For any other company a free or demo key answers with that one year only:
`rows.full_history` is `False` and a `FreeTierDepthWarning` says so.
Free Data is supplied under the Trading Agent Data Free Licence (https://www.tradingagentapp.com/licences/free); using it means you accept that licence.

A Personal or Commercial data licence unlocks full history and the `as_of`
query (bulk files come with the Redistribution Licence); your code doesn't
change:

```bash
export PIT_FUNDAMENTALS_KEY=ta_live_xxxxxxxx
```

## Pricing & licences

Free / Personal US$29/mo / Commercial US$249/mo / Redistribution US$9,900/yr —
plans: <https://www.tradingagentapp.com/fundamentals> · licence documents:
<https://www.tradingagentapp.com/licences>

What makes the licence unusual: **no export bans and no display-only
clause.** We ingest from public filings directly, so no upstream vendor
licence forbids export. When a subscription ends, the Aggregated Results and
the records of your own work stay yours; raw data and other derived data are
deleted within 30 days (Data Terms 16.6). A Snapshot licence has no end date.

## Notes worth knowing

- **Taiwan income statements are single-quarter (three-month) amounts.**
  Taiwan files cumulative year-to-date totals (Q2 = H1, Q4 = full year); they
  are converted before you see them, so do not difference adjacent quarters
  again. Balance-sheet items are period-end balances as usual.
- Danish filing dates are the Copenhagen calendar date of the register's
  publication (a date only before 11 April 2015).
- Quarterly rows (US, Taiwan) carry the **calendar** year and quarter that
  contain the period end, not the company's fiscal quarter: Apple's quarter
  ending 2025-12-27 is `fy 2025, fp Q4` (Apple's fiscal Q1 of 2026). In
  `latest()`, a fact with a quarterly `fp` is one quarter's figure.
- Every API response embeds its source attribution, and so do the results
  (`.attribution`, and `to_df`'s `source_attribution` column). Taiwan
  responses carry two notices — the TWSE OpenAPI notice (OGDL v1.0) and the
  MOPS archive notice (not open data); keep both with the data.
- Factual, historical data only — no forecasts, no advice, no price/OHLCV.

Docs: <https://www.tradingagentapp.com/developers> ·
Field dictionary and examples included.
