simudyne-pulse 0.6.0.dev2__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {simudyne_pulse-0.6.0.dev2/src/simudyne_pulse.egg-info → simudyne_pulse-0.7.0}/PKG-INFO +2 -2
  2. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/README.md +1 -1
  3. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/pyproject.toml +4 -4
  4. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/simulation.py +15 -8
  5. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/validation.py +56 -23
  6. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0/src/simudyne_pulse.egg-info}/PKG-INFO +2 -2
  7. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/LICENSE +0 -0
  8. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/setup.cfg +0 -0
  9. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/__init__.py +0 -0
  10. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/client.py +0 -0
  11. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/exceptions.py +0 -0
  12. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/__init__.py +0 -0
  13. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/api_keys.py +0 -0
  14. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/data.py +0 -0
  15. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/historical.py +0 -0
  16. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/profile.py +0 -0
  17. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne/resources/simulator_gym.py +0 -0
  18. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne_pulse.egg-info/SOURCES.txt +0 -0
  19. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne_pulse.egg-info/dependency_links.txt +0 -0
  20. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne_pulse.egg-info/requires.txt +0 -0
  21. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/src/simudyne_pulse.egg-info/top_level.txt +0 -0
  22. {simudyne_pulse-0.6.0.dev2 → simudyne_pulse-0.7.0}/tests/test_simulator_gym.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simudyne-pulse
3
- Version: 0.6.0.dev2
3
+ Version: 0.7.0
4
4
  Summary: Python SDK for the Simudyne Pulse synthetic market data API
5
5
  Author-email: Simudyne <support@simudyne.com>
6
6
  License-Expression: MIT
@@ -57,7 +57,7 @@ pip install --pre simudyne-pulse
57
57
  ```
58
58
 
59
59
  Only use dev builds for testing unreleased changes; they are not guaranteed
60
- stable. Merge `dev` into `main` to promote those changes to a stable release.
60
+ stable. Merge `dev` into `prod` to promote those changes to a stable release.
61
61
 
62
62
  ## Quick start
63
63
 
@@ -31,7 +31,7 @@ pip install --pre simudyne-pulse
31
31
  ```
32
32
 
33
33
  Only use dev builds for testing unreleased changes; they are not guaranteed
34
- stable. Merge `dev` into `main` to promote those changes to a stable release.
34
+ stable. Merge `dev` into `prod` to promote those changes to a stable release.
35
35
 
36
36
  ## Quick start
37
37
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simudyne-pulse"
7
- version = "0.6.0-dev.2"
7
+ version = "0.7.0"
8
8
  description = "Python SDK for the Simudyne Pulse synthetic market data API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -50,11 +50,11 @@ version_toml = ["pyproject.toml:project.version"]
50
50
  changelog_file = "CHANGELOG.md"
51
51
  build_command = "pip install build && python -m build"
52
52
 
53
- # Release channels. `main` cuts stable versions (0.6.0); `dev` cuts
53
+ # Release channels. `prod` cuts stable versions (0.6.0); `dev` cuts
54
54
  # prereleases (0.6.0-dev.1). Prerelease tags never collide with stable ones,
55
55
  # and `pip install git+...@dev` is how you pull a dev build.
56
- [tool.semantic_release.branches.main]
57
- match = "main"
56
+ [tool.semantic_release.branches.prod]
57
+ match = "prod"
58
58
  prerelease = false
59
59
 
60
60
  [tool.semantic_release.branches.dev]
@@ -32,18 +32,25 @@ SCENARIOS = {
32
32
  "trending_down": "Small steady SELL flow producing a persistent downtrend",
33
33
  }
34
34
 
35
- # Scenario parameter defaults
35
+ # Scenario parameter defaults.
36
+ #
37
+ # MUST mirror the builder signatures in the engine's EIB/calcs/scenarios.py —
38
+ # SimulationRun backfills any omitted key from those defaults via
39
+ # inspect.signature, so a stale copy here misreports what a run will actually
40
+ # do. flash_crash/buy_panic drifted once already (22.0/0.19/500ms lingered here
41
+ # after the engine moved to 150.0/0.02/100ms), so re-check both when either side
42
+ # changes.
36
43
  SCENARIO_DEFAULTS = {
37
44
  "flash_crash": {
38
- "impact_multiplier": 22.0,
39
- "order_size_ratio": 0.19,
40
- "order_freq": "500ms",
45
+ "impact_multiplier": 150.0,
46
+ "order_size_ratio": 0.02,
47
+ "order_freq": "100ms",
41
48
  "start_time": "10:30:00",
42
49
  },
43
50
  "buy_panic": {
44
- "impact_multiplier": 22.0,
45
- "order_size_ratio": 0.19,
46
- "order_freq": "500ms",
51
+ "impact_multiplier": 150.0,
52
+ "order_size_ratio": 0.02,
53
+ "order_freq": "100ms",
47
54
  "start_time": "10:30:00",
48
55
  },
49
56
  "gradual_selloff": {
@@ -397,7 +404,7 @@ class SimulationResource:
397
404
  Example:
398
405
  >>> defaults = client.simulation.get_scenario_defaults("flash_crash")
399
406
  >>> print(defaults)
400
- {'impact_multiplier': 22.0, 'order_size_ratio': 0.19, ...}
407
+ {'impact_multiplier': 150.0, 'order_size_ratio': 0.02, ...}
401
408
  """
402
409
  return SCENARIO_DEFAULTS.get(scenario, {}).copy()
403
410
 
@@ -30,9 +30,10 @@ class ValidationResource:
30
30
  date: str,
31
31
  sim_ids: list[str],
32
32
  ticksize: float = 1.0,
33
- run_metrics: bool = True,
34
- run_impact: bool = False,
35
- run_fid: bool = False,
33
+ run_metrics: bool | None = None,
34
+ run_impact: bool | None = None,
35
+ run_fid: bool | None = None,
36
+ run_stylised_facts: bool | None = None,
36
37
  n_levels: int = 10,
37
38
  rescale_volumes: bool = True,
38
39
  lot_size: int = 1,
@@ -51,9 +52,15 @@ class ValidationResource:
51
52
  date: Calibration date in YYYY-MM-DD format (e.g. "2025-09-01")
52
53
  sim_ids: List of simulation IDs to validate (max 25)
53
54
  ticksize: Tick size for the symbol
54
- run_metrics: Compute L1/Wasserstein distributional distances
55
- run_impact: Compute impact response curves
56
- run_fid: Compute Frechet Inception Distance
55
+ run_metrics: Compute L1/Wasserstein distributional distances.
56
+ Leave unset to use your tier's default.
57
+ run_impact: Compute impact response curves. Leave unset to use your
58
+ tier's default.
59
+ run_fid: Compute Frechet Inception Distance. Leave unset to use your
60
+ tier's default.
61
+ run_stylised_facts: Compute stylised facts (autocorrelation, heavy
62
+ tails, volatility clustering). Leave unset to use your tier's
63
+ default.
57
64
  n_levels: Number of L2 book levels to use
58
65
  rescale_volumes: Multiply simulated L2 size columns by lot_size
59
66
  lot_size: Lot size multiplier for volume rescaling
@@ -61,19 +68,30 @@ class ValidationResource:
61
68
  Returns:
62
69
  dict with job_id, status, message
63
70
  """
71
+ # A run_* flag left unset is omitted so the API applies your tier's
72
+ # default rather than an SDK-side one. Sending False for the optional
73
+ # passes would silently opt demo accounts out of the extra results that
74
+ # tier is meant to return by default.
75
+ config = {
76
+ "n_levels": n_levels,
77
+ "rescale_volumes": rescale_volumes,
78
+ "lot_size": lot_size,
79
+ }
80
+ for flag, value in (
81
+ ("run_metrics", run_metrics),
82
+ ("run_impact", run_impact),
83
+ ("run_fid", run_fid),
84
+ ("run_stylised_facts", run_stylised_facts),
85
+ ):
86
+ if value is not None:
87
+ config[flag] = value
88
+
64
89
  payload = {
65
90
  "symbol": symbol,
66
91
  "date": date,
67
92
  "sim_ids": sim_ids,
68
93
  "ticksize": ticksize,
69
- "config": {
70
- "run_metrics": run_metrics,
71
- "run_impact": run_impact,
72
- "run_fid": run_fid,
73
- "n_levels": n_levels,
74
- "rescale_volumes": rescale_volumes,
75
- "lot_size": lot_size,
76
- },
94
+ "config": config,
77
95
  }
78
96
  return self._client._request("POST", RUN_PATH, json=payload)
79
97
 
@@ -87,10 +105,17 @@ class ValidationResource:
87
105
  dict with:
88
106
  - status: "pending", "running", "completed", or "failed"
89
107
  - distances: dict of {metric: {l1: [...], w: [...]}} (when completed)
90
- - fid_scores: list of floats (when completed and run_fid=True)
91
- - plots: list of {name, content_base64} (when completed)
92
- - metadata: dict with run parameters
108
+ - metadata: dict with run parameters, including which passes ran
93
109
  - error: error message (when failed)
110
+
111
+ Demo-tier accounts additionally receive the numbers derived from the
112
+ historical data, which are withheld at the pro tier:
113
+
114
+ - distributions: per-metric historical vs simulated histograms
115
+ - impact_response: impact response curves as numbers, historical and
116
+ one block per sim run
117
+ - stylised_facts: historical and one block per sim run
118
+ - fid_scores: one score per sim run (None where not computable)
94
119
  """
95
120
  return self._client._request("GET", f"{JOBS_PATH}/{job_id}")
96
121
 
@@ -111,9 +136,10 @@ class ValidationResource:
111
136
  date: str,
112
137
  sim_ids: list[str],
113
138
  ticksize: float = 1.0,
114
- run_metrics: bool = True,
115
- run_impact: bool = False,
116
- run_fid: bool = False,
139
+ run_metrics: bool | None = None,
140
+ run_impact: bool | None = None,
141
+ run_fid: bool | None = None,
142
+ run_stylised_facts: bool | None = None,
117
143
  n_levels: int = 10,
118
144
  rescale_volumes: bool = True,
119
145
  lot_size: int = 1,
@@ -130,9 +156,15 @@ class ValidationResource:
130
156
  date: Calibration date in YYYY-MM-DD format
131
157
  sim_ids: List of simulation IDs to validate (max 25)
132
158
  ticksize: Tick size for the symbol
133
- run_metrics: Compute L1/Wasserstein distributional distances
134
- run_impact: Compute impact response curves
135
- run_fid: Compute Frechet Inception Distance
159
+ run_metrics: Compute L1/Wasserstein distributional distances.
160
+ Leave unset to use your tier's default.
161
+ run_impact: Compute impact response curves. Leave unset to use your
162
+ tier's default.
163
+ run_fid: Compute Frechet Inception Distance. Leave unset to use your
164
+ tier's default.
165
+ run_stylised_facts: Compute stylised facts (autocorrelation, heavy
166
+ tails, volatility clustering). Leave unset to use your tier's
167
+ default.
136
168
  n_levels: Number of L2 book levels to use
137
169
  rescale_volumes: Multiply simulated L2 size columns by lot_size
138
170
  lot_size: Lot size multiplier for volume rescaling
@@ -156,6 +188,7 @@ class ValidationResource:
156
188
  run_metrics=run_metrics,
157
189
  run_impact=run_impact,
158
190
  run_fid=run_fid,
191
+ run_stylised_facts=run_stylised_facts,
159
192
  n_levels=n_levels,
160
193
  rescale_volumes=rescale_volumes,
161
194
  lot_size=lot_size,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simudyne-pulse
3
- Version: 0.6.0.dev2
3
+ Version: 0.7.0
4
4
  Summary: Python SDK for the Simudyne Pulse synthetic market data API
5
5
  Author-email: Simudyne <support@simudyne.com>
6
6
  License-Expression: MIT
@@ -57,7 +57,7 @@ pip install --pre simudyne-pulse
57
57
  ```
58
58
 
59
59
  Only use dev builds for testing unreleased changes; they are not guaranteed
60
- stable. Merge `dev` into `main` to promote those changes to a stable release.
60
+ stable. Merge `dev` into `prod` to promote those changes to a stable release.
61
61
 
62
62
  ## Quick start
63
63