mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
Finance and trading
backtester
trading strategy backtester
Zipline
System
Techniques · 10
Primitives · 46
backtester
Work-stealing deque
concurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.
›
Market impact models
finance · medium: Transaction-cost and market-impact estimation (square-root law, Almgren-Chriss) for routing and simulation
Matching engine
finance · medium: Single-threaded, deterministic loop that journals sequenced orders, matches them by price-time priority against a limit order book and emits trades.
›
Discrete event simulation
numerics · medium: Simulation driven by a time-ordered event queue with deterministic, reproducible replay
External merge sort
search-sort · medium: Sort data larger than RAM: write memory-sized sorted runs, then k-way merge them with large sequential buffers; terabytes in one merge pass.
›
Bitemporal data
storage · medium: Valid time plus transaction time on every record for as-of queries, back-dating and corrections
Columnar storage
storage · medium: Store each column contiguously so analytic scans read only the columns they need, compress well and run as tight SIMD loops.
›
Limit order book
finance · low: Per-symbol store of resting orders as FIFO queues per price level; array-indexed ticks plus intrusive lists give O(1) add, cancel and best-price lookup.
›
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.
›
PRNGs (PCG, xoshiro)
numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.
›
Delta encoding
compression · low: Store differences between consecutive values instead of the values, turning sorted IDs, timestamps and counters into small numbers that pack into few bits.
›
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.
›
Portfolio performance metrics
finance · low: Time-weighted and money-weighted returns, Sharpe, Sortino, drawdown
mmap and the page cache
hardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.
›
Time-series cross-validation (rolli…
statistics · low: Estimate forecast error by repeatedly training on the past and testing on the next h steps, moving the origin forward; never trains on the future.
›
Epoch-based reclamation
concurrency · low: Threads announce a global epoch while touching shared lock-free data; garbage retired in epoch e is freed once the epoch reaches e + 2.
›
Memory ordering
concurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
›
Linear and logistic regression
machine-learning · low: Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.
›
Sequenced multicast feed
networking · low: Exchange order-by-order data as fixed binary messages in sequenced UDP multicast packets
Low-latency hot path
finance · low: Rules for microsecond trading paths: one pinned busy-polling thread per stage, no allocation, syscalls, locks or page faults after startup, kernel-bypass I/O, and measured tails.
›
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.
›
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.
›
Buffer pools for zero-allocation I/O
hardware-os · low: Preallocate a fixed set of aligned I/O buffers and recycle them through a free list, so the hot path never mallocs, faults or unmaps. The bounded count doubles as back pressure.
›
+ 3 more techniques
+ 30 more primitives
System
Techniques · 10
Primitives · 46
backtester
Work-stealing deque
concurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.
›
Market impact models
finance · medium: Transaction-cost and market-impact estimation (square-root law, Almgren-Chriss) for routing and simulation
Matching engine
finance · medium: Single-threaded, deterministic loop that journals sequenced orders, matches them by price-time priority against a limit order book and emits trades.
›
Discrete event simulation
numerics · medium: Simulation driven by a time-ordered event queue with deterministic, reproducible replay
External merge sort
search-sort · medium: Sort data larger than RAM: write memory-sized sorted runs, then k-way merge them with large sequential buffers; terabytes in one merge pass.
›
Bitemporal data
storage · medium: Valid time plus transaction time on every record for as-of queries, back-dating and corrections
Columnar storage
storage · medium: Store each column contiguously so analytic scans read only the columns they need, compress well and run as tight SIMD loops.
›
Vectorized execution
storage · medium: Query operators pass batches of about 1-2K values per column instead of single tuples, amortizing interpretation overhead and enabling tight SIMD loops.
›
Total order sequencer
finance · medium: Single sequencer stamps every inbound message so replicated deterministic state machines (LMAX style) replay identically
MVCC
storage · medium: Keep timestamped versions of each row so readers see a consistent snapshot without blocking writers; the default concurrency control in modern databases.
›
Limit order book
finance · low: Per-symbol store of resting orders as FIFO queues per price level; array-indexed ticks plus intrusive lists give O(1) add, cancel and best-price lookup.
›
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.
›
PRNGs (PCG, xoshiro)
numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.
›
Delta encoding
compression · low: Store differences between consecutive values instead of the values, turning sorted IDs, timestamps and counters into small numbers that pack into few bits.
›
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.
›
Portfolio performance metrics
finance · low: Time-weighted and money-weighted returns, Sharpe, Sortino, drawdown
mmap and the page cache
hardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.
›
Time-series cross-validation (rolli…
statistics · low: Estimate forecast error by repeatedly training on the past and testing on the next h steps, moving the origin forward; never trains on the future.
›
Epoch-based reclamation
concurrency · low: Threads announce a global epoch while touching shared lock-free data; garbage retired in epoch e is freed once the epoch reaches e + 2.
›
Memory ordering
concurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
›
Linear and logistic regression
machine-learning · low: Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.
›
Sequenced multicast feed
networking · low: Exchange order-by-order data as fixed binary messages in sequenced UDP multicast packets
Low-latency hot path
finance · low: Rules for microsecond trading paths: one pinned busy-polling thread per stage, no allocation, syscalls, locks or page faults after startup, kernel-bypass I/O, and measured tails.
›
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.
›
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.
›
Buffer pools for zero-allocation I/O
hardware-os · low: Preallocate a fixed set of aligned I/O buffers and recycle them through a free list, so the hot path never mallocs, faults or unmaps. The bounded count doubles as back pressure.
›
K way merge
search-sort · low: Merge k sorted streams with a heap or loser tree (merging iterators)
Pattern-defeating quicksort (pdqsor…
search-sort · low: Introsort successor: quicksort with adaptive pivots, linear on sorted and equal-heavy input, heapsort fallback; the unstable sort of Go and (until 1.81) Rust.
›
Interval tree
data-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.
›
Time partitioning
storage · low: Cut a table into fixed-interval time blocks so queries read only overlapping blocks and retention drops a whole block as one metadata change.
›
Bit packing and PFOR
compression · low: Store blocks of integers with exactly b bits each and patch rare outliers separately (PFOR); the fastest integer codec family, billions of values per second.
›
Dictionary encoding
compression · low: Map values to small integer codes via a dictionary for compact, comparable columns
Zone maps
storage · low: Per-block min/max (and sparse primary) indexes to skip data during scans
IP multicast
networking · low: Send each datagram once to a class D group address; the network copies it to every joined receiver, and sequence numbers let receivers find loss.
›
Gapless sequence numbers
storage · low: Gap-free, monotonic numbering (invoices, journal entries) under concurrency and rollbacks
Varint (LEB128)
compression · low: Variable-length integers in 7-bit groups with a continuation bit; small numbers take 1 byte, the wire format of Protobuf, WebAssembly and DWARF.
›
False sharing
concurrency · low: Independent variables written by different cores on one cache line force the line to bounce between cores; pad or regroup hot data to fix it.
›
SPSC ring buffer
data-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.
›
Largest remainder rounding
finance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorations
CPU caches and the memory hierarchy
hardware-os · low: Sizes, line widths and latencies of L1/L2/L3/DRAM on modern x86 and Apple M-series, and the data-layout rules that follow from them.
›
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.
›
Huge pages
hardware-os · low: 2 MB/1 GB pages to cut TLB misses; THP vs explicit hugetlbfs
Numa aware allocation
hardware-os · low: Allocate memory and pin threads on the local NUMA node; first-touch and interleave policies
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.
›
Virtual memory and the TLB
hardware-os · low: How page tables and TLBs translate every address, what TLB reach means, and when 2 MiB or 1 GiB huge pages pay off on Linux.
›
Evaluation metrics
machine-learning · low: Precision, recall, ROC AUC, average precision, log loss, NDCG and pass@k computed correctly, plus paired confidence intervals for comparing models.
›
Loss functions
machine-learning · low: The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.
›
Ebpf xdp
networking · low: EBPF programs at the XDP/tc hooks for in-kernel packet processing at line rate
Kernel-bypass networking
networking · low: User space (DPDK, AF_XDP) or an in-driver eBPF hook (XDP) handles packets straight from NIC rings, skipping sockets, for 10-40 Mpps per core.
›
Receive side scaling
networking · low: NIC hashing of flows to RX queues (RSS) and symmetric hashing for per-core processing
L-BFGS
numerics · low: Quasi-Newton minimizer that approximates the inverse Hessian from the last m gradient differences via the two-loop recursion; O(m·n) memory and work per step.
›
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²).
›
Bootstrap confidence intervals
statistics · low: Resampling-based confidence intervals for arbitrary statistics
Arena allocator
systems · low: Allocate by bumping a pointer through big chunks and free everything at once: a few instructions per allocation for objects sharing a lifetime.
›
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