cmdrvl's picture
Refresh EXP-014 CMBS special-servicing datasets: corrected as-of dates, per-loan servicers, normalized units, honest missingness, add is_stub + tape_completeness_score, restore recent reporting periods (796,953 rows).
0c6de2d verified
|
Raw
History Blame Contribute Delete
5.18 kB
---
license: cc-by-nc-4.0
task_categories:
- tabular-classification
tags:
- cmbs
- cre
- credit-risk
- sec-edgar
- lineage
- sequences
- time-series
- event-sequences
pretty_name: CMBS Special-Servicing Transfer Early-Warning Sequences
---
# CMBS Special-Servicing Transfer Early-Warning Sequences
Leakage-safe CMBS special-servicing-transfer prediction dataset for the job: identify CMBS assets at elevated risk of transferring to special servicing within the next 12 months, using ordered point-in-time observations from SEC-filed CMBS loan reports.
This release is a sequence-friendly view of the same benchmark population as the flat table. Each row is one ordered step in an asset's history, with compact model inputs inside `step_features`.
```python
import pandas as pd
train = pd.read_parquet("train.parquet")
asset_sequences = (
train.sort_values(["cik", "assetnumber", "sequence_step"])
.groupby(["cik", "assetnumber"], sort=False)
)
```
## Listing Terms
Contact: cairn@cmdrvl.com
License: CC-BY-NC-4.0. This dataset is open source for non-commercial use only.
Commercial use: Snowflake Marketplace listing coming soon, contact cairn@cmdrvl.com.
## Files
| File | Rows | Positives | Positive rate | Notes |
| --- | ---: | ---: | ---: | --- |
| `train.parquet` | 497,552 | 10,825 | 2.18% | `reporting_period_end_date <= 2022-12-31` |
| `test.parquet` | 299,401 | 6,581 | 2.20% | `reporting_period_end_date >= 2023-07-01` |
| `all.parquet` | 796,953 | 17,406 | 2.18% | Combined file with `split` column |
The six-month embargo window from 2023-01-01 through 2023-06-30 is excluded from all published files. Rows whose full 12-month forward label window is not yet observable are also excluded rather than shipped as negatives.
## Grain
One row is one CMBS asset observation step at:
- `cik`
- `loannumber`
- `assetnumber`
- `reporting_period_end_date`
- `observation_id`
`assetnumber` is part of the observation grain. `loannumber` is retained as a descriptive loan identifier because loan numbers can repeat across deals and can cover multiple assets.
Use `sequence_step` to order rows within each `(cik, assetnumber)` sequence.
## Label And Split
Target column: `transfers_to_special_servicing_within_12m`
The target is `1` when the asset's first observed special-servicer transfer date occurs after the observation period end date and within the next 12 months. Rows on or after that asset-level first transfer date are dropped before modeling, so the feature table contains pre-transfer observations only.
Split policy:
- Train: reporting periods on or before 2022-12-31.
- Embargo: 2023-01-01 through 2023-06-30, excluded.
- Test: reporting periods on or after 2023-07-01.
The split is temporal, not random. The embargo is a buffer band discarded between train and test so the two sets do not touch at the boundary.
## Step Features
`step_features` is a struct with compact per-period fields intended for sequence models:
- raw payment status and workout strategy codes
- balance change percentage
- payment status severity rank
- delinquency streak length
- seasoning and months to maturity
- modification flag
Example unpack:
```python
steps = train.sort_values(["cik", "assetnumber", "sequence_step"])
first_asset = next(iter(steps.groupby(["cik", "assetnumber"], sort=False)))[1]
feature_dicts = first_asset["step_features"].tolist()
label = int(first_asset.iloc[-1]["transfers_to_special_servicing_within_12m"])
```
For recurrent, transformer, temporal-convolution, or pooling-based models, group by `(cik, assetnumber)`, sort by `sequence_step`, encode each `step_features` struct, and use the last available row's label for the supervised target.
## Leakage Verification
This release is gated by a machine-checkable leakage receipt before publication. The receipt checks:
- No feature rows with `period_end >= first_special_servicer_transfer_date`.
- No published rows in the six-month embargo window.
- No point-in-time appointed-servicer join where the source filing date is later than the panel filing date it is joined to.
- Exact split reproduction: train 497,552 with 10,825 positives, test 299,401 with 6,581 positives.
## Provenance
Every published row includes `source_filing_id`, `filing_date`, and `source_url`. Use these fields to trace an observation back to its SEC archive context. They are provenance fields, not model features, unless the modeling task explicitly needs provenance.
## Quickstart
```python
import pandas as pd
train = pd.read_parquet("train.parquet")
test = pd.read_parquet("test.parquet")
drop_cols = [
"observation_id",
"cik",
"loannumber",
"assetnumber",
"reporting_period_end_date",
"special_servicing_transfer_date",
"source_filing_id",
"filing_date",
"source_created_at",
"source_url",
"split",
]
y_train = train["transfers_to_special_servicing_within_12m"]
X_train_steps = train.drop(columns=drop_cols + ["transfers_to_special_servicing_within_12m"])
y_test = test["transfers_to_special_servicing_within_12m"]
X_test_steps = test.drop(columns=drop_cols + ["transfers_to_special_servicing_within_12m"])
```