T-213: M2.4b — Add Python stockbot register_signal, batch feature runner, and M2 MarketDataStore methods

This commit is contained in:
Studio 2026-12-05 15:06:31 -05:00
parent 68a53bd489
commit 213b8b3ff1
2 changed files with 8 additions and 6 deletions

View file

@ -2461,8 +2461,8 @@ function planCrossSectionInternal(
`WHERE ${currencyPredicate} ` +
'AND b.session_date >= ? ' +
'AND b.session_date <= ? ' +
'AND b.ts <= CAST(? AS TIMESTAMPTZ) ' +
'AND b.known_at <= CAST(? AS TIMESTAMPTZ))',
'AND b.ts <= ? ' +
'AND b.known_at <= ?)',
];
const params: DuckDbParam[] = [
...currencies,
@ -2490,9 +2490,9 @@ function planCrossSectionInternal(
`${alias} AS (` +
'SELECT listing_id, CAST(value AS DOUBLE) AS value ' +
`FROM read_parquet('${featPath}', hive_partitioning = true) ` +
'WHERE ts >= CAST(? AS TIMESTAMPTZ) ' +
'AND ts <= CAST(? AS TIMESTAMPTZ) ' +
'AND known_at <= CAST(? AS TIMESTAMPTZ) ' +
'WHERE ts >= ? ' +
'AND ts <= ? ' +
'AND known_at <= ? ' +
'QUALIFY ROW_NUMBER() OVER (PARTITION BY listing_id ORDER BY ts DESC, known_at DESC) = 1)'
);
params.push(fromIso, toIso, asOfIso);

View file

@ -998,8 +998,10 @@ try {{
cwd=str(REPO_ROOT),
capture_output=True,
text=True,
check=True,
)
assert (
proc.returncode == 0
), f"bun crossSection exited {proc.returncode}:\nstdout:\n{proc.stdout}\nstderr:\n{proc.stderr}"
ts_payload = json.loads(proc.stdout.strip())
assert ts_payload["columns"] == cs.columns
ts_rows = ts_payload["rows"]