dfm-python 0.5.59__tar.gz → 0.6.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 (169) hide show
  1. dfm_python-0.6.0/.cursor/agents/test-runner.md +118 -0
  2. dfm_python-0.6.0/=0.11.0 +1 -0
  3. dfm_python-0.6.0/PKG-INFO +56 -0
  4. {dfm_python-0.5.59 → dfm_python-0.6.0}/config/ddfm_exchange.yaml +1 -1
  5. {dfm_python-0.5.59 → dfm_python-0.6.0}/config/ddfm_finance.yaml +1 -1
  6. {dfm_python-0.5.59 → dfm_python-0.6.0}/config/ddfm_macro.yaml +1 -1
  7. dfm_python-0.6.0/config/dfm_exchange.yaml +18 -0
  8. dfm_python-0.6.0/config/dfm_finance.yaml +104 -0
  9. dfm_python-0.6.0/config/dfm_macro.yaml +84 -0
  10. dfm_python-0.6.0/data/macro.csv +2539 -0
  11. dfm_python-0.6.0/models/dfm_exchange.pkl +0 -0
  12. {dfm_python-0.5.59 → dfm_python-0.6.0}/pyproject.toml +1 -2
  13. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/__init__.py +8 -3
  14. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/__init__.py +2 -8
  15. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/adapter.py +3 -10
  16. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/constants.py +35 -0
  17. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/schema/model.py +46 -85
  18. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/schema/params.py +59 -89
  19. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/dataset/ddfm_dataset.py +85 -47
  20. dfm_python-0.6.0/src/dfm_python/dataset/dfm_dataset.py +274 -0
  21. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/encoder/pca.py +3 -0
  22. dfm_python-0.6.0/src/dfm_python/functional/em.py +1702 -0
  23. dfm_python-0.6.0/src/dfm_python/logger/dfm_logger.py +39 -0
  24. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/models/__init__.py +8 -4
  25. dfm_python-0.6.0/src/dfm_python/models/base.py +73 -0
  26. {dfm_python-0.5.59/src/dfm_python/models → dfm_python-0.6.0/src/dfm_python/models/ddfm}/ddfm.py +281 -54
  27. dfm_python-0.6.0/src/dfm_python/models/dfm/__init__.py +39 -0
  28. dfm_python-0.6.0/src/dfm_python/models/dfm/dfm.py +1087 -0
  29. dfm_python-0.6.0/src/dfm_python/models/dfm/initialization.py +1154 -0
  30. dfm_python-0.6.0/src/dfm_python/models/dfm/mixed_freq.py +387 -0
  31. {dfm_python-0.5.59/src/dfm_python/numeric → dfm_python-0.6.0/src/dfm_python/models/dfm}/tent.py +99 -22
  32. dfm_python-0.6.0/src/dfm_python/numeric/builder.py +200 -0
  33. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/numeric/estimator.py +253 -157
  34. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/numeric/stability.py +204 -515
  35. dfm_python-0.6.0/src/dfm_python/numeric/validator.py +742 -0
  36. dfm_python-0.6.0/src/dfm_python/ssm/kalman.py +729 -0
  37. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/__init__.py +32 -56
  38. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/misc.py +36 -13
  39. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/validation.py +1 -0
  40. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/test_tent_weights_config.py +1 -1
  41. dfm_python-0.6.0/src/test/dataset/test_ddfm_dataset.py +0 -0
  42. dfm_python-0.6.0/src/test/dataset/test_dfm_dataset.py +0 -0
  43. dfm_python-0.6.0/src/test/functional/test_em.py +277 -0
  44. dfm_python-0.6.0/src/test/functional/test_em_correctness.py +506 -0
  45. dfm_python-0.6.0/src/test/functional/test_em_properties.py +151 -0
  46. dfm_python-0.6.0/src/test/functional/test_invariance.py +348 -0
  47. dfm_python-0.6.0/src/test/functional/test_macro_overflow.py +240 -0
  48. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/models/test_ddfm.py +26 -32
  49. dfm_python-0.6.0/src/test/models/test_dfm.py +253 -0
  50. dfm_python-0.6.0/src/test/numeric/test_builder.py +40 -0
  51. dfm_python-0.6.0/src/test/numeric/test_cov_rowvar_regression.py +22 -0
  52. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/numeric/test_estimator.py +12 -12
  53. dfm_python-0.6.0/src/test/numeric/test_initialization.py +413 -0
  54. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/numeric/test_stability.py +2 -7
  55. dfm_python-0.6.0/src/test/numeric/test_validator.py +122 -0
  56. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/ssm/test_kalman.py +162 -5
  57. dfm_python-0.6.0/src/test/ssm/test_kalman_correctness.py +174 -0
  58. {dfm_python-0.5.59 → dfm_python-0.6.0}/tutorial/tutorial_exchange_ddfm.py +12 -13
  59. dfm_python-0.6.0/tutorial/tutorial_exchange_dfm.py +57 -0
  60. {dfm_python-0.5.59 → dfm_python-0.6.0}/tutorial/tutorial_finance_ddfm.py +6 -4
  61. dfm_python-0.6.0/tutorial/tutorial_finance_dfm.py +84 -0
  62. {dfm_python-0.5.59 → dfm_python-0.6.0}/tutorial/tutorial_macro_ddfm.py +13 -5
  63. dfm_python-0.6.0/tutorial/tutorial_macro_dfm.py +56 -0
  64. {dfm_python-0.5.59 → dfm_python-0.6.0}/uv.lock +1 -1
  65. dfm_python-0.5.59/PKG-INFO +0 -380
  66. dfm_python-0.5.59/README.md +0 -322
  67. dfm_python-0.5.59/config/dfm_finance.yaml +0 -103
  68. dfm_python-0.5.59/config/dfm_macro.yaml +0 -86
  69. dfm_python-0.5.59/data/macro.csv +0 -2539
  70. dfm_python-0.5.59/src/dfm_python/dataset/dfm_dataset.py +0 -542
  71. dfm_python-0.5.59/src/dfm_python/functional/dfm_block.py +0 -485
  72. dfm_python-0.5.59/src/dfm_python/functional/em.py +0 -1356
  73. dfm_python-0.5.59/src/dfm_python/models/base.py +0 -292
  74. dfm_python-0.5.59/src/dfm_python/models/dfm.py +0 -1897
  75. dfm_python-0.5.59/src/dfm_python/numeric/builder.py +0 -187
  76. dfm_python-0.5.59/src/dfm_python/numeric/validator.py +0 -1110
  77. dfm_python-0.5.59/src/dfm_python/ssm/kalman.py +0 -628
  78. dfm_python-0.5.59/src/test/dataset/__init__.py +0 -2
  79. dfm_python-0.5.59/src/test/dataset/test_dataloader.py +0 -25
  80. dfm_python-0.5.59/src/test/dataset/test_dataset.py +0 -69
  81. dfm_python-0.5.59/src/test/dataset/test_process.py +0 -116
  82. dfm_python-0.5.59/src/test/functional/test_dfm_block.py +0 -140
  83. dfm_python-0.5.59/src/test/functional/test_em.py +0 -878
  84. dfm_python-0.5.59/src/test/models/test_base.py +0 -161
  85. dfm_python-0.5.59/src/test/models/test_ddfm_batchnorm_placement.py +0 -179
  86. dfm_python-0.5.59/src/test/models/test_dfm.py +0 -225
  87. dfm_python-0.5.59/src/test/models/test_dfm_fixes.py +0 -261
  88. dfm_python-0.5.59/src/test/models/test_dfm_result_caching.py +0 -309
  89. dfm_python-0.5.59/src/test/models/test_dfm_save_load.py +0 -261
  90. dfm_python-0.5.59/src/test/models/test_dfm_save_load_integration.py +0 -136
  91. dfm_python-0.5.59/src/test/models/test_dfm_save_load_mock.py +0 -340
  92. dfm_python-0.5.59/src/test/models/test_dfm_training_pipeline_save.py +0 -246
  93. dfm_python-0.5.59/src/test/models/test_tensorflow_batchnorm_comparison.py +0 -266
  94. dfm_python-0.5.59/src/test/numeric/test_builder.py +0 -27
  95. dfm_python-0.5.59/src/test/numeric/test_tent.py +0 -113
  96. dfm_python-0.5.59/src/test/numeric/test_validator.py +0 -279
  97. dfm_python-0.5.59/src/test/ssm/test_arma.py +0 -22
  98. dfm_python-0.5.59/src/test/ssm/test_companion.py +0 -103
  99. dfm_python-0.5.59/src/test/ssm/test_kalman_progress.py +0 -161
  100. dfm_python-0.5.59/src/test/ssm/test_progress_bar_exact_scenario.py +0 -226
  101. dfm_python-0.5.59/src/test/ssm/test_progress_bar_spam_fix.py +0 -297
  102. dfm_python-0.5.59/src/test/ssm/test_structural.py +0 -67
  103. dfm_python-0.5.59/src/test/utils/test_common.py +0 -458
  104. dfm_python-0.5.59/src/test/utils/test_tensor_utils.py +0 -57
  105. dfm_python-0.5.59/src/test/utils/test_validation.py +0 -137
  106. dfm_python-0.5.59/tutorial/tutorial_finance_dfm.py +0 -259
  107. dfm_python-0.5.59/tutorial/tutorial_illness_ddfm.py +0 -284
  108. dfm_python-0.5.59/tutorial/tutorial_macro_dfm.py +0 -306
  109. {dfm_python-0.5.59 → dfm_python-0.6.0}/.git +0 -0
  110. {dfm_python-0.5.59 → dfm_python-0.6.0}/.gitignore +0 -0
  111. {dfm_python-0.5.59 → dfm_python-0.6.0}/.python-version +0 -0
  112. {dfm_python-0.5.59 → dfm_python-0.6.0}/MANIFEST.in +0 -0
  113. {dfm_python-0.5.59 → dfm_python-0.6.0}/data/exchange_rate.csv +0 -0
  114. {dfm_python-0.5.59 → dfm_python-0.6.0}/data/finance.csv +0 -0
  115. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/schema/__init__.py +0 -0
  116. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/schema/block.py +0 -0
  117. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/schema/results.py +0 -0
  118. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/config/types.py +0 -0
  119. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/dataset/__init__.py +0 -0
  120. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/dataset/time.py +0 -0
  121. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/decoder/__init__.py +0 -0
  122. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/decoder/base.py +0 -0
  123. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/decoder/linear.py +0 -0
  124. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/decoder/mlp.py +0 -0
  125. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/encoder/__init__.py +0 -0
  126. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/encoder/base.py +0 -0
  127. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/encoder/simple_autoencoder.py +0 -0
  128. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/functional/__init__.py +0 -0
  129. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/logger/__init__.py +0 -0
  130. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/logger/inference_logger.py +0 -0
  131. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/logger/logger.py +0 -0
  132. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/logger/train_logger.py +0 -0
  133. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/numeric/statistic.py +0 -0
  134. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/ssm/__init__.py +0 -0
  135. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/checkpoint.py +0 -0
  136. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/errors.py +0 -0
  137. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/helper.py +0 -0
  138. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/loss.py +0 -0
  139. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/dfm_python/utils/metric.py +0 -0
  140. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/__init__.py +0 -0
  141. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/__init__.py +0 -0
  142. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/schema/__init__.py +0 -0
  143. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/schema/test_block.py +0 -0
  144. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/schema/test_model.py +0 -0
  145. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/schema/test_results.py +0 -0
  146. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/test_adapter.py +0 -0
  147. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/test_constants.py +0 -0
  148. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/config/test_types.py +0 -0
  149. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/conftest.py +0 -0
  150. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/decoder/__init__.py +0 -0
  151. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/decoder/test_linear.py +0 -0
  152. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/decoder/test_mlp.py +0 -0
  153. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/encoder/__init__.py +0 -0
  154. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/encoder/test_base.py +0 -0
  155. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/encoder/test_pca.py +0 -0
  156. /dfm_python-0.5.59/src/test/encoder/test_simple_encoder.py → /dfm_python-0.6.0/src/test/encoder/test_simple_autoencoder.py +0 -0
  157. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/functional/__init__.py +0 -0
  158. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/logger/__init__.py +0 -0
  159. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/logger/test_inference_logger.py +0 -0
  160. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/logger/test_logger.py +0 -0
  161. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/logger/test_train_logger.py +0 -0
  162. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/models/__init__.py +0 -0
  163. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/numeric/__init__.py +0 -0
  164. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/ssm/__init__.py +0 -0
  165. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/utils/__init__.py +0 -0
  166. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/utils/test_errors.py +0 -0
  167. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/utils/test_helper.py +0 -0
  168. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/utils/test_metric.py +0 -0
  169. {dfm_python-0.5.59 → dfm_python-0.6.0}/src/test/utils/test_misc.py +0 -0
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: test-runner
3
+ description: Testing specialist for running pytest, fixing test failures, and verifying implementations. Use proactively after code changes or when user requests testing.
4
+ ---
5
+
6
+ You are a testing specialist focused on running tests, diagnosing failures, and ensuring code correctness.
7
+
8
+ ## Core Responsibilities
9
+
10
+ When invoked:
11
+ 1. **Run tests** using `uv run pytest` (never use system pytest)
12
+ 2. **Analyze failures** with clear error messages and stack traces
13
+ 3. **Fix issues** directly in the code
14
+ 4. **Verify fixes** by re-running tests
15
+ 5. **Report results** concisely
16
+
17
+ ## Testing Workflow
18
+
19
+ ### 1. Environment Setup
20
+ - Always use `uv` and virtual environment (`.venv/`)
21
+ - Activate venv: `source .venv/bin/activate` OR use `uv run`
22
+ - Never use system `python` or `pytest` directly
23
+
24
+ ### 2. Running Tests
25
+
26
+ ```bash
27
+ # Run all tests
28
+ uv run pytest
29
+
30
+ # Run specific test file
31
+ uv run pytest src/test/models/test_dfm.py
32
+
33
+ # Run with verbose output
34
+ uv run pytest -v
35
+
36
+ # Run specific test function
37
+ uv run pytest src/test/models/test_dfm.py::TestDFM::test_dfm_fit
38
+ ```
39
+
40
+ ### 3. Analyzing Failures
41
+
42
+ For each failure:
43
+ - **Read the error message** carefully
44
+ - **Check the stack trace** to locate the issue
45
+ - **Identify root cause** (not just symptoms)
46
+ - **Check recent code changes** if applicable
47
+ - **Verify imports and dependencies**
48
+
49
+ ### 4. Fixing Issues
50
+
51
+ - **Fix directly** in the code (don't just report)
52
+ - **Make minimal changes** to resolve the issue
53
+ - **Preserve existing functionality** unless explicitly changing it
54
+ - **Update tests** if requirements changed (not just to make them pass)
55
+
56
+ ### 5. Verification
57
+
58
+ - **Re-run the specific failing test** first
59
+ - **Run the full test suite** if multiple tests might be affected
60
+ - **Verify no regressions** introduced
61
+
62
+ ## Common Issues and Fixes
63
+
64
+ ### Import Errors
65
+ - Check if module exists and path is correct
66
+ - Verify `__init__.py` files exist
67
+ - Check if function/class was moved or renamed
68
+ - Update imports to match current code structure
69
+
70
+ ### Assertion Failures
71
+ - Understand what the test expects vs what code produces
72
+ - Check if test expectations are outdated
73
+ - Verify logic correctness, not just make test pass
74
+
75
+ ### Missing Dependencies
76
+ - Install with `uv pip install <package>`
77
+ - Check `pyproject.toml` for required dependencies
78
+ - Verify virtual environment has all packages
79
+
80
+ ### Type Errors
81
+ - Check type hints match actual usage
82
+ - Verify imports for type annotations
83
+ - Update types if code behavior changed
84
+
85
+ ## Output Format
86
+
87
+ After running tests, provide:
88
+ 1. **Summary**: Total tests, passed, failed, skipped
89
+ 2. **Failures**: List each failure with:
90
+ - Test name and location
91
+ - Error message
92
+ - Root cause analysis
93
+ - Fix applied
94
+ 3. **Status**: All tests passing or remaining issues
95
+
96
+ ## Best Practices
97
+
98
+ - **Run tests immediately** when requested
99
+ - **Fix issues proactively** - don't just report them
100
+ - **Use uv and venv** always
101
+ - **Be thorough** but efficient
102
+ - **Verify fixes** before reporting success
103
+ - **Keep test output** concise but informative
104
+
105
+ ## Example Workflow
106
+
107
+ ```
108
+ User: "Run tests for DFM"
109
+ Assistant:
110
+ 1. Runs: `uv run pytest src/test/models/test_dfm.py -v`
111
+ 2. Sees failure: ImportError for validate_dfm_initialization
112
+ 3. Checks: Function exists in validator.py
113
+ 4. Fixes: Updates import path in test file
114
+ 5. Re-runs: `uv run pytest src/test/models/test_dfm.py::TestDFM::test_dfm_fit`
115
+ 6. Reports: "Fixed import error. All DFM tests passing."
116
+ ```
117
+
118
+ **Remember: Act quickly, fix directly, verify thoroughly.**
@@ -0,0 +1 @@
1
+ Audited 1 package in 1ms
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: dfm-python
3
+ Version: 0.6.0
4
+ Summary: Dynamic Factor Model (DFM) estimation and forecasting in Python
5
+ Project-URL: Homepage, https://github.com/yourusername/dfm-python
6
+ Project-URL: Documentation, https://github.com/yourusername/dfm-python#readme
7
+ Project-URL: Repository, https://github.com/yourusername/dfm-python
8
+ Project-URL: Issues, https://github.com/yourusername/dfm-python/issues
9
+ Author: Minkey Chang
10
+ License: MIT
11
+ Keywords: dfm,dynamic-factor-model,econometrics,forecasting,time-series
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: build>=1.4.0
22
+ Requires-Dist: einops>=0.8.1
23
+ Requires-Dist: hydra-core>=1.3.2
24
+ Requires-Dist: matplotlib>=3.5.0
25
+ Requires-Dist: numpy>=1.24.0
26
+ Requires-Dist: pandas>=2.0.0
27
+ Requires-Dist: pyarrow>=22.0.0
28
+ Requires-Dist: pykalman>=0.11.0
29
+ Requires-Dist: pytorch-lightning>=2.0.0
30
+ Requires-Dist: scikit-learn>=1.7.2
31
+ Requires-Dist: scipy>=1.10.0
32
+ Requires-Dist: sktime>=0.40.1
33
+ Requires-Dist: torch>=2.0.0
34
+ Requires-Dist: twine>=6.2.0
35
+ Provides-Extra: all
36
+ Requires-Dist: hydra-core>=1.3.0; extra == 'all'
37
+ Requires-Dist: omegaconf>=2.3.0; extra == 'all'
38
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
39
+ Requires-Dist: pytest>=7.0.0; extra == 'all'
40
+ Requires-Dist: scikit-learn>=1.0.0; extra == 'all'
41
+ Requires-Dist: sktime>=0.27.0; extra == 'all'
42
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'all'
43
+ Provides-Extra: db
44
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'db'
45
+ Provides-Extra: deep
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
48
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
49
+ Requires-Dist: scikit-learn>=1.0.0; extra == 'dev'
50
+ Provides-Extra: forecasting
51
+ Requires-Dist: sktime[forecasting]>=0.40.1; extra == 'forecasting'
52
+ Provides-Extra: hydra
53
+ Requires-Dist: hydra-core>=1.3.0; extra == 'hydra'
54
+ Requires-Dist: omegaconf>=2.3.0; extra == 'hydra'
55
+ Provides-Extra: transform
56
+ Requires-Dist: sktime>=0.27.0; extra == 'transform'
@@ -22,7 +22,7 @@ seed: 3 # Random seed (matching original seed=3)
22
22
 
23
23
  # Data Handling (used by Dataset, not Model)
24
24
  clock: d # Daily clock frequency (all series are daily)
25
- target_scaler: null # No target scaler - data should be pre-scaled before passing to Dataset
25
+ scaler: null # No scaler - data should be pre-scaled before passing to Dataset
26
26
 
27
27
  # Frequency mapping (all series are daily)
28
28
  # If not specified, all series use clock frequency (d)
@@ -20,7 +20,7 @@ seed: null # Random seed (None uses default)
20
20
 
21
21
  # Data Handling (used by Dataset, not Model)
22
22
  clock: m # Monthly clock frequency
23
- target_scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
23
+ scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
24
24
 
25
25
  # Frequency mapping (optional)
26
26
  # If not specified, all series use clock frequency
@@ -22,7 +22,7 @@ seed: null # Random seed (None uses default)
22
22
 
23
23
  # Data Handling (used by Dataset, not Model)
24
24
  clock: w # Weekly clock frequency (base frequency for latent factors)
25
- target_scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
25
+ scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
26
26
 
27
27
  # Frequency mapping for mixed-frequency macro data
28
28
  # Clock is weekly (w), so monthly series are slower frequency
@@ -0,0 +1,18 @@
1
+ # DFM Configuration for Exchange Rate Datasets
2
+ # Clock: Daily (d) - base frequency for latent factors
3
+ # Data: Daily exchange rate data (all series at same frequency)
4
+
5
+ # EM Algorithm Parameters
6
+ # NOTE: Exchange tutorial is long daily data (T~7.6k). Full EM can take hours.
7
+ # Keep tutorial runs short by capping iterations and loosening convergence.
8
+ threshold: 1.0e-04 # EM convergence threshold (tutorial-friendly)
9
+ max_iter: 50 # Maximum EM iterations (tutorial-friendly)
10
+
11
+ # Data Handling
12
+ clock: d # Daily clock frequency (base frequency for latent factors)
13
+ scaler: standard # Scaler for all series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
14
+ # Note: scaler is handled internally by the model, not set on config object
15
+ # Note: nan_method and nan_k are internal constants (not user-configurable)
16
+ num_factors: 2 # Number of factors
17
+
18
+
@@ -0,0 +1,104 @@
1
+ # DFM Configuration for Financial Datasets
2
+ # Based on coded financial indicators (D, E, I, M, P, S, V series)
3
+ # Data: 97 series (D1-D9, E1-E20, I1-I9, M1-M18, P1-P13, S1-S12, V1-V13, plus targets)
4
+ # Target: market_forward_excess_returns
5
+ # Excluded: risk_free_rate, forward_returns
6
+ # Reduced series for testing purposes
7
+
8
+ # EM Algorithm Parameters
9
+ threshold: 1.0e-05 # EM convergence threshold
10
+ max_iter: 50 # Maximum EM iterations
11
+
12
+ # Data Handling
13
+ clock: d # Daily clock frequency (finance.csv uses daily index via date_id)
14
+ scaler: standard # Scaler for all series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
15
+ # Note: scaler is handled internally by the model, not set on config object
16
+ # Note: nan_method and nan_k are internal constants (not user-configurable)
17
+
18
+ # Block Structure for Financial Data (testing configuration)
19
+ # 4 blocks, 2 factors per block (reduced from 3 for faster testing)
20
+ # This still verifies all block mechanisms while reducing state dimension
21
+ blocks:
22
+ Block_ALL:
23
+ num_factors: 2 # Reduced from 3 for faster testing
24
+ series:
25
+ # Contains all series from Block_EI, Block_MD, and Block_PSV
26
+ # From Block_EI:
27
+ - E1
28
+ - E5
29
+ - E10
30
+ - E15
31
+ - E20
32
+ - I1
33
+ - I5
34
+ - I9
35
+ # From Block_MD:
36
+ - M1
37
+ - M5
38
+ - M10
39
+ - M15
40
+ - M18
41
+ - D1
42
+ - D5
43
+ - D9
44
+ # From Block_PSV:
45
+ - P1
46
+ - P5
47
+ - P10
48
+ - P13
49
+ - S1
50
+ - S5
51
+ - S10
52
+ - V1
53
+ - V5
54
+ - V10
55
+ - market_forward_excess_returns
56
+
57
+ Block_EI:
58
+ num_factors: 2 # Reduced from 3 for faster testing
59
+ series:
60
+ # E series: ~6 series
61
+ - E1
62
+ - E5
63
+ - E10
64
+ - E15
65
+ - E20
66
+ # I series: ~4 series
67
+ - I1
68
+ - I5
69
+ - I9
70
+
71
+ Block_MD:
72
+ num_factors: 2 # Reduced from 3 for faster testing
73
+ series:
74
+ # M series: ~6 series
75
+ - M1
76
+ - M5
77
+ - M10
78
+ - M15
79
+ - M18
80
+ # D series: ~4 series
81
+ - D1
82
+ - D5
83
+ - D9
84
+
85
+ Block_PSV:
86
+ num_factors: 2 # Reduced from 3 for faster testing
87
+ series:
88
+ # P series: ~4 series
89
+ - P1
90
+ - P5
91
+ - P10
92
+ - P13
93
+ # S series: ~3 series
94
+ - S1
95
+ - S5
96
+ - S10
97
+ # V series: ~3 series
98
+ - V1
99
+ - V5
100
+ - V10
101
+ - market_forward_excess_returns
102
+
103
+ # Frequency mapping: Not required for single-frequency cases
104
+ # The code will automatically create frequency dict from data columns using clock frequency (d)
@@ -0,0 +1,84 @@
1
+ # DFM Configuration for Macroeconomic Datasets
2
+ # Based on Korean economic indicators (KO* series)
3
+ # Data: 101 series, mixed weekly/monthly frequency (1985-04-05 to 2025-11-21)
4
+ # Clock: Weekly (w) - base frequency for latent factors
5
+ # Target: KOEQUIPTE (Investment, Equipment, Estimation, SA)
6
+
7
+ # EM Algorithm Parameters
8
+ threshold: 1.0e-05 # EM convergence threshold
9
+ max_iter: 50 # Maximum EM iterations
10
+
11
+ # Numerical Stability Parameters
12
+ clip_ar_coefficients: true
13
+ ar_clip_min: -0.99
14
+ ar_clip_max: 0.99
15
+ use_regularization: true
16
+ regularization_scale: 1.0e-05
17
+
18
+ # Idiosyncratic Component Parameters
19
+ augment_idio: true
20
+ augment_idio_slow: true # Important for mixed-frequency macro data (weekly clock, monthly indicators)
21
+ idio_rho0: 0.1
22
+ idio_min_var: 1.0e-08
23
+
24
+ # Data Handling
25
+ clock: w # Weekly clock frequency (base frequency for latent factors)
26
+ scaler: standard # Scaler for all series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
27
+ # Note: scaler is handled internally by the model, not set on config object
28
+ # Note: nan_method and nan_k are internal constants (not user-configurable)
29
+
30
+ # Tent weights for mixed-frequency aggregation
31
+ # 3-period tent kernel for monthly->weekly aggregation
32
+ tent_weights:
33
+ m:w: [1, 2, 1] # 3-period tent kernel for monthly->weekly aggregation
34
+
35
+ # Block Structure for Macroeconomic Data
36
+ # Single global block for all series
37
+ # Series order: clock-frequency (weekly) first, then slower-frequency (monthly)
38
+ blocks:
39
+ Block_Global:
40
+ num_factors: 3 # Number of factors for global block
41
+ series:
42
+ # Weekly series (clock frequency) - must come first
43
+ - KORFBEV # Retail, Food & Beverages (weekly)
44
+ - KORWHLS # Retail, Wholesale (weekly)
45
+ - KORMCMP # Retail, Miscellaneous & Comparison (weekly)
46
+ - KORELEC # Retail, Electronics (weekly)
47
+ - KORCNST # Retail, Construction (weekly)
48
+ - KORMACH # Retail, Machinery (weekly)
49
+ - KOROCOINF # Retail, Other Consumer & Information (weekly)
50
+ # Monthly series (slower than clock) - must come after clock-frequency series
51
+ - KOEMPTOTO # Total employment (monthly)
52
+ - KOHWRWEMP # Hours worked (monthly)
53
+ - KOWRCDURE # Durable goods consumption (monthly)
54
+ - KOCONPRCF # Production (monthly)
55
+ - KOEQUIPTE # Investment, Equipment (monthly, target series)
56
+ - KOWRCCNSE # Consumption (monthly, target series)
57
+ - KOIMPCONA # Investment, Construction (monthly, target series)
58
+
59
+ # Frequency mapping for mixed-frequency macro data
60
+ # Clock is weekly (w), so monthly series are slower frequency
61
+ # Grouped format: frequencies are specified as lists grouped by frequency code
62
+ frequency:
63
+ # Monthly series (slower than weekly clock) - typically end-of-month observations
64
+ # These are the series used in the tutorial
65
+ m:
66
+ - KOEMPTOTO # Total employment (monthly)
67
+ - KOHWRWEMP # Hours worked (monthly)
68
+ - KOWRCDURE # Durable goods consumption (monthly)
69
+ - KOCONPRCF # Production (monthly)
70
+ - KOEQUIPTE # Investment, Equipment (monthly, target series)
71
+ - KOWRCCNSE # Consumption (monthly, target series)
72
+ - KOIMPCONA # Investment, Construction (monthly, target series)
73
+ # Weekly series (same as clock frequency - these appear every week like the clock)
74
+ # This is a mixed-frequency example: clock is weekly, but monthly series are slower
75
+ # The tutorial now respects YAML frequencies for proper mixed-frequency handling
76
+ # These weekly series are available in the data at clock frequency
77
+ w:
78
+ - KORFBEV # Retail, Food & Beverages (weekly)
79
+ - KORWHLS # Retail, Wholesale (weekly)
80
+ - KORMCMP # Retail, Miscellaneous & Comparison (weekly)
81
+ - KORELEC # Retail, Electronics (weekly)
82
+ - KORCNST # Retail, Construction (weekly)
83
+ - KORMACH # Retail, Machinery (weekly)
84
+ - KOROCOINF # Retail, Other Consumer & Information (weekly)