Skip to content

Wickra ShazamMatch the moment against history.

Turn an asset's whole history into a rolling index of microstructure fingerprints, then match the current one against it — "that's the May-2021 crash setup". Pattern recognition over the full feature space, not price alone.

Wickra Shazam

The fingerprint is JSON, not code

A FingerprintSpec names the ordered features to sample, the window length, an optional normalize mode and the metric to compare under. Every fingerprint the spec produces has the same fixed dimension N, which is what makes the index and its matches deterministic.

json
{
  "features": [
    { "kind": "indicator", "name": "Rsi", "params": [14] },
    { "kind": "price", "field": "close" },
    { "kind": "microstructure", "name": "Obv", "params": [] }
  ],
  "window": 10,
  "normalize": "z_score",
  "metric": "cosine"
}

Because the spec is data, the same fingerprint crosses the C ABI and WASM unchanged, and the same match comes back byte-for-byte in every language.

Install

The same matcher from every language — native Rust, Python, Node.js and WASM, plus a C ABI for C, C++, C#, Go, Java and R.

pip install wickra-shazam

Index once, match against the whole history

Build the rolling index from a history, then match the current window against it. The command API returns the same bytes in every binding.

import json
from wickra_shazam import Shazam

spec = json.dumps({
    "features": [{"kind": "indicator", "name": "Rsi", "params": [14]},
                 {"kind": "price", "field": "close"}],
    "window": 10,
    "normalize": "z_score",
    "metric": "cosine",
})

shazam = Shazam(spec)
shazam.command(json.dumps({"cmd": "index", "history": history}))
report = json.loads(shazam.command(json.dumps({"cmd": "match", "current": current, "k": 5})))
for m in report["matches"]:
    print(m["ts"], m["similarity"])

Built on the Wickra core

Wickra Shazam is part of the Wickra ecosystem. Its fingerprints are drawn from the same typed feature space that wickra-core computes, so a match reasons over exactly the numbers a backtest or a live chart would see.

Wickra Shazam is a software library, not a trading system, and gives no financial advice — use at your own risk.