Price-time synthetic stock market simulator with visible-only corpus output and market-screen plots.
Project description
Market Wave
Market Wave is a latent-field synthetic stock market simulator backed by a deterministic price-time matching engine. It generates visible-only public market messages, reconstructable snapshots, internal sidecars, simple JSON views, structural validation reports, deterministic replay checks, and market-screen plots.
Contract
- Runtime randomness exists only in
sample_market_message(). - Internal prices are integer ticks. Internal quantities are integer units.
- Crossed or locked books are structurally impossible in the matching engine.
- Public corpus never contains hidden fields, generator parameters, labels, targets, returns, future columns, or ticker symbols.
- Public messages are typed:
ORDER_ACCEPTED,TAKE_ORDER,ORDER_CANCELED,ORDER_REPLACED,TRADE, andBOOK_DELTA. - Aggressive flow is explicit.
TAKE_ORDERwalks resting liquidity and never rests; passiveORDER_ACCEPTEDmessages may rest or partially execute. - Snapshots are reconstructable from the initial full visible ladder and ordered
public
BOOK_DELTAevents. - Public
world_idis not derived from seed or theta. Use--world-indexor--world-idfor public identity. - Internal artifacts are written under
internal/, outside the trainable corpus. - Visualization reads visible corpus files only. Price charts are built from trades, candles, volume, best bid/ask, and mid. Top-10 orderbook heatmaps use fixed quote levels on the y-axis and time on the x-axis.
- Visual output uses a white/cool-gray trading-screen theme with blue/red contrast for bid/ask and buy/sell. Warm-tone page backgrounds, violet accents, and dark terminal themes are out of contract.
CLI
market-wave generate out --seed 7 --steps 500 --price 71800 --tick 100 --force
market-wave validate out
market-wave replay --seed 7 --steps 500
market-wave price out
market-wave book out
market-wave trades out --limit 100
market-wave candles out --interval 1m
market-wave events out --limit 100 --cursor 0
market-wave plot out
market-wave inspect out
Output Layout
out/
corpus/
manifest.json
visible_market_stream.jsonl
visible_snapshot_stream.jsonl
internal/
hidden_sidecar.jsonl
theta_manifest.jsonl
run_manifest.json
plots/
market_screen.png
price_chart.png
orderbook_panel.png
event_tape.png
mid_spread_depth.png
depth_heatmap.png
top10_orderbook_heatmap.png
Only corpus/ is training input. internal/ is for replay and debugging.
Python API
The top-level Python API is intentionally small: generate, open, and
Market.
import market_wave as mw
market = mw.generate("out", seed=7, steps=500, price=71_800, tick=100, force=True)
market.validate()
market.plot()
market.price()
market.book(levels=10)
market.trades(limit=100)
market.candles("1m")
market.events(limit=100, cursor=0)
same_market = mw.open("out")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file market_wave-1.0.0.tar.gz.
File metadata
- Download URL: market_wave-1.0.0.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fbf75f8fcbb39a236b05cf4b51d3d5b075e6c5bff57b2994a81d26fd33fdbd7
|
|
| MD5 |
0ed2cc69393611510f5f641ac0ad264b
|
|
| BLAKE2b-256 |
1dc049a78d05115731ed56396c034aef2d3076925ebd14946e749a2bc9585d81
|
Provenance
The following attestation bundles were made for market_wave-1.0.0.tar.gz:
Publisher:
workflow.yml on smturtle2/market-wave
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
market_wave-1.0.0.tar.gz -
Subject digest:
5fbf75f8fcbb39a236b05cf4b51d3d5b075e6c5bff57b2994a81d26fd33fdbd7 - Sigstore transparency entry: 1908113095
- Sigstore integration time:
-
Permalink:
smturtle2/market-wave@616448d712d496295001b3b7478f851e1f3b3a3e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@616448d712d496295001b3b7478f851e1f3b3a3e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file market_wave-1.0.0-py3-none-any.whl.
File metadata
- Download URL: market_wave-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
753b350aae8f4435be9ef619f332c4b712c5154d446be974e4f174f02a708561
|
|
| MD5 |
7101b516fd64e85daf05e0f617e59385
|
|
| BLAKE2b-256 |
f53eaa52e14f060dc7db64f5ff74af2bd34b16a26d93582ff922fe52443aeb2d
|
Provenance
The following attestation bundles were made for market_wave-1.0.0-py3-none-any.whl:
Publisher:
workflow.yml on smturtle2/market-wave
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
market_wave-1.0.0-py3-none-any.whl -
Subject digest:
753b350aae8f4435be9ef619f332c4b712c5154d446be974e4f174f02a708561 - Sigstore transparency entry: 1908113235
- Sigstore integration time:
-
Permalink:
smturtle2/market-wave@616448d712d496295001b3b7478f851e1f3b3a3e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@616448d712d496295001b3b7478f851e1f3b3a3e -
Trigger Event:
workflow_dispatch
-
Statement type: