varmapack 0.1.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 (96) hide show
  1. varmapack-0.1.0/LICENSE +38 -0
  2. varmapack-0.1.0/PKG-INFO +70 -0
  3. varmapack-0.1.0/README.md +53 -0
  4. varmapack-0.1.0/SCIPY-OPENBLAS-LICENSE.txt +929 -0
  5. varmapack-0.1.0/docs/Makefile +23 -0
  6. varmapack-0.1.0/docs/_static/custom.css +7 -0
  7. varmapack-0.1.0/docs/_templates/autosummary/base.rst +6 -0
  8. varmapack-0.1.0/docs/_templates/autosummary/class.rst +3 -0
  9. varmapack-0.1.0/docs/_templates/method.rst +6 -0
  10. varmapack-0.1.0/docs/bivariate_varma.rst +46 -0
  11. varmapack-0.1.0/docs/conf.py +51 -0
  12. varmapack-0.1.0/docs/figures/bivariate_varma_cross_correlation.pdf +0 -0
  13. varmapack-0.1.0/docs/figures/bivariate_varma_cross_correlation.svg +1230 -0
  14. varmapack-0.1.0/docs/figures/bivariate_varma_paths.pdf +0 -0
  15. varmapack-0.1.0/docs/figures/bivariate_varma_paths.svg +2325 -0
  16. varmapack-0.1.0/docs/index.rst +21 -0
  17. varmapack-0.1.0/docs/install.rst +47 -0
  18. varmapack-0.1.0/docs/make.bat +35 -0
  19. varmapack-0.1.0/docs/math.md +139 -0
  20. varmapack-0.1.0/docs/reference/generated/varmapack.Model.A.rst +7 -0
  21. varmapack-0.1.0/docs/reference/generated/varmapack.Model.B.rst +7 -0
  22. varmapack-0.1.0/docs/reference/generated/varmapack.Model.C.rst +7 -0
  23. varmapack-0.1.0/docs/reference/generated/varmapack.Model.Sig.rst +7 -0
  24. varmapack-0.1.0/docs/reference/generated/varmapack.Model.acvf.rst +7 -0
  25. varmapack-0.1.0/docs/reference/generated/varmapack.Model.irf.rst +7 -0
  26. varmapack-0.1.0/docs/reference/generated/varmapack.Model.ma_specrad.rst +7 -0
  27. varmapack-0.1.0/docs/reference/generated/varmapack.Model.mu.rst +7 -0
  28. varmapack-0.1.0/docs/reference/generated/varmapack.Model.p.rst +7 -0
  29. varmapack-0.1.0/docs/reference/generated/varmapack.Model.psi.rst +7 -0
  30. varmapack-0.1.0/docs/reference/generated/varmapack.Model.q.rst +7 -0
  31. varmapack-0.1.0/docs/reference/generated/varmapack.Model.r.rst +7 -0
  32. varmapack-0.1.0/docs/reference/generated/varmapack.Model.rst +4 -0
  33. varmapack-0.1.0/docs/reference/generated/varmapack.Model.s.rst +7 -0
  34. varmapack-0.1.0/docs/reference/generated/varmapack.Model.sim.rst +7 -0
  35. varmapack-0.1.0/docs/reference/generated/varmapack.Model.specrad.rst +7 -0
  36. varmapack-0.1.0/docs/reference/generated/varmapack.VarmapackError.rst +7 -0
  37. varmapack-0.1.0/docs/reference/generated/varmapack.autocov.rst +7 -0
  38. varmapack-0.1.0/docs/reference/generated/varmapack.cov2corr.rst +7 -0
  39. varmapack-0.1.0/docs/reference/generated/varmapack.testcase.rst +7 -0
  40. varmapack-0.1.0/docs/reference/generated/varmapack.testcases.rst +7 -0
  41. varmapack-0.1.0/docs/reference.rst +60 -0
  42. varmapack-0.1.0/docs/requirements.txt +4 -0
  43. varmapack-0.1.0/docs/usage.rst +137 -0
  44. varmapack-0.1.0/examples/TimeSimulate.py +141 -0
  45. varmapack-0.1.0/examples/bivariate_varma.py +83 -0
  46. varmapack-0.1.0/examples/quickstart.py +54 -0
  47. varmapack-0.1.0/meson.build +156 -0
  48. varmapack-0.1.0/meson_options.txt +5 -0
  49. varmapack-0.1.0/pyproject.toml +53 -0
  50. varmapack-0.1.0/src/BlasGateway.h +150 -0
  51. varmapack-0.1.0/src/FindW.c +39 -0
  52. varmapack-0.1.0/src/Lyapunov.c +71 -0
  53. varmapack-0.1.0/src/Lyapunov.h +10 -0
  54. varmapack-0.1.0/src/RandompackGateway.h +12 -0
  55. varmapack-0.1.0/src/VYW.c +243 -0
  56. varmapack-0.1.0/src/VYW.h +19 -0
  57. varmapack-0.1.0/src/VarmaPackUtil.c +405 -0
  58. varmapack-0.1.0/src/VarmaPackUtil.h +67 -0
  59. varmapack-0.1.0/src/VarmaUtilities.h +180 -0
  60. varmapack-0.1.0/src/blasref.h +142 -0
  61. varmapack-0.1.0/src/debugprint.h +277 -0
  62. varmapack-0.1.0/src/error.c +21 -0
  63. varmapack-0.1.0/src/error.h +67 -0
  64. varmapack-0.1.0/src/exog.c +37 -0
  65. varmapack-0.1.0/src/printX.h +82 -0
  66. varmapack-0.1.0/src/rp_dpstrf.c +250 -0
  67. varmapack-0.1.0/src/sb03md-complete.F +1569 -0
  68. varmapack-0.1.0/src/sb03mdGateway.c +73 -0
  69. varmapack-0.1.0/src/sb03mdGateway.h +9 -0
  70. varmapack-0.1.0/src/varmapack.h +152 -0
  71. varmapack-0.1.0/src/varmapack_acvf.c +90 -0
  72. varmapack-0.1.0/src/varmapack_autocov.c +63 -0
  73. varmapack-0.1.0/src/varmapack_config.h +58 -0
  74. varmapack-0.1.0/src/varmapack_cov2corr.c +39 -0
  75. varmapack-0.1.0/src/varmapack_ma_specrad.c +8 -0
  76. varmapack-0.1.0/src/varmapack_psi.c +67 -0
  77. varmapack-0.1.0/src/varmapack_sim.c +476 -0
  78. varmapack-0.1.0/src/varmapack_simx.c +175 -0
  79. varmapack-0.1.0/src/varmapack_specrad.c +72 -0
  80. varmapack-0.1.0/src/varmapack_testcase.c +332 -0
  81. varmapack-0.1.0/src/varmapack_testcasex.c +28 -0
  82. varmapack-0.1.0/tests/test_basic.py +113 -0
  83. varmapack-0.1.0/tests/test_data.py +53 -0
  84. varmapack-0.1.0/tests/test_errors.py +145 -0
  85. varmapack-0.1.0/tests/test_interop.py +66 -0
  86. varmapack-0.1.0/tests/test_moments.py +92 -0
  87. varmapack-0.1.0/tests/test_testcases.py +59 -0
  88. varmapack-0.1.0/tests/test_varmax.py +149 -0
  89. varmapack-0.1.0/tools/repair-wheel.py +43 -0
  90. varmapack-0.1.0/tools/wheel-requirements.txt +12 -0
  91. varmapack-0.1.0/uv.lock +189 -0
  92. varmapack-0.1.0/varmapack/RandompackPythonGateway.c +59 -0
  93. varmapack-0.1.0/varmapack/RandompackPythonGateway.h +25 -0
  94. varmapack-0.1.0/varmapack/__init__.py +56 -0
  95. varmapack-0.1.0/varmapack/_core.pyx +909 -0
  96. varmapack-0.1.0/varmapack/meson.build +16 -0
@@ -0,0 +1,38 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kristján Jónasson
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.
22
+
23
+
24
+ THIRD-PARTY NOTICES
25
+
26
+ This software includes or adapts code from the following projects:
27
+
28
+ SLICOT
29
+ The SLICOT Team — https://github.com/SLICOT/SLICOT-Reference — BSD-3-Clause
30
+ File: src/sb03md-complete.F
31
+
32
+ LAPACK routines
33
+ Netlib LAPACK — https://www.netlib.org/lapack/ — BSD-style
34
+ File: src/rp_dpstrf.c
35
+
36
+ getopt
37
+ OpenBSD / NetBSD — https://github.com/openbsd/src — ISC-style
38
+ Files: examples/getopt.c, examples/getopt.h
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: varmapack
3
+ Version: 0.1.0
4
+ Summary: VARMA time-series simulation library
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ License-File: SCIPY-OPENBLAS-LICENSE.txt
8
+ Project-URL: Homepage, https://github.com/jonasson2/varmapack
9
+ Project-URL: Documentation, https://varmapack.readthedocs.io/
10
+ Project-URL: Repository, https://github.com/jonasson2/varmapack
11
+ Project-URL: Issues, https://github.com/jonasson2/varmapack/issues
12
+ Requires-Python: >=3.10
13
+ Requires-Dist: numpy<2.3,>=1.22; python_version < "3.14" and platform_machine == "aarch64"
14
+ Requires-Dist: numpy>=1.22; python_version >= "3.14" or platform_machine != "aarch64"
15
+ Requires-Dist: randompack>=0.1.10
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Varmapack
19
+
20
+ Varmapack is a Python interface to the Varmapack C library for simulation and
21
+ analysis of Gaussian VAR, VMA, VARMA, and VARMAX time-series models.
22
+
23
+ It supports burn-in-free simulation, model testcases, theoretical and sample
24
+ autocovariances, spectral radii, and impulse response functions.
25
+ VARMAX models support scalar or vector-valued exogenous inputs.
26
+
27
+ ## Quick Example
28
+
29
+ ```python
30
+ import varmapack
31
+ model = varmapack.Model(
32
+ A=[[0.6, 0.1], [0.0, 0.4]],
33
+ Sig=[[2, 0], [0, 1]],
34
+ )
35
+ X = model.sim(200)
36
+ print(X.shape)
37
+ ```
38
+
39
+ For repeated simulations, `Model.sim` accepts a writable, C-contiguous
40
+ `float64` NumPy array through `out=`. Reusing an output array avoids an
41
+ allocation on each call; its required shape is `(nrep, length, r)`.
42
+
43
+ ## Timing
44
+
45
+ `examples/TimeSimulate.py` compares Varmapack with Statsmodels `VARMAX` on all
46
+ named testcases and with Statsmodels `VAR` on pure-VAR testcases. The latter
47
+ uses a 200-observation burn-in by default. The program uses length 100, 1000
48
+ replicates, and a 0.1-second timing target per method and testcase. Its output
49
+ can be compared with the C and MATLAB simulation benchmarks. It is a
50
+ source-tree benchmark and requires the optional `statsmodels` package:
51
+
52
+ ```sh
53
+ python -m pip install statsmodels
54
+ python examples/TimeSimulate.py
55
+ ```
56
+
57
+ Use `-h` to list its timing and workload options.
58
+
59
+ ## Documentation
60
+
61
+ The full documentation is at:
62
+
63
+ > https://varmapack.readthedocs.io/
64
+
65
+ For information about the underlying C library, see the
66
+ [C README](https://github.com/jonasson2/varmapack/blob/main/README.md).
67
+
68
+ For development builds from source, see:
69
+
70
+ > https://github.com/jonasson2/varmapack/blob/main/DEVELOPMENT.md
@@ -0,0 +1,53 @@
1
+ # Varmapack
2
+
3
+ Varmapack is a Python interface to the Varmapack C library for simulation and
4
+ analysis of Gaussian VAR, VMA, VARMA, and VARMAX time-series models.
5
+
6
+ It supports burn-in-free simulation, model testcases, theoretical and sample
7
+ autocovariances, spectral radii, and impulse response functions.
8
+ VARMAX models support scalar or vector-valued exogenous inputs.
9
+
10
+ ## Quick Example
11
+
12
+ ```python
13
+ import varmapack
14
+ model = varmapack.Model(
15
+ A=[[0.6, 0.1], [0.0, 0.4]],
16
+ Sig=[[2, 0], [0, 1]],
17
+ )
18
+ X = model.sim(200)
19
+ print(X.shape)
20
+ ```
21
+
22
+ For repeated simulations, `Model.sim` accepts a writable, C-contiguous
23
+ `float64` NumPy array through `out=`. Reusing an output array avoids an
24
+ allocation on each call; its required shape is `(nrep, length, r)`.
25
+
26
+ ## Timing
27
+
28
+ `examples/TimeSimulate.py` compares Varmapack with Statsmodels `VARMAX` on all
29
+ named testcases and with Statsmodels `VAR` on pure-VAR testcases. The latter
30
+ uses a 200-observation burn-in by default. The program uses length 100, 1000
31
+ replicates, and a 0.1-second timing target per method and testcase. Its output
32
+ can be compared with the C and MATLAB simulation benchmarks. It is a
33
+ source-tree benchmark and requires the optional `statsmodels` package:
34
+
35
+ ```sh
36
+ python -m pip install statsmodels
37
+ python examples/TimeSimulate.py
38
+ ```
39
+
40
+ Use `-h` to list its timing and workload options.
41
+
42
+ ## Documentation
43
+
44
+ The full documentation is at:
45
+
46
+ > https://varmapack.readthedocs.io/
47
+
48
+ For information about the underlying C library, see the
49
+ [C README](https://github.com/jonasson2/varmapack/blob/main/README.md).
50
+
51
+ For development builds from source, see:
52
+
53
+ > https://github.com/jonasson2/varmapack/blob/main/DEVELOPMENT.md