跳轉到

整體概觀

目標架構:

External Sources
  -> Source Connectors
  -> Ingestion Layer
  -> Raw Storage + Canonical Event Stream
  -> Compute Layer
  -> Strategy / Risk / Execution
  -> Observability

分層原則

資料來源層

負責把外部世界接進來,不直接提供策略使用。

典型來源:

  • market data vendors
  • broker market data
  • broker execution events
  • exchange websocket / REST
  • historical flat files
  • corporate actions / fundamentals / news

資料接入層

負責把來源接成可治理、可回放、可監控的內部事件流。

核心責任:

  • connector 獨立化
  • raw payload 留存
  • event_time / ingest_time 區分
  • validator / parser / normalizer
  • raw log 與 normalized stream 雙輸出

標準資料模型

定義公司內部對市場世界的正式語言,讓 research、backtest、live、risk、execution 都使用同一套實體與欄位語意。

儲存層

建議熱冷分離:

  • cold: object storage + parquet
  • stream: Kafka 或 Redpanda
  • query: QuestDB / ClickHouse
  • state: Postgres / Redis

計算層

負責把 canonical event 轉成更可用的資料形態:

  • bar aggregation
  • indicators
  • features
  • factor calculation
  • data quality checks

存取層

內部服務不應直接打外部 API,而是透過公司自己的存取介面:

  • internal query API
  • streaming consumer
  • backtest loader
  • feature service
  • execution gateway

一句話總結

公司的核心不是 API client,而是內部市場資料與交易平台。