glidepath 1.1.1__tar.gz → 1.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.
- {glidepath-1.1.1 → glidepath-1.2.0}/PKG-INFO +3 -2
- {glidepath-1.1.1 → glidepath-1.2.0}/README.md +2 -1
- glidepath-1.2.0/pyproject.toml +181 -0
- glidepath-1.1.1/pyproject.toml → glidepath-1.2.0/pyproject.toml.orig +5 -4
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/__init__.py +34 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/backtest.py +23 -5
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/copy.py +16 -7
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/display.py +3 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/example.py +1 -2
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/firstrun.py +26 -18
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/forms.py +579 -71
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/montecarlo.py +37 -5
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/outlook.py +72 -13
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/__init__.py +6 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/engine.py +95 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/provenance.py +1 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/results.py +7 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/state_pension.py +98 -13
- glidepath-1.2.0/src/glidepath/gui/assets/chevron_down.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/forms.py +609 -75
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/style.py +47 -2
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/widgets.py +32 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/data/age_rules.toml +1 -1
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/data/assumptions_default.toml +9 -3
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/data/returns_history.toml +1 -1
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/data/tax_year_2026_27.toml +16 -6
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/extension.py +5 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/loader.py +17 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/schema.py +24 -2
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/state_pension.py +66 -15
- {glidepath-1.1.1 → glidepath-1.2.0}/LICENSE +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/LICENSE-DATA +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/__init__.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/charts.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/drawdown.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/exports.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/files.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/inspector.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/labels.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/plan.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/retirement.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/scenarios.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/shell.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/app/tables.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/annuities.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/backtest.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/comparison.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/config.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/contributions.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/entities.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/glide.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/investments.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/money.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/montecarlo.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/pensions.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/periods.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/randomness.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/region.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/reporting.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/retirement.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/returns.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/scenarios.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/tax.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/withdrawals.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/core/wrappers.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/__init__.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/glidepath.ico +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_128.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_16.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_24.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_256.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_32.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_48.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/icon_64.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/assets/wordmark.png +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/charts.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/inspector.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/main.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/scenarios.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/gui/tableview.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/__init__.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/assumptions.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/decode.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/document.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/encode.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/migrations.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/persistence/values.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/py.typed +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/__init__.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/__init__.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/ages.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/contributions.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/region.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/tax.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/wrappers.py +0 -0
- {glidepath-1.1.1 → glidepath-1.2.0}/src/glidepath/regions/uk/years.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: glidepath
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Desktop retirement and investment planner (UK-first, region-extensible).
|
|
5
5
|
Keywords: retirement,pension,financial-planning,investment,uk,sipp,isa,monte-carlo
|
|
6
6
|
Author: James Williams
|
|
@@ -70,7 +70,8 @@ What it models today (UK, single or couple):
|
|
|
70
70
|
- **Defined benefit pensions** — deferred entitlements or active
|
|
71
71
|
CARE-style accrual, with revaluation, early/late factors and
|
|
72
72
|
commutation; **state pension** from your official DWP forecast,
|
|
73
|
-
including deferral
|
|
73
|
+
including deferral — or, until you enter one, the full new State
|
|
74
|
+
Pension from State Pension age, labelled as an assumption.
|
|
74
75
|
- **Tax** — rUK and Scottish income tax from verified 2026/27 data
|
|
75
76
|
files; pension allowances (AA/taper/MPAA, lump-sum allowance).
|
|
76
77
|
- **Couples** — an optional partner, modelled end to end: one pooled
|
|
@@ -41,7 +41,8 @@ What it models today (UK, single or couple):
|
|
|
41
41
|
- **Defined benefit pensions** — deferred entitlements or active
|
|
42
42
|
CARE-style accrual, with revaluation, early/late factors and
|
|
43
43
|
commutation; **state pension** from your official DWP forecast,
|
|
44
|
-
including deferral
|
|
44
|
+
including deferral — or, until you enter one, the full new State
|
|
45
|
+
Pension from State Pension age, labelled as an assumption.
|
|
45
46
|
- **Tax** — rUK and Scottish income tax from verified 2026/27 data
|
|
46
47
|
files; pension allowances (AA/taper/MPAA, lump-sum allowance).
|
|
47
48
|
- **Couples** — an optional partner, modelled end to end: one pooled
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "glidepath"
|
|
3
|
+
version = "1.2.0"
|
|
4
|
+
description = "Desktop retirement and investment planner (UK-first, region-extensible)."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT AND CC-BY-NC-SA-4.0"
|
|
7
|
+
license-files = [
|
|
8
|
+
"LICENSE",
|
|
9
|
+
"LICENSE-DATA",
|
|
10
|
+
]
|
|
11
|
+
requires-python = ">=3.14"
|
|
12
|
+
keywords = [
|
|
13
|
+
"retirement",
|
|
14
|
+
"pension",
|
|
15
|
+
"financial-planning",
|
|
16
|
+
"investment",
|
|
17
|
+
"uk",
|
|
18
|
+
"sipp",
|
|
19
|
+
"isa",
|
|
20
|
+
"monte-carlo",
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Development Status :: 5 - Production/Stable",
|
|
24
|
+
"Environment :: Win32 (MS Windows)",
|
|
25
|
+
"Environment :: X11 Applications :: Qt",
|
|
26
|
+
"Intended Audience :: End Users/Desktop",
|
|
27
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
28
|
+
"Operating System :: Microsoft :: Windows",
|
|
29
|
+
"Operating System :: POSIX :: Linux",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Programming Language :: Python :: 3.14",
|
|
32
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
33
|
+
"Typing :: Typed",
|
|
34
|
+
]
|
|
35
|
+
dependencies = ["pyside6==6.11.2"]
|
|
36
|
+
|
|
37
|
+
[[project.authors]]
|
|
38
|
+
name = "James Williams"
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Homepage = "https://williajm.github.io/glidepath/"
|
|
42
|
+
Repository = "https://github.com/williajm/glidepath"
|
|
43
|
+
Changelog = "https://github.com/williajm/glidepath/blob/main/CHANGELOG.md"
|
|
44
|
+
Issues = "https://github.com/williajm/glidepath/issues"
|
|
45
|
+
Statistics = "https://pyrank.org/package/glidepath/"
|
|
46
|
+
|
|
47
|
+
[project.gui-scripts]
|
|
48
|
+
glidepath = "glidepath.gui.main:main"
|
|
49
|
+
|
|
50
|
+
[dependency-groups]
|
|
51
|
+
binary = [
|
|
52
|
+
"nuitka>=4.2",
|
|
53
|
+
"setuptools>=84",
|
|
54
|
+
"wheel>=0.48",
|
|
55
|
+
"zstandard",
|
|
56
|
+
]
|
|
57
|
+
dev = [
|
|
58
|
+
"hypothesis",
|
|
59
|
+
"mypy",
|
|
60
|
+
"pip-audit",
|
|
61
|
+
"pre-commit",
|
|
62
|
+
"pytest",
|
|
63
|
+
"pytest-cov",
|
|
64
|
+
"pytest-qt",
|
|
65
|
+
"pytest-timeout",
|
|
66
|
+
"ruff",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[build-system]
|
|
70
|
+
requires = ["uv_build>=0.11,<0.14"]
|
|
71
|
+
build-backend = "uv_build"
|
|
72
|
+
|
|
73
|
+
[tool.glidepath.binary]
|
|
74
|
+
windows-icon = "src/glidepath/gui/assets/glidepath.ico"
|
|
75
|
+
dependency-walker-url = "https://dependencywalker.com/depends22_x64.zip"
|
|
76
|
+
dependency-walker-sha256 = "35db68a613874a2e8c1422eb0ea7861f825fc71717d46dabf1f249ce9634b4f1"
|
|
77
|
+
nuitka-options = [
|
|
78
|
+
"--update-check=never",
|
|
79
|
+
"--enable-plugin=pyside6",
|
|
80
|
+
"--include-qt-plugins=platforms,imageformats",
|
|
81
|
+
"--include-package-data=glidepath",
|
|
82
|
+
"--include-distribution-metadata=glidepath",
|
|
83
|
+
"--include-data-files=LICENSE=LICENSE",
|
|
84
|
+
"--include-data-files=LICENSE-DATA=LICENSE-DATA",
|
|
85
|
+
"--include-data-dir=third-party-licences=third-party-licences",
|
|
86
|
+
"--product-name=Glidepath",
|
|
87
|
+
"--file-description=Glidepath retirement planner",
|
|
88
|
+
"--company-name=James Williams",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[tool.uv]
|
|
92
|
+
exclude-newer = "2026-11-08T10:49:18Z"
|
|
93
|
+
no-build-isolation-package = ["nuitka"]
|
|
94
|
+
|
|
95
|
+
[[tool.uv.index]]
|
|
96
|
+
name = "pypi"
|
|
97
|
+
url = "https://pypi.org/simple"
|
|
98
|
+
default = true
|
|
99
|
+
|
|
100
|
+
[tool.ruff]
|
|
101
|
+
src = [
|
|
102
|
+
"src",
|
|
103
|
+
"tests",
|
|
104
|
+
"scripts",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[tool.ruff.lint]
|
|
108
|
+
select = ["ALL"]
|
|
109
|
+
ignore = [
|
|
110
|
+
"COM812",
|
|
111
|
+
"ISC001",
|
|
112
|
+
"CPY001",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint.pydocstyle]
|
|
116
|
+
convention = "google"
|
|
117
|
+
|
|
118
|
+
[tool.ruff.lint.mccabe]
|
|
119
|
+
max-complexity = 10
|
|
120
|
+
|
|
121
|
+
[tool.ruff.lint.per-file-ignores]
|
|
122
|
+
"src/glidepath/core/randomness.py" = ["S311"]
|
|
123
|
+
"scripts/build_returns_history.py" = ["S314"]
|
|
124
|
+
"tests/**" = [
|
|
125
|
+
"S101",
|
|
126
|
+
"PLR2004",
|
|
127
|
+
"INP001",
|
|
128
|
+
"PLR0913",
|
|
129
|
+
]
|
|
130
|
+
"scripts/**" = [
|
|
131
|
+
"T201",
|
|
132
|
+
"INP001",
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
[tool.mypy]
|
|
136
|
+
strict = true
|
|
137
|
+
warn_unreachable = true
|
|
138
|
+
python_version = "3.14"
|
|
139
|
+
files = [
|
|
140
|
+
"src",
|
|
141
|
+
"tests",
|
|
142
|
+
"scripts",
|
|
143
|
+
]
|
|
144
|
+
mypy_path = [
|
|
145
|
+
"scripts",
|
|
146
|
+
"tests",
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
[tool.pytest.ini_options]
|
|
150
|
+
addopts = [
|
|
151
|
+
"-ra",
|
|
152
|
+
"--strict-markers",
|
|
153
|
+
"--strict-config",
|
|
154
|
+
"--cov=glidepath",
|
|
155
|
+
"--cov=scripts",
|
|
156
|
+
"--cov-report=term-missing",
|
|
157
|
+
"--cov-report=xml",
|
|
158
|
+
]
|
|
159
|
+
testpaths = ["tests"]
|
|
160
|
+
pythonpath = [
|
|
161
|
+
"scripts",
|
|
162
|
+
"tests",
|
|
163
|
+
]
|
|
164
|
+
timeout = 120
|
|
165
|
+
qt_api = "pyside6"
|
|
166
|
+
markers = [
|
|
167
|
+
"gui: exercises the PySide6 shell on the offscreen Qt platform",
|
|
168
|
+
"slow: long-running engine sweeps (Monte Carlo, backtest, solvers); deselect with -m 'not slow'",
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
[tool.coverage.run]
|
|
172
|
+
branch = true
|
|
173
|
+
omit = ["scripts/measure_mc_performance.py"]
|
|
174
|
+
|
|
175
|
+
[tool.coverage.report]
|
|
176
|
+
fail_under = 96
|
|
177
|
+
show_missing = true
|
|
178
|
+
exclude_lines = [
|
|
179
|
+
"pragma: no cover",
|
|
180
|
+
'if __name__ == "__main__":',
|
|
181
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "glidepath"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Desktop retirement and investment planner (UK-first, region-extensible)."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
# MIT code plus one CC BY-NC-SA 4.0 data file (returns_history.toml —
|
|
@@ -74,7 +74,7 @@ dev = [
|
|
|
74
74
|
]
|
|
75
75
|
|
|
76
76
|
[build-system]
|
|
77
|
-
requires = ["uv_build>=0.11,<0.
|
|
77
|
+
requires = ["uv_build>=0.11,<0.14"]
|
|
78
78
|
build-backend = "uv_build"
|
|
79
79
|
|
|
80
80
|
# Shared by the local build command and the tagged release workflow.
|
|
@@ -101,8 +101,9 @@ nuitka-options = [
|
|
|
101
101
|
# --- uv ---------------------------------------------------------------------
|
|
102
102
|
[tool.uv]
|
|
103
103
|
# Supply-chain cooldown: resolution ignores anything published to PyPI after
|
|
104
|
-
# this timestamp (now minus 7 days). Updated ONLY by `make deps
|
|
105
|
-
exclude-newer
|
|
104
|
+
# this timestamp (now minus 7 days). Updated ONLY by `make deps`, which
|
|
105
|
+
# also maintains the security-fix exclude-newer-package line (CLAUDE.md).
|
|
106
|
+
exclude-newer = "2026-11-08T10:49:18Z"
|
|
106
107
|
# Nuitka is source-only. uv installs its build requirements from the binary
|
|
107
108
|
# group first, then builds it in that environment: the lockfile hashes, age
|
|
108
109
|
# check and all-groups audit cover the exact setuptools/wheel versions used.
|
|
@@ -101,33 +101,48 @@ from glidepath.app.firstrun import (
|
|
|
101
101
|
default_state_path,
|
|
102
102
|
load_state,
|
|
103
103
|
record_disclaimer_acknowledged,
|
|
104
|
+
record_facts_view,
|
|
104
105
|
record_last_plan_path,
|
|
105
106
|
)
|
|
106
107
|
from glidepath.app.forms import (
|
|
108
|
+
DONE_ROW_LABEL,
|
|
109
|
+
EDIT_ROW_LABEL,
|
|
107
110
|
ENTITY_ID_KEY,
|
|
108
111
|
HIDE_ADVANCED_LABEL,
|
|
112
|
+
HIDE_DETAILS_LABEL,
|
|
109
113
|
INCOME_PREFERENCE_ANNUITY,
|
|
110
114
|
INCOME_PREFERENCE_KEY,
|
|
111
115
|
OWNER_KEY,
|
|
112
116
|
REQUIRED_MARKER,
|
|
113
117
|
SHOW_ADVANCED_LABEL,
|
|
118
|
+
SHOW_DETAILS_LABEL,
|
|
119
|
+
STATE_PENSION_INCLUDED_KEY,
|
|
120
|
+
STATE_PENSION_LEFT_OUT,
|
|
121
|
+
STEP_ERROR_SUFFIX,
|
|
114
122
|
ChoiceOption,
|
|
115
123
|
FactsFormData,
|
|
116
124
|
FactsFormResult,
|
|
117
125
|
FactsFormViewModel,
|
|
118
126
|
FactsSubmissionOutcome,
|
|
119
127
|
FieldKind,
|
|
128
|
+
FieldLevel,
|
|
120
129
|
FieldSpec,
|
|
121
130
|
FormError,
|
|
131
|
+
FormStep,
|
|
132
|
+
FormView,
|
|
122
133
|
PersonFormData,
|
|
123
134
|
PlanEntityIds,
|
|
124
135
|
SectionSpec,
|
|
125
136
|
build_facts_form_view_model,
|
|
126
137
|
facts_form_data_from_household,
|
|
127
138
|
form_cannot_represent,
|
|
139
|
+
form_view_from_token,
|
|
128
140
|
format_form_errors,
|
|
141
|
+
money_display_text,
|
|
129
142
|
parse_facts_form,
|
|
130
143
|
plan_entity_ids,
|
|
144
|
+
row_summary,
|
|
145
|
+
simple_view_shows,
|
|
131
146
|
)
|
|
132
147
|
from glidepath.app.inspector import (
|
|
133
148
|
AssumptionRow,
|
|
@@ -146,6 +161,7 @@ from glidepath.app.montecarlo import (
|
|
|
146
161
|
MONTE_CARLO_SEED_MESSAGE,
|
|
147
162
|
MONTE_CARLO_STALE_MESSAGE,
|
|
148
163
|
NO_MONTE_CARLO_MESSAGE,
|
|
164
|
+
NO_SPENDING_ENTERED,
|
|
149
165
|
MonteCarloMetric,
|
|
150
166
|
MonteCarloPanelViewModel,
|
|
151
167
|
RunModeOption,
|
|
@@ -158,6 +174,7 @@ from glidepath.app.montecarlo import (
|
|
|
158
174
|
from glidepath.app.outlook import (
|
|
159
175
|
DETERMINISTIC_BASIS_SENTENCE,
|
|
160
176
|
NO_OUTLOOK_MESSAGE,
|
|
177
|
+
NO_SPENDING_SENTENCE,
|
|
161
178
|
OUTLOOK_HEADING,
|
|
162
179
|
OUTLOOK_NO_PLAN_MESSAGE,
|
|
163
180
|
OutlookPanelViewModel,
|
|
@@ -232,17 +249,20 @@ __all__ = [
|
|
|
232
249
|
"DISCLAIMER_BODY",
|
|
233
250
|
"DISCLAIMER_DECLINE_LABEL",
|
|
234
251
|
"DISCLAIMER_TITLE",
|
|
252
|
+
"DONE_ROW_LABEL",
|
|
235
253
|
"DRAWDOWN_AGE_MESSAGE",
|
|
236
254
|
"DRAWDOWN_NO_PLAN_MESSAGE",
|
|
237
255
|
"DRAWDOWN_RUNNING_MESSAGE",
|
|
238
256
|
"DRAWDOWN_STALE_MESSAGE",
|
|
239
257
|
"DRAWDOWN_SUCCESS_MESSAGE",
|
|
258
|
+
"EDIT_ROW_LABEL",
|
|
240
259
|
"ENTITY_ID_KEY",
|
|
241
260
|
"HELP_GUIDE_INTRO",
|
|
242
261
|
"HELP_GUIDE_SECTIONS",
|
|
243
262
|
"HELP_GUIDE_TITLE",
|
|
244
263
|
"HELP_MENU_LABEL",
|
|
245
264
|
"HIDE_ADVANCED_LABEL",
|
|
265
|
+
"HIDE_DETAILS_LABEL",
|
|
246
266
|
"INCOME_PREFERENCE_ANNUITY",
|
|
247
267
|
"INCOME_PREFERENCE_KEY",
|
|
248
268
|
"MONTE_CARLO_CHART_TITLE",
|
|
@@ -259,6 +279,8 @@ __all__ = [
|
|
|
259
279
|
"NO_OUTLOOK_MESSAGE",
|
|
260
280
|
"NO_PROJECTION_MESSAGE",
|
|
261
281
|
"NO_RETIREMENT_MESSAGE",
|
|
282
|
+
"NO_SPENDING_ENTERED",
|
|
283
|
+
"NO_SPENDING_SENTENCE",
|
|
262
284
|
"OUTLOOK_HEADING",
|
|
263
285
|
"OUTLOOK_NO_PLAN_MESSAGE",
|
|
264
286
|
"OVERRIDE_SOURCE",
|
|
@@ -274,6 +296,10 @@ __all__ = [
|
|
|
274
296
|
"RETIREMENT_SUCCESS_MESSAGE",
|
|
275
297
|
"RUN_FAILED_PREFIX",
|
|
276
298
|
"SHOW_ADVANCED_LABEL",
|
|
299
|
+
"SHOW_DETAILS_LABEL",
|
|
300
|
+
"STATE_PENSION_INCLUDED_KEY",
|
|
301
|
+
"STATE_PENSION_LEFT_OUT",
|
|
302
|
+
"STEP_ERROR_SUFFIX",
|
|
277
303
|
"TABLE_VIEW_LABEL",
|
|
278
304
|
"UNSAVED_CHANGES_PROMPT",
|
|
279
305
|
"UNSAVED_CHANGES_TITLE",
|
|
@@ -302,10 +328,13 @@ __all__ = [
|
|
|
302
328
|
"FactsFormViewModel",
|
|
303
329
|
"FactsSubmissionOutcome",
|
|
304
330
|
"FieldKind",
|
|
331
|
+
"FieldLevel",
|
|
305
332
|
"FieldSpec",
|
|
306
333
|
"FileMenuViewModel",
|
|
307
334
|
"FirstRunState",
|
|
308
335
|
"FormError",
|
|
336
|
+
"FormStep",
|
|
337
|
+
"FormView",
|
|
309
338
|
"HelpGuideViewModel",
|
|
310
339
|
"HelpSectionViewModel",
|
|
311
340
|
"InspectorViewModel",
|
|
@@ -356,6 +385,7 @@ __all__ = [
|
|
|
356
385
|
"facts_saved_message",
|
|
357
386
|
"fill_tooltip",
|
|
358
387
|
"form_cannot_represent",
|
|
388
|
+
"form_view_from_token",
|
|
359
389
|
"format_date",
|
|
360
390
|
"format_form_errors",
|
|
361
391
|
"format_money",
|
|
@@ -367,6 +397,7 @@ __all__ = [
|
|
|
367
397
|
"load_plan_state",
|
|
368
398
|
"load_state",
|
|
369
399
|
"metric_from_key",
|
|
400
|
+
"money_display_text",
|
|
370
401
|
"monte_carlo_running_status",
|
|
371
402
|
"parse_facts_form",
|
|
372
403
|
"path_pool",
|
|
@@ -374,13 +405,16 @@ __all__ = [
|
|
|
374
405
|
"plan_entity_ids",
|
|
375
406
|
"plan_run_config",
|
|
376
407
|
"record_disclaimer_acknowledged",
|
|
408
|
+
"record_facts_view",
|
|
377
409
|
"record_last_plan_path",
|
|
378
410
|
"report_exported_message",
|
|
411
|
+
"row_summary",
|
|
379
412
|
"run_mode_from_key",
|
|
380
413
|
"run_mode_key",
|
|
381
414
|
"save_plan_state",
|
|
382
415
|
"scenario_target_options",
|
|
383
416
|
"should_show_disclaimer",
|
|
417
|
+
"simple_view_shows",
|
|
384
418
|
"state_marked_saved",
|
|
385
419
|
"state_with_backtest",
|
|
386
420
|
"state_with_drawdown",
|
|
@@ -17,8 +17,13 @@ plan.
|
|
|
17
17
|
from dataclasses import dataclass, replace
|
|
18
18
|
from typing import TYPE_CHECKING, Any, Final
|
|
19
19
|
|
|
20
|
-
from glidepath.app.display import format_money
|
|
21
|
-
from glidepath.app.montecarlo import
|
|
20
|
+
from glidepath.app.display import format_money
|
|
21
|
+
from glidepath.app.montecarlo import (
|
|
22
|
+
BAND_SPECS,
|
|
23
|
+
SUCCESS_RATE_LABEL,
|
|
24
|
+
spending_entered,
|
|
25
|
+
success_text,
|
|
26
|
+
)
|
|
22
27
|
from glidepath.app.plan import PlanState, plan_run_config, region_for, replanned_state
|
|
23
28
|
from glidepath.core import Money, run_windows
|
|
24
29
|
from glidepath.regions.uk import load_returns_history
|
|
@@ -199,7 +204,12 @@ def build_backtest_panel(
|
|
|
199
204
|
elif result is None or ending_pot_deflator is None:
|
|
200
205
|
message = NO_BACKTEST_MESSAGE
|
|
201
206
|
else:
|
|
202
|
-
metrics = _metrics(
|
|
207
|
+
metrics = _metrics(
|
|
208
|
+
result,
|
|
209
|
+
ending_pot_deflator,
|
|
210
|
+
basis_suffix,
|
|
211
|
+
spending_entered=spending_entered(state),
|
|
212
|
+
)
|
|
203
213
|
first = result.outcomes[0].start_year
|
|
204
214
|
last = result.outcomes[-1].start_year
|
|
205
215
|
year_placeholder = f"{first}-{last}"
|
|
@@ -241,14 +251,22 @@ def _window_value(
|
|
|
241
251
|
|
|
242
252
|
|
|
243
253
|
def _metrics(
|
|
244
|
-
result: BacktestResult,
|
|
254
|
+
result: BacktestResult,
|
|
255
|
+
ending_pot_deflator: Decimal,
|
|
256
|
+
basis_suffix: str,
|
|
257
|
+
*,
|
|
258
|
+
spending_entered: bool,
|
|
245
259
|
) -> tuple[BacktestMetric, ...]:
|
|
246
260
|
"""The backtest readout rows, mirroring the Monte Carlo metrics."""
|
|
247
261
|
first = result.outcomes[0].start_year
|
|
248
262
|
last = result.outcomes[-1].start_year
|
|
249
263
|
rows = [
|
|
250
264
|
BacktestMetric(
|
|
251
|
-
label=SUCCESS_RATE_LABEL,
|
|
265
|
+
label=SUCCESS_RATE_LABEL,
|
|
266
|
+
value=success_text(
|
|
267
|
+
result.success_rate,
|
|
268
|
+
tested=spending_entered or result.success_rate < 1,
|
|
269
|
+
),
|
|
252
270
|
),
|
|
253
271
|
BacktestMetric(
|
|
254
272
|
label=WINDOWS_LABEL,
|
|
@@ -52,13 +52,19 @@ HELP_GUIDE_SECTIONS: Final[tuple[tuple[str, str], ...]] = (
|
|
|
52
52
|
(
|
|
53
53
|
"Facts — enter what you know",
|
|
54
54
|
(
|
|
55
|
+
"The Facts tab opens in a Simple view that asks only who you "
|
|
56
|
+
"are and what you have; switch to Detailed for everything "
|
|
57
|
+
"below — both are the same form, and anything you have filled "
|
|
58
|
+
"in shows in either. "
|
|
55
59
|
"The Facts tab captures what you state: your date of birth and "
|
|
56
60
|
"tax residency, planned retirement age, household spending, "
|
|
57
|
-
"your state pension record, each
|
|
61
|
+
"your state pension record, each account (workplace "
|
|
58
62
|
"pension, SIPP, ISA, LISA, general account, or cash) with its "
|
|
59
|
-
"balance, contributions
|
|
63
|
+
"balance, contributions — a workplace pension's grow with "
|
|
64
|
+
"earnings unless you choose a fixed amount in Detailed — "
|
|
65
|
+
"and optionally its own equity "
|
|
60
66
|
"allocation percentage — blank follows the de-risking glide "
|
|
61
|
-
"path, 100 models an all-equity
|
|
67
|
+
"path, 100 models an all-equity account — and any defined "
|
|
62
68
|
"benefit pension. "
|
|
63
69
|
"The Retirement income section holds two choices: a "
|
|
64
70
|
"preference between drawdown only (the default — everything "
|
|
@@ -70,16 +76,19 @@ HELP_GUIDE_SECTIONS: Final[tuple[tuple[str, str], ...]] = (
|
|
|
70
76
|
"different ages annuitising in stages — and a drawdown withdrawal "
|
|
71
77
|
"strategy: fixed real spending (the default), a fixed "
|
|
72
78
|
"percentage of the pot, guardrails, or natural yield. "
|
|
73
|
-
"Add one
|
|
79
|
+
"Add one account, DB pension, or annuity section per item. "
|
|
74
80
|
"Fields marked * are required, hovering any field repeats "
|
|
75
81
|
'its guidance, and each section\'s "More options" reveals '
|
|
76
82
|
"its rarely needed fields — anything already filled in, or "
|
|
77
83
|
"in error, is shown automatically. Dates can "
|
|
78
84
|
"be typed or picked from the calendar assist, and the "
|
|
79
85
|
'"as of" dates on balances and your state pension forecast '
|
|
80
|
-
"default to today when left blank. Your state pension
|
|
81
|
-
"your official DWP forecast (gov.uk/check-state-pension)
|
|
82
|
-
"the app never re-derives what DWP has already computed
|
|
86
|
+
"default to today when left blank. Your state pension comes "
|
|
87
|
+
"from your official DWP forecast (gov.uk/check-state-pension) "
|
|
88
|
+
"— the app never re-derives what DWP has already computed; "
|
|
89
|
+
"leave it blank and the full new State Pension is assumed "
|
|
90
|
+
"from your State Pension age, shown as an assumption, or "
|
|
91
|
+
"choose to leave the State Pension out. "
|
|
83
92
|
'Press "Save facts and project" to run the '
|
|
84
93
|
"projection — if anything cannot be read, the message under "
|
|
85
94
|
"the buttons and a note under each affected field say what "
|
|
@@ -80,6 +80,9 @@ ASSUMPTION_NAMES: Final[Mapping[str, str]] = {
|
|
|
80
80
|
"annuity.age_adjustment": "Annuity rate age adjustment",
|
|
81
81
|
"db.survivor_fraction": "DB survivor pension fraction",
|
|
82
82
|
"spending.survivor_multiplier": "Survivor spending multiplier",
|
|
83
|
+
"state_pension.default_fraction": (
|
|
84
|
+
"State Pension without a forecast (share of the full rate)"
|
|
85
|
+
),
|
|
83
86
|
}
|
|
84
87
|
"""Human display names for the shipped assumption keys (roadmap 8.3).
|
|
85
88
|
|
|
@@ -10,7 +10,7 @@ the user's own statement).
|
|
|
10
10
|
|
|
11
11
|
The persona extends the §4.5 golden scenario: a 35-year-old on a
|
|
12
12
|
£52,000 salary targeting retirement at 62, with a workplace DC pension
|
|
13
|
-
(net pay, employer-matched, growing with earnings), a stocks & shares
|
|
13
|
+
(net pay, employer-matched, growing with earnings by default), a stocks & shares
|
|
14
14
|
ISA, a mid-career state pension forecast, and a £24,000 net spending
|
|
15
15
|
need in today's money. The numbers are tuned so the plan holds
|
|
16
16
|
together — the deterministic projection meets every period's need and
|
|
@@ -39,7 +39,6 @@ _WORKPLACE_DC = {
|
|
|
39
39
|
"employee_contribution": "4200",
|
|
40
40
|
"employer_contribution": "3150",
|
|
41
41
|
"relief_mechanic": "net_pay",
|
|
42
|
-
"escalation": "earnings",
|
|
43
42
|
}
|
|
44
43
|
# The ISA saving is £400/month — deliberately neither the £4,000 LISA
|
|
45
44
|
# allowance nor the £5,000 savings starting-rate limit either side of it.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
"""Local per-user settings: disclaimer
|
|
1
|
+
"""Local per-user settings: disclaimer, last plan, facts view (§1, §4.7, §4.13).
|
|
2
2
|
|
|
3
|
-
A tiny local JSON file records the disclaimer acknowledgement date
|
|
4
|
-
the path of the last plan file saved or opened,
|
|
5
|
-
|
|
3
|
+
A tiny local JSON file records the disclaimer acknowledgement date,
|
|
4
|
+
the path of the last plan file saved or opened, and the facts form's
|
|
5
|
+
Simple/Detailed view, so the next launch can skip the first-run
|
|
6
|
+
screen, reopen the user's plan, and show the form the way they left
|
|
7
|
+
it. The view is a display preference, never plan data (§4.13). Anything
|
|
6
8
|
unreadable — missing file, bad JSON, wrong shape, a schema version
|
|
7
9
|
this reader does not know — degrades to an empty state, so the
|
|
8
10
|
disclaimer is shown again (and no plan auto-opens) rather than
|
|
@@ -14,6 +16,7 @@ so this module never touches Qt or a display.
|
|
|
14
16
|
import json
|
|
15
17
|
import os
|
|
16
18
|
import sys
|
|
19
|
+
from copy import replace
|
|
17
20
|
from dataclasses import dataclass
|
|
18
21
|
from datetime import date
|
|
19
22
|
from pathlib import Path
|
|
@@ -23,6 +26,7 @@ _STATE_SCHEMA_VERSION = 1
|
|
|
23
26
|
_SCHEMA_KEY = "schema"
|
|
24
27
|
_ACKNOWLEDGED_KEY = "disclaimer_acknowledged_on"
|
|
25
28
|
_LAST_PLAN_KEY = "last_plan_path"
|
|
29
|
+
_FACTS_VIEW_KEY = "facts_view"
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
@dataclass(frozen=True)
|
|
@@ -31,6 +35,8 @@ class FirstRunState:
|
|
|
31
35
|
|
|
32
36
|
disclaimer_acknowledged_on: date | None
|
|
33
37
|
last_plan_path: Path | None = None
|
|
38
|
+
facts_view: str | None = None
|
|
39
|
+
"""The facts form's view token (``FormView`` value), if ever chosen."""
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
_EMPTY_STATE = FirstRunState(disclaimer_acknowledged_on=None)
|
|
@@ -61,6 +67,12 @@ def _last_plan_from(raw: dict[str, Any]) -> Path | None:
|
|
|
61
67
|
return Path(text)
|
|
62
68
|
|
|
63
69
|
|
|
70
|
+
def _facts_view_from(raw: dict[str, Any]) -> str | None:
|
|
71
|
+
"""The recorded facts view token; ``None`` on any defect."""
|
|
72
|
+
text = raw.get(_FACTS_VIEW_KEY)
|
|
73
|
+
return text if isinstance(text, str) and text else None
|
|
74
|
+
|
|
75
|
+
|
|
64
76
|
def load_state(path: Path) -> FirstRunState:
|
|
65
77
|
"""Read the local state, degrading to an empty state on any defect.
|
|
66
78
|
|
|
@@ -76,6 +88,7 @@ def load_state(path: Path) -> FirstRunState:
|
|
|
76
88
|
return FirstRunState(
|
|
77
89
|
disclaimer_acknowledged_on=_acknowledged_from(raw),
|
|
78
90
|
last_plan_path=_last_plan_from(raw),
|
|
91
|
+
facts_view=_facts_view_from(raw),
|
|
79
92
|
)
|
|
80
93
|
|
|
81
94
|
|
|
@@ -86,29 +99,24 @@ def _write_state(path: Path, state: FirstRunState) -> None:
|
|
|
86
99
|
payload[_ACKNOWLEDGED_KEY] = state.disclaimer_acknowledged_on.isoformat()
|
|
87
100
|
if state.last_plan_path is not None:
|
|
88
101
|
payload[_LAST_PLAN_KEY] = str(state.last_plan_path)
|
|
102
|
+
if state.facts_view is not None:
|
|
103
|
+
payload[_FACTS_VIEW_KEY] = state.facts_view
|
|
89
104
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
90
105
|
path.write_text(json.dumps(payload, indent=2) + "\n", encoding="utf-8")
|
|
91
106
|
|
|
92
107
|
|
|
93
108
|
def record_disclaimer_acknowledged(path: Path, acknowledged_on: date) -> None:
|
|
94
109
|
"""Persist the acknowledgement so later runs skip the first-run screen."""
|
|
95
|
-
state = load_state(path)
|
|
96
110
|
_write_state(
|
|
97
|
-
path,
|
|
98
|
-
FirstRunState(
|
|
99
|
-
disclaimer_acknowledged_on=acknowledged_on,
|
|
100
|
-
last_plan_path=state.last_plan_path,
|
|
101
|
-
),
|
|
111
|
+
path, replace(load_state(path), disclaimer_acknowledged_on=acknowledged_on)
|
|
102
112
|
)
|
|
103
113
|
|
|
104
114
|
|
|
105
115
|
def record_last_plan_path(path: Path, plan_path: Path) -> None:
|
|
106
116
|
"""Persist the plan file just saved or opened, for the next launch."""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
),
|
|
114
|
-
)
|
|
117
|
+
_write_state(path, replace(load_state(path), last_plan_path=plan_path))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def record_facts_view(path: Path, view: str) -> None:
|
|
121
|
+
"""Persist the facts form's chosen view token for the next launch."""
|
|
122
|
+
_write_state(path, replace(load_state(path), facts_view=view))
|