AI Trading System Architecture for Financial Markets

Financial markets generate petabytes of data daily: price ticks, order book updates, news feeds, earnings reports, social media sentiment, and macroeconomic indicators. Traditional quantitative finance relies on human-designed models—moving averages, mean reversion strategies, factor models—that capture known patterns but struggle to adapt to regime changes and novel market dynamics. Modern AI agents combine machine learning with systematic trading infrastructure to process multimodal signals, estimate future price movements, and execute trades at scale. ...

November 22, 2025 · 17 min · 3487 words · Svein Erik

Columnar Storage in Go: Fast Financial Aggregation

Consider a financial analytics platform serving real-time portfolio metrics to thousands of clients. Traditional row-oriented storage loads entire transaction records into memory—customer ID, timestamp, instrument, quantity, price, fees—even when clients only request daily trade volumes. At 10 million transactions per day with 50-byte records, this means loading 500MB to calculate a single sum. By switching to columnar storage where each field lives in its own contiguous array, the same aggregation touches only 40MB (the price column), fits in CPU cache, and completes 18× faster. The architecture shift isn’t just about memory efficiency. It’s about aligning data layout with how modern CPUs actually process numerical operations. ...

March 26, 2025 · 21 min · 4400 words · Svein Erik

ML Risk Models for Nordic Power Futures & GoO Portfolios

The Nordic power market is one of the world’s most liquid and sophisticated electricity markets, trading over 500 TWh annually across Norway, Sweden, Finland, and Denmark. Power producers, industrial consumers, and financial players manage portfolios worth billions of euros, exposed to extreme price volatility driven by weather patterns, hydroelectric reservoir levels, wind generation variability, and cross-border transmission constraints. A single winter storm can swing prices from €50/MWh to €500/MWh within hours. A mild autumn can crash prices to near-zero as hydroelectric reservoirs overflow. Managing risk in this environment is not optional—it’s existential. ...

December 10, 2024 · 35 min · 7448 words · Svein Erik

Building a Derivatives Pricing DSL in Rust

Financial institutions require precise, auditable, and performant valuation of derivative portfolios. This article presents the design and implementation of a domain-specific language (DSL) for pricing futures and forwards, embedded in Rust. We examine the mathematical foundations of derivative pricing, construct a type-safe expression language, and build an evaluation engine capable of handling portfolios containing thousands of instruments. Introduction Futures and forwards are fundamental derivatives: contracts obligating parties to transact an underlying asset at a predetermined price on a future date. While conceptually similar, they differ in standardization (futures trade on exchanges, forwards are OTC) and settlement mechanics (futures mark-to-market daily, forwards settle at maturity). ...

April 29, 2021 · 17 min · 3418 words · Svein Erik