Skip to content

About

Turn OHLCV and microstructure event streams into ML-ready feature matrices over 495 O(1) streaming indicators — deterministic across 10 languages.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

109 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Wickra Feature Store — turn OHLCV and microstructure event streams into ML-ready feature matrices over 495 streaming indicators, deterministic across ten languages

Built on Wickra Status CI CodeQL codecov GitHub release crates.io PyPI npm NuGet Maven Central Go module R-universe License: MIT OR Apache-2.0 OpenSSF Scorecard OpenSSF Best Practices Build provenance Docs Verified across 10 languages


Turn OHLCV and microstructure event streams into ML-ready feature matrices over 495 O(1) streaming indicators — deterministic across ten languages.

▶ Live demos: the backtester compiled to WebAssembly, an equity curve building bar by bar — backtest-live.wickra.org; one StrategySpec side by side in Python, Rust, JS and Go — playground.wickra.org; all 514 indicators of the core over a real Binance feed — live.wickra.org. Zero backend, all of them.

Part of the Wickra ecosystem: the same data-driven core and ten-language binding surface also power wickra-exchange, wickra-backtest, wickra-terminal and 20 more — see the full list.

Wickra Feature Store is one data-driven core, wickra-feature-store-core: a serde FeatureSpec is folded over each symbol's history with the Wickra indicator library — the 495 indicators the backtest registry resolves by name — emitting one feature row per bar, joining forward-looking labels, optionally scaling, and materializing a feature matrix — in parallel (rayon) or sequentially (the WASM fallback), byte-for-byte identical.

Because the spec is data, not code, the exact same feature build crosses the C ABI and WASM unchanged. The core is exposed as a JSON-over-C-ABI data API (FeatureStore::command) in Rust, Python, Node.js, WASM, C, C++, C#, Go, Java and R, so a developer in any language builds the same features.

  • Batch — build(data, spec) folds every symbol over its full history and emits one row per bar.
  • Streaming — push(symbol, candle) + build(), O(1) per tick, over the state accumulated so far.
  • Side feeds — a column whose indicator reads a reference series, a derivatives tick, an order book, the bar's trades or the market cross-section gets it, or the spec is refused by name.
use wickra_feature_store_core::{build, FeatureSpec, SymbolInput};
use std::collections::BTreeMap;

let spec: FeatureSpec = serde_json::from_str(r#"{
    "universe": ["AAA"],
    "features": [{"kind": "indicator", "name": "Rsi", "params": [14]},
                 {"kind": "price", "field": "close"}],
    "labels":   [{"kind": "forward_return", "horizon": 5}]
}"#)?;

let mut data: BTreeMap<String, SymbolInput> = BTreeMap::new();
data.insert("AAA".into(), candles.into());

let matrix = build(&data, &spec)?;
println!("{}", matrix.to_json());

Status

0.2.1 — the current release. The API is settling; the matrix format and command protocol are stable and pinned by golden tests.

Documentation

Quickstart

Build a matrix from a directory of per-symbol CSV files (<SYMBOL>.csv, header ts,open,high,low,close,volume):

wickra-feature-store --spec spec.json --data ./data            # JSON to stdout
wickra-feature-store --spec spec.json --data ./data --format csv
wickra-feature-store --spec spec.json --data ./data --format parquet --out features.parquet

A spec lists the feature columns (in order) and the label columns:

{
  "universe": ["sym-01", "sym-02"],
  "features": [
    {"kind": "indicator", "name": "Sma", "params": [10]},
    {"kind": "indicator", "name": "Rsi", "params": [14]},
    {"kind": "indicator", "name": "Macd", "params": [12, 26, 9], "field": "hist"},
    {"kind": "price", "field": "close"}
  ],
  "labels": [{"kind": "forward_return", "horizon": 5}]
}

produces columns ["Sma(10)", "Rsi(14)", "Macd(12,26,9).hist", "price.close", "fwd_return(5)"].

Features and labels

  • Features are indicator, price or microstructure columns — see docs/FEATURES.md. Any of the 495 streaming indicators is available by its registry name (Sma, Ema, Rsi, Macd, …).
  • Labels are forward_return (arithmetic or log) or triple_barrier (+1 / -1 / 0) — see docs/LABELS.md. Look-ahead cells with no future are NaN.

Scaling and output formats

Optional per-column scaling (z_score or min_max) applies to feature columns only. Matrices serialise as JSON, CSV, Arrow or Parquet; JSON and CSV are available in every language and target, Arrow and Parquet on native builds with the arrow feature.

Use in any language

The core is exposed as a JSON-over-C-ABI data API in ten languages: Rust, Python, Node.js and WASM natively, plus C, C++, C#, Go, Java and R over the C ABI hub. A FeatureStore handle plus command(json) -> json and version is the whole surface; the same spec and data produce a byte-identical matrix in every binding.

cargo add wickra-feature-store           # Rust
pip install wickra-feature-store         # Python
npm install wickra-feature-store         # Node.js
dotnet add package Wickra.FeatureStore   # C#
go get github.com/wickra-lib/wickra-feature-store-go   # Go

Java ships to Maven Central (org.wickra:wickra-feature-store), R to r-universe (wickrafeaturestore), and the C ABI ships as a per-platform library with a vendored header. Runnable programs for every language live under examples/; each binding's README.md under bindings/ has install and API details.

Project layout

crates/feature-store-core   # the data-driven core: spec, fold, matrix, formats
crates/feature-store-cli    # wickra-feature-store reference CLI
crates/feature-store-bench  # criterion benchmarks
bindings/{c,python,node,wasm,go,csharp,java,r}   # ten-language surface over the C ABI hub
examples/                   # runnable programs per language
golden/                     # blessed specs + expected matrices (cross-language pin)
docs/                       # deep-dive documentation

Building everything from source

cargo build --workspace --all-features                 # Rust core + CLI + C ABI
(cd bindings/python && maturin develop --release)      # Python
(cd bindings/node   && npm ci && npm run build)        # Node
(cd bindings/wasm   && wasm-pack build --target web)   # WASM
(cd bindings/csharp && dotnet build)                   # C#
(cd bindings/go     && go build ./...)                 # Go
(cd bindings/java   && mvn -q package)                 # Java
R CMD INSTALL bindings/r                               # R

Each binding builds against the C ABI hub in bindings/c, so build that first — cargo build -p wickra-feature-store-c — and put the resulting library on the loader path.

Testing

cargo test --workspace --all-features                  # native, Arrow/Parquet on
cargo test --workspace --no-default-features            # sequential / WASM path
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo fmt --all --check

Every binding runs the same golden corpus from golden/ and must produce the identical bytes; that corpus is the cross-language contract, not a per-language approximation. python scripts/check_binding_surface.py asserts the ten surfaces stayed in step.

Requirements

  • Rust 1.86+ — the workspace MSRV; the Node binding needs Rust 1.88.
  • Python 3.9+ — the Python binding.
  • Node 22+ — the Node binding.
  • Go 1.23+ — the Go binding.
  • Java 22+ — the Java binding.
  • R 4.1+ — the R package.

Per-language toolchains are only needed to build that language's binding — see its README.md.

Benchmarks

The core cost is folding every symbol's history through its indicators and computing the labels at each bar. See BENCHMARKS.md for the methodology and figures; run them with cargo bench -p feature-store-bench.

Ecosystem

Part of the Wickra family — each one a data-driven core with a CLI and the same ten-language binding surface:

  • wickra — main library (Rust core + Python / Node.js / WASM bindings + a C ABI for C / C++ / C# / Go / Java / R)
  • wickra-playground — a polyglot strategy playground: one StrategySpec live side by side in Python, Rust, JS and Go, entirely in the browser
  • wickra-exchange — unified market-data + execution across ten crypto exchanges
  • wickra-backtest — event-driven backtester over the Wickra core
  • wickra-terminal — the trading terminal: a TUI and a browser renderer over the stack
  • wickra-xray — market-microstructure explorer: footprint, order-book heatmap, liquidation map, funding/OI divergence
  • wickra-radar — perp-universe alert radar: OI delta, funding flip, book imbalance, liquidation clusters, OI/price divergence
  • wickra-copilot — local market copilot grounded in real order-book, liquidation and funding microstructure
  • wickra-shazam — match an asset's current microstructure fingerprint against its entire history
  • wickra-benchmark — reproducible, golden-verified benchmark suite — recompute any (strategy, dataset, report) in ten languages and confirm it byte-for-byte
  • wickra-strategy-ci — Jest for trading strategies: golden-pin the report, catch regressions in CI, property-test against fuzzed data
  • wickra-verify — confirm or refute a claimed backtest report against its strategy and data, in ten languages
  • wickra-proof — Proof-of-Backtest: deterministic (spec, data) → report + blake3 hash, recomputable byte-for-byte in ten languages
  • wickra-zk — prove a backtest zero-knowledge — on-chain-verifiable performance without revealing the data or the strategy
  • wickra-impact — the backtester that knows you would have moved the market: agent-based fills on the real historical L2 order book
  • wickra-darwin — evolutionary strategy search at hundreds of thousands of backtests per second, mutating and crossing JSON specs across the whole indicator registry
  • wickra-gym — a Gymnasium-compatible, microstructure-aware backtest environment with O(1) steps for deterministic RL rollouts
  • wickra-genome — a vector database of the whole market: every asset a live vector over the indicator registry, for similarity search, clustering and anomaly detection
  • wickra-timemachine — scrub the whole market like a video — every symbol, full order book, rewound to any moment via deterministic re-fold
  • wickra-synth — deterministic synthetic market microstructure: OHLCV, order book, trades and funding from a single seed
  • wickra-compile — compile a strategy spec into a standalone deployable: a WASM module, a self-contained binary, or a no_std artifact
  • wickra-embed — allocation-free, no_std streaming indicators for bare-metal and HFT, byte-for-byte identical to the core
  • wickra-pico — the O(1) indicator core running bare-metal on a $5 Raspberry Pi Pico — the LED blinks on the EMA cross

The screener's own guides live in docs/ beside the code; its site, with the in-browser demo and the benchmark figures, is at screener.wickra.org. The indicator library's reference is at docs.wickra.org and the org landing page at wickra.org.

Contributing

See CONTRIBUTING.md and the Code of Conduct.

Security

Report vulnerabilities per SECURITY.md.

License

Licensed under either of

at your option. Use it, fork it, modify it, redistribute it — commercially or not — file issues, send pull requests; all welcome.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Disclaimer

wickra-feature-store is research and engineering tooling, not financial advice. A feature matrix describes historical data under the spec you provide; it makes no claim about the profitability or future performance of any model trained on it. Trading carries risk; you are responsible for your own decisions.


GitHub stars GitHub forks GitHub issues

Built on Wickra. If it saved you time, the cheapest way to say thanks is to ⭐ the repo.

wickra-feature-store star history

About

Turn OHLCV and microstructure event streams into ML-ready feature matrices over 495 O(1) streaming indicators — deterministic across 10 languages.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages