cranalytics 0.2.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 (110) hide show
  1. cranalytics-0.2.0/.gitignore +182 -0
  2. cranalytics-0.2.0/CHANGELOG.md +300 -0
  3. cranalytics-0.2.0/LICENSE +21 -0
  4. cranalytics-0.2.0/PKG-INFO +519 -0
  5. cranalytics-0.2.0/README.md +475 -0
  6. cranalytics-0.2.0/pyproject.toml +133 -0
  7. cranalytics-0.2.0/src/cranalytics/README.md +42 -0
  8. cranalytics-0.2.0/src/cranalytics/__init__.py +151 -0
  9. cranalytics-0.2.0/src/cranalytics/__main__.py +6 -0
  10. cranalytics-0.2.0/src/cranalytics/_contract_helpers.py +53 -0
  11. cranalytics-0.2.0/src/cranalytics/_contract_issues.py +112 -0
  12. cranalytics-0.2.0/src/cranalytics/_helpers.py +140 -0
  13. cranalytics-0.2.0/src/cranalytics/_loan_contract_base.py +393 -0
  14. cranalytics-0.2.0/src/cranalytics/_loan_states.py +171 -0
  15. cranalytics-0.2.0/src/cranalytics/_loan_tape_normalization.py +126 -0
  16. cranalytics-0.2.0/src/cranalytics/_quickstart_demos.py +479 -0
  17. cranalytics-0.2.0/src/cranalytics/_quickstart_ui.py +129 -0
  18. cranalytics-0.2.0/src/cranalytics/_rollforward_readiness_session.py +534 -0
  19. cranalytics-0.2.0/src/cranalytics/_rollforward_reporting.py +615 -0
  20. cranalytics-0.2.0/src/cranalytics/_rollforward_session.py +366 -0
  21. cranalytics-0.2.0/src/cranalytics/_rollforward_splitting.py +85 -0
  22. cranalytics-0.2.0/src/cranalytics/_rollforward_variants.py +28 -0
  23. cranalytics-0.2.0/src/cranalytics/_transition_estimation.py +120 -0
  24. cranalytics-0.2.0/src/cranalytics/_validation_core.py +70 -0
  25. cranalytics-0.2.0/src/cranalytics/_version.py +3 -0
  26. cranalytics-0.2.0/src/cranalytics/_workflow_results.py +68 -0
  27. cranalytics-0.2.0/src/cranalytics/cli.py +827 -0
  28. cranalytics-0.2.0/src/cranalytics/datasets.py +816 -0
  29. cranalytics-0.2.0/src/cranalytics/distributions.py +44 -0
  30. cranalytics-0.2.0/src/cranalytics/early_performance.py +676 -0
  31. cranalytics-0.2.0/src/cranalytics/examples/__init__.py +23 -0
  32. cranalytics-0.2.0/src/cranalytics/examples/core_feature_analytics.py +49 -0
  33. cranalytics-0.2.0/src/cranalytics/examples/core_lifetime_loss.py +45 -0
  34. cranalytics-0.2.0/src/cranalytics/examples/core_ml_modeling.py +56 -0
  35. cranalytics-0.2.0/src/cranalytics/examples/core_rollforward.py +55 -0
  36. cranalytics-0.2.0/src/cranalytics/examples/core_segmentation.py +22 -0
  37. cranalytics-0.2.0/src/cranalytics/examples/core_simulation.py +39 -0
  38. cranalytics-0.2.0/src/cranalytics/examples/core_survival.py +365 -0
  39. cranalytics-0.2.0/src/cranalytics/examples/core_vintage.py +44 -0
  40. cranalytics-0.2.0/src/cranalytics/examples/fpf_workflow.py +88 -0
  41. cranalytics-0.2.0/src/cranalytics/examples/loss_forecasting_demo.py +61 -0
  42. cranalytics-0.2.0/src/cranalytics/examples/segmentation_demo.py +105 -0
  43. cranalytics-0.2.0/src/cranalytics/finance.py +90 -0
  44. cranalytics-0.2.0/src/cranalytics/forecasting_bridge.py +251 -0
  45. cranalytics-0.2.0/src/cranalytics/fpf_workflow.py +484 -0
  46. cranalytics-0.2.0/src/cranalytics/governance_models.py +266 -0
  47. cranalytics-0.2.0/src/cranalytics/loan_history.py +144 -0
  48. cranalytics-0.2.0/src/cranalytics/loan_history_contract.py +142 -0
  49. cranalytics-0.2.0/src/cranalytics/loan_snapshot.py +210 -0
  50. cranalytics-0.2.0/src/cranalytics/loan_snapshot_contract.py +120 -0
  51. cranalytics-0.2.0/src/cranalytics/loss_forecasting.py +400 -0
  52. cranalytics-0.2.0/src/cranalytics/method_selection.py +474 -0
  53. cranalytics-0.2.0/src/cranalytics/metrics.py +130 -0
  54. cranalytics-0.2.0/src/cranalytics/model_development.py +225 -0
  55. cranalytics-0.2.0/src/cranalytics/onboarding.py +469 -0
  56. cranalytics-0.2.0/src/cranalytics/portfolio.py +295 -0
  57. cranalytics-0.2.0/src/cranalytics/predictive_backtest.py +183 -0
  58. cranalytics-0.2.0/src/cranalytics/predictive_contract.py +192 -0
  59. cranalytics-0.2.0/src/cranalytics/predictive_modeling.py +331 -0
  60. cranalytics-0.2.0/src/cranalytics/predictive_session.py +105 -0
  61. cranalytics-0.2.0/src/cranalytics/predictive_targets.py +279 -0
  62. cranalytics-0.2.0/src/cranalytics/py.typed +0 -0
  63. cranalytics-0.2.0/src/cranalytics/quickstart.py +119 -0
  64. cranalytics-0.2.0/src/cranalytics/rollforward.py +70 -0
  65. cranalytics-0.2.0/src/cranalytics/rollforward_backtest.py +268 -0
  66. cranalytics-0.2.0/src/cranalytics/rollforward_contract.py +389 -0
  67. cranalytics-0.2.0/src/cranalytics/rollforward_evaluation.py +344 -0
  68. cranalytics-0.2.0/src/cranalytics/rollforward_readiness.py +69 -0
  69. cranalytics-0.2.0/src/cranalytics/rollforward_results.py +587 -0
  70. cranalytics-0.2.0/src/cranalytics/rollforward_workflow.py +90 -0
  71. cranalytics-0.2.0/src/cranalytics/score_monitoring.py +784 -0
  72. cranalytics-0.2.0/src/cranalytics/simulation.py +474 -0
  73. cranalytics-0.2.0/src/cranalytics/skills/loss-forecasting/SKILL.md +500 -0
  74. cranalytics-0.2.0/src/cranalytics/skills/loss-forecasting/agents/openai.yaml +4 -0
  75. cranalytics-0.2.0/src/cranalytics/skills/loss-forecasting/references/flow-hazard-guide.md +146 -0
  76. cranalytics-0.2.0/src/cranalytics/skills/loss-forecasting/references/stress-scenario-guide.md +166 -0
  77. cranalytics-0.2.0/src/cranalytics/skills/loss-forecasting/references/transition-matrix-guide.md +146 -0
  78. cranalytics-0.2.0/src/cranalytics/skills/portfolio-diagnostics/SKILL.md +324 -0
  79. cranalytics-0.2.0/src/cranalytics/skills/portfolio-diagnostics/agents/openai.yaml +4 -0
  80. cranalytics-0.2.0/src/cranalytics/skills/portfolio-diagnostics/references/lgd-methodology.md +213 -0
  81. cranalytics-0.2.0/src/cranalytics/skills/predictive-credit-modeling/SKILL.md +448 -0
  82. cranalytics-0.2.0/src/cranalytics/skills/predictive-credit-modeling/agents/openai.yaml +4 -0
  83. cranalytics-0.2.0/src/cranalytics/skills/predictive-credit-modeling/references/early-performance-guide.md +119 -0
  84. cranalytics-0.2.0/src/cranalytics/skills/predictive-credit-modeling/references/model-training-guide.md +157 -0
  85. cranalytics-0.2.0/src/cranalytics/skills/predictive-credit-modeling/references/score-monitoring-guide.md +150 -0
  86. cranalytics-0.2.0/src/cranalytics/skills/vintage-loss-curves/SKILL.md +450 -0
  87. cranalytics-0.2.0/src/cranalytics/skills/vintage-loss-curves/agents/openai.yaml +4 -0
  88. cranalytics-0.2.0/src/cranalytics/skills/vintage-loss-curves/references/methodology.md +272 -0
  89. cranalytics-0.2.0/src/cranalytics/skills/vintage-loss-curves/references/smoother-guide.md +231 -0
  90. cranalytics-0.2.0/src/cranalytics/skills/vintage-loss-curves/references/validation-api.md +121 -0
  91. cranalytics-0.2.0/src/cranalytics/survival.py +349 -0
  92. cranalytics-0.2.0/src/cranalytics/survival_flows.py +464 -0
  93. cranalytics-0.2.0/src/cranalytics/transition/__init__.py +29 -0
  94. cranalytics-0.2.0/src/cranalytics/validation.py +150 -0
  95. cranalytics-0.2.0/src/cranalytics/validation_dispatch.py +155 -0
  96. cranalytics-0.2.0/src/cranalytics/validation_flow.py +428 -0
  97. cranalytics-0.2.0/src/cranalytics/validation_loan.py +727 -0
  98. cranalytics-0.2.0/src/cranalytics/validation_vintage.py +337 -0
  99. cranalytics-0.2.0/src/cranalytics/vintage.py +79 -0
  100. cranalytics-0.2.0/src/cranalytics/vintage_contract.py +191 -0
  101. cranalytics-0.2.0/src/cranalytics/vintage_fitting.py +191 -0
  102. cranalytics-0.2.0/src/cranalytics/vintage_session.py +175 -0
  103. cranalytics-0.2.0/src/cranalytics/vintage_smoothing.py +791 -0
  104. cranalytics-0.2.0/src/cranalytics/vintage_transforms.py +275 -0
  105. cranalytics-0.2.0/src/cranalytics/vintage_validation.py +489 -0
  106. cranalytics-0.2.0/src/cranalytics/vintage_wide.py +341 -0
  107. cranalytics-0.2.0/src/cranalytics/viz.py +36 -0
  108. cranalytics-0.2.0/src/cranalytics/viz_early_performance.py +343 -0
  109. cranalytics-0.2.0/src/cranalytics/viz_heatmaps.py +353 -0
  110. cranalytics-0.2.0/src/cranalytics/viz_smoothing.py +723 -0
@@ -0,0 +1,182 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+ cover/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+ db.sqlite3
60
+ db.sqlite3-journal
61
+
62
+ # Flask stuff:
63
+ instance/
64
+ .webassets-cache
65
+
66
+ # Scrapy stuff:
67
+ .scrapy
68
+
69
+ # Sphinx documentation
70
+ docs/_build/
71
+
72
+ # PyBuilder
73
+ .pybuilder/
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ Pipfile.lock
88
+
89
+ # poetry
90
+ poetry.lock
91
+
92
+ # pdm
93
+ .pdm.toml
94
+ .pdm-python
95
+
96
+ # PEP 582
97
+ __pypackages__/
98
+
99
+ # Celery stuff
100
+ celerybeat-schedule
101
+ celerybeat.pid
102
+
103
+ # SageMath parsed files
104
+ *.sage.py
105
+
106
+ # Environments
107
+ .env
108
+ .venv
109
+ env/
110
+ venv/
111
+ ENV/
112
+ env.bak/
113
+ venv.bak/
114
+
115
+ # Spyder project settings
116
+ .spyderproject
117
+ .spyproject
118
+
119
+ # Rope project settings
120
+ .ropeproject
121
+
122
+ # mkdocs documentation
123
+ /site
124
+
125
+ # mypy
126
+ .mypy_cache/
127
+ .dmypy.json
128
+ dmypy.json
129
+
130
+ # Pyre type checker
131
+ .pyre/
132
+
133
+ # pytype static type analyzer
134
+ .pytype/
135
+
136
+ # Cython debug symbols
137
+ cython_debug/
138
+
139
+ # VS Code
140
+ .vscode/
141
+
142
+ # JetBrains IDEs
143
+ .idea/
144
+
145
+ # macOS
146
+ .DS_Store
147
+
148
+ # Windows
149
+ Thumbs.db
150
+ ehthumbs.db
151
+ *.db
152
+
153
+ # Local review notes
154
+ /doc.md
155
+ RECOMMENDATIONS_ACTION_PLAN.md
156
+
157
+ # Generated pipeline reports
158
+ *_pipeline_report.html
159
+ *.png
160
+
161
+ # Git worktrees
162
+ .worktrees/
163
+
164
+ # Locally installed agent skills (managed by npx skills, not committed)
165
+ .agents/
166
+ .agent/
167
+
168
+ # Claude Code local files (not project config)
169
+ .claude/settings.local.json
170
+ .claude/skills/
171
+ CLAUDE.local.md
172
+
173
+ # Codex worktree artifacts
174
+ .codex-worktrees/
175
+
176
+ # Temporary test output — all temp dirs go here, not project root
177
+ .tmp/
178
+ tests_tmp/
179
+ .pytest_tmp/
180
+ manual_check_tmp/
181
+ pytest_tmp*/
182
+ pytest-cache-files-*/
@@ -0,0 +1,300 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.0] - 2026-06-10
11
+
12
+ ### Removed (breaking)
13
+
14
+ - **31 deprecated top-level exports.** `from cranalytics import <name>` now raises an
15
+ `AttributeError` tombstone naming the workflow module to import from instead.
16
+ Migration table:
17
+
18
+ | Old import (`from cranalytics import ...`) | New import |
19
+ |---|---|
20
+ | `calculate_early_performance_rates`, `compute_conditional_loss_table`, `compute_marginal_impact`, `compute_segment_rates`, `estimate_vintage_lifetime_profit`, `rank_features_by_separation`, `validate_performance_flags` | `from cranalytics.early_performance import ...` |
21
+ | `FPFWorkflowReport`, `print_fpf_report`, `run_fpf_workflow`, `train_fpf_challenger` | `from cranalytics.fpf_workflow import ...` |
22
+ | `ModelSweepSpec`, `build_curve_fitter_sweep_spec`, `run_backtest_sweeps`, `select_champion_and_challengers`, `summarize_variant_performance` | `from cranalytics.method_selection import ...` |
23
+ | `run_rollforward_backtest_sweeps`, `select_rollforward_champion_and_challengers`, `summarize_rollforward_variant_performance` | `from cranalytics.rollforward_backtest import ...` |
24
+ | `calibrate_score_to_event_rate`, `compute_actual_vs_expected`, `compute_psi`, `score_performance_monitoring_report`, `simulate_policy_cutoff` | `from cranalytics.score_monitoring import ...` |
25
+ | `compare_known_actuals_to_curves`, `fit_flow_hazard_curves`, `forecast_balance_flows`, `validate_flow_data` | `from cranalytics.survival_flows import ...` |
26
+ | `compute_cgco_curve_wide`, `compute_final_cgco_wide`, `load_wide_vintage_data` | `from cranalytics.vintage_wide import ...` |
27
+
28
+ - **`rollforward-workflow` and `rollforward-readiness` CLI commands.** Use
29
+ `cranalytics rollforward` and `cranalytics rollforward --mode readiness`; the old
30
+ spellings now exit with a parser error.
31
+
32
+ ### Deprecated
33
+
34
+ - **`cranalytics.transition`** is now a shim emitting `DeprecationWarning`; it will be
35
+ removed in 0.3.0. The estimator implementation moved to the private
36
+ `cranalytics._transition_estimation` module. Supply a transition matrix, transition
37
+ ledger, or loan history directly to `forecast_lifetime_loss` instead of estimating
38
+ cohort matrices yourself.
39
+
40
+ ### Changed
41
+
42
+ - The top-level namespace is now 51 names (22 preferred + 29 compatibility), pinned by
43
+ `tests/test_public_api_surface.py`.
44
+ - `fpf_workflow` is documented as an applied workflow rather than core API; its
45
+ functions are importable only from `cranalytics.fpf_workflow`.
46
+
47
+ ## [0.1.22] - 2026-06-07
48
+
49
+ ### Added
50
+ - Shared rollforward result-summary types in `src/cranalytics/rollforward_results.py` so `run_rollforward(...)`, `run_rollforward_workflow(...)`, and `generate_rollforward_readiness_report(...)` all expose the same `run_summary` / `operational_status` vocabulary.
51
+ - Canonical rollforward output payload adapters in `src/cranalytics/_rollforward_output_payloads.py` plus dedicated readiness/workflow writer modules for surface-specific artifact emission.
52
+ - New rollforward artifacts `rollforward_run_summary.json` and `workflow_run_metadata.json` for readiness and workflow outputs, alongside governance-model adapters that consume the shared run-summary contract.
53
+ - New characterization and regression coverage for shared rollforward status semantics, result adapters, reporting payloads, and workflow/result typing.
54
+
55
+ ### Changed
56
+ - Consolidated the rollforward public surfaces around typed internal session results in `src/cranalytics/_workflow_results.py` and shared public result adapters in `src/cranalytics/rollforward_results.py`, leaving `rollforward.py`, `rollforward_workflow.py`, and `rollforward_readiness.py` as thinner orchestration wrappers.
57
+ - Centralized rollforward session-to-public-result translation and JSON-ready payload shaping, then split artifact writing by surface into `src/cranalytics/_rollforward_readiness_reporting.py` and `src/cranalytics/_rollforward_workflow_reporting.py`.
58
+ - Surfaced shared rollforward operational status in CLI output, committee summaries, champion-selection payloads, readiness summaries, the core rollforward example, and the output-contract documentation.
59
+ - Reframed FPF as an advanced binary actual-performance-flag workflow in docs, examples, and onboarding paths instead of treating it as a front-door package workflow.
60
+ - Continued the top-level API curation pass by moving the remaining docs and bundled-skill examples toward module-local imports and preserving the root namespace mainly as a compatibility surface.
61
+
62
+ ### Deprecated
63
+ - Additional top-level convenience imports for advanced helpers now emit `DeprecationWarning`, including FPF-specific workflow symbols, early-performance helpers, and survival-flow utilities. Callers should import these from their workflow modules directly.
64
+
65
+ ### Removed
66
+ - Removed the internal `src/cranalytics/rollforward_reporting.py` facade after all tracked callers and tests moved to the shared payload layer plus the dedicated readiness/workflow reporting modules.
67
+
68
+ ### Fixed
69
+ - Unified rollforward `ok` / `data_issues` / `insufficient_data` semantics across in-memory results, readiness outputs, workflow outputs, and written artifacts so the same session state no longer needs to be re-derived in multiple places.
70
+ - Preserved `max_mob`, issue counts, and operational-status details consistently across rollforward facade, workflow, and readiness summaries.
71
+
72
+ ## [0.1.21] - 2026-06-05
73
+
74
+ ### Added
75
+ - Workflow-aware `cranalytics validate-data` support with auto-detection and dispatch for vintage, feature-analytics, and related CSV shapes via `validation_dispatch.py`.
76
+ - Scriptable `cranalytics quickstart` flags: `--workflow`, `--show-requirements`, and `--write-template`, plus starter CSV templates for vintage and feature-analytics workflows.
77
+ - Read-only `cranalytics install-skills --list` and `--describe` modes so bundled skills can be discovered without performing an install.
78
+ - Shared internal loan-tape normalization helpers in `src/cranalytics/_loan_tape_normalization.py` so loan snapshot and loan history contracts stop cross-importing private helpers.
79
+
80
+ ### Changed
81
+ - Centralized workflow onboarding metadata and generated workflow-routing docs from a single registry, simplifying `quickstart`, CLI help, and starter-template wiring.
82
+ - Narrowed the documented top-level API promise: `src/cranalytics/__init__.py` now distinguishes a small preferred convenience surface from the wider compatibility namespace.
83
+ - Top-level imports for specialized method-selection, score-monitoring, rollforward-backtest, and wide-vintage helpers now emit `DeprecationWarning` and point callers to workflow-module imports.
84
+ - Tightened rollforward workflow session typing and explicit status=`"ok"` artifact guards so downstream reporting and export paths no longer rely on optional outputs implicitly being present.
85
+ - Updated the repo-local `publish-package` skill to use the dynamic version source in `src/cranalytics/__init__.py` and the correct `cranalytics` workspace/import names.
86
+
87
+ ### Fixed
88
+ - Hardened workflow-aware validation contracts so feature-analytics CSV validation rejects invalid balances, rates, terms, dates, duplicate identifiers, and unsupported target values while preserving blank immature targets.
89
+ - Aligned vintage `validate-data` auto-detection and validation with the documented minimal unsegmented shape used by starter templates and onboarding flows.
90
+ - Cleaned tracked Ruff issues and reduced source `basedpyright` output to a single known `__all__` warning in `src/cranalytics/__init__.py`.
91
+ - Resolved pandas typing and guard issues across loan contract normalization, score monitoring, forecasting bridge, validation, survival flows, and vintage transforms uncovered during the release-hardening pass.
92
+
93
+ ## [0.1.20] - 2026-04-10
94
+
95
+ ### Added
96
+ - Ledger-first Loss Forecasting support: `forecast_lifetime_loss(...)` and `summarize_lifetime_loss(...)` now accept transition ledgers and loan-history panels in addition to explicit square matrices.
97
+ - Governance metadata models in `src/cranalytics/governance_models.py` for non-DataFrame workflow metadata validation, backed by `pydantic>=2`.
98
+ - Mapping-compatible `PredictiveModelingSessionResult` and `VintageAnalysisSessionResult` outputs with expanded docs and examples around `run_predictive_modeling_session(...)` and `run_vintage_analysis_session(...)`.
99
+
100
+ ### Changed
101
+ - Deepened predictive and vintage session boundaries so workflow callers receive clearer typed session seams instead of looser dict-style orchestration paths.
102
+ - Refreshed the Lifetime Loss Forecasting, ML modeling, and vintage tutorials/examples to align with the ledger-first and typed-session workflow boundaries.
103
+
104
+ ## [0.1.19] - 2026-04-08
105
+
106
+ ### Added
107
+ - `project_incomplete_vintage_tails(df, incomplete_vintages, smoother, max_mob)` — projects forward-looking loss curves for immature vintages using a fitted smoother; clips projections to non-decreasing and ≤ 1.0. Exported as `cranalytics.project_incomplete_vintage_tails`.
108
+ - `run_vintage_analysis_session` gains `extrapolate_tails` and `tail_max_mob` parameters; result dict always includes `"tail_projections"` key.
109
+
110
+ ### Changed
111
+ - `score_model` argument order changed to DataFrame-first: `score_model(df, estimator, feature_cols, ...)`. Old order `(estimator, df, ...)` still works with a `DeprecationWarning`. Enables clean `.pipe()` chaining.
112
+ - Internal DataFrame transforms in `calculate_duration_and_event` (`survival.py`) and `evaluate_rollforward_validation_window` (`rollforward_evaluation.py`) converted from in-place mutation to `.assign()` chains.
113
+
114
+ ## [0.1.18] - 2026-04-05
115
+
116
+ ### Added
117
+ - Internal `LoanState` enum coverage across datasets, simulation, and Loss Forecasting to make not-yet-due and terminal-state handling more explicit.
118
+ - `CurveFitter.converged` tracking and backtest-schema support so model-selection workflows can distinguish failed fits from valid challengers.
119
+ - New regression suites for curve-fitter convergence, forecasting-bridge conservation, forecasting-bridge vectorization, loan states, and survival-flow guards/vectorization.
120
+
121
+ ### Changed
122
+ - Vectorized `forecast_balance_flows(...)` and `forecast_calendar_chargeoff_from_predictions(...)` to remove row-wise iteration from the main allocation/forecasting paths.
123
+ - Consolidated shared helper logic such as `_require_columns`, `_validate_confidence`, and `_months_elapsed` under `src/cranalytics/_helpers.py`.
124
+
125
+ ### Fixed
126
+ - Added allocation-conservation warnings so calendar charge-off forecasts surface silent dollar-allocation drift.
127
+ - Guarded fitted hazard curves by clipping rates to `[0, 1]` and raising on NaN/Inf outputs before returning them to callers.
128
+ - Hardened model-selection comparison logic so champion/challenger selection filters infinite-MAPE rows and raises when every variant fails.
129
+
130
+ ## [0.1.17] - 2026-03-19
131
+
132
+ ### Added
133
+ - Package-level module execution entrypoint via `python -m cranalytics`, matching the existing console-script CLI behavior.
134
+
135
+ ## [0.1.16] - 2026-03-19
136
+
137
+ ### Added
138
+ - Onboarding workflow metadata and regression coverage so the quickstart and onboarding path stay aligned as docs and CLI copy evolve.
139
+ - New reference maps and contributor-navigation docs for the public API, workflows, modules, and onboarding paths.
140
+
141
+ ### Changed
142
+ - Made `cranalytics quickstart` the canonical getting-started path, refreshed onboarding copy, and aligned schema guidance across the CLI, docs, and examples.
143
+ - Added packaged feature-analytics and ML examples/tutorials and published the release as `0.1.16` on TestPyPI.
144
+
145
+ ## [0.1.15] - 2026-03-17
146
+
147
+ ### Added
148
+ - Internal rollforward session boundaries to make readiness, workflow, and artifact-generation orchestration more explicit.
149
+
150
+ ### Changed
151
+ - Documented the repo's multi-agent worktree workflow and operating procedure for contributors.
152
+
153
+ ### Fixed
154
+ - Preserved rollforward-contract denominators across backtests so readiness and workflow comparisons stay on the same population basis.
155
+ - Synchronized `CHANGELOG.md` with the shipped `0.1.14` feature set and republished as `0.1.15` after the prior TestPyPI artifacts had already been uploaded.
156
+
157
+ ## [0.1.14] - 2026-03-17
158
+
159
+ ### Added
160
+ - Predictive modeling toolkit expansion: `engineer_loan_features`, `lift_gain_table`, `fit_woe_binning`, `build_targets`, `assemble_modeling_frame`, `score_model`, `train_binary_model`, `train_regression_model`, predictive backtesting helpers, and calendar charge-off forecasting.
161
+ - Flow Performance Framework workflow support: `make_mock_fpf_data`, `run_fpf_workflow`, `train_fpf_challenger`, `FPFWorkflowReport`, `print_fpf_report`, and a packaged FPF demo.
162
+ - Canonical Rollforward workflow modules for CLI execution, rollforward backtesting, rollforward input contract validation, shared rollforward evaluation, reporting adapters, characterization tests, and internal workflow/readiness session boundaries.
163
+ - Explicit predictive and vintage session boundaries with dedicated contract modules and validation coverage for DataFrame-first orchestration paths.
164
+ - New tutorials and reference docs for core workflows, validation ownership, and TestPyPI installation.
165
+
166
+ ### Changed
167
+ - Modernized packaging to use Hatch dynamic versioning and explicit wheel artifacts so bundled skills and `py.typed` are included consistently in distributions.
168
+ - Restored Python 3.10 support in build and CI coverage, and added optional extras for `ml`, `xgboost`, and `lightgbm` workflows.
169
+ - Tightened temporary artifact handling under `.tmp` and refreshed docs/navigation for the expanded workflow surface area.
170
+
171
+ ### Fixed
172
+ - Preserved rollforward-contract denominators across backtests and aligned readiness/workflow paths on the canonical rollforward input boundary.
173
+ - Hardened readiness and interpretation code paths, including FPF challenger calibration handling and additional rollforward schema/validation checks.
174
+ - Cleared multiple CI linting, formatting, type-checking, and workflow integration issues uncovered during the release hardening pass.
175
+
176
+ ## [0.1.13] - 2026-03-13
177
+
178
+ ### Added
179
+ - Early performance analytics module (`early_performance.py`) with flag validation, portfolio/segment rate analysis, WoE/IV, feature ranking, marginal impact, and conditional loss tables.
180
+ - Score monitoring module (`score_monitoring.py`) with score-to-event calibration, actual-vs-expected monitoring, and PSI drift analysis.
181
+ - Visualization module (`viz_early_performance.py`) with eight early-performance chart helpers.
182
+ - Validation factory `make_performance_flag_schema` for dynamic binary flag validation via Pandera.
183
+ - Decision-support helpers including `simulate_policy_cutoff`, `score_performance_monitoring_report`, and `estimate_vintage_lifetime_profit`.
184
+ - New tests for early performance and score monitoring workflows.
185
+
186
+ ## [0.1.12] - 2026-03-12
187
+
188
+ ### Added
189
+ - `cranalytics quickstart` CLI command: 7-item interactive menu with narrated workflow demos and data requirement tables.
190
+ - `src/cranalytics/quickstart.py`: menu logic, six workflow walkthroughs, and CSV template writer.
191
+ - Repo-local `publish-package` release skill plus a README example for the LendingClub full-pipeline workflow.
192
+
193
+ ## [0.1.11] - 2026-03-12
194
+
195
+ ### Fixed
196
+ - Simulation `ValueError: assignment destination is read-only` — added `.copy()` on balances array from `to_numpy()` in `simulation.py`.
197
+ - Synced `__init__.py` `__version__` to match `pyproject.toml` (was behind after namespace rename).
198
+ - Updated `.claude/settings.json` lint hook path after `credit_analytics` → `cranalytics` folder rename.
199
+
200
+ ## [0.1.10] - 2026-03-12
201
+
202
+ ### Added
203
+ - Bundled Claude skills (M1–M4): `vintage-loss-curves`, `loss-forecasting`, `portfolio-diagnostics` under `src/cranalytics/skills/` with `SKILL.md` and `references/`.
204
+ - Skills CI workflow (`.github/workflows/skills-ci.yml`): frontmatter lint and `__all__` alignment checks.
205
+ - `.claude/skills/publish-package/SKILL.md` for guided PyPI publish workflow.
206
+ - `uv` install instructions added to README alongside pip.
207
+
208
+ ### Changed
209
+ - Renamed package namespace `credit_analytics` → `cranalytics` across all source, tests, docs, and CI.
210
+ - Bumped version to `0.1.10`.
211
+
212
+ ## [0.1.9] - 2026-03-11
213
+
214
+ ### Added
215
+ - Bootstrap confidence intervals for vintage curve forecasts via `bootstrap_smoother_intervals()`.
216
+ - CRO package review artifact: `CRO_TECHNICAL_REVIEW_RECOMMENDATIONS.md` with prioritized model-risk findings and a 60-day hardening plan.
217
+
218
+ ### Changed
219
+ - Hardened simulation state propagation, rolling-origin validation defaults, dataset reproducibility, survival strictness, and the rollforward-readiness CLI before the `0.1.9` release.
220
+
221
+ ## [0.1.8] - 2026-03-10
222
+
223
+ ### Added
224
+ - Bundled Claude skills workflow: `install-skills` CLI subcommand installs packaged skills to local skills directories.
225
+ - New analytics modules: `method_selection.py` (variant sweep backtesting, champion/challenger), `survival_flows.py` (rollforward-based hazard modeling), `vintage_wide.py` (wide-format vintage loader + CGCO forecaster).
226
+ - Rollforward-based readiness report: `rollforward_readiness.py` with `generate_rollforward_readiness_report()`.
227
+ - `rollforward-readiness` CLI subcommand exposing `generate_rollforward_readiness_report` (fixes P0 contract gap).
228
+ - Competing-risks survival demos and Aalen-Johansen support.
229
+ - `fetch_lending_club()` dataset loader with pooch caching; hash pinned for reproducibility.
230
+ - `resolve_columns()` dynamic column alias registry in `datasets.py`.
231
+ - Schema validation integrated into `simulate_portfolio_cashflows`.
232
+ - `strict` parameter on `calculate_duration_and_event`: negative-duration records now warn+drop by default; `strict=True` raises.
233
+
234
+ ### Changed
235
+ - Replaced `black` formatter with `ruff format` across all tooling and CI.
236
+ - Relaxed mypy config to reflect actual maturity (`allow_untyped_defs`, `ignore_missing_imports`).
237
+ - Pinned external dataset hash in `datasets.py` for reproducible benchmarks.
238
+ - CI now runs `ruff check` + `ruff format --check` + `pytest` on Python 3.10/3.11/3.12.
239
+
240
+ ### Fixed
241
+ - `fetch_lending_club()` output conforms to `PortfolioSchema` canonical status values.
242
+ - Smoothing validation flow and column validation in `vintage_transforms.py`.
243
+ - Snake_case key consistency in test fixtures.
244
+
245
+ ## [0.1.7] - 2026-03-01
246
+
247
+ ### Added
248
+ - Linting, typing, and docstring cleanup across all source modules.
249
+ - `normalize_return_schema` for `generate_survival_data`.
250
+ - Extra column allowance in `PortfolioSchema` validation.
251
+
252
+ ### Changed
253
+ - Improved CLI discoverability for common onboarding tasks and normalized Lending Club status handling/tests around the validation surface.
254
+
255
+ ## [0.1.6] - 2026-02-25
256
+
257
+ ### Added
258
+ - Core examples refactored as standalone scripts: `core_vintage.py`, `core_lifetime_loss.py`, `core_segmentation.py`.
259
+ - Competing-risks survival analysis utilities.
260
+ - Dynamic column alias registry (`COLUMN_ALIASES`, `resolve_columns()`).
261
+ - `fetch_lending_club()` data-loading path for reproducible Lending Club examples and survival testing.
262
+
263
+ ### Changed
264
+ - Simplified README around 3 core workflows and optional advanced modules.
265
+ - Added docs onboarding page: `docs/getting_started.md`.
266
+ - Split optional dependencies into extras: `viz`, `survival`, `full`.
267
+ - Removed `sys.path` mutations from examples.
268
+ - Naming conventions enforced: `residual_analysis` → `analyze_residuals`, `summary_table` → `create_summary_table`, `temporal_validation` → `validate_temporally`.
269
+ - Updated smoothing demo output paths from `/tmp` to local `output/`.
270
+
271
+ ## [0.1.5] - 2026-02-20
272
+
273
+ ### Changed
274
+ - Applied review-driven fixes and status updates across finance, survival, vintage transforms, vintage validation, and visualization docs/tests after the `0.1.4` packaging rename pass.
275
+ - Published a follow-up TestPyPI release as `0.1.5`.
276
+
277
+ ## [0.1.4] - 2026-02-19
278
+
279
+ ### Added
280
+ - Packaged runnable demos for the core vintage, lifetime-loss, and segmentation workflows.
281
+
282
+ ### Changed
283
+ - Normalized user-facing distribution and CLI naming to `cranalytics` for TestPyPI while documenting the separate `credit_analytics` import namespace.
284
+
285
+ ## [0.1.3] - 2026-02-19
286
+
287
+ ### Changed
288
+ - Restored the published package name to `cranalytics` for TestPyPI compatibility while keeping the existing import namespace unchanged.
289
+ - Shipped as a packaging-only follow-up release with no intended library-behavior changes relative to `0.1.2`.
290
+
291
+ ## [0.1.2] - 2026-02-19
292
+
293
+ ### Changed
294
+ - Packaging-only follow-up TestPyPI release with no intended library-code changes relative to `0.1.1`.
295
+
296
+ ## [0.1.1] - 2026-02-19
297
+
298
+ ### Added
299
+ - Initial public package release with DataFrame-first vintage analysis, smoothing, visualization, lifetime-loss forecasting, survival modeling, and financial-metrics utilities.
300
+ - Pandera-backed validation across the public workflow surface, plus early tutorials, demos, and publishing setup for TestPyPI distribution.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Your Name
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.