mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
Finance and trading
robo-advisor
automated portfolio rebalancing
Betterment
System
Techniques · 10
Primitives · 34
robo-advisor
Durable workflow execution
distributed · medium: Ordinary code made crash-proof by logging every side-effect result and replaying the code from that log; activities run at least once, workflow logic must be deterministic.
›
Mean variance optimization
finance · medium: Markowitz portfolio optimization with constraints and efficient frontier
Order lifecycle state machine
finance · medium: Order states (new, partial fill, cancel/replace, rejected, expired) with strict transitions and idempotent events
Tax lot accounting
finance · medium: Per-lot cost basis (FIFO, specific ID), wash-sale rules and tax-loss harvesting
Quadratic programming
optimization · medium: Convex QP solvers (active-set, interior-point, ADMM) for constrained optimization
Durable job queue
distributed · medium: Persisted tasks that workers lease for a visibility timeout, ack on success and retry with backoff; at-least-once execution that survives worker and queue crashes.
›
Interior-point method (primal-dual,…
optimization · medium: Follows the central path with Newton steps on the perturbed KKT system, one sparse Cholesky per iteration; Mehrotra's predictor-corrector makes it fast.
›
Covariance shrinkage
statistics · low: Ledoit-Wolf shrinkage for stable covariance matrices from few samples
Idempotency keys
finance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.
›
Money representation
finance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.
›
Double-entry ledger
finance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.
›
Largest remainder rounding
finance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorations
Portfolio performance metrics
finance · low: Time-weighted and money-weighted returns, Sharpe, Sortino, drawdown
Threshold rebalancing
finance · low: Drift-band portfolio rebalancing with minimal trades and cash-flow-aware allocation
Monte Carlo integration
numerics · low: Estimate an expectation by averaging random samples; error falls as σ/√N in any dimension, and variance reduction (antithetic, control variates, importance sampling) shrinks σ.
›
Record replay
distributed · low: Record every nondeterministic input (time, randomness, I/O, model and tool outputs, per-tick player input) and re-execute deterministically for debugging, replays and state rebuild
Event sourcing
finance · low: Persist state changes as an append-only stream of immutable events per entity; current state is a fold over them, guarded by expected-version appends.
›
Hierarchical timing wheel
systems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.
›
FIX protocol (session layer)
finance · low: Tag=value order-entry protocol over TCP with per-direction sequence numbers, heartbeats and resend so sessions survive disconnects without losing or duplicating orders.
›
Hierarchical state machine
systems · low: Nest states so a substate inherits its parent's reactions and only overrides what differs, with ordered entry and exit actions along the path.
›
Corporate-action adjustment
finance · low: Keep raw bars plus a tiny table of cumulative backward factors, built by one reverse scan over events and applied at read time, versioned by as-of date.
›
Fifo lot consumption
finance · low: Consuming quantities from dated lots in FIFO/FEFO order (points expiry, stock rotation)
Calendar date arithmetic
systems · low: Civil dates, time zones (tzdb), DST gaps, month-end anchoring and duration math
+ 3 more techniques
+ 18 more primitives
System
Techniques · 10
Primitives · 34
robo-advisor
Durable workflow execution
distributed · medium: Ordinary code made crash-proof by logging every side-effect result and replaying the code from that log; activities run at least once, workflow logic must be deterministic.
›
Mean variance optimization
finance · medium: Markowitz portfolio optimization with constraints and efficient frontier
Order lifecycle state machine
finance · medium: Order states (new, partial fill, cancel/replace, rejected, expired) with strict transitions and idempotent events
Tax lot accounting
finance · medium: Per-lot cost basis (FIFO, specific ID), wash-sale rules and tax-loss harvesting
Quadratic programming
optimization · medium: Convex QP solvers (active-set, interior-point, ADMM) for constrained optimization
Durable job queue
distributed · medium: Persisted tasks that workers lease for a visibility timeout, ack on success and retry with backoff; at-least-once execution that survives worker and queue crashes.
›
Interior-point method (primal-dual,…
optimization · medium: Follows the central path with Newton steps on the perturbed KKT system, one sparse Cholesky per iteration; Mehrotra's predictor-corrector makes it fast.
›
Sparse direct solver
numerics · medium: Solve sparse Ax = b exactly by reordering, symbolic analysis, numeric LLᵀ/LU and triangular solves; fill-in, not flops per entry, decides the cost.
›
Fill-reducing ordering
numerics · medium: Permute a sparse symmetric matrix before Cholesky/LU so the factor has few new nonzeros; minimum degree, nested dissection and RCM trade quality, speed and parallelism.
›
Graph partitioning
graphs · medium: Split a graph into k balanced parts with few edges between them; multilevel coarsen-partition-refine (METIS, KaHIP) for quality, streaming heuristics (LDG, Fennel) for one-pass scale.
›
Covariance shrinkage
statistics · low: Ledoit-Wolf shrinkage for stable covariance matrices from few samples
Idempotency keys
finance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.
›
Money representation
finance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.
›
Double-entry ledger
finance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.
›
Largest remainder rounding
finance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorations
Portfolio performance metrics
finance · low: Time-weighted and money-weighted returns, Sharpe, Sortino, drawdown
Threshold rebalancing
finance · low: Drift-band portfolio rebalancing with minimal trades and cash-flow-aware allocation
Monte Carlo integration
numerics · low: Estimate an expectation by averaging random samples; error falls as σ/√N in any dimension, and variance reduction (antithetic, control variates, importance sampling) shrinks σ.
›
Record replay
distributed · low: Record every nondeterministic input (time, randomness, I/O, model and tool outputs, per-tick player input) and re-execute deterministically for debugging, replays and state rebuild
Event sourcing
finance · low: Persist state changes as an append-only stream of immutable events per entity; current state is a fold over them, guarded by expected-version appends.
›
Hierarchical timing wheel
systems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.
›
FIX protocol (session layer)
finance · low: Tag=value order-entry protocol over TCP with per-direction sequence numbers, heartbeats and resend so sessions survive disconnects without losing or duplicating orders.
›
Hierarchical state machine
systems · low: Nest states so a substate inherits its parent's reactions and only overrides what differs, with ordered entry and exit actions along the path.
›
Corporate-action adjustment
finance · low: Keep raw bars plus a tiny table of cumulative backward factors, built by one reverse scan over events and applied at read time, versioned by as-of date.
›
Fifo lot consumption
finance · low: Consuming quantities from dated lots in FIFO/FEFO order (points expiry, stock rotation)
Calendar date arithmetic
systems · low: Civil dates, time zones (tzdb), DST gaps, month-end anchoring and duration math
LU and Cholesky factorization
numerics · low: Factor A = PLU (any square matrix, partial pivoting) or A = LLᵀ (SPD) once in O(n³), then solve each right-hand side in O(n²).
›
Sparse matrices (CSR)
numerics · low: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.
›
Dead-letter queue
distributed · low: A side queue for messages that keep failing: after N delivery attempts or a permanent error, park them with the reason so the main queue keeps moving.
›
Leases
distributed · low: A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.
›
Write-ahead log
storage · low: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.
›
Exponential backoff with jitter
systems · low: Retry after delays that grow geometrically and are randomized, so failed clients spread out instead of hammering a recovering service in synchronized waves.
›
Newton root finding
numerics · low: Linearize at the guess and jump to the tangent root; quadratic convergence near a simple root, made robust by brackets (1D) or line search.
›
d-ary heap
data-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.
›
PRNGs (PCG, xoshiro)
numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.
›
Fencing tokens
distributed · low: A number that grows with every lock grant and is checked by the protected resource, so a paused ex-holder's late write is rejected.
›
Message sequence numbers
distributed · low: A per-stream counter on every message lets the receiver detect loss, duplicates and reordering, ack cheaply and resume after reconnect with "send from N".
›
CRC32C checksums
hardware-os · low: The Castagnoli CRC-32 with dedicated instructions on x86 (SSE4.2) and ARMv8. It is the standard fast integrity check for storage blocks, logs and network frames.
›
fsync, O_DSYNC and O_DIRECT
hardware-os · low: What fsync, fdatasync, O_DSYNC, O_DIRECT and F_FULLFSYNC really guarantee on Linux and macOS, and the exact call sequences for crash-safe files.
›
SIMD programming
hardware-os · low: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.
›
Rejection sampling
ml-training · low: Best-of-n and filtered sampling: generate many candidates, keep those passing a verifier or reward threshold
Cryptographic hashes (SHA-2, BLAKE3)
security · low: Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.
›
Optimistic concurrency control
storage · low: Run transactions without locks, record what they read, and validate at commit that nothing changed; fastest when conflicts are rare.
›
Slab allocator
systems · low: Pre-carve pages into equal-size slots per size class with an in-place free list: O(1) alloc and free, no external fragmentation, cache-warm reuse.
›
Copy for AI
Similar systems
Share the most building blocks with this one.
portfolio-management
32 %
utility-cis
22 %
securities-custody
21 %
payroll
21 %
lending-platform
20 %