T-123: M1.3h — @stock-bot/research: pure event-study panel builder (MarketDataStore daily bars + events table → Vault-safe EventStudyInput) with an end-to-end qmFilings event study test (store → runEventStudy → trial_ledger → DSR) and local benchmark (no new dependencies)
This commit is contained in:
parent
112b830985
commit
5e626b083b
5 changed files with 756 additions and 62 deletions
|
|
@ -102,7 +102,7 @@ let evIdx = 0;
|
|||
|
||||
for (let l = 0; l < LISTINGS; l += 1) {
|
||||
const listingId = l + 1;
|
||||
const subtype = l % 2 === 0 ? '10-Q' : 'SEDAR_INTERIM';
|
||||
const subtype = l % 2 === 0 ? '10-q' : 'interim_financial_statements';
|
||||
let price = 10 + (l % 200) * 0.5;
|
||||
for (let t = 0; t < SESSIONS; t += 1) {
|
||||
const ts = calendar.closeTs[t] as number;
|
||||
|
|
@ -148,6 +148,7 @@ checksum = fnv1aUint32(checksum, result.diagnostics.vaultExcludedDates);
|
|||
checksum = fnv1aUint32(checksum, result.diagnostics.vaultExcludedEvents);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.droppedUnknownListing);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.droppedAfterLastSession);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.droppedMissingCalendarSession);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.duplicateEvents);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.duplicateBars);
|
||||
checksum = fnv1aUint32(checksum, result.diagnostics.nonPositiveCloseReturns);
|
||||
|
|
@ -174,7 +175,7 @@ for (let i = 0; i < result.input.events.length; i += 1) {
|
|||
|
||||
const checksumHex = checksum.toString(16).padStart(8, '0');
|
||||
|
||||
const EXPECTED_CHECKSUM = '92bb8ae3';
|
||||
const EXPECTED_CHECKSUM = '01b356d3';
|
||||
if (checksumHex !== EXPECTED_CHECKSUM) {
|
||||
throw new Error(
|
||||
`Benchmark checksum mismatch: expected ${EXPECTED_CHECKSUM}, got ${checksumHex}.`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue