Sync NZX noise filtering

This commit is contained in:
Admin 2026-09-29 20:14:39 +00:00
parent 3b490dee62
commit 3da352e66b

View File

@ -89,8 +89,15 @@ export function scoreItem(item: NormalizedItem): ScoredItem {
if (item.sourceId === "nzx-announcements") { if (item.sourceId === "nzx-announcements") {
score += 1; score += 1;
reasons.push("New NZX market announcement"); reasons.push("New NZX market announcement");
const eventText = `${item.title} ${item.metrics?.announcementType ?? ""}`.toLowerCase(); const title = item.title.toLowerCase();
if (/(fll?yr|hal?fyr|transact|corpact|takeover|guidance|results|earnings|dividend|trading halt|capital raise|acquisition|merger|scheme)/i.test(eventText)) { const announcementType = String(item.metrics?.announcementType ?? "").toUpperCase();
const routineNotice =
/(notice of acquisition of securities|transaction in own shares|net asset value|\bnta\b|sph notice|capital change notice|ongoing disclosure notice)/i.test(title);
const materialType = new Set(["FLLYR","HALFYR","TRANSACT","CORPACT"]).has(announcementType);
const materialTitle =
/(takeover|guidance|results|earnings|dividend|trading halt|capital rais|merger|scheme of arrangement|acquisition of (?:a |the )?(?:business|company|asset)|sale of (?:a |the )?(?:business|company|asset))/i.test(title);
if (!routineNotice && (materialType || materialTitle)) {
score += 2; score += 2;
reasons.push("Potentially material market event"); reasons.push("Potentially material market event");
} }