feat: instrument analysis
This commit is contained in:
@@ -711,9 +711,9 @@ function comprehensionScore(ev: SnapshotEvent, tmpl: CausalTemplate, instrument:
|
||||
const actual = actuals[instrument] ?? actuals[instrument.toUpperCase()] ?? actuals[instrument.toLowerCase()]
|
||||
if (actual == null) return null
|
||||
|
||||
// Find the market_asset node for this instrument
|
||||
// Find the output node for this instrument (built-in templates use "output", auto-generated use "market_asset")
|
||||
const outputNode = tmpl.graph_json.nodes.find(n =>
|
||||
n.type === 'market_asset' && n.instrument?.toUpperCase() === instrument.toUpperCase()
|
||||
(n.type === 'market_asset' || n.type === 'output') && n.instrument?.toUpperCase() === instrument.toUpperCase()
|
||||
)
|
||||
const predicted = outputNode ? (preds[outputNode.id] ?? null) : null
|
||||
if (predicted == null) return null
|
||||
|
||||
Reference in New Issue
Block a user