jane-street_skill

This skill helps you build robust, correct-by-construction market systems inspired by Jane Street, using functional patterns, strong types, and explicit error
  • Python

3

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill copyleftdev/sk1llz --skill jane-street

  • SKILL.md11.6 KB

Overview

This skill teaches how to design and implement trading systems in the style of Jane Street: functional, strongly-typed, and correctness-first. It emphasizes making illegal states unrepresentable, explicit effects, immutability by default, and rigorous testing for mission-critical market-making and pricing engines. Use the guidance to build safer real-time components, pricing pipelines, and risk checks even when using Python as the implementation language.

How this skill works

The skill inspects system boundaries, state machines, error surfaces, and side-effect locations, and translates Jane Street design patterns into practical engineering rules. It guides you to encode states as explicit variants, use result-style error propagation instead of exceptions, prefer pure functions for pricing, and isolate mutable state for real-time pipelines. It also prescribes property-based testing, incremental computation patterns, and modular abstractions to improve reasoning and correctness.

When to use it

  • Building market-making systems, pricing engines, or execution infrastructure.
  • Implementing risk checks, order lifecycle handling, or exchange adapters.
  • Designing real-time pipelines where incremental recomputation matters.
  • When you need high-assurance code with minimal runtime surprises.
  • Refactoring legacy trading code to reduce bugs and implicit state.

Best practices

  • Model all domain states explicitly (sum types / enums) so invalid states cannot occur.
  • Keep pure functions for calculations and side-effect boundaries small and explicit.
  • Return result-like values for recoverable errors; avoid using exceptions for control flow.
  • Favor immutability; contain mutable state and make updates explicit and local.
  • Use property-based tests for invariants and QuickCheck-style generators for edge cases.
  • Design composable modules with clear interfaces and exhaustive pattern matching.

Example use cases

  • Design an order lifecycle where Pending, Acked, PartiallyFilled, Filled, Cancelled, and Rejected are distinct variants with safe transitions.
  • Implement a Black–Scholes pricing module as pure functions with deterministic greeks and an optional implied-vol routine.
  • Build a real-time pricing graph that recomputes only affected nodes when market data changes (incremental approach).
  • Create risk checks that return structured errors (insufficient buying power, position limit exceeded) and force callers to handle each case.
  • Replace ad hoc nulls and sentinel values with explicit option/result types for clearer invariants and safer composition.

FAQ

Yes. Represent variants with enums/dataclasses, use explicit Result/Option types or libraries, keep pure functions for calculations, and isolate mutable state to achieve the same safety benefits.

How do I handle performance in pure, immutable designs for real-time systems?

Use incremental recomputation, efficient immutable data structures, and confine hot mutable buffers behind well-defined interfaces so you get both safety and speed.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
jane-street skill by copyleftdev/sk1llz | VeilStrat