offdataai
Banking & Financial Services · data model template

Capital Markets Trading & Investment data model

Kimball warehouse for trading and asset management: order and execution facts, an accumulating settlement snapshot, daily position and P&L snapshots, and corporate actions over a conformed security master, portfolio, account, counterparty, and trader dimensions.

Capital markets and investment analytics covering the full trade lifecycle — orders, executions, and settlement — plus daily position and P&L snapshots and corporate actions, built as a Kimball star schema over a conformed security master and portfolio, account, counterparty, and trader dimensions for best-execution, exposure, and MiFID II / Dodd-Frank transaction reporting. It is a Kimball dimensional model: fact tables at a declared grain surrounded by conformed dimensions, ready for BI tools and a semantic layer.

KimballBanking & Financial ServicesMiFID-IIDodd-FrankSOXSEC-17a-4
14
tables
132
columns
26
relationships
3
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: Snowflake). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

tradingpositionssettlementcorporate_actionsconformed_dimensions

Design decisions

  • Separate order and execution facts

    An order can produce zero, one, or many fills; modeling orders and executions as distinct facts supports fill-rate, slippage, and best-execution analysis.

  • Daily position snapshot distinct from executions

    Holdings and market value are semi-additive and needed daily for risk and NAV independent of trade volume — a periodic snapshot fits.

  • Accumulating snapshot for settlement

    Settlement runs on a T+1/T+2 cycle with pending → settled/failed milestones; an accumulating snapshot captures fails and settlement lag.

  • Security master as conformed SCD2 dimension

    Sector, ratings, and identifiers change over time; SCD2 preserves the attributes as-of trade date for accurate historical attribution.

Tables in the Capital Markets Trading & Investment model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Fact tables (6)

fct_order

Grain: one row per order

Order-grain fact capturing intent before execution.

ColumnTypeKeys
order_keybigintPK
date_keybigint
security_keybigint
account_keybigint
trader_keybigint
order_type_keybigint
exchange_keybigint
order_idvarchar
sidevarchar
order_quantitydecimal
limit_pricedecimal
order_statusvarchar
filled_quantitydecimal

fct_execution

Grain: one row per execution / fill

Execution-grain fact — the core trade event.

ColumnTypeKeys
execution_keybigintPK
date_keybigint
security_keybigint
account_keybigint
counterparty_keybigint
trader_keybigint
exchange_keybigint
settle_date_keybigint
trade_idvarchar
sidevarchar
executed_quantitydecimal
execution_pricedecimal
gross_amountdecimal
commissiondecimal
exchange_feesdecimal
tax_amountdecimal
currencyvarchar

fct_position_snapshot

Grain: one row per account per security per day (periodic snapshot)

Daily holdings snapshot — semi-additive market value.

ColumnTypeKeys
date_keybigint
account_keybigint
security_keybigint
portfolio_keybigint
quantitydecimal
average_costdecimal
market_pricedecimal
market_valuedecimal
cost_basisdecimal
unrealized_pnldecimal
currencyvarchar

fct_settlement

Grain: one row per trade settlement (accumulating snapshot)

Accumulating snapshot tracking the settlement cycle.

ColumnTypeKeys
settlement_keybigintPK
date_keybigint
security_keybigint
account_keybigint
counterparty_keybigint
settle_date_keybigint
trade_idvarchar
settlement_amountdecimal
currencyvarchar
settlement_statusvarchar
fail_reasonvarchar
days_to_settlesmallint

fct_daily_pnl

Grain: one row per portfolio per day (periodic snapshot)

Daily P&L attribution per portfolio.

ColumnTypeKeys
date_keybigint
portfolio_keybigint
account_keybigint
realized_pnldecimal
unrealized_pnldecimal
trading_feesdecimal
net_pnldecimal
gross_market_valuedecimal
daily_return_pctdecimal

fct_corporate_action

Grain: one row per corporate action applied to a holding

Corporate actions affecting positions (dividends, splits, etc.).

ColumnTypeKeys
corporate_action_keybigintPK
date_keybigint
security_keybigint
account_keybigint
action_idvarchar
action_typevarchar
action_ratiodecimal
cash_amount_per_sharedecimal
total_cash_amountdecimal
currencyvarchar

Dimension tables (6)

dim_date

Grain: one row per calendar day

ColumnTypeKeys
date_keybigintPK
full_datedateBK
month_numbersmallint
quartersmallint
yearsmallint
is_trading_dayboolean

dim_security

Grain: one row per security per SCD2 version

SCD type 2

ColumnTypeKeys
security_keybigintPK
security_idvarcharBK
isinvarchar
cusipvarchar
tickervarchar
security_namevarchar
asset_classvarchar
instrument_typevarchar
issuer_namevarchar
sectorvarchar
currencyvarchar
issue_datedate
maturity_datedate
coupon_ratedecimal
contract_sizedecimal

dim_account

Grain: one row per trading account per SCD2 version

SCD type 2

ColumnTypeKeys
account_keybigintPK
account_idvarcharBK
account_numbervarcharPII
account_typevarchar
legal_entityvarchar
base_currencyvarchar
open_datedate
account_statusvarchar

dim_portfolio

Grain: one row per portfolio / fund

ColumnTypeKeys
portfolio_keybigintPK
portfolio_idvarcharBK
portfolio_namevarchar
strategyvarchar
mandatevarchar
benchmarkvarchar
base_currencyvarchar
portfolio_managervarcharPII

dim_counterparty

Grain: one row per trading counterparty

ColumnTypeKeys
counterparty_keybigintPK
counterparty_idvarcharBK
counterparty_namevarchar
leivarchar
counterparty_typevarchar
countryvarchar
credit_ratingvarchar

dim_trader

Grain: one row per trader

ColumnTypeKeys
trader_keybigintPK
trader_idvarcharBK
trader_namevarcharPII
deskvarchar
bookvarchar
license_idvarchar

Lookup tables (2)

dim_order_type

Grain: one row per order type

ColumnTypeKeys
order_type_keybigintPK
order_type_codevarcharBK
order_type_namevarchar
time_in_forcevarchar

dim_exchange

Grain: one row per exchange / venue

ColumnTypeKeys
exchange_keybigintPK
exchange_codevarcharBK
exchange_namevarchar
micvarchar
countryvarchar
timezonevarchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • fct_order.date_key → dim_date (many-to-one)
  • fct_order.security_key → dim_security (many-to-one)
  • fct_order.account_key → dim_account (many-to-one)
  • fct_order.trader_key → dim_trader (many-to-one)
  • fct_order.order_type_key → dim_order_type (many-to-one)
  • fct_order.exchange_key → dim_exchange (many-to-one)
  • fct_execution.date_key → dim_date (many-to-one)
  • fct_execution.security_key → dim_security (many-to-one)
  • fct_execution.account_key → dim_account (many-to-one)
  • fct_execution.counterparty_key → dim_counterparty (many-to-one)
  • fct_execution.trader_key → dim_trader (many-to-one)
  • fct_execution.exchange_key → dim_exchange (many-to-one)
  • fct_position_snapshot.date_key → dim_date (many-to-one)
  • fct_position_snapshot.account_key → dim_account (many-to-one)
  • fct_position_snapshot.security_key → dim_security (many-to-one)
  • fct_position_snapshot.portfolio_key → dim_portfolio (many-to-one)
  • fct_settlement.date_key → dim_date (many-to-one)
  • fct_settlement.security_key → dim_security (many-to-one)
  • fct_settlement.account_key → dim_account (many-to-one)
  • fct_settlement.counterparty_key → dim_counterparty (many-to-one)
  • fct_daily_pnl.date_key → dim_date (many-to-one)
  • fct_daily_pnl.portfolio_key → dim_portfolio (many-to-one)
  • fct_daily_pnl.account_key → dim_account (many-to-one)
  • fct_corporate_action.date_key → dim_date (many-to-one)
  • fct_corporate_action.security_key → dim_security (many-to-one)
  • fct_corporate_action.account_key → dim_account (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time