# Methodology

Release `2026.09`, covering 2018-09 to 2026-08 (96 months,
18,668 rows, 1,554,514 classified publications).

## Source

The Swiss Official Gazette of Commerce (SHAB/FOSC) is the publication of record
for the Swiss commercial register. Prospex reads it through the public
Amtsblattportal API and keeps one row per publication, with the full publication
text. This dataset aggregates those rows. It holds aggregate counts only: no company
name, identifier or personal data.

## How the covered period was chosen

The period follows from four checks. A calendar month enters the dataset only if
it passes all of them:

1. **Ingestion cursor.** The month ends before the point to which the gazette has
   been fully ingested. That cursor is a conservative bound on how far the corpus
   is whole.
2. **Run health.** No failed ingestion run covering the month is left unsuperseded
   by a later successful run over the same dates.
3. **Publication density.** Every Monday to Friday in the month carries at least
   one publication, except the Swiss federal holidays confirmed to have no
   gazette. That list was built by taking every weekday in the corpus with zero
   publications and matching it against the holiday calendar.
4. **Parse health.** Fewer than 0.5% of the month's publications failed to parse.

The published period is the longest unbroken run of passing months. A month that
fails truncates the series, so the published period is continuous.

Months considered and rejected:

- `2026-09-01`: cursor_behind_month, missing_publication_day:2026-09-04, missing_publication_day:2026-09-07, missing_publication_day:2026-09-08, missing_publication_day:2026-09-09, missing_publication_day:2026-09-10, missing_publication_day:2026-09-11, missing_publication_day:2026-09-14, missing_publication_day:2026-09-15, missing_publication_day:2026-09-16, missing_publication_day:2026-09-17, missing_publication_day:2026-09-18, missing_publication_day:2026-09-21, missing_publication_day:2026-09-22, missing_publication_day:2026-09-23, missing_publication_day:2026-09-24, missing_publication_day:2026-09-25, missing_publication_day:2026-09-28, missing_publication_day:2026-09-29, missing_publication_day:2026-09-30

## How publications were classified

Each publication carries structured metadata from the register and a text body.
The parser reads both. A capital movement, for example, is taken from the
register's own prior and new nominal capital fields where they are present.

The parser is versioned, and the corpus was not all processed by the same
version:

| Parser version (`shab-parser/`) | Publications |
|---|---|
| `0.2.0` | 335,226 |
| `0.3.0` | 774,655 |
| `0.4.0` | 209,090 |
| `0.7.0` | 218,827 |
| `0.8.0` | 1,483 |
| `0.9.0` | 8,762 |
| `0.10.0` | 2,034 |
| `0.11.0` | 4,437 |

The raw gazette XML is retained for a short window only, so the corpus cannot
be reprocessed at a single version. Version drift is measured instead. For each
candidate event type, the rate per 1,000 publications was compared across parser
versions with the calendar month held fixed, because several of these series are
strongly seasonal. Types whose rate moves at a version boundary
are excluded from the dataset and named in the README.

## Aggregation

Counts group by month of publication, canton, and event type. Canton comes from
the publication's own metadata, so it is available whether or not the company was
matched to a register profile. Capital differences are computed per event as new
minus prior nominal capital, in CHF, and are summed and medianed within a cell
using exact decimal arithmetic rounded to the whole franc. An even-length sample
takes the mean of its two middle values.

Where fewer than three events in a cell carried an amount, both capital measures
are withheld and `capital_suppressed` is set. An empty capital column with
`capital_suppressed` false means no events in that cell carried an amount.

## Verification

Each release is checked three ways before it is published:

- **Reconciliation.** The sum of `event_count` across the file must equal a direct
  count of qualifying events over the same period.
- **Schema.** The emitted columns must equal the declared schema exactly.
- **Manual review.** A stratified sample of ten cells is traced back to the
  underlying publications, and each is opened and checked for five things: the
  publication exists, its date falls in the cell's month, its canton matches, the
  classification is a defensible reading of the text, and the capital arithmetic
  is right. A cell that fails blocks the release.

## Corrections

A publication can be withdrawn after the fact. The figures in a release are
never restated in place: a correction to the data appears as a new release, with
the change recorded in the changelog at https://prospex.ch/open-data/swiss-registry-panel/
