When to Use
Use this when a firm subscribes to one or more regulatory feeds and needs the
answer to a recurring question: which published rule changes still require
work from us, and how long is left? The engine is the deterministic assessment
stage behind whatever ingestion adapter you run — it filters a batch to the
authorities and subject areas the firm is exposed to, resolves each update's
binding deadline, flags open items that are urgent or already past due, and
emits an auditable record of what it kept, what it filtered, and why.
The failure this exists to prevent is not "we never heard about the rule." It is
"we heard about it, alerted on the wrong date, and went quiet during the window
when the work had to happen."
The date that matters is usually not the date in the feed
The SEC's T+1 rulemaking is the canonical case, and every field below is
verifiable in the Federal Register API today:
| Field |
Value |
Where it lives |
publication_date |
2023-03-06 |
structured feed |
effective_on |
2023-05-05 |
structured feed |
dates (free text) |
"Effective date: May 5, 2023." |
structured feed |
| compliance date |
2024-05-28 |
only in the release body / press release 2023-29 |
An engine keyed on effective_on would have raised a 30-day alarm in April
2023 and then been silent through the entire 15-month window in which
broker-dealers actually had to re-plumb settlement. That is why
RegulatoryUpdate carries compliance_date separately, why it is the deadline
when present, and why every assessment records which date it used
(deadline_basis). The EU has the same split under different names: MiFID II
entered into force 2014-07-02 and applied from 2018-01-03 — a date that was
itself moved by a later amending directive.
When NOT to Use
- As the ingestion layer. This does not fetch, poll, authenticate, or parse
RSS/HTML/PDF. It assesses records that an adapter has already normalised.
- As the classifier.
severity, action_required and impacted_subdomains
come from your analyst triage, vendor taxonomy, or model. The engine validates
their shape and trusts their content — garbage severity in, confident
mis-triage out.
- As legal interpretation, or as evidence of compliance. A
COMPLIANT
status means somebody set remediation_complete. Nothing here verifies that
the work was done, and nothing here decides whether a rule applies to your
entity. That is a lawyer's job.
- For business-day or intraday deadlines. Comparisons are naive calendar
dates. No holiday calendar, no jurisdiction-local timezone. Deadlines that
turn on trading days (an exchange notice effective "T+3 sessions") need
global-exchange-holiday-calendar-handling, not this.
- For phased rulemakings, as one record. A rule with three staged compliance
dates must be ingested as three updates. There is no phase model, and folding
three deadlines into one field loses the two that have not passed yet.
- As a substitute for the supervisory procedures themselves. Monitoring
supports FINRA Rule 3110 / RTS 6 Art. 9 obligations; it does not discharge them.
Prerequisites
- An ingestion adapter producing
RegulatoryUpdate records with an ISO
YYYY-MM-DD effective_date, and compliance_date populated wherever the
source sets a distinct one. Leaving compliance_date empty because the
structured feed has no field for it is the single most consequential input
error in this skill.
monitored_regulators: the authorities the firm is actually exposed to. Pass
None for the five-authority default; an empty list raises rather than
silently monitoring everything.
- Optionally
monitored_subdomains for noise suppression, and
urgent_action_window_days if 30 days is not your escalation window.
- Stable
update_ids from the source (Federal Register document number, FCA
Handbook Notice number, SEBI circular reference). Duplicates within one batch
raise.
- Named owners for the two routing outcomes: immediate action, and overdue.
Workflow
Filter to the monitored surface — and record what you dropped:
- Regulator match is case-insensitive after stripping. Non-matching updates
are counted in
filtered_regulator_count and named in
filtered_regulators.
- Decision point — an update with no
impacted_subdomains is retained
even when a subdomain filter is active. Fail-open: an unclassified rule
change disappearing into a noise filter is the exact failure the filter is
supposed to prevent. It is logged at WARNING.
Resolve the binding deadline:
compliance_date when present, effective_date otherwise;
deadline_basis records which. effective_date is validated either way,
so a broken record cannot hide behind the field that happens to be unused.
- Decision point — a malformed date raises, it is not defaulted. The
previous version substituted 30 days on any parse failure, which fabricated
a deadline, wrote it into the audit record, and made a MEDIUM item look
routine. A date the feed got wrong is a feed defect to fix, not a value to
guess at.
Classify severity and status:
- Severity is upper-cased and validated against
CRITICAL/HIGH/MEDIUM/LOW.
Decision point — an unrecognised label raises rather than defaulting
low, and case is normalised: a feed emitting 'critical' against a
case-sensitive comparison silently leaves the urgent band and
critical_count.
- Status is
MONITORING (informational), COMPLIANT (remediation signed
off), OVERDUE (open past its deadline), or ACTION_REQUIRED.
Escalate:
- An open CRITICAL/HIGH item at or inside
urgent_action_window_days
escalates. Decision point — an open item past its deadline escalates
regardless of severity, because a missed deadline is a live breach, not a
forecast. A LOW rule that took effect 107 days ago and was never
implemented is the worst item in the report, not the least urgent.
remediation_complete removes an item from the open counts. It never makes
it invisible — it stays in assessments as COMPLIANT.
Report and route:
- Assessments are sorted nearest-deadline-first with
update_id as
tie-break, so two runs over the same batch produce byte-identical reports.
audit_notes carries the assessment date, every count, and both filter
counts. Persist the whole report — it is the evidence that monitoring ran.
Full procedure: see references/workflows.md.
Standards reference: see references/standards.md.
Printable pre-flight checklist: see assets/checklist.md.
Common Pitfalls
- Alerting on the effective date when a compliance date exists: the 30-day
warning fires 15 months early and nothing fires when the work is actually due.
The structured Federal Register record for T+1 contains only
2023-05-05; the
date that mattered, 2024-05-28, appears solely in the release body. Any
adapter that maps effective_on → effective_date and stops there has this bug.
- Assuming a deadline is fixed: MiFID II's application date moved a year by
amending Directive (EU) 2016/1034. Re-ingest revised records and replace
them — the engine raises on a duplicate
update_id in one batch precisely so
that a re-delivered revision cannot be counted as a second obligation.
- Silently swallowing a parse failure: substituting a placeholder deadline
puts a fabricated date into an audit trail a regulator may later read.
- Case-sensitive severity matching:
'critical' from one feed and
'CRITICAL' from another are the same obligation. One of them quietly
bypassing escalation is a monitoring system that reports success.
- Treating an empty filter as "no filter":
monitored_regulators=[] used to
fall through to the five defaults, so a caller narrowing scope got the
opposite of what they asked for. It now raises.
- Filtering without counting: a drop you cannot see is indistinguishable
from a quiet feed. Every filtered update is counted; unmonitored authorities
are named.
- Treating overdue as just another deadline:
days_until_effective = -107
compared against a "within 30 days" window is arithmetically urgent by
accident. Make it a distinct status so it can be routed to a distinct owner.
- Running with the default assessment date in production: the previous
version defaulted to a hard-coded
2024-01-01, so a caller who forgot the
argument got confidently wrong day counts. It now defaults to today (UTC) and
logs that it did — but pass the date explicitly for reproducible audits.
- Treating this skill's 30-day window or 24-hour poll cadence as a rule:
both are house defaults. No regulator publishes either. See
references/standards.md before repeating them in a policy document.
- Ignoring implementation lead time: the compliance date is when the work
must be finished, including testing and change approval — not when it starts.
- Single-jurisdiction focus: monitoring the home regulator while a venue in
another jurisdiction changes tick size or short-selling rules under the
strategy.
Verification
- Instantiate
RegulatoryChangeMonitoringServiceIntegrationEngine(monitored_regulators=["SEC","FCA","SEBI"]).
Ingest the SEC T+1 update with effective_date="2023-05-05" and
compliance_date="2024-05-28" at current_date_iso="2023-04-05": confirm
days_until_effective == 419, deadline_basis == "COMPLIANCE_DATE", and
requires_immediate_action is False. Re-run at 2024-05-01: confirm 27 days
and requires_immediate_action is True. The same record assessed on
effective_date alone is urgent in April 2023 and silent in May 2024 — that
inversion is the regression this skill exists to prevent.
- Boundary: an effective date exactly
urgent_action_window_days out escalates;
one day beyond does not (30 vs 31).
- Overdue: a
LOW, action-required update dated 2024-01-15 assessed at
2024-05-01 reports days_until_effective == -107, status == "OVERDUE", and
requires_immediate_action is True.
- Closure: the same update with
remediation_complete=True reports
COMPLIANT, drops out of action_required_count and overdue_count, and the
batch falls back to MONITORING_ONLY.
- Filtering: an unmonitored authority yields
NO_UPDATES with
filtered_regulator_count == 1 and the authority named in
filtered_regulators. An update with empty impacted_subdomains survives an
active subdomain filter.
- Negative checks — each must raise
ValueError: severity="URGENT",
effective_date="28-05-2024", effective_date="2024-02-30",
compliance_date="soon", a blank update_id, a blank regulator, two
updates sharing an update_id, monitored_regulators=[],
urgent_action_window_days=-1.
- Determinism: the same batch in reversed order produces identical
assessments ordering and identical audit_notes.
- Run
python -m unittest discover -s skills/regulatory-change-monitoring-service-integration/scripts
from the scripts/ directory and confirm a 100% pass rate (42 tests).
Related Skills
regulatory-custody-requirements-by-jurisdiction
reference-data-change-notification-pipeline
cross-jurisdiction-regulatory-conflict-resolution
annual-compliance-attestation-workflow
broker-api-deprecation-notice-monitoring
global-exchange-holiday-calendar-handling
1---2name: regulatory-change-monitoring-service-integration3description: >-4 Use when a firm subscribes to regulatory feeds such as the Federal Register, FCA5 Handbook notices, SEBI circulars or EUR-Lex and needs to know which published changes6 still require work and how long is left before the operative deadline.7license: Apache-2.08metadata:9 source: https://skillmd.com/skills/himanshuj16/regulatory-change-monitoring-service-integration10 domain: algorithmic-trading11 subdomain: regulatory-compliance-global12 tags: regulatory-compliance-global, regulatory-change-monitoring, compliance-deadline-tracking, horizon-scanning, finra-rule-3110, rts-6-article-913 brokers_frameworks: "Federal Register API (SEC rulemaking documents); FCA Handbook Notices; SEBI Circulars; EUR-Lex / ESMA publications; MAS Notices and Guidelines; Python Standard Library"14 version: "2.0.0"15 author: algo-trading-skills-contributors16---1718## When to Use1920Use this when a firm subscribes to one or more regulatory feeds and needs the21answer to a recurring question: **which published rule changes still require22work from us, and how long is left?** The engine is the deterministic assessment23stage behind whatever ingestion adapter you run — it filters a batch to the24authorities and subject areas the firm is exposed to, resolves each update's25binding deadline, flags open items that are urgent or already past due, and26emits an auditable record of what it kept, what it filtered, and why.2728The failure this exists to prevent is not "we never heard about the rule." It is29**"we heard about it, alerted on the wrong date, and went quiet during the window30when the work had to happen."**3132### The date that matters is usually not the date in the feed3334The SEC's T+1 rulemaking is the canonical case, and every field below is35verifiable in the Federal Register API today:3637| Field | Value | Where it lives |38|---|---|---|39| `publication_date` | 2023-03-06 | structured feed |40| `effective_on` | **2023-05-05** | structured feed |41| `dates` (free text) | "Effective date: May 5, 2023." | structured feed |42| **compliance date** | **2024-05-28** | only in the release body / press release 2023-29 |4344An engine keyed on `effective_on` would have raised a 30-day alarm in **April452023** and then been silent through the entire 15-month window in which46broker-dealers actually had to re-plumb settlement. That is why47`RegulatoryUpdate` carries `compliance_date` separately, why it is the deadline48when present, and why every assessment records which date it used49(`deadline_basis`). The EU has the same split under different names: MiFID II50entered into force 2014-07-02 and *applied* from 2018-01-03 — a date that was51itself moved by a later amending directive.5253## When NOT to Use5455- **As the ingestion layer.** This does not fetch, poll, authenticate, or parse56 RSS/HTML/PDF. It assesses records that an adapter has already normalised.57- **As the classifier.** `severity`, `action_required` and `impacted_subdomains`58 come from your analyst triage, vendor taxonomy, or model. The engine validates59 their shape and trusts their content — garbage severity in, confident60 mis-triage out.61- **As legal interpretation, or as evidence of compliance.** A `COMPLIANT`62 status means somebody set `remediation_complete`. Nothing here verifies that63 the work was done, and nothing here decides whether a rule applies to your64 entity. That is a lawyer's job.65- **For business-day or intraday deadlines.** Comparisons are naive calendar66 dates. No holiday calendar, no jurisdiction-local timezone. Deadlines that67 turn on trading days (an exchange notice effective "T+3 sessions") need68 `global-exchange-holiday-calendar-handling`, not this.69- **For phased rulemakings, as one record.** A rule with three staged compliance70 dates must be ingested as three updates. There is no phase model, and folding71 three deadlines into one field loses the two that have not passed yet.72- **As a substitute for the supervisory procedures themselves.** Monitoring73 supports FINRA Rule 3110 / RTS 6 Art. 9 obligations; it does not discharge them.7475## Prerequisites7677- An ingestion adapter producing `RegulatoryUpdate` records with an ISO78 `YYYY-MM-DD` `effective_date`, and `compliance_date` populated wherever the79 source sets a distinct one. **Leaving `compliance_date` empty because the80 structured feed has no field for it is the single most consequential input81 error in this skill.**82- `monitored_regulators`: the authorities the firm is actually exposed to. Pass83 `None` for the five-authority default; an empty list raises rather than84 silently monitoring everything.85- Optionally `monitored_subdomains` for noise suppression, and86 `urgent_action_window_days` if 30 days is not your escalation window.87- Stable `update_id`s from the source (Federal Register document number, FCA88 Handbook Notice number, SEBI circular reference). Duplicates within one batch89 raise.90- Named owners for the two routing outcomes: immediate action, and overdue.9192## Workflow93941. **Filter to the monitored surface — and record what you dropped**:95 - Regulator match is case-insensitive after stripping. Non-matching updates96 are counted in `filtered_regulator_count` and named in97 `filtered_regulators`.98 - **Decision point — an update with no `impacted_subdomains` is retained**99 even when a subdomain filter is active. Fail-open: an unclassified rule100 change disappearing into a noise filter is the exact failure the filter is101 supposed to prevent. It is logged at WARNING.1021032. **Resolve the binding deadline**:104 - `compliance_date` when present, `effective_date` otherwise;105 `deadline_basis` records which. `effective_date` is validated either way,106 so a broken record cannot hide behind the field that happens to be unused.107 - **Decision point — a malformed date raises, it is not defaulted.** The108 previous version substituted 30 days on any parse failure, which fabricated109 a deadline, wrote it into the audit record, and made a MEDIUM item look110 routine. A date the feed got wrong is a feed defect to fix, not a value to111 guess at.1121133. **Classify severity and status**:114 - Severity is upper-cased and validated against `CRITICAL/HIGH/MEDIUM/LOW`.115 **Decision point — an unrecognised label raises rather than defaulting116 low**, and case is normalised: a feed emitting `'critical'` against a117 case-sensitive comparison silently leaves the urgent band *and*118 `critical_count`.119 - Status is `MONITORING` (informational), `COMPLIANT` (remediation signed120 off), `OVERDUE` (open past its deadline), or `ACTION_REQUIRED`.1211224. **Escalate**:123 - An open CRITICAL/HIGH item at or inside `urgent_action_window_days`124 escalates. **Decision point — an open item past its deadline escalates125 regardless of severity**, because a missed deadline is a live breach, not a126 forecast. A `LOW` rule that took effect 107 days ago and was never127 implemented is the worst item in the report, not the least urgent.128 - `remediation_complete` removes an item from the open counts. It never makes129 it invisible — it stays in `assessments` as `COMPLIANT`.1301315. **Report and route**:132 - Assessments are sorted nearest-deadline-first with `update_id` as133 tie-break, so two runs over the same batch produce byte-identical reports.134 - `audit_notes` carries the assessment date, every count, and both filter135 counts. Persist the whole report — it is the evidence that monitoring ran.136137> Full procedure: see `references/workflows.md`.138> Standards reference: see `references/standards.md`.139> Printable pre-flight checklist: see `assets/checklist.md`.140141## Common Pitfalls142143- **Alerting on the effective date when a compliance date exists**: the 30-day144 warning fires 15 months early and nothing fires when the work is actually due.145 The structured Federal Register record for T+1 contains only `2023-05-05`; the146 date that mattered, `2024-05-28`, appears solely in the release body. Any147 adapter that maps `effective_on → effective_date` and stops there has this bug.148- **Assuming a deadline is fixed**: MiFID II's application date moved a year by149 amending Directive (EU) 2016/1034. Re-ingest revised records and *replace*150 them — the engine raises on a duplicate `update_id` in one batch precisely so151 that a re-delivered revision cannot be counted as a second obligation.152- **Silently swallowing a parse failure**: substituting a placeholder deadline153 puts a fabricated date into an audit trail a regulator may later read.154- **Case-sensitive severity matching**: `'critical'` from one feed and155 `'CRITICAL'` from another are the same obligation. One of them quietly156 bypassing escalation is a monitoring system that reports success.157- **Treating an empty filter as "no filter"**: `monitored_regulators=[]` used to158 fall through to the five defaults, so a caller narrowing scope got the159 opposite of what they asked for. It now raises.160- **Filtering without counting**: a drop you cannot see is indistinguishable161 from a quiet feed. Every filtered update is counted; unmonitored authorities162 are named.163- **Treating overdue as just another deadline**: `days_until_effective = -107`164 compared against a "within 30 days" window is arithmetically urgent by165 accident. Make it a distinct status so it can be routed to a distinct owner.166- **Running with the default assessment date in production**: the previous167 version defaulted to a hard-coded `2024-01-01`, so a caller who forgot the168 argument got confidently wrong day counts. It now defaults to today (UTC) and169 logs that it did — but pass the date explicitly for reproducible audits.170- **Treating this skill's 30-day window or 24-hour poll cadence as a rule**:171 both are house defaults. No regulator publishes either. See172 `references/standards.md` before repeating them in a policy document.173- **Ignoring implementation lead time**: the compliance date is when the work174 must be *finished*, including testing and change approval — not when it starts.175- **Single-jurisdiction focus**: monitoring the home regulator while a venue in176 another jurisdiction changes tick size or short-selling rules under the177 strategy.178179## Verification180181- Instantiate `RegulatoryChangeMonitoringServiceIntegrationEngine(monitored_regulators=["SEC","FCA","SEBI"])`.182 Ingest the SEC T+1 update with `effective_date="2023-05-05"` and183 `compliance_date="2024-05-28"` at `current_date_iso="2023-04-05"`: confirm184 `days_until_effective == 419`, `deadline_basis == "COMPLIANCE_DATE"`, and185 `requires_immediate_action is False`. Re-run at `2024-05-01`: confirm `27` days186 and `requires_immediate_action is True`. The same record assessed on187 `effective_date` alone is urgent in April 2023 and silent in May 2024 — that188 inversion is the regression this skill exists to prevent.189- Boundary: an effective date exactly `urgent_action_window_days` out escalates;190 one day beyond does not (30 vs 31).191- Overdue: a `LOW`, action-required update dated `2024-01-15` assessed at192 `2024-05-01` reports `days_until_effective == -107`, `status == "OVERDUE"`, and193 `requires_immediate_action is True`.194- Closure: the same update with `remediation_complete=True` reports195 `COMPLIANT`, drops out of `action_required_count` and `overdue_count`, and the196 batch falls back to `MONITORING_ONLY`.197- Filtering: an unmonitored authority yields `NO_UPDATES` with198 `filtered_regulator_count == 1` and the authority named in199 `filtered_regulators`. An update with empty `impacted_subdomains` survives an200 active subdomain filter.201- Negative checks — each must raise `ValueError`: `severity="URGENT"`,202 `effective_date="28-05-2024"`, `effective_date="2024-02-30"`,203 `compliance_date="soon"`, a blank `update_id`, a blank `regulator`, two204 updates sharing an `update_id`, `monitored_regulators=[]`,205 `urgent_action_window_days=-1`.206- Determinism: the same batch in reversed order produces identical207 `assessments` ordering and identical `audit_notes`.208- Run `python -m unittest discover -s skills/regulatory-change-monitoring-service-integration/scripts`209 from the `scripts/` directory and confirm a 100% pass rate (42 tests).210211## Related Skills212213- `regulatory-custody-requirements-by-jurisdiction`214- `reference-data-change-notification-pipeline`215- `cross-jurisdiction-regulatory-conflict-resolution`216- `annual-compliance-attestation-workflow`217- `broker-api-deprecation-notice-monitoring`218- `global-exchange-holiday-calendar-handling`