dfm-python 0.4.0__tar.gz → 0.4.3__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.
- {dfm_python-0.4.0 → dfm_python-0.4.3}/PKG-INFO +30 -64
- {dfm_python-0.4.0 → dfm_python-0.4.3}/README.md +20 -62
- dfm_python-0.4.3/config/experiment/base.yaml +15 -0
- dfm_python-0.4.3/config/experiment/investment_ddfm.yaml +79 -0
- dfm_python-0.4.3/config/experiment/production_dfm.yaml +61 -0
- dfm_python-0.4.3/config/experiment/production_dfm_high_factors.yaml +61 -0
- dfm_python-0.4.3/config/experiment/test_ddfm.yaml +26 -0
- dfm_python-0.4.3/config/experiment/test_dfm.yaml +26 -0
- dfm_python-0.4.3/config/model/ddfm.yaml +30 -0
- dfm_python-0.4.3/config/model/dfm.yaml +42 -0
- dfm_python-0.4.3/config/series/KO3YEARC.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBFDSAAF.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBFINAAF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBFXSAAF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBSESI_R.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBSIBCEQ.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBSIBCOQ.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBSIBNER.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBSIBNMR.yaml +11 -0
- dfm_python-0.4.3/config/series/KOBSIEMAR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBSIHAPR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBSIIMER.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBSIIMPR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBSIXMER.yaml +12 -0
- dfm_python-0.4.3/config/series/KOBUSINVR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCALL_.yaml +11 -0
- dfm_python-0.4.3/config/series/KOCNFBUSR.yaml +11 -0
- dfm_python-0.4.3/config/series/KOCNFCONR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCNGOV_D.yaml +11 -0
- dfm_python-0.4.3/config/series/KOCNPER_D.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCOBUSIR.yaml +11 -0
- dfm_python-0.4.3/config/series/KOCONPMTH.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCONPRCF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCONSTRP.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCPCOREF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCPEXFEF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCREU__A.yaml +13 -0
- dfm_python-0.4.3/config/series/KOCSECDMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSECEMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSEMEMR.yaml +13 -0
- dfm_python-0.4.3/config/series/KOCSEOHDR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSEOHSR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSHHEMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSHHLMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSMTTOA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOCSPHIMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCSPSPMR.yaml +12 -0
- dfm_python-0.4.3/config/series/KOCYLEADR.yaml +11 -0
- dfm_python-0.4.3/config/series/KODBLNEQA.yaml +13 -0
- dfm_python-0.4.3/config/series/KODBLNHSA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOEMPCONF.yaml +13 -0
- dfm_python-0.4.3/config/series/KOEMPMANF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEMPTOTO.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEMPWREP.yaml +13 -0
- dfm_python-0.4.3/config/series/KOEQUIMAE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEQUIPTE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEQUITTE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEXCHINA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOEXNGS_D.yaml +12 -0
- dfm_python-0.4.3/config/series/KOEXPGDSA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOEXPPRCF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOGCFCNSD.yaml +12 -0
- dfm_python-0.4.3/config/series/KOGCFFNVD.yaml +12 -0
- dfm_python-0.4.3/config/series/KOGDP___D.yaml +12 -0
- dfm_python-0.4.3/config/series/KOGFCF__D.yaml +12 -0
- dfm_python-0.4.3/config/series/KOHWRWEMP.yaml +12 -0
- dfm_python-0.4.3/config/series/KOIMNGS_D.yaml +11 -0
- dfm_python-0.4.3/config/series/KOIMPCONA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOIMPGDDA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOIMPGDSA.yaml +12 -0
- dfm_python-0.4.3/config/series/KOIMPPRCF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOIPALL_G.yaml +11 -0
- dfm_python-0.4.3/config/series/KOIPMIMAG.yaml +11 -0
- dfm_python-0.4.3/config/series/KOLRLTCO.yaml +12 -0
- dfm_python-0.4.3/config/series/KOLRLTHH.yaml +11 -0
- dfm_python-0.4.3/config/series/KOMPCAPGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMPCONDG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMPCONGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMPCONNG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMPRI30G.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMSCAPGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOMSCONGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KONETTRDF.yaml +13 -0
- dfm_python-0.4.3/config/series/KONEWCONA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOPICAPGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOPICONGG.yaml +12 -0
- dfm_python-0.4.3/config/series/KOPIMANUG.yaml +11 -0
- dfm_python-0.4.3/config/series/KOPOPACTE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOPPSRM_F.yaml +12 -0
- dfm_python-0.4.3/config/series/KOPROPRCF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOPSMANUG.yaml +11 -0
- dfm_python-0.4.3/config/series/KORCNST.yaml +8 -0
- dfm_python-0.4.3/config/series/KORELEC.yaml +11 -0
- dfm_python-0.4.3/config/series/KORFBEV.yaml +11 -0
- dfm_python-0.4.3/config/series/KORMACH.yaml +8 -0
- dfm_python-0.4.3/config/series/KORMCMP.yaml +8 -0
- dfm_python-0.4.3/config/series/KOROCOINF.yaml +11 -0
- dfm_python-0.4.3/config/series/KORWHLS.yaml +11 -0
- dfm_python-0.4.3/config/series/KOSHRPRCF.yaml +12 -0
- dfm_python-0.4.3/config/series/KOSIAHOTE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOSIAI__E.yaml +12 -0
- dfm_python-0.4.3/config/series/KOSIARRLE.yaml +11 -0
- dfm_python-0.4.3/config/series/KOSIAWRTE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOSSBFMBE.yaml +11 -0
- dfm_python-0.4.3/config/series/KOUN_TOTQ.yaml +12 -0
- dfm_python-0.4.3/config/series/KOUS____.yaml +13 -0
- dfm_python-0.4.3/config/series/KOVALCONA.yaml +13 -0
- dfm_python-0.4.3/config/series/KOWRCCNSE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOWRCDURE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOWRCNODE.yaml +12 -0
- dfm_python-0.4.3/config/series/KOWRCSEME.yaml +12 -0
- dfm_python-0.4.3/data/sample_data.csv +2539 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/pyproject.toml +10 -2
- dfm_python-0.4.3/src/dfm_python/__init__.py +170 -0
- dfm_python-0.4.3/src/dfm_python/config/__init__.py +60 -0
- dfm_python-0.4.0/src/dfm_python/config/io.py → dfm_python-0.4.3/src/dfm_python/config/adapter.py +188 -396
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/config/results.py +54 -21
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/config/schema.py +400 -209
- dfm_python-0.4.0/src/dfm_python/config/structure.py → dfm_python-0.4.3/src/dfm_python/config/utils.py +114 -24
- dfm_python-0.4.3/src/dfm_python/data/__init__.py +28 -0
- dfm_python-0.4.3/src/dfm_python/data/dataloader.py +140 -0
- dfm_python-0.4.3/src/dfm_python/data/dataset.py +154 -0
- {dfm_python-0.4.0/src/dfm_python/transformations → dfm_python-0.4.3/src/dfm_python/data}/utils.py +30 -32
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/encoder/__init__.py +8 -2
- dfm_python-0.4.3/src/dfm_python/encoder/base.py +111 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/encoder/pca.py +142 -3
- dfm_python-0.4.3/src/dfm_python/encoder/vae.py +551 -0
- dfm_python-0.4.3/src/dfm_python/lightning/__init__.py +63 -0
- dfm_python-0.4.3/src/dfm_python/lightning/data_module.py +686 -0
- dfm_python-0.4.3/src/dfm_python/lightning/scaling.py +432 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/logger/__init__.py +2 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/logger/inference_logger.py +60 -17
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/logger/logger.py +13 -3
- dfm_python-0.4.3/src/dfm_python/logger/train_logger.py +533 -0
- dfm_python-0.4.3/src/dfm_python/models/__init__.py +24 -0
- dfm_python-0.4.3/src/dfm_python/models/base.py +564 -0
- dfm_python-0.4.3/src/dfm_python/models/ddfm.py +2410 -0
- dfm_python-0.4.0/src/dfm_python/lightning/dfm_module.py → dfm_python-0.4.3/src/dfm_python/models/dfm.py +292 -47
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/models/estimation.py +54 -35
- dfm_python-0.4.3/src/dfm_python/nowcast/__init__.py +37 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/nowcast/dataview.py +7 -7
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/nowcast/helpers.py +32 -228
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/nowcast/nowcast.py +274 -29
- dfm_python-0.4.3/src/dfm_python/nowcast/splitters.py +431 -0
- dfm_python-0.4.3/src/dfm_python/nowcast/transformers.py +330 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/nowcast/utils.py +20 -21
- dfm_python-0.4.3/src/dfm_python/ssm/em.py +775 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/ssm/kalman.py +14 -28
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/ssm/utils.py +5 -2
- dfm_python-0.4.3/src/dfm_python/trainer/__init__.py +739 -0
- dfm_python-0.4.3/src/dfm_python/trainer/ddfm.py +177 -0
- dfm_python-0.4.3/src/dfm_python/trainer/dfm.py +155 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/__init__.py +26 -56
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/data.py +44 -211
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/diagnostics.py +28 -23
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/helpers.py +26 -105
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/statespace.py +83 -142
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/utils/time.py +148 -249
- dfm_python-0.4.3/src/test/test_config.py +383 -0
- dfm_python-0.4.3/src/test/test_helpers.py +427 -0
- dfm_python-0.4.3/src/test/test_logger.py +190 -0
- dfm_python-0.4.3/src/test/test_models.py +319 -0
- dfm_python-0.4.3/src/test/test_nowcast.py +348 -0
- dfm_python-0.4.3/src/test/test_pipeline_ddfm.py +830 -0
- dfm_python-0.4.3/src/test/test_pipeline_dfm.py +718 -0
- dfm_python-0.4.3/src/test/test_sktime_integration.py +447 -0
- dfm_python-0.4.3/src/test/test_ssm.py +371 -0
- dfm_python-0.4.3/src/test/test_trainer.py +232 -0
- dfm_python-0.4.3/src/test/test_utils.py +373 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/uv.lock +1681 -124
- dfm_python-0.4.0/.git +0 -1
- dfm_python-0.4.0/SKTIME_INTEGRATION_PLAN.md +0 -562
- dfm_python-0.4.0/config/blocks/default.yaml +0 -29
- dfm_python-0.4.0/config/blocks/sample_spec.yaml +0 -29
- dfm_python-0.4.0/config/blocks/sample_spec2.yaml +0 -29
- dfm_python-0.4.0/config/default.yaml +0 -70
- dfm_python-0.4.0/config/experiment/ddfm_example.yaml +0 -26
- dfm_python-0.4.0/config/experiment/exp1.yaml +0 -14
- dfm_python-0.4.0/config/experiment/exp2.yaml +0 -14
- dfm_python-0.4.0/config/experiment/exp3.yaml +0 -14
- dfm_python-0.4.0/config/series/default.yaml +0 -749
- dfm_python-0.4.0/config/series/sample_spec.yaml +0 -749
- dfm_python-0.4.0/config/series/sample_spec2.yaml +0 -699
- dfm_python-0.4.0/data/mdfred_snapshot_monthly.csv +0 -780
- dfm_python-0.4.0/data/mdfred_snapshot_quarterly.csv +0 -262
- dfm_python-0.4.0/data/sample_data.csv +0 -490
- dfm_python-0.4.0/data/sample_spec.csv +0 -85
- dfm_python-0.4.0/full_tutorial_example.ipynb +0 -2265
- dfm_python-0.4.0/src/dfm_python/__init__.py +0 -236
- dfm_python-0.4.0/src/dfm_python/config/__init__.py +0 -65
- dfm_python-0.4.0/src/dfm_python/config/params.py +0 -202
- dfm_python-0.4.0/src/dfm_python/config/utils.py +0 -93
- dfm_python-0.4.0/src/dfm_python/encoder/base.py +0 -0
- dfm_python-0.4.0/src/dfm_python/encoder/vae.py +0 -291
- dfm_python-0.4.0/src/dfm_python/lightning/__init__.py +0 -48
- dfm_python-0.4.0/src/dfm_python/lightning/data_module.py +0 -364
- dfm_python-0.4.0/src/dfm_python/lightning/ddfm_module.py +0 -553
- dfm_python-0.4.0/src/dfm_python/logger/train_logger.py +0 -309
- dfm_python-0.4.0/src/dfm_python/models/__init__.py +0 -36
- dfm_python-0.4.0/src/dfm_python/models/base.py +0 -94
- dfm_python-0.4.0/src/dfm_python/models/ddfm.py +0 -1120
- dfm_python-0.4.0/src/dfm_python/models/dfm.py +0 -810
- dfm_python-0.4.0/src/dfm_python/nowcast/__init__.py +0 -28
- dfm_python-0.4.0/src/dfm_python/ssm/em.py +0 -488
- dfm_python-0.4.0/src/dfm_python/trainer/__init__.py +0 -20
- dfm_python-0.4.0/src/dfm_python/trainer/ddfm.py +0 -196
- dfm_python-0.4.0/src/dfm_python/trainer/dfm.py +0 -153
- dfm_python-0.4.0/src/dfm_python/transformations/__init__.py +0 -35
- dfm_python-0.4.0/src/dfm_python/transformations/sktime.py +0 -40
- dfm_python-0.4.0/src/dfm_python/transformations/transformers.py +0 -320
- dfm_python-0.4.0/src/test/__init__.py +0 -226
- dfm_python-0.4.0/src/test/test_ddfm.py +0 -681
- dfm_python-0.4.0/src/test/test_dfm.py +0 -450
- dfm_python-0.4.0/src/test/test_lightning_module.py +0 -678
- dfm_python-0.4.0/src/test/test_nowcast.py +0 -516
- dfm_python-0.4.0/src/test/test_trainer.py +0 -54
- dfm_python-0.4.0/src/test/test_transformations.py +0 -1151
- dfm_python-0.4.0/test_comprehensive.py +0 -1
- {dfm_python-0.4.0 → dfm_python-0.4.3}/.gitignore +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/.python-version +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/LICENSE +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/MANIFEST.in +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/lightning/callbacks.py +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/lightning/utils.py +0 -0
- {dfm_python-0.4.0 → dfm_python-0.4.3}/src/dfm_python/ssm/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dfm-python
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Dynamic Factor Model (DFM) estimation and nowcasting in Python
|
|
5
5
|
Project-URL: Homepage, https://github.com/yourusername/dfm-python
|
|
6
6
|
Project-URL: Documentation, https://github.com/yourusername/dfm-python#readme
|
|
@@ -22,13 +22,18 @@ Requires-Python: >=3.10
|
|
|
22
22
|
Requires-Dist: hydra-core>=1.3.2
|
|
23
23
|
Requires-Dist: matplotlib>=3.5.0
|
|
24
24
|
Requires-Dist: numpy>=1.24.0
|
|
25
|
-
Requires-Dist:
|
|
25
|
+
Requires-Dist: pandas>=2.0.0
|
|
26
|
+
Requires-Dist: pyarrow>=22.0.0
|
|
27
|
+
Requires-Dist: pytorch-lightning>=2.0.0
|
|
28
|
+
Requires-Dist: scikit-learn>=1.7.2
|
|
26
29
|
Requires-Dist: scipy>=1.10.0
|
|
30
|
+
Requires-Dist: sktime>=0.40.1
|
|
27
31
|
Requires-Dist: torch>=2.0.0
|
|
28
32
|
Requires-Dist: twine>=6.2.0
|
|
29
33
|
Provides-Extra: all
|
|
30
34
|
Requires-Dist: hydra-core>=1.3.0; extra == 'all'
|
|
31
35
|
Requires-Dist: omegaconf>=2.3.0; extra == 'all'
|
|
36
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
|
|
32
37
|
Requires-Dist: pytest>=7.0.0; extra == 'all'
|
|
33
38
|
Requires-Dist: scikit-learn>=1.0.0; extra == 'all'
|
|
34
39
|
Requires-Dist: sktime>=0.27.0; extra == 'all'
|
|
@@ -37,8 +42,11 @@ Provides-Extra: db
|
|
|
37
42
|
Requires-Dist: sqlalchemy>=2.0.0; extra == 'db'
|
|
38
43
|
Provides-Extra: deep
|
|
39
44
|
Provides-Extra: dev
|
|
45
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
40
46
|
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
41
47
|
Requires-Dist: scikit-learn>=1.0.0; extra == 'dev'
|
|
48
|
+
Provides-Extra: forecasting
|
|
49
|
+
Requires-Dist: sktime[forecasting]>=0.40.1; extra == 'forecasting'
|
|
42
50
|
Provides-Extra: hydra
|
|
43
51
|
Requires-Dist: hydra-core>=1.3.0; extra == 'hydra'
|
|
44
52
|
Requires-Dist: omegaconf>=2.3.0; extra == 'hydra'
|
|
@@ -72,7 +80,7 @@ A Dynamic Factor Model is a powerful statistical framework that:
|
|
|
72
80
|
- ✅ **Clock-based framework**: All factors evolve at a common clock frequency (configurable: daily, weekly, monthly, quarterly, semi-annual, annual)
|
|
73
81
|
- ✅ **Block structure**: Flexible factor organization (global common factor + sector-specific factors)
|
|
74
82
|
- ✅ **Idiosyncratic components**: Per-series state augmentation for better fit (AR(1) for clock-frequency, tent-length chains for slower frequencies)
|
|
75
|
-
- ✅ **
|
|
83
|
+
- ✅ **Preprocessed data**: Package expects preprocessed data from users - users handle all preprocessing (imputation, scaling, feature engineering) using sktime or other tools
|
|
76
84
|
- ✅ **News decomposition**: Attribute forecast changes to specific data releases
|
|
77
85
|
- ✅ **Nowcasting & Forecasting**: Generate predictions for any horizon
|
|
78
86
|
- ✅ **Deep Dynamic Factor Models (DDFM)**: Nonlinear encoder with PyTorch for capturing complex factor structures (optional, requires `dfm-python[deep]`)
|
|
@@ -97,7 +105,7 @@ pip install dfm-python
|
|
|
97
105
|
**Requirements**:
|
|
98
106
|
- Python >= 3.10
|
|
99
107
|
- numpy >= 1.24.0
|
|
100
|
-
-
|
|
108
|
+
- pandas >= 2.0.0
|
|
101
109
|
- scipy >= 1.10.0
|
|
102
110
|
|
|
103
111
|
Optional dependencies:
|
|
@@ -113,7 +121,7 @@ Optional dependencies:
|
|
|
113
121
|
import dfm_python as dfm
|
|
114
122
|
import numpy as np
|
|
115
123
|
from datetime import datetime
|
|
116
|
-
import
|
|
124
|
+
import pandas as pd
|
|
117
125
|
|
|
118
126
|
# Generate or load your data (T × N: time periods × series)
|
|
119
127
|
# Data should be standardized or will be standardized automatically
|
|
@@ -209,36 +217,25 @@ dfm.train(max_iter=5000, threshold=1e-5)
|
|
|
209
217
|
X_forecast, Z_forecast = dfm.predict(horizon=None) # Or specify: horizon=12
|
|
210
218
|
```
|
|
211
219
|
|
|
212
|
-
### Example 3: Using
|
|
220
|
+
### Example 3: Using YAML Configuration (Recommended)
|
|
213
221
|
|
|
214
222
|
```python
|
|
215
223
|
import dfm_python as dfm
|
|
216
|
-
from dfm_python.config import Params
|
|
217
|
-
import polars as pl
|
|
218
|
-
|
|
219
|
-
# 1. Create spec CSV (see Data Format section)
|
|
220
|
-
# 2. Load configuration
|
|
221
|
-
params = Params(
|
|
222
|
-
max_iter=5000,
|
|
223
|
-
threshold=1e-5,
|
|
224
|
-
clock='m',
|
|
225
|
-
augment_idio=True, # Enable idio components
|
|
226
|
-
idio_rho0=0.1 # Initial AR coefficient for idio
|
|
227
|
-
)
|
|
228
|
-
spec_df = pl.read_csv('data/spec.csv')
|
|
229
|
-
dfm.from_spec_df(spec_df, params=params)
|
|
230
224
|
|
|
231
|
-
#
|
|
225
|
+
# 1. Load configuration from YAML file
|
|
226
|
+
dfm.from_yaml('config/default.yaml')
|
|
227
|
+
|
|
228
|
+
# 2. Load data
|
|
232
229
|
dfm.load_data('data/data.csv', sample_start='2020-01-01', sample_end='2023-12-31')
|
|
233
230
|
|
|
234
|
-
#
|
|
231
|
+
# 3. Train
|
|
235
232
|
dfm.train()
|
|
236
233
|
|
|
237
|
-
#
|
|
234
|
+
# 4. Forecast and visualize (horizon=None defaults to 1 year of periods)
|
|
238
235
|
X_forecast, Z_forecast = dfm.predict(horizon=None) # Or specify: horizon=12
|
|
239
236
|
dfm.plot(kind='factor', factor_index=0, forecast_horizon=None, save_path='factor_forecast.png')
|
|
240
237
|
|
|
241
|
-
#
|
|
238
|
+
# 5. Access results
|
|
242
239
|
result = dfm.get_result()
|
|
243
240
|
print(f"Converged: {result.converged}, Iterations: {result.num_iter}")
|
|
244
241
|
print(f"Log-likelihood: {result.loglik:.2f}")
|
|
@@ -291,28 +288,7 @@ decomposition abilities (which require the data view).
|
|
|
291
288
|
|
|
292
289
|
The package supports multiple ways to configure your model:
|
|
293
290
|
|
|
294
|
-
#### 1.
|
|
295
|
-
|
|
296
|
-
**Best for**: Users with existing CSV files and Excel-based workflows
|
|
297
|
-
|
|
298
|
-
```python
|
|
299
|
-
from dfm_python.config import Params
|
|
300
|
-
import polars as pl
|
|
301
|
-
|
|
302
|
-
params = Params(
|
|
303
|
-
max_iter=5000,
|
|
304
|
-
threshold=1e-5,
|
|
305
|
-
clock='m',
|
|
306
|
-
augment_idio=True,
|
|
307
|
-
augment_idio_slow=True,
|
|
308
|
-
idio_rho0=0.1,
|
|
309
|
-
idio_min_var=1e-8
|
|
310
|
-
)
|
|
311
|
-
spec_df = pl.read_csv('data/spec.csv')
|
|
312
|
-
dfm.from_spec_df(spec_df, params=params)
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
#### 2. YAML Configuration
|
|
291
|
+
#### 1. YAML Configuration
|
|
316
292
|
|
|
317
293
|
**Best for**: Users who prefer declarative configuration files
|
|
318
294
|
|
|
@@ -325,7 +301,7 @@ dfm.load_data('data/sample_data.csv')
|
|
|
325
301
|
dfm.train()
|
|
326
302
|
```
|
|
327
303
|
|
|
328
|
-
####
|
|
304
|
+
#### 2. Hydra Decorator (Advanced)
|
|
329
305
|
|
|
330
306
|
**Best for**: Users already using Hydra for configuration management
|
|
331
307
|
|
|
@@ -350,7 +326,7 @@ if __name__ == "__main__":
|
|
|
350
326
|
|
|
351
327
|
**CLI Overrides**: `python script.py max_iter=10 threshold=1e-4 blocks.Block_Global.factors=2`
|
|
352
328
|
|
|
353
|
-
####
|
|
329
|
+
#### 3. Direct Python Objects
|
|
354
330
|
|
|
355
331
|
**Best for**: Programmatic configuration and integration with other Python code
|
|
356
332
|
|
|
@@ -453,7 +429,7 @@ Date,gdp_real,consumption,investment,employment,retail_sales
|
|
|
453
429
|
**Notes**:
|
|
454
430
|
- Quarterly series (e.g., `gdp_real`) only have values at quarter-end months
|
|
455
431
|
- Monthly series (e.g., `employment`, `retail_sales`) have values every month
|
|
456
|
-
-
|
|
432
|
+
- **Data must be preprocessed**: Users must handle missing values, scaling, and feature engineering before passing data to the package. Use sktime or other tools for preprocessing.
|
|
457
433
|
|
|
458
434
|
### Supported Frequencies
|
|
459
435
|
|
|
@@ -850,11 +826,9 @@ config = DFMConfig(series=series, blocks=blocks)
|
|
|
850
826
|
|
|
851
827
|
```python
|
|
852
828
|
import dfm_python as dfm
|
|
853
|
-
import
|
|
829
|
+
import pandas as pd
|
|
854
830
|
|
|
855
831
|
# Configuration
|
|
856
|
-
spec_df = pl.read_csv(spec_path)
|
|
857
|
-
dfm.from_spec_df(spec_df, params=None) # Convert spec DataFrame to YAML + load
|
|
858
832
|
dfm.from_yaml(yaml_path) # Load from YAML file
|
|
859
833
|
dfm.from_dict(config_dict) # Load from dictionary
|
|
860
834
|
dfm.load_config(hydra=cfg) # Load from Hydra DictConfig
|
|
@@ -1135,13 +1109,6 @@ python tutorial/basic_tutorial.py \
|
|
|
1135
1109
|
--config-name default \
|
|
1136
1110
|
data_path=data/sample_data.csv
|
|
1137
1111
|
|
|
1138
|
-
# Convert spec CSV to YAML first, then use
|
|
1139
|
-
python -c "import dfm_python as dfm; dfm.from_spec('data/sample_spec.csv')"
|
|
1140
|
-
python tutorial/basic_tutorial.py \
|
|
1141
|
-
--config-path config \
|
|
1142
|
-
--config-name sample_spec \
|
|
1143
|
-
data_path=data/sample_data.csv
|
|
1144
|
-
|
|
1145
1112
|
# With CLI overrides
|
|
1146
1113
|
python tutorial/basic_tutorial.py \
|
|
1147
1114
|
--config-path config \
|
|
@@ -1154,7 +1121,6 @@ python tutorial/basic_tutorial.py \
|
|
|
1154
1121
|
|
|
1155
1122
|
Comprehensive tutorial covering:
|
|
1156
1123
|
- **Hydra-based configuration**: All configs managed through YAML files
|
|
1157
|
-
- **Spec CSV conversion**: Convert CSV to YAML using `dfm.from_spec()`, then load via Hydra
|
|
1158
1124
|
- **CLI parameter overrides**: Override any parameter via command line
|
|
1159
1125
|
- **Data preparation and transformation**
|
|
1160
1126
|
- **Model training and convergence**
|
|
@@ -1217,14 +1183,14 @@ DATA_VIEW_SOURCE=file # or database
|
|
|
1217
1183
|
|
|
1218
1184
|
### Recent Improvements (v0.3.1)
|
|
1219
1185
|
|
|
1220
|
-
- ✅ **
|
|
1221
|
-
`create_data_view()` now applies release-date masks via
|
|
1186
|
+
- ✅ **Pandas-backed Data Views + Kalman Cache**
|
|
1187
|
+
`create_data_view()` now applies release-date masks via pandas, avoiding per-view NumPy copies. `Nowcast.backtest()` reuses cached Kalman filter/smoother states across successive data views, giving large speed-ups for 12-step pseudo real-time tests.
|
|
1222
1188
|
- ✅ **Backtest Trajectory Plot**
|
|
1223
1189
|
`BacktestResult.plot_trajectory()` draws 이전 vs. 업데이트 nowcast curves plus monthly actuals along a relative week axis (`-12주 … 현재`). The tutorial simply calls this helper—no more hand-built plotting code.
|
|
1224
1190
|
- ✅ **Higher-Frequency Backsteps**
|
|
1225
1191
|
`Nowcast.backtest(..., backward_steps=12, higher_freq=True)` now emits weekly snapshots even when the model clock is monthly, so you can inspect 12주 worth of “pseudo releases” immediately.
|
|
1226
1192
|
- ✅ **Reload & Reuse**
|
|
1227
|
-
`DFM.load_pickle()` restores config, time index, and cached
|
|
1193
|
+
`DFM.load_pickle()` restores config, time index, and cached pandas data views so you can call `predict()`/`nowcast()` right after loading without re-reading CSVs.
|
|
1228
1194
|
- ✅ **API + Docs Refresh**
|
|
1229
1195
|
README/tutorial sections now highlight the faster backtests, new trajectory plots, and guidelines for interpreting flattened Q-matrix values or “strange” news decomposition outputs.
|
|
1230
1196
|
|
|
@@ -1238,7 +1204,7 @@ DATA_VIEW_SOURCE=file # or database
|
|
|
1238
1204
|
- ✅ **Model Result Storage**: File-based and SQLite adapters for saving/loading model results
|
|
1239
1205
|
- ✅ **Data View Management**: Time-point specific data views for pseudo real-time evaluation
|
|
1240
1206
|
- ✅ **Helper Function Consolidation**: Reduced code duplication with consolidated helper functions
|
|
1241
|
-
- `to_python_datetime()`: Generic datetime conversion (handles
|
|
1207
|
+
- `to_python_datetime()`: Generic datetime conversion (handles pandas Timestamp, strings, etc.)
|
|
1242
1208
|
- `extract_last_date()`: Generic time index extraction
|
|
1243
1209
|
- `clock_to_datetime_freq()`: Shared clock-to-datetime frequency mapping
|
|
1244
1210
|
- `get_periods_per_year()`: Generic periods-per-year calculation
|
|
@@ -24,7 +24,7 @@ A Dynamic Factor Model is a powerful statistical framework that:
|
|
|
24
24
|
- ✅ **Clock-based framework**: All factors evolve at a common clock frequency (configurable: daily, weekly, monthly, quarterly, semi-annual, annual)
|
|
25
25
|
- ✅ **Block structure**: Flexible factor organization (global common factor + sector-specific factors)
|
|
26
26
|
- ✅ **Idiosyncratic components**: Per-series state augmentation for better fit (AR(1) for clock-frequency, tent-length chains for slower frequencies)
|
|
27
|
-
- ✅ **
|
|
27
|
+
- ✅ **Preprocessed data**: Package expects preprocessed data from users - users handle all preprocessing (imputation, scaling, feature engineering) using sktime or other tools
|
|
28
28
|
- ✅ **News decomposition**: Attribute forecast changes to specific data releases
|
|
29
29
|
- ✅ **Nowcasting & Forecasting**: Generate predictions for any horizon
|
|
30
30
|
- ✅ **Deep Dynamic Factor Models (DDFM)**: Nonlinear encoder with PyTorch for capturing complex factor structures (optional, requires `dfm-python[deep]`)
|
|
@@ -49,7 +49,7 @@ pip install dfm-python
|
|
|
49
49
|
**Requirements**:
|
|
50
50
|
- Python >= 3.10
|
|
51
51
|
- numpy >= 1.24.0
|
|
52
|
-
-
|
|
52
|
+
- pandas >= 2.0.0
|
|
53
53
|
- scipy >= 1.10.0
|
|
54
54
|
|
|
55
55
|
Optional dependencies:
|
|
@@ -65,7 +65,7 @@ Optional dependencies:
|
|
|
65
65
|
import dfm_python as dfm
|
|
66
66
|
import numpy as np
|
|
67
67
|
from datetime import datetime
|
|
68
|
-
import
|
|
68
|
+
import pandas as pd
|
|
69
69
|
|
|
70
70
|
# Generate or load your data (T × N: time periods × series)
|
|
71
71
|
# Data should be standardized or will be standardized automatically
|
|
@@ -161,36 +161,25 @@ dfm.train(max_iter=5000, threshold=1e-5)
|
|
|
161
161
|
X_forecast, Z_forecast = dfm.predict(horizon=None) # Or specify: horizon=12
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
### Example 3: Using
|
|
164
|
+
### Example 3: Using YAML Configuration (Recommended)
|
|
165
165
|
|
|
166
166
|
```python
|
|
167
167
|
import dfm_python as dfm
|
|
168
|
-
from dfm_python.config import Params
|
|
169
|
-
import polars as pl
|
|
170
|
-
|
|
171
|
-
# 1. Create spec CSV (see Data Format section)
|
|
172
|
-
# 2. Load configuration
|
|
173
|
-
params = Params(
|
|
174
|
-
max_iter=5000,
|
|
175
|
-
threshold=1e-5,
|
|
176
|
-
clock='m',
|
|
177
|
-
augment_idio=True, # Enable idio components
|
|
178
|
-
idio_rho0=0.1 # Initial AR coefficient for idio
|
|
179
|
-
)
|
|
180
|
-
spec_df = pl.read_csv('data/spec.csv')
|
|
181
|
-
dfm.from_spec_df(spec_df, params=params)
|
|
182
168
|
|
|
183
|
-
#
|
|
169
|
+
# 1. Load configuration from YAML file
|
|
170
|
+
dfm.from_yaml('config/default.yaml')
|
|
171
|
+
|
|
172
|
+
# 2. Load data
|
|
184
173
|
dfm.load_data('data/data.csv', sample_start='2020-01-01', sample_end='2023-12-31')
|
|
185
174
|
|
|
186
|
-
#
|
|
175
|
+
# 3. Train
|
|
187
176
|
dfm.train()
|
|
188
177
|
|
|
189
|
-
#
|
|
178
|
+
# 4. Forecast and visualize (horizon=None defaults to 1 year of periods)
|
|
190
179
|
X_forecast, Z_forecast = dfm.predict(horizon=None) # Or specify: horizon=12
|
|
191
180
|
dfm.plot(kind='factor', factor_index=0, forecast_horizon=None, save_path='factor_forecast.png')
|
|
192
181
|
|
|
193
|
-
#
|
|
182
|
+
# 5. Access results
|
|
194
183
|
result = dfm.get_result()
|
|
195
184
|
print(f"Converged: {result.converged}, Iterations: {result.num_iter}")
|
|
196
185
|
print(f"Log-likelihood: {result.loglik:.2f}")
|
|
@@ -243,28 +232,7 @@ decomposition abilities (which require the data view).
|
|
|
243
232
|
|
|
244
233
|
The package supports multiple ways to configure your model:
|
|
245
234
|
|
|
246
|
-
#### 1.
|
|
247
|
-
|
|
248
|
-
**Best for**: Users with existing CSV files and Excel-based workflows
|
|
249
|
-
|
|
250
|
-
```python
|
|
251
|
-
from dfm_python.config import Params
|
|
252
|
-
import polars as pl
|
|
253
|
-
|
|
254
|
-
params = Params(
|
|
255
|
-
max_iter=5000,
|
|
256
|
-
threshold=1e-5,
|
|
257
|
-
clock='m',
|
|
258
|
-
augment_idio=True,
|
|
259
|
-
augment_idio_slow=True,
|
|
260
|
-
idio_rho0=0.1,
|
|
261
|
-
idio_min_var=1e-8
|
|
262
|
-
)
|
|
263
|
-
spec_df = pl.read_csv('data/spec.csv')
|
|
264
|
-
dfm.from_spec_df(spec_df, params=params)
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
#### 2. YAML Configuration
|
|
235
|
+
#### 1. YAML Configuration
|
|
268
236
|
|
|
269
237
|
**Best for**: Users who prefer declarative configuration files
|
|
270
238
|
|
|
@@ -277,7 +245,7 @@ dfm.load_data('data/sample_data.csv')
|
|
|
277
245
|
dfm.train()
|
|
278
246
|
```
|
|
279
247
|
|
|
280
|
-
####
|
|
248
|
+
#### 2. Hydra Decorator (Advanced)
|
|
281
249
|
|
|
282
250
|
**Best for**: Users already using Hydra for configuration management
|
|
283
251
|
|
|
@@ -302,7 +270,7 @@ if __name__ == "__main__":
|
|
|
302
270
|
|
|
303
271
|
**CLI Overrides**: `python script.py max_iter=10 threshold=1e-4 blocks.Block_Global.factors=2`
|
|
304
272
|
|
|
305
|
-
####
|
|
273
|
+
#### 3. Direct Python Objects
|
|
306
274
|
|
|
307
275
|
**Best for**: Programmatic configuration and integration with other Python code
|
|
308
276
|
|
|
@@ -405,7 +373,7 @@ Date,gdp_real,consumption,investment,employment,retail_sales
|
|
|
405
373
|
**Notes**:
|
|
406
374
|
- Quarterly series (e.g., `gdp_real`) only have values at quarter-end months
|
|
407
375
|
- Monthly series (e.g., `employment`, `retail_sales`) have values every month
|
|
408
|
-
-
|
|
376
|
+
- **Data must be preprocessed**: Users must handle missing values, scaling, and feature engineering before passing data to the package. Use sktime or other tools for preprocessing.
|
|
409
377
|
|
|
410
378
|
### Supported Frequencies
|
|
411
379
|
|
|
@@ -802,11 +770,9 @@ config = DFMConfig(series=series, blocks=blocks)
|
|
|
802
770
|
|
|
803
771
|
```python
|
|
804
772
|
import dfm_python as dfm
|
|
805
|
-
import
|
|
773
|
+
import pandas as pd
|
|
806
774
|
|
|
807
775
|
# Configuration
|
|
808
|
-
spec_df = pl.read_csv(spec_path)
|
|
809
|
-
dfm.from_spec_df(spec_df, params=None) # Convert spec DataFrame to YAML + load
|
|
810
776
|
dfm.from_yaml(yaml_path) # Load from YAML file
|
|
811
777
|
dfm.from_dict(config_dict) # Load from dictionary
|
|
812
778
|
dfm.load_config(hydra=cfg) # Load from Hydra DictConfig
|
|
@@ -1087,13 +1053,6 @@ python tutorial/basic_tutorial.py \
|
|
|
1087
1053
|
--config-name default \
|
|
1088
1054
|
data_path=data/sample_data.csv
|
|
1089
1055
|
|
|
1090
|
-
# Convert spec CSV to YAML first, then use
|
|
1091
|
-
python -c "import dfm_python as dfm; dfm.from_spec('data/sample_spec.csv')"
|
|
1092
|
-
python tutorial/basic_tutorial.py \
|
|
1093
|
-
--config-path config \
|
|
1094
|
-
--config-name sample_spec \
|
|
1095
|
-
data_path=data/sample_data.csv
|
|
1096
|
-
|
|
1097
1056
|
# With CLI overrides
|
|
1098
1057
|
python tutorial/basic_tutorial.py \
|
|
1099
1058
|
--config-path config \
|
|
@@ -1106,7 +1065,6 @@ python tutorial/basic_tutorial.py \
|
|
|
1106
1065
|
|
|
1107
1066
|
Comprehensive tutorial covering:
|
|
1108
1067
|
- **Hydra-based configuration**: All configs managed through YAML files
|
|
1109
|
-
- **Spec CSV conversion**: Convert CSV to YAML using `dfm.from_spec()`, then load via Hydra
|
|
1110
1068
|
- **CLI parameter overrides**: Override any parameter via command line
|
|
1111
1069
|
- **Data preparation and transformation**
|
|
1112
1070
|
- **Model training and convergence**
|
|
@@ -1169,14 +1127,14 @@ DATA_VIEW_SOURCE=file # or database
|
|
|
1169
1127
|
|
|
1170
1128
|
### Recent Improvements (v0.3.1)
|
|
1171
1129
|
|
|
1172
|
-
- ✅ **
|
|
1173
|
-
`create_data_view()` now applies release-date masks via
|
|
1130
|
+
- ✅ **Pandas-backed Data Views + Kalman Cache**
|
|
1131
|
+
`create_data_view()` now applies release-date masks via pandas, avoiding per-view NumPy copies. `Nowcast.backtest()` reuses cached Kalman filter/smoother states across successive data views, giving large speed-ups for 12-step pseudo real-time tests.
|
|
1174
1132
|
- ✅ **Backtest Trajectory Plot**
|
|
1175
1133
|
`BacktestResult.plot_trajectory()` draws 이전 vs. 업데이트 nowcast curves plus monthly actuals along a relative week axis (`-12주 … 현재`). The tutorial simply calls this helper—no more hand-built plotting code.
|
|
1176
1134
|
- ✅ **Higher-Frequency Backsteps**
|
|
1177
1135
|
`Nowcast.backtest(..., backward_steps=12, higher_freq=True)` now emits weekly snapshots even when the model clock is monthly, so you can inspect 12주 worth of “pseudo releases” immediately.
|
|
1178
1136
|
- ✅ **Reload & Reuse**
|
|
1179
|
-
`DFM.load_pickle()` restores config, time index, and cached
|
|
1137
|
+
`DFM.load_pickle()` restores config, time index, and cached pandas data views so you can call `predict()`/`nowcast()` right after loading without re-reading CSVs.
|
|
1180
1138
|
- ✅ **API + Docs Refresh**
|
|
1181
1139
|
README/tutorial sections now highlight the faster backtests, new trajectory plots, and guidelines for interpreting flattened Q-matrix values or “strange” news decomposition outputs.
|
|
1182
1140
|
|
|
@@ -1190,7 +1148,7 @@ DATA_VIEW_SOURCE=file # or database
|
|
|
1190
1148
|
- ✅ **Model Result Storage**: File-based and SQLite adapters for saving/loading model results
|
|
1191
1149
|
- ✅ **Data View Management**: Time-point specific data views for pseudo real-time evaluation
|
|
1192
1150
|
- ✅ **Helper Function Consolidation**: Reduced code duplication with consolidated helper functions
|
|
1193
|
-
- `to_python_datetime()`: Generic datetime conversion (handles
|
|
1151
|
+
- `to_python_datetime()`: Generic datetime conversion (handles pandas Timestamp, strings, etc.)
|
|
1194
1152
|
- `extract_last_date()`: Generic time index extraction
|
|
1195
1153
|
- `clock_to_datetime_freq()`: Shared clock-to-datetime frequency mapping
|
|
1196
1154
|
- `get_periods_per_year()`: Generic periods-per-year calculation
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
defaults:
|
|
2
|
+
- 'model: dfm'
|
|
3
|
+
- _self_
|
|
4
|
+
data:
|
|
5
|
+
path: data/sample_data.csv
|
|
6
|
+
sample_start: null
|
|
7
|
+
sample_end: null
|
|
8
|
+
output:
|
|
9
|
+
path: outputs/${experiment.name}
|
|
10
|
+
save_model: true
|
|
11
|
+
save_plots: true
|
|
12
|
+
save_results: true
|
|
13
|
+
description: Base experiment template
|
|
14
|
+
name: base_experiment
|
|
15
|
+
target: null
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @package _global_
|
|
2
|
+
defaults:
|
|
3
|
+
- override /model: ddfm
|
|
4
|
+
- _self_
|
|
5
|
+
data:
|
|
6
|
+
path: data/sample_data.csv
|
|
7
|
+
sample_start: '2000-01-01'
|
|
8
|
+
sample_end: '2023-12-31'
|
|
9
|
+
description: DDFM model for investment indicators
|
|
10
|
+
name: investment_ddfm
|
|
11
|
+
output:
|
|
12
|
+
path: outputs/investment_ddfm
|
|
13
|
+
save_model: true
|
|
14
|
+
save_plots: true
|
|
15
|
+
save_results: true
|
|
16
|
+
series:
|
|
17
|
+
- KO3YEARC
|
|
18
|
+
- KOBFDSAAF
|
|
19
|
+
- KOBFINAAF
|
|
20
|
+
- KOBFXSAAF
|
|
21
|
+
- KOBSESI.R
|
|
22
|
+
- KOBSIBCEQ
|
|
23
|
+
- KOBSIBCOQ
|
|
24
|
+
- KOBSIIMER
|
|
25
|
+
- KOBSIIMPR
|
|
26
|
+
- KOBSIXMER
|
|
27
|
+
- KOBUSINVR
|
|
28
|
+
- KOCALL.
|
|
29
|
+
- KOCNFBUSR
|
|
30
|
+
- KOCNFCONR
|
|
31
|
+
- KOCNGOV.D
|
|
32
|
+
- KOCOBUSIR
|
|
33
|
+
- KOCONPMTH
|
|
34
|
+
- KOCONSTRP
|
|
35
|
+
- KOCSEMEMR
|
|
36
|
+
- KOCYLEADR
|
|
37
|
+
- KODBLNEQA
|
|
38
|
+
- KOEMPCONF
|
|
39
|
+
- KOEMPMANF
|
|
40
|
+
- KOEQUIMAE
|
|
41
|
+
- KOEQUIPTE
|
|
42
|
+
- KOEQUITTE
|
|
43
|
+
- KOEXCHINA
|
|
44
|
+
- KOEXNGS.D
|
|
45
|
+
- KOEXPGDSA
|
|
46
|
+
- KOEXPPRCF
|
|
47
|
+
- KOGCFCNSD
|
|
48
|
+
- KOGCFFNVD
|
|
49
|
+
- KOGDP...D
|
|
50
|
+
- KOGFCF..D
|
|
51
|
+
- KOIMNGS.D
|
|
52
|
+
- KOIMPGDDA
|
|
53
|
+
- KOIMPGDSA
|
|
54
|
+
- KOIMPPRCF
|
|
55
|
+
- KOIPALL.G
|
|
56
|
+
- KOIPMIMAG
|
|
57
|
+
- KOLRLTCO
|
|
58
|
+
- KOMPCAPGG
|
|
59
|
+
- KOMPCONDG
|
|
60
|
+
- KOMPRI30G
|
|
61
|
+
- KOMSCAPGG
|
|
62
|
+
- KONETTRDF
|
|
63
|
+
- KONEWCONA
|
|
64
|
+
- KOPICAPGG
|
|
65
|
+
- KOPIMANUG
|
|
66
|
+
- KOPPSRM.F
|
|
67
|
+
- KOPROPRCF
|
|
68
|
+
- KOPSMANUG
|
|
69
|
+
- KORCNST
|
|
70
|
+
- KORELEC
|
|
71
|
+
- KORMACH
|
|
72
|
+
- KORMCMP
|
|
73
|
+
- KOROCOINF
|
|
74
|
+
- KOSHRPRCF
|
|
75
|
+
- KOSIARRLE
|
|
76
|
+
- KOSSBFMBE
|
|
77
|
+
- KOUS$...
|
|
78
|
+
- KOVALCONA
|
|
79
|
+
target: KOGFCF..D
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @package _global_
|
|
2
|
+
defaults:
|
|
3
|
+
- override /model: dfm
|
|
4
|
+
- _self_
|
|
5
|
+
data:
|
|
6
|
+
path: data/sample_data.csv
|
|
7
|
+
sample_start: '2000-01-01'
|
|
8
|
+
sample_end: '2023-12-31'
|
|
9
|
+
description: DFM model for production indicators
|
|
10
|
+
name: production_dfm
|
|
11
|
+
output:
|
|
12
|
+
path: outputs/production_dfm
|
|
13
|
+
save_model: true
|
|
14
|
+
save_plots: true
|
|
15
|
+
save_results: true
|
|
16
|
+
series:
|
|
17
|
+
- KOBFDSAAF
|
|
18
|
+
- KOBFXSAAF
|
|
19
|
+
- KOBSESI.R
|
|
20
|
+
- KOBSIBCEQ
|
|
21
|
+
- KOBSIBCOQ
|
|
22
|
+
- KOBSIHAPR
|
|
23
|
+
- KOBSIXMER
|
|
24
|
+
- KOCALL.
|
|
25
|
+
- KOCNFBUSR
|
|
26
|
+
- KOCNFCONR
|
|
27
|
+
- KOCNGOV.D
|
|
28
|
+
- KOCOBUSIR
|
|
29
|
+
- KOCONPRCF
|
|
30
|
+
- KOCSECEMR
|
|
31
|
+
- KOCSEMEMR
|
|
32
|
+
- KOCSPHIMR
|
|
33
|
+
- KOCYLEADR
|
|
34
|
+
- KOEMPTOTO
|
|
35
|
+
- KOEQUIPTE
|
|
36
|
+
- KOEXCHINA
|
|
37
|
+
- KOEXNGS.D
|
|
38
|
+
- KOEXPGDSA
|
|
39
|
+
- KOEXPPRCF
|
|
40
|
+
- KOGDP...D
|
|
41
|
+
- KOHWRWEMP
|
|
42
|
+
- KOIMNGS.D
|
|
43
|
+
- KOIMPGDSA
|
|
44
|
+
- KOIMPPRCF
|
|
45
|
+
- KOIPALL.G
|
|
46
|
+
- KONETTRDF
|
|
47
|
+
- KONEWCONA
|
|
48
|
+
- KOPIMANUG
|
|
49
|
+
- KOPOPACTE
|
|
50
|
+
- KOPPSRM.F
|
|
51
|
+
- KOPROPRCF
|
|
52
|
+
- KOPSMANUG
|
|
53
|
+
- KORELEC
|
|
54
|
+
- KORMCMP
|
|
55
|
+
- KOROCOINF
|
|
56
|
+
- KOSIAI..E
|
|
57
|
+
- KOUN%TOTQ
|
|
58
|
+
- KOUS$...
|
|
59
|
+
- KOVALCONA
|
|
60
|
+
- KOWRCCNSE
|
|
61
|
+
target: KOGDP...D
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @package _global_
|
|
2
|
+
defaults:
|
|
3
|
+
- override /model: dfm_high_factors
|
|
4
|
+
- _self_
|
|
5
|
+
data:
|
|
6
|
+
path: data/sample_data.csv
|
|
7
|
+
sample_start: '2000-01-01'
|
|
8
|
+
sample_end: '2023-12-31'
|
|
9
|
+
description: DFM model with high factors for production indicators
|
|
10
|
+
name: production_dfm_high_factors
|
|
11
|
+
output:
|
|
12
|
+
path: outputs/production_dfm_high_factors
|
|
13
|
+
save_model: true
|
|
14
|
+
save_plots: true
|
|
15
|
+
save_results: true
|
|
16
|
+
series:
|
|
17
|
+
- KOBFDSAAF
|
|
18
|
+
- KOBFXSAAF
|
|
19
|
+
- KOBSESI.R
|
|
20
|
+
- KOBSIBCEQ
|
|
21
|
+
- KOBSIBCOQ
|
|
22
|
+
- KOBSIHAPR
|
|
23
|
+
- KOBSIXMER
|
|
24
|
+
- KOCALL.
|
|
25
|
+
- KOCNFBUSR
|
|
26
|
+
- KOCNFCONR
|
|
27
|
+
- KOCNGOV.D
|
|
28
|
+
- KOCOBUSIR
|
|
29
|
+
- KOCONPRCF
|
|
30
|
+
- KOCSECEMR
|
|
31
|
+
- KOCSEMEMR
|
|
32
|
+
- KOCSPHIMR
|
|
33
|
+
- KOCYLEADR
|
|
34
|
+
- KOEMPTOTO
|
|
35
|
+
- KOEQUIPTE
|
|
36
|
+
- KOEXCHINA
|
|
37
|
+
- KOEXNGS.D
|
|
38
|
+
- KOEXPGDSA
|
|
39
|
+
- KOEXPPRCF
|
|
40
|
+
- KOGDP...D
|
|
41
|
+
- KOHWRWEMP
|
|
42
|
+
- KOIMNGS.D
|
|
43
|
+
- KOIMPGDSA
|
|
44
|
+
- KOIMPPRCF
|
|
45
|
+
- KOIPALL.G
|
|
46
|
+
- KONETTRDF
|
|
47
|
+
- KONEWCONA
|
|
48
|
+
- KOPIMANUG
|
|
49
|
+
- KOPOPACTE
|
|
50
|
+
- KOPPSRM.F
|
|
51
|
+
- KOPROPRCF
|
|
52
|
+
- KOPSMANUG
|
|
53
|
+
- KORELEC
|
|
54
|
+
- KORMCMP
|
|
55
|
+
- KOROCOINF
|
|
56
|
+
- KOSIAI..E
|
|
57
|
+
- KOUN%TOTQ
|
|
58
|
+
- KOUS$...
|
|
59
|
+
- KOVALCONA
|
|
60
|
+
- KOWRCCNSE
|
|
61
|
+
target: KOGDP...D
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @package _global_
|
|
2
|
+
defaults:
|
|
3
|
+
- override /model: ddfm
|
|
4
|
+
- _self_
|
|
5
|
+
data:
|
|
6
|
+
path: data/sample_data.csv
|
|
7
|
+
sample_start: '2000-01-01'
|
|
8
|
+
sample_end: '2023-12-31'
|
|
9
|
+
description: Test DDFM model configuration for unit tests
|
|
10
|
+
name: test_ddfm
|
|
11
|
+
output:
|
|
12
|
+
path: outputs/test_ddfm
|
|
13
|
+
save_model: false
|
|
14
|
+
save_plots: false
|
|
15
|
+
save_results: false
|
|
16
|
+
series:
|
|
17
|
+
- KO3YEARC
|
|
18
|
+
- KOGDP...D
|
|
19
|
+
- KOEMPTOTO
|
|
20
|
+
- KOEXPGDSA
|
|
21
|
+
- KOIMPGDSA
|
|
22
|
+
- KOCONPRCF
|
|
23
|
+
- KOPOPACTE
|
|
24
|
+
- KOHWRWEMP
|
|
25
|
+
target: KOGDP...D
|
|
26
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @package _global_
|
|
2
|
+
defaults:
|
|
3
|
+
- override /model: dfm
|
|
4
|
+
- _self_
|
|
5
|
+
data:
|
|
6
|
+
path: data/sample_data.csv
|
|
7
|
+
sample_start: '2000-01-01'
|
|
8
|
+
sample_end: '2023-12-31'
|
|
9
|
+
description: Test DFM model configuration for unit tests
|
|
10
|
+
name: test_dfm
|
|
11
|
+
output:
|
|
12
|
+
path: outputs/test_dfm
|
|
13
|
+
save_model: false
|
|
14
|
+
save_plots: false
|
|
15
|
+
save_results: false
|
|
16
|
+
series:
|
|
17
|
+
- KO3YEARC
|
|
18
|
+
- KOGDP...D
|
|
19
|
+
- KOEMPTOTO
|
|
20
|
+
- KOEXPGDSA
|
|
21
|
+
- KOIMPGDSA
|
|
22
|
+
- KOCONPRCF
|
|
23
|
+
- KOPOPACTE
|
|
24
|
+
- KOHWRWEMP
|
|
25
|
+
target: KOGDP...D
|
|
26
|
+
|