Learning data structure

This page describes the public model for judgment, market, account, risk, execution, and explanation records used by NoahAI Client. Its purpose is traceability, audit, and reproducibility, with separate venue, account, PAPER/LIVE, and strategy-version boundaries.

Why it matters

Financial AI must support trace, audit, and reproduction of supported decisions, not just outcome prediction. NoahAI records rationale, controls, requests, and outcomes within the applicable service boundary.

Who should read it

This structure separates PAPER and LIVE, venue and broker, account, currency, and strategy version so it can support product validation, venue review, and audit.

Production data flow

  • Real-time market data (price, volatility, order book)
  • AI decision generation (signals, confidence, guardrail application)
  • Order execution feedback (fill, slippage, reject)
  • Post-trade review and learning loop

The key is "standardization of record".

Judgment, context, and outcome must be stored in the same schema for replay, learning, audit, and user trust. Below are the main data structures in a CareLog-like schema.

DecisionLog

Decision log

FieldTypeDescription
decision_idUUIDUnique decision ID
timestampTIMESTAMPDecision time
strategySTRINGSelected strategy
actionENUMAction type (BUY/SELL/HOLD)
reasoningJSONReasoning (pattern, signal, weights)
confidenceFLOATConfidence score (0–1)
model_versionSTRINGAI model version used

MarketSnapshot

Market data snapshot

FieldTypeDescription
snapshot_idUUIDUnique snapshot ID
timestampTIMESTAMPSnapshot time
symbolSTRINGTrading symbol
priceDECIMALCurrent price
volumeDECIMALVolume
volatilityDECIMALVolatility indicator
orderbook_depthJSONOrder book depth
market_signalsJSONDetected market signals

AccountSnapshot

Account state snapshot

FieldTypeDescription
snapshot_idUUIDUnique snapshot ID
timestampTIMESTAMPSnapshot time
balanceDECIMALBalance
positionsJSONCurrent positions
leverageDECIMALLeverage ratio
margin_usedDECIMALMargin in use
unrealized_pnlDECIMALUnrealized P&L

RiskEvent

Risk event

FieldTypeDescription
event_idUUIDUnique event ID
timestampTIMESTAMPEvent time
risk_typeENUMRisk type (LOSS_LIMIT/VOLATILITY/LEVERAGE/ANOMALY)
severityENUMSeverity (LOW/MEDIUM/HIGH/CRITICAL)
trigger_valueDECIMALTrigger value
action_takenSTRINGAction taken
guardrail_appliedBOOLEANWhether guardrail was applied

ExecutionResult

Execution result

FieldTypeDescription
execution_idUUIDUnique execution ID
decision_idUUIDLinked decision ID
timestampTIMESTAMPExecution time
order_typeENUMOrder type (MARKET/LIMIT/STOP)
quantityDECIMALQuantity
executed_priceDECIMALExecuted price
slippageDECIMALSlippage
feeDECIMALFee
statusENUMStatus (PENDING/FILLED/PARTIAL/CANCELLED/FAILED)

XAITrace

XAI trace log

FieldTypeDescription
trace_idUUIDUnique trace ID
decision_idUUIDLinked decision ID
timestampTIMESTAMPTrace time
explanationTEXTDecision explanation (human-readable)
evidenceJSONEvidence (pattern, signal, stats)
confidence_breakdownJSONConfidence breakdown
alternative_optionsJSONOptions considered but not chosen

Learning data structure example

The JSON below is a synthetic field example, not real user, account, order, or performance data.

The learning data structure in use includes:

{
  "example_only": true,
  "ai_learning_data": {
    "decision_history": [
      {
        "timestamp": "YYYY-MM-DDTHH:MM:SSZ",
        "asset_type": "crypto",
        "decision": "long_entry",
        "reasoning": {
          "signal_strength": null,
          "pattern": "bull_flag",
          "market_conditions": "high_volatility"
        },
        "confidence": null,
        "tp": null,
        "sl": null,
        "exchange": "example_venue",
        "execution_status": "example_status",
        "result": "example_result"
      }
    ],
    "conversation_patterns": {
      "common_questions": [
        "Deposit method",
        "Withdrawal procedure",
        "API key setup",
        "Fee guide"
      ],
      "response_effectiveness": {
        "step_by_step_guide": null,
        "simple_language": null
      }
    },
    "user_satisfaction_metrics": {
      "comprehension_rate": null,
      "task_completion_rate": null
    }
  }
}

This structure supports real-time crypto decision-making, execution tracking, and learning from market conditions.

Schema design principles

  • Standardization: All judgment/context/outcome in the same format for replay
  • Traceability: Each record has unique ID and timestamp for time-order trace
  • Connectivity: DecisionLog, ExecutionResult, XAITrace link for full flow trace
  • Anonymization roadmap: cross-user learning requires explicit consent, anonymization, revocation, and operational validation; it is not an operating feature in the current public release
  • Extensibility: JSON fields allow new fields without breaking existing structure

Data usage examples

Trade pattern similarity

Compare past crypto trade patterns with current market to analyze performance in similar patterns; used for risk management via pattern verification before entry.

Regime-dependent thresholds

Adjust confidence and risk thresholds by regime (volatility spike, sideways, trend) to support better decisions.

Guardrail effect and loss prevention

Analyze guardrail application and max drawdown for policy improvement and risk strategy optimization.