02.2 Kor.ai Bayesian Node Library - ravkorsurv/kor-ai-core GitHub Wiki
02.2 Kor.ai Bayesian Node Library (Market Abuse)
This page defines the canonical node library for constructing Bayesian Networks (BNs) across market abuse typologies such as insider dealing, spoofing, layering, wash trades, price manipulation, and front-running. It supersedes and consolidates elements from 11.2_Node_Library
for unified usage.
Each node includes a definition, example states, data inputs, and typical parent/child relationships. This supports modular model design, CPT consistency, and auditability across Kor.ai.
๐ Core Latent Nodes (Inferred Concepts)
IntentToManipulate
- Whether the actor is deliberately attempting to distort the market.
True
,False
,Uncertain
- Parents:
OrderAggressiveness
,LayeringPattern
,QuoteImbalance
,PNLSpike
- Children:
MarketAbuseLikelihood
AccessToMNPI
- Whether the actor had access to material non-public information (MNPI).
Yes
,No
- Parents:
Role
,HRSignals
,EmailKeywords
,AccessLogs
- Children:
IntentToTradeOnMNPI
,MarketAbuseLikelihood
IntentToTradeOnMNPI
- Whether actor acted on privileged info.
Yes
,No
,Unclear
- Parents:
AccessToMNPI
,TradeDirectionAligned
,TimingProximity
- Children:
MarketAbuseLikelihood
SpoofingDetected
- Signal indicating spoofing pattern.
None
,Suspected
,Confirmed
- Parents:
OrderPlacementRate
,CancelRateRatio
,BookPressure
- Children:
IntentToManipulate
,MarketAbuseLikelihood
WashTradeLikelihood
- Likelihood of wash trade behavior.
Low
,Medium
,High
- Parents:
CounterpartyMatch
,VolumeMirror
,TimeWindowRepetition
- Children:
MarketAbuseLikelihood
ClusteredBehavior
- Pattern similarity with prior cases.
None
,Similar
,HighlyCorrelated
- Parents:
TraderID
,BehaviorVector
- Children:
MarketAbuseLikelihood
KnownRiskProfile
- Prior alert history or case exposure.
Clean
,PreviouslyFlagged
,UnderInvestigation
- Inputs: STORs, alerts
- Children:
MarketAbuseLikelihood
MarketAbuseLikelihood
- Posterior abuse score node.
Low
,Medium
,High
- Parents: all above
- Children:
AlertRaised
,ExplainabilityModule
๐ Evidence Nodes (Observable Inputs)
Trade Behavior
OrderAggressiveness
โPassive
,Neutral
,Aggressive
OrderPlacementRate
โLow
,Medium
,High
CancelRateRatio
โ<50%
,50โ90%
,>90%
BookPressure
โNeutral
,BidPressure
,AskPressure
LayeringPattern
โNone
,Moderate
,Strong
TradeDirectionAligned
โYes
,No
,Neutral
TimingProximity
โ<1h
,SameDay
,>1d
TradeTimingWindow
โNormalHours
,EndOfDay
,EventDriven
VolumeSpike
โNone
,Moderate
,High
Trade Outcome
PNLSpike
โAbsent
,Mild
,Extreme
VolumeMirror
โNo
,Partial
,Full
CounterpartyMatch
โNo
,Possible
,Likely
TimeWindowRepetition
โAbsent
,Moderate
,Frequent
Comms / Access / HR
EmailKeywords
โClean
,Flagged
,Escalated
AccessLogs
โYes
,No
,Unknown
ClientOrderVisibility
โNone
,Limited
,Full
PreTradeBehavior
โNeutral
,MinorFrontRun
,SignificantFrontRun
HRSignals
โLow
,Moderate
,High
KYC / Profile Context
KYCRiskRating
โLow
,Medium
,High
TraderID
โ categorical key for linking historyRole
โAnalyst
,Sales
,Trader
,DeskHead
, etc.
๐งพ Output / UX Nodes
AlertRaised
- Whether score crosses alert threshold.
True
,False
ExplainabilityModule
- Captures key drivers of posterior.
- JSON structure includes:
node
value
score_impact
confidence
input_description
- Optional
tag
๐ง Integration Notes
- This library replaces
11.2
with additional structure, clustering, and front-running support. - Each node has an alias (
Q#
) for compact model serialization. - Nodes are reusable across modular DAG templates in
13.2
. - CPTs are stored and versioned separately.
- Explainability logic is powered by this same set.
Next: Ensure CPT scaffolds and typology mappings reflect this unified structure. DAG generation services and Agena model uploads should use this version going forward.