mumo-engine 1.0.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.
- mumo_engine-1.0.0/LICENSE +21 -0
- mumo_engine-1.0.0/PKG-INFO +248 -0
- mumo_engine-1.0.0/README.md +230 -0
- mumo_engine-1.0.0/pyproject.toml +32 -0
- mumo_engine-1.0.0/setup.cfg +4 -0
- mumo_engine-1.0.0/src/mumo_engine.egg-info/PKG-INFO +248 -0
- mumo_engine-1.0.0/src/mumo_engine.egg-info/SOURCES.txt +10 -0
- mumo_engine-1.0.0/src/mumo_engine.egg-info/dependency_links.txt +1 -0
- mumo_engine-1.0.0/src/mumo_engine.egg-info/entry_points.txt +3 -0
- mumo_engine-1.0.0/src/mumo_engine.egg-info/top_level.txt +2 -0
- mumo_engine-1.0.0/src/mumo_framework.py +545 -0
- mumo_engine-1.0.0/src/mumo_gui.py +365 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mumo Framework Authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mumo-engine
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Boundary-based statistics and risk-corridor calculations
|
|
5
|
+
Author: Mumo Framework Authors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: statistics,risk,boundaries,mumo
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
================================================================================
|
|
20
|
+
MUMO MATHEMATICAL FRAMEWORK ENGINE (mumo-engine)
|
|
21
|
+
================================================================================
|
|
22
|
+
Version: 1.0.0
|
|
23
|
+
Author: Mumo Framework Authors
|
|
24
|
+
License: MIT (LICENSE)
|
|
25
|
+
|
|
26
|
+
--------------------------------------------------------------------------------
|
|
27
|
+
1. EXECUTIVE SUMMARY & LIBRARY PURPOSE
|
|
28
|
+
--------------------------------------------------------------------------------
|
|
29
|
+
The Mumo Framework (`mumo-engine`) is an advanced mathematical computing
|
|
30
|
+
library designed to replace legacy statistical metrics (such as standard
|
|
31
|
+
deviation, raw arithmetic means, and isolated medians) with dynamic risk-corridor
|
|
32
|
+
tracking, extreme boundary isolation, consensus core squeezing, autotuned parameter
|
|
33
|
+
self-calibration, and multi-dimensional tensor risk modeling.
|
|
34
|
+
|
|
35
|
+
Traditional statistical tools suffer from critical real-world limitations:
|
|
36
|
+
- Standard deviation produces abstract squared variance units rather than
|
|
37
|
+
unit-accurate risk limits.
|
|
38
|
+
- Single outliers or sensor typos skew basic mean calculations.
|
|
39
|
+
- Single-point medians flip wildly in large streaming data.
|
|
40
|
+
- Manual tuning parameters introduce human operator bias.
|
|
41
|
+
|
|
42
|
+
The Mumo Engine solves these problems by establishing boundary envelopes, dynamic
|
|
43
|
+
consensus squeezing, calculus-based derivative velocity tracking, and automated
|
|
44
|
+
parameter self-calibration across massive datasets and GPU-accelerated matrices.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
--------------------------------------------------------------------------------
|
|
48
|
+
2. PIPELINE ARCHITECTURE DIAGRAM
|
|
49
|
+
--------------------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
[ THE TOTAL SC-PGMF PIPELINE ]
|
|
52
|
+
|
|
|
53
|
+
+----------------------------+----------------------------+
|
|
54
|
+
| | |
|
|
55
|
+
v v v
|
|
56
|
+
[ Boundary Modules ] [ Core Stabilisers ] [ Calculus Tensors ]
|
|
57
|
+
* P-MPU (Ceiling Limit) * P-GMCSI (True Baseline) * Derivatives (Velocity)
|
|
58
|
+
* P-MPD (Safety Floor) * P-MBTS (Tension Weight) * Integrals (Total Strain)
|
|
59
|
+
* MBV (Risk Corridor) * MAEI (Master Engines) * Matrices (Multi-Scale)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
--------------------------------------------------------------------------------
|
|
63
|
+
3. COMPLETE FORMULA BREAKDOWN: FUNCTIONS, SYMBOLS & GAPS FILLED
|
|
64
|
+
--------------------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
[SECTION A: FOUNDATIONAL MUMO MODEL (Small Sample Sizes: n, k = 1)]
|
|
67
|
+
|
|
68
|
+
1. Mumo Potential Upside (MPU)
|
|
69
|
+
* Formula: MPU = ( x_n + (sum(x_i for i=1 to n-1) / (n-1)) ) / 2
|
|
70
|
+
* Symbol Definitions:
|
|
71
|
+
- x_n : The single maximum value in the sorted dataset X.
|
|
72
|
+
- x_i : Individual baseline entries in the sorted dataset.
|
|
73
|
+
- n : Total number of data points.
|
|
74
|
+
* Function: Evaluates maximum peak performance capability relative to baseline.
|
|
75
|
+
* Gap Filled: Replaces raw maximum values (which are highly vulnerable to
|
|
76
|
+
single data entry errors or noise spikes) with a baseline-anchored peak limit.
|
|
77
|
+
|
|
78
|
+
2. Mumo Potential Downside (MPD)
|
|
79
|
+
* Formula: MPD = ( x_1 + (sum(x_i for i=2 to n) / (n-1)) ) / 2
|
|
80
|
+
* Symbol Definitions:
|
|
81
|
+
- x_1 : The single minimum value in the sorted dataset X.
|
|
82
|
+
- x_i : Individual baseline entries in the upper dataset.
|
|
83
|
+
- n : Total number of data points.
|
|
84
|
+
* Function: Evaluates system risk floor safety relative to the remaining baseline.
|
|
85
|
+
* Gap Filled: Eliminates raw minimum metrics by evaluating worst-case failure
|
|
86
|
+
risk in proportion to baseline health.
|
|
87
|
+
|
|
88
|
+
3. Mumo Average (MA)
|
|
89
|
+
* Formula: MA = ( MPU + MPD ) / 2
|
|
90
|
+
* Function: Establishes the central equilibrium point between MPU and MPD.
|
|
91
|
+
* Gap Filled: Provides an unwarped balance point for small sample counts.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
[SECTION B: GENERALIZED & PARAMETRIC BOUNDARY MODULES (Big Data & Slice k)]
|
|
95
|
+
|
|
96
|
+
4. Parametric Mumo Potential Upside (P-MPU)
|
|
97
|
+
* Formula: P-MPU = alpha * (sum(top k) / k) + (1 - alpha) * (sum(remaining) / (n - k))
|
|
98
|
+
* Symbol Definitions:
|
|
99
|
+
- k : Boundary slice size (number of top/bottom boundary elements).
|
|
100
|
+
- alpha : Weighting slider controlling boundary sensitivity (0 <= alpha <= 1).
|
|
101
|
+
- n : Total size of the data array.
|
|
102
|
+
* Function: Calculates continuous upper performance capacity across massive data streams.
|
|
103
|
+
* Gap Filled: Prevents single data typos or corrupted streaming telemetry from
|
|
104
|
+
warping performance capacity estimates.
|
|
105
|
+
|
|
106
|
+
5. Parametric Mumo Potential Downside (P-MPD)
|
|
107
|
+
* Formula: P-MPD = alpha * (sum(bottom k) / k) + (1 - alpha) * (sum(remaining) / (n - k))
|
|
108
|
+
* Function: Establishes a flexible operational safety floor across large database streams.
|
|
109
|
+
* Gap Filled: Stops transient system glitches from triggering false automated
|
|
110
|
+
emergency shutdown routines.
|
|
111
|
+
|
|
112
|
+
6. Parametric Generalized Mumo Average (P-GMA)
|
|
113
|
+
* Formula: P-GMA = beta * (P-MPU) + (1 - beta) * (P-MPD)
|
|
114
|
+
* Symbol Definitions:
|
|
115
|
+
- beta : Risk-reward balance parameter slider (0 <= beta <= 1).
|
|
116
|
+
* Function: Blends peak upside boundaries and risk floors according to operational goals.
|
|
117
|
+
* Gap Filled: Enables real-time tuning of automated trading bots or server network
|
|
118
|
+
throttling based on target risk tolerance.
|
|
119
|
+
|
|
120
|
+
7. Mumo Bounds of Variance (MBV)
|
|
121
|
+
* Formula: MBV = P-MPU - P-MPD
|
|
122
|
+
* Function: Measures the physical width of the operational risk corridor.
|
|
123
|
+
* Gap Filled: Replaces statistical standard deviation (which yields abstract
|
|
124
|
+
squared units) with a unit-accurate physical range measurement matching the input data.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
[SECTION C: CORE STABILISERS]
|
|
128
|
+
|
|
129
|
+
8. Parametric Generalized Mumo Core-Squeeze Index (P-GMCSI)
|
|
130
|
+
* Formula: P-GMCSI = alpha * (sum(Core Cluster C_k) / k) + (1 - alpha) * (sum(Remaining Mass) / (n - k))
|
|
131
|
+
* Symbol Definitions:
|
|
132
|
+
- C_k : The contiguous central k-value slice of the sorted dataset.
|
|
133
|
+
- R_{n-k} : Every value outside C_k; this set contains n-k values.
|
|
134
|
+
- Slice position: start at index floor((n-k)/2) in the sorted dataset.
|
|
135
|
+
* Function: Squeezes middle elements to produce an uncorrupted central consensus value.
|
|
136
|
+
* Gap Filled: Eliminates median flipping in large datasets while preserving full
|
|
137
|
+
consensus awareness of outer wing mass.
|
|
138
|
+
|
|
139
|
+
For dynamic fractional sizing, set k = max(1, floor(p*n)) (capped at n-1)
|
|
140
|
+
using autotune_parameters(data, fraction=p).k. This is the framework's
|
|
141
|
+
fractional-size mode (equivalent to delta=1); omitting it leaves k under
|
|
142
|
+
caller control (equivalent to delta=0). The calculation functions
|
|
143
|
+
themselves remain deterministic and accept k as an ordinary parameter.
|
|
144
|
+
When using k for P-MBTS, MAEI, or MCHI as well, choose p < 0.5 so
|
|
145
|
+
2*k < n and P-MBTS has at least one value remaining between its two
|
|
146
|
+
boundary slices.
|
|
147
|
+
|
|
148
|
+
9. Mumo Adaptive Equilibrium Index (MAEI)
|
|
149
|
+
* Formula: MAEI = gamma * (P-GMA) + (1 - gamma) * (P-GMCSI)
|
|
150
|
+
* Symbol Definitions:
|
|
151
|
+
- gamma : Balance switch between outer threat boundary tracking and inner core stability.
|
|
152
|
+
* Function: Master Engine unifying boundary limits and core consensus into one metric.
|
|
153
|
+
* Gap Filled: Provides hardware engines with dynamic mathematical survival instincts.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
[SECTION D: AUTOTUNE ZERO-BIAS ENGINE (SC-PGMF)]
|
|
157
|
+
|
|
158
|
+
10. Autotune Self-Calibration (SC-MPU, SC-MPD, SC-GMA, SC-GMCSI, SC-MAEI)
|
|
159
|
+
* Formulas:
|
|
160
|
+
k_auto = floor(p * n)
|
|
161
|
+
alpha_auto = (x_n - x_1) / mean(x)
|
|
162
|
+
beta_auto = (x_n - mean(x)) / MBV_baseline
|
|
163
|
+
* Symbol Definitions:
|
|
164
|
+
- p : Target fractional boundary depth (e.g., 0.05 for 5%).
|
|
165
|
+
- delta, omega : Mode switches (0 = manual, 1 = fully automated autotune).
|
|
166
|
+
* Function: Auto-derives k, alpha, and beta parameters straight from data volume and variance.
|
|
167
|
+
* Gap Filled: Erases human parameter bias and eliminates manual recalibration during sudden market spikes.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
[SECTION E: CALCULUS TENSORS & MULTI-DIMENSIONAL EXTENSIONS]
|
|
171
|
+
|
|
172
|
+
11. Risk Derivatives (Velocity & Acceleration)
|
|
173
|
+
* Formulas:
|
|
174
|
+
Velocity = d(MBV)/dt = d(P-MPU)/dt - d(P-MPD)/dt
|
|
175
|
+
Acceleration = d^2(MBV)/dt^2
|
|
176
|
+
* Function: Tracks the rate of expansion and acceleration of system risk corridors over time vectors.
|
|
177
|
+
* Gap Filled: Predicts market crashes or hardware failures before safety floors break by detecting positive acceleration.
|
|
178
|
+
|
|
179
|
+
12. Cumulative Risk Mass Integration (Total Exposure Volume)
|
|
180
|
+
* Formula: Total Exposure Volume = integral_a^b ( P-MPD(t) - f(t) ) dt
|
|
181
|
+
* Symbol Definitions:
|
|
182
|
+
- f(t) : Continuous metric spot curve over time t from a to b.
|
|
183
|
+
* Function: Integrates continuous structural strain volume over time windows.
|
|
184
|
+
* Gap Filled: Quantifies cumulative physical fatigue or financial drawdown duration rather than static point snapshots.
|
|
185
|
+
|
|
186
|
+
13. Multi-Dimensional Risk Matrix (Tensor Surface Transformation)
|
|
187
|
+
* Formula: Y = Omega * X
|
|
188
|
+
* Symbol Definitions:
|
|
189
|
+
- X : High-dimensional data matrix of multi-asset streams.
|
|
190
|
+
- Omega : Automated parameter state matrix.
|
|
191
|
+
* Function: Executes multi-asset risk surface calculations simultaneously.
|
|
192
|
+
* Gap Filled: Enables GPU hardware to compute thousands of asset risk metrics in a single clock cycle.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
--------------------------------------------------------------------------------
|
|
196
|
+
4. INSTALLATION & QUICKSTART
|
|
197
|
+
--------------------------------------------------------------------------------
|
|
198
|
+
Install via PyPI:
|
|
199
|
+
pip install mumo-engine
|
|
200
|
+
|
|
201
|
+
Python Example:
|
|
202
|
+
from mumo_framework import MumoEngine
|
|
203
|
+
|
|
204
|
+
data = [12.0, 15.2, 11.8, 45.0, 14.1, 13.9, 10.5]
|
|
205
|
+
|
|
206
|
+
# Calculate Ceiling, Safety Floor, and Risk Corridor Width
|
|
207
|
+
p_mpu = MumoEngine.calculate_p_mpu(data, k=2, alpha=0.7)
|
|
208
|
+
p_mpd = MumoEngine.calculate_p_mpd(data, k=2, alpha=0.7)
|
|
209
|
+
mbv = MumoEngine.calculate_mbv(data, k=2, alpha=0.7)
|
|
210
|
+
|
|
211
|
+
print(f"Performance Ceiling (P-MPU): {p_mpu:.2f}")
|
|
212
|
+
print(f"Safety Floor (P-MPD): {p_mpd:.2f}")
|
|
213
|
+
print(f"Risk Corridor Width (MBV): {mbv:.2f}")
|
|
214
|
+
|
|
215
|
+
Fractional core/boundary sizing:
|
|
216
|
+
params = MumoEngine.autotune_parameters(data, fraction=0.10)
|
|
217
|
+
p_gmcsi = MumoEngine.calculate_p_gmcsi(data, k=params.k, alpha=0.7)
|
|
218
|
+
|
|
219
|
+
For combined P-MBTS, MAEI, or MCHI calculations, use a fraction below 0.5
|
|
220
|
+
and a dataset of at least three values so the returned k satisfies 2*k < n.
|
|
221
|
+
|
|
222
|
+
Interactive calculator:
|
|
223
|
+
python -m mumo_framework
|
|
224
|
+
|
|
225
|
+
The calculator accepts numbers separated by commas or spaces over as many
|
|
226
|
+
input lines as needed. Submit a blank line to finish the dataset, then enter
|
|
227
|
+
k, alpha, beta, and gamma. Its dataset size is limited by available memory.
|
|
228
|
+
P-MBTS uses the mean of the values remaining after removing the lowest k and
|
|
229
|
+
highest k entries as mu_rest_core; therefore, it requires 2*k < n.
|
|
230
|
+
|
|
231
|
+
Interactive desktop calculator:
|
|
232
|
+
mumo-framework-gui
|
|
233
|
+
|
|
234
|
+
Or, when running from the source checkout:
|
|
235
|
+
python -m mumo_gui
|
|
236
|
+
|
|
237
|
+
The desktop calculator lets you edit or paste a dataset and interactively adjust
|
|
238
|
+
k, alpha, beta, and gamma. Results update as the data or parameters change.
|
|
239
|
+
It uses Python's built-in Tkinter interface and adds no third-party dependencies.
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
--------------------------------------------------------------------------------
|
|
243
|
+
5. LICENSE
|
|
244
|
+
--------------------------------------------------------------------------------
|
|
245
|
+
This project is licensed under the MIT License. See the accompanying LICENSE
|
|
246
|
+
file for full terms.
|
|
247
|
+
|
|
248
|
+
Based on the original Mumo Mathematical Framework created by Mumo Framework Authors (Root Project).
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
================================================================================
|
|
2
|
+
MUMO MATHEMATICAL FRAMEWORK ENGINE (mumo-engine)
|
|
3
|
+
================================================================================
|
|
4
|
+
Version: 1.0.0
|
|
5
|
+
Author: Mumo Framework Authors
|
|
6
|
+
License: MIT (LICENSE)
|
|
7
|
+
|
|
8
|
+
--------------------------------------------------------------------------------
|
|
9
|
+
1. EXECUTIVE SUMMARY & LIBRARY PURPOSE
|
|
10
|
+
--------------------------------------------------------------------------------
|
|
11
|
+
The Mumo Framework (`mumo-engine`) is an advanced mathematical computing
|
|
12
|
+
library designed to replace legacy statistical metrics (such as standard
|
|
13
|
+
deviation, raw arithmetic means, and isolated medians) with dynamic risk-corridor
|
|
14
|
+
tracking, extreme boundary isolation, consensus core squeezing, autotuned parameter
|
|
15
|
+
self-calibration, and multi-dimensional tensor risk modeling.
|
|
16
|
+
|
|
17
|
+
Traditional statistical tools suffer from critical real-world limitations:
|
|
18
|
+
- Standard deviation produces abstract squared variance units rather than
|
|
19
|
+
unit-accurate risk limits.
|
|
20
|
+
- Single outliers or sensor typos skew basic mean calculations.
|
|
21
|
+
- Single-point medians flip wildly in large streaming data.
|
|
22
|
+
- Manual tuning parameters introduce human operator bias.
|
|
23
|
+
|
|
24
|
+
The Mumo Engine solves these problems by establishing boundary envelopes, dynamic
|
|
25
|
+
consensus squeezing, calculus-based derivative velocity tracking, and automated
|
|
26
|
+
parameter self-calibration across massive datasets and GPU-accelerated matrices.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
--------------------------------------------------------------------------------
|
|
30
|
+
2. PIPELINE ARCHITECTURE DIAGRAM
|
|
31
|
+
--------------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
[ THE TOTAL SC-PGMF PIPELINE ]
|
|
34
|
+
|
|
|
35
|
+
+----------------------------+----------------------------+
|
|
36
|
+
| | |
|
|
37
|
+
v v v
|
|
38
|
+
[ Boundary Modules ] [ Core Stabilisers ] [ Calculus Tensors ]
|
|
39
|
+
* P-MPU (Ceiling Limit) * P-GMCSI (True Baseline) * Derivatives (Velocity)
|
|
40
|
+
* P-MPD (Safety Floor) * P-MBTS (Tension Weight) * Integrals (Total Strain)
|
|
41
|
+
* MBV (Risk Corridor) * MAEI (Master Engines) * Matrices (Multi-Scale)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
--------------------------------------------------------------------------------
|
|
45
|
+
3. COMPLETE FORMULA BREAKDOWN: FUNCTIONS, SYMBOLS & GAPS FILLED
|
|
46
|
+
--------------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
[SECTION A: FOUNDATIONAL MUMO MODEL (Small Sample Sizes: n, k = 1)]
|
|
49
|
+
|
|
50
|
+
1. Mumo Potential Upside (MPU)
|
|
51
|
+
* Formula: MPU = ( x_n + (sum(x_i for i=1 to n-1) / (n-1)) ) / 2
|
|
52
|
+
* Symbol Definitions:
|
|
53
|
+
- x_n : The single maximum value in the sorted dataset X.
|
|
54
|
+
- x_i : Individual baseline entries in the sorted dataset.
|
|
55
|
+
- n : Total number of data points.
|
|
56
|
+
* Function: Evaluates maximum peak performance capability relative to baseline.
|
|
57
|
+
* Gap Filled: Replaces raw maximum values (which are highly vulnerable to
|
|
58
|
+
single data entry errors or noise spikes) with a baseline-anchored peak limit.
|
|
59
|
+
|
|
60
|
+
2. Mumo Potential Downside (MPD)
|
|
61
|
+
* Formula: MPD = ( x_1 + (sum(x_i for i=2 to n) / (n-1)) ) / 2
|
|
62
|
+
* Symbol Definitions:
|
|
63
|
+
- x_1 : The single minimum value in the sorted dataset X.
|
|
64
|
+
- x_i : Individual baseline entries in the upper dataset.
|
|
65
|
+
- n : Total number of data points.
|
|
66
|
+
* Function: Evaluates system risk floor safety relative to the remaining baseline.
|
|
67
|
+
* Gap Filled: Eliminates raw minimum metrics by evaluating worst-case failure
|
|
68
|
+
risk in proportion to baseline health.
|
|
69
|
+
|
|
70
|
+
3. Mumo Average (MA)
|
|
71
|
+
* Formula: MA = ( MPU + MPD ) / 2
|
|
72
|
+
* Function: Establishes the central equilibrium point between MPU and MPD.
|
|
73
|
+
* Gap Filled: Provides an unwarped balance point for small sample counts.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
[SECTION B: GENERALIZED & PARAMETRIC BOUNDARY MODULES (Big Data & Slice k)]
|
|
77
|
+
|
|
78
|
+
4. Parametric Mumo Potential Upside (P-MPU)
|
|
79
|
+
* Formula: P-MPU = alpha * (sum(top k) / k) + (1 - alpha) * (sum(remaining) / (n - k))
|
|
80
|
+
* Symbol Definitions:
|
|
81
|
+
- k : Boundary slice size (number of top/bottom boundary elements).
|
|
82
|
+
- alpha : Weighting slider controlling boundary sensitivity (0 <= alpha <= 1).
|
|
83
|
+
- n : Total size of the data array.
|
|
84
|
+
* Function: Calculates continuous upper performance capacity across massive data streams.
|
|
85
|
+
* Gap Filled: Prevents single data typos or corrupted streaming telemetry from
|
|
86
|
+
warping performance capacity estimates.
|
|
87
|
+
|
|
88
|
+
5. Parametric Mumo Potential Downside (P-MPD)
|
|
89
|
+
* Formula: P-MPD = alpha * (sum(bottom k) / k) + (1 - alpha) * (sum(remaining) / (n - k))
|
|
90
|
+
* Function: Establishes a flexible operational safety floor across large database streams.
|
|
91
|
+
* Gap Filled: Stops transient system glitches from triggering false automated
|
|
92
|
+
emergency shutdown routines.
|
|
93
|
+
|
|
94
|
+
6. Parametric Generalized Mumo Average (P-GMA)
|
|
95
|
+
* Formula: P-GMA = beta * (P-MPU) + (1 - beta) * (P-MPD)
|
|
96
|
+
* Symbol Definitions:
|
|
97
|
+
- beta : Risk-reward balance parameter slider (0 <= beta <= 1).
|
|
98
|
+
* Function: Blends peak upside boundaries and risk floors according to operational goals.
|
|
99
|
+
* Gap Filled: Enables real-time tuning of automated trading bots or server network
|
|
100
|
+
throttling based on target risk tolerance.
|
|
101
|
+
|
|
102
|
+
7. Mumo Bounds of Variance (MBV)
|
|
103
|
+
* Formula: MBV = P-MPU - P-MPD
|
|
104
|
+
* Function: Measures the physical width of the operational risk corridor.
|
|
105
|
+
* Gap Filled: Replaces statistical standard deviation (which yields abstract
|
|
106
|
+
squared units) with a unit-accurate physical range measurement matching the input data.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
[SECTION C: CORE STABILISERS]
|
|
110
|
+
|
|
111
|
+
8. Parametric Generalized Mumo Core-Squeeze Index (P-GMCSI)
|
|
112
|
+
* Formula: P-GMCSI = alpha * (sum(Core Cluster C_k) / k) + (1 - alpha) * (sum(Remaining Mass) / (n - k))
|
|
113
|
+
* Symbol Definitions:
|
|
114
|
+
- C_k : The contiguous central k-value slice of the sorted dataset.
|
|
115
|
+
- R_{n-k} : Every value outside C_k; this set contains n-k values.
|
|
116
|
+
- Slice position: start at index floor((n-k)/2) in the sorted dataset.
|
|
117
|
+
* Function: Squeezes middle elements to produce an uncorrupted central consensus value.
|
|
118
|
+
* Gap Filled: Eliminates median flipping in large datasets while preserving full
|
|
119
|
+
consensus awareness of outer wing mass.
|
|
120
|
+
|
|
121
|
+
For dynamic fractional sizing, set k = max(1, floor(p*n)) (capped at n-1)
|
|
122
|
+
using autotune_parameters(data, fraction=p).k. This is the framework's
|
|
123
|
+
fractional-size mode (equivalent to delta=1); omitting it leaves k under
|
|
124
|
+
caller control (equivalent to delta=0). The calculation functions
|
|
125
|
+
themselves remain deterministic and accept k as an ordinary parameter.
|
|
126
|
+
When using k for P-MBTS, MAEI, or MCHI as well, choose p < 0.5 so
|
|
127
|
+
2*k < n and P-MBTS has at least one value remaining between its two
|
|
128
|
+
boundary slices.
|
|
129
|
+
|
|
130
|
+
9. Mumo Adaptive Equilibrium Index (MAEI)
|
|
131
|
+
* Formula: MAEI = gamma * (P-GMA) + (1 - gamma) * (P-GMCSI)
|
|
132
|
+
* Symbol Definitions:
|
|
133
|
+
- gamma : Balance switch between outer threat boundary tracking and inner core stability.
|
|
134
|
+
* Function: Master Engine unifying boundary limits and core consensus into one metric.
|
|
135
|
+
* Gap Filled: Provides hardware engines with dynamic mathematical survival instincts.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
[SECTION D: AUTOTUNE ZERO-BIAS ENGINE (SC-PGMF)]
|
|
139
|
+
|
|
140
|
+
10. Autotune Self-Calibration (SC-MPU, SC-MPD, SC-GMA, SC-GMCSI, SC-MAEI)
|
|
141
|
+
* Formulas:
|
|
142
|
+
k_auto = floor(p * n)
|
|
143
|
+
alpha_auto = (x_n - x_1) / mean(x)
|
|
144
|
+
beta_auto = (x_n - mean(x)) / MBV_baseline
|
|
145
|
+
* Symbol Definitions:
|
|
146
|
+
- p : Target fractional boundary depth (e.g., 0.05 for 5%).
|
|
147
|
+
- delta, omega : Mode switches (0 = manual, 1 = fully automated autotune).
|
|
148
|
+
* Function: Auto-derives k, alpha, and beta parameters straight from data volume and variance.
|
|
149
|
+
* Gap Filled: Erases human parameter bias and eliminates manual recalibration during sudden market spikes.
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
[SECTION E: CALCULUS TENSORS & MULTI-DIMENSIONAL EXTENSIONS]
|
|
153
|
+
|
|
154
|
+
11. Risk Derivatives (Velocity & Acceleration)
|
|
155
|
+
* Formulas:
|
|
156
|
+
Velocity = d(MBV)/dt = d(P-MPU)/dt - d(P-MPD)/dt
|
|
157
|
+
Acceleration = d^2(MBV)/dt^2
|
|
158
|
+
* Function: Tracks the rate of expansion and acceleration of system risk corridors over time vectors.
|
|
159
|
+
* Gap Filled: Predicts market crashes or hardware failures before safety floors break by detecting positive acceleration.
|
|
160
|
+
|
|
161
|
+
12. Cumulative Risk Mass Integration (Total Exposure Volume)
|
|
162
|
+
* Formula: Total Exposure Volume = integral_a^b ( P-MPD(t) - f(t) ) dt
|
|
163
|
+
* Symbol Definitions:
|
|
164
|
+
- f(t) : Continuous metric spot curve over time t from a to b.
|
|
165
|
+
* Function: Integrates continuous structural strain volume over time windows.
|
|
166
|
+
* Gap Filled: Quantifies cumulative physical fatigue or financial drawdown duration rather than static point snapshots.
|
|
167
|
+
|
|
168
|
+
13. Multi-Dimensional Risk Matrix (Tensor Surface Transformation)
|
|
169
|
+
* Formula: Y = Omega * X
|
|
170
|
+
* Symbol Definitions:
|
|
171
|
+
- X : High-dimensional data matrix of multi-asset streams.
|
|
172
|
+
- Omega : Automated parameter state matrix.
|
|
173
|
+
* Function: Executes multi-asset risk surface calculations simultaneously.
|
|
174
|
+
* Gap Filled: Enables GPU hardware to compute thousands of asset risk metrics in a single clock cycle.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
--------------------------------------------------------------------------------
|
|
178
|
+
4. INSTALLATION & QUICKSTART
|
|
179
|
+
--------------------------------------------------------------------------------
|
|
180
|
+
Install via PyPI:
|
|
181
|
+
pip install mumo-engine
|
|
182
|
+
|
|
183
|
+
Python Example:
|
|
184
|
+
from mumo_framework import MumoEngine
|
|
185
|
+
|
|
186
|
+
data = [12.0, 15.2, 11.8, 45.0, 14.1, 13.9, 10.5]
|
|
187
|
+
|
|
188
|
+
# Calculate Ceiling, Safety Floor, and Risk Corridor Width
|
|
189
|
+
p_mpu = MumoEngine.calculate_p_mpu(data, k=2, alpha=0.7)
|
|
190
|
+
p_mpd = MumoEngine.calculate_p_mpd(data, k=2, alpha=0.7)
|
|
191
|
+
mbv = MumoEngine.calculate_mbv(data, k=2, alpha=0.7)
|
|
192
|
+
|
|
193
|
+
print(f"Performance Ceiling (P-MPU): {p_mpu:.2f}")
|
|
194
|
+
print(f"Safety Floor (P-MPD): {p_mpd:.2f}")
|
|
195
|
+
print(f"Risk Corridor Width (MBV): {mbv:.2f}")
|
|
196
|
+
|
|
197
|
+
Fractional core/boundary sizing:
|
|
198
|
+
params = MumoEngine.autotune_parameters(data, fraction=0.10)
|
|
199
|
+
p_gmcsi = MumoEngine.calculate_p_gmcsi(data, k=params.k, alpha=0.7)
|
|
200
|
+
|
|
201
|
+
For combined P-MBTS, MAEI, or MCHI calculations, use a fraction below 0.5
|
|
202
|
+
and a dataset of at least three values so the returned k satisfies 2*k < n.
|
|
203
|
+
|
|
204
|
+
Interactive calculator:
|
|
205
|
+
python -m mumo_framework
|
|
206
|
+
|
|
207
|
+
The calculator accepts numbers separated by commas or spaces over as many
|
|
208
|
+
input lines as needed. Submit a blank line to finish the dataset, then enter
|
|
209
|
+
k, alpha, beta, and gamma. Its dataset size is limited by available memory.
|
|
210
|
+
P-MBTS uses the mean of the values remaining after removing the lowest k and
|
|
211
|
+
highest k entries as mu_rest_core; therefore, it requires 2*k < n.
|
|
212
|
+
|
|
213
|
+
Interactive desktop calculator:
|
|
214
|
+
mumo-framework-gui
|
|
215
|
+
|
|
216
|
+
Or, when running from the source checkout:
|
|
217
|
+
python -m mumo_gui
|
|
218
|
+
|
|
219
|
+
The desktop calculator lets you edit or paste a dataset and interactively adjust
|
|
220
|
+
k, alpha, beta, and gamma. Results update as the data or parameters change.
|
|
221
|
+
It uses Python's built-in Tkinter interface and adds no third-party dependencies.
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
--------------------------------------------------------------------------------
|
|
225
|
+
5. LICENSE
|
|
226
|
+
--------------------------------------------------------------------------------
|
|
227
|
+
This project is licensed under the MIT License. See the accompanying LICENSE
|
|
228
|
+
file for full terms.
|
|
229
|
+
|
|
230
|
+
Based on the original Mumo Mathematical Framework created by Mumo Framework Authors (Root Project).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mumo-engine"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Boundary-based statistics and risk-corridor calculations"
|
|
9
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Mumo Framework Authors" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["statistics", "risk", "boundaries", "mumo"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Topic :: Scientific/Engineering :: Mathematics",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[tool.setuptools]
|
|
27
|
+
package-dir = { "" = "src" }
|
|
28
|
+
py-modules = ["mumo_framework", "mumo_gui"]
|
|
29
|
+
|
|
30
|
+
[project.scripts]
|
|
31
|
+
mumo-framework = "mumo_framework:main"
|
|
32
|
+
mumo-framework-gui = "mumo_gui:main"
|