wickra-feature-store
v0.2.1
Published
Data-driven feature-matrix core for trading: fold a FeatureSpec over each symbol's history with 495 streaming indicators, join labels over a forward horizon, and materialize a byte-identical feature matrix. Node bindings powered by Rust.
Downloads
110
Maintainers
Readme
Wickra Feature Store — Node.js
Turn OHLCV and microstructure event streams into ML-ready feature matrices over 495 O(1) streaming indicators — for Node.js. npm install wickra-feature-store — prebuilt native binary, no system dependencies.
Node.js bindings for the Wickra feature-matrix core, powered by Rust via
napi-rs. A FeatureStore is built from a spec JSON and driven
by command JSONs over a JSON boundary, so the result is byte-identical to every
other Wickra Feature Store binding.
Install
npm install wickra-feature-storeThe native addon ships as a prebuilt binary per platform (Linux, macOS, Windows — x64 and arm64), selected automatically through optional dependencies. There is nothing to compile.
The correct prebuilt native binary is pulled in automatically as an optional dependency for your platform.
Building from this repository (contributors)
npm install
npm run build # napi build --platform --release
npm test # node --testindex.js and index.d.ts are generated by napi build and committed; CI fails
on drift.
Quick start
const { FeatureStore } = require("wickra-feature-store");
const spec = JSON.stringify({
universe: ["AAA"],
features: [
{ kind: "indicator", name: "Sma", params: [2] },
{ kind: "price", field: "close" },
],
labels: [{ kind: "forward_return", horizon: 1 }],
});
const store = new FeatureStore(spec);
const candle = (ts, close) => ({ ts, open: close, high: close, low: close, close, volume: 1.0 });
const response = store.command(JSON.stringify({
cmd: "build_batch",
data: { AAA: [candle(0, 100.0), candle(1, 110.0), candle(2, 121.0)] },
}));
const matrix = JSON.parse(response);
console.log(matrix.columns); // ['Sma(2)', 'price.close', 'fwd_return(1)']Surface
new FeatureStore(specJson)— build a feature store from a spec JSON (throws if the spec is invalid).store.command(cmdJson) -> string— apply a command envelope ({"cmd":"...", ...}) and return the response JSON. Commands:set_spec,push,push_batch,build,build_batch,labels,reset,version.store.version() -> string— the crate version.
An invalid spec, a malformed command, or an unknown command name throws; a successful command returns the response JSON.
Arrow / Parquet output is a binary file format and is not available over this
JSON surface; use the wickra-feature-store CLI for columnar output.
Determinism
The response bytes are identical across languages and between the parallel and sequential build paths, because the whole feature fold lives once in the Rust core and this binding forwards its JSON verbatim.
Benchmark
Every binding forwards to the same data-driven Rust core, so what this one adds is
the call overhead of napi-rs, not a different result. The core's throughput is
measured by the repository's benchmark suite and the nightly bench.yml run; the
numbers, the machine and how to reproduce them are in the repository
BENCHMARKS.md.
Documentation
The full guide, the spec reference and the API documentation live in the main repository and the documentation site:
Repository: https://github.com/wickra-lib/wickra-feature-store
Docs (guides, spec reference, cookbook): https://feature-store.wickra.org
Runnable example:
examples/node/The main project: https://github.com/wickra-lib/wickra-feature-store
Documentation: https://wickra.org
Wickra Feature Store ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
same data-driven, unsafe-forbidden Rust core.
Security
Found a security issue? Please don't open a public issue. Report it privately
via the repository's Security tab ("Report a vulnerability") or email
[email protected] with a subject line starting [wickra security]. Full
policy: https://github.com/wickra-lib/wickra-feature-store/blob/main/SECURITY.md.
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.
License
Licensed under either of Apache-2.0 or MIT at your option.
