owlplanner 2025.2.22__py3-none-any.whl → 2025.2.24__py3-none-any.whl
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.
- owlplanner/config.py +49 -49
- owlplanner/plan.py +0 -1
- owlplanner/version.py +1 -1
- {owlplanner-2025.2.22.dist-info → owlplanner-2025.2.24.dist-info}/METADATA +1 -1
- {owlplanner-2025.2.22.dist-info → owlplanner-2025.2.24.dist-info}/RECORD +7 -7
- {owlplanner-2025.2.22.dist-info → owlplanner-2025.2.24.dist-info}/WHEEL +0 -0
- {owlplanner-2025.2.22.dist-info → owlplanner-2025.2.24.dist-info}/licenses/LICENSE +0 -0
owlplanner/config.py
CHANGED
|
@@ -19,7 +19,7 @@ from owlplanner import logging
|
|
|
19
19
|
from owlplanner.rates import FROM, TO
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
def saveConfig(
|
|
22
|
+
def saveConfig(myplan, file, mylog):
|
|
23
23
|
"""
|
|
24
24
|
Save case parameters and return a dictionary containing all parameters.
|
|
25
25
|
"""
|
|
@@ -27,87 +27,87 @@ def saveConfig(plan, file, mylog):
|
|
|
27
27
|
accountTypes = ["taxable", "tax-deferred", "tax-free"]
|
|
28
28
|
|
|
29
29
|
diconf = {}
|
|
30
|
-
diconf["Plan Name"] =
|
|
31
|
-
diconf["Description"] =
|
|
30
|
+
diconf["Plan Name"] = myplan._name
|
|
31
|
+
diconf["Description"] = myplan._description
|
|
32
32
|
|
|
33
33
|
# Basic Info.
|
|
34
34
|
diconf["Basic Info"] = {
|
|
35
|
-
"Status": ["unknown", "single", "married"][
|
|
36
|
-
"Names":
|
|
37
|
-
"Birth year":
|
|
38
|
-
"Life expectancy":
|
|
39
|
-
"Start date":
|
|
35
|
+
"Status": ["unknown", "single", "married"][myplan.N_i],
|
|
36
|
+
"Names": myplan.inames,
|
|
37
|
+
"Birth year": myplan.yobs.tolist(),
|
|
38
|
+
"Life expectancy": myplan.expectancy.tolist(),
|
|
39
|
+
"Start date": myplan.startDate,
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
# Assets.
|
|
43
43
|
diconf["Assets"] = {}
|
|
44
|
-
for j in range(
|
|
45
|
-
amounts =
|
|
44
|
+
for j in range(myplan.N_j):
|
|
45
|
+
amounts = myplan.beta_ij[:, j] / 1000
|
|
46
46
|
diconf["Assets"][f"{accountTypes[j]} savings balances"] = amounts.tolist()
|
|
47
|
-
if
|
|
48
|
-
diconf["Assets"]["Beneficiary fractions"] =
|
|
49
|
-
diconf["Assets"]["Spousal surplus deposit fraction"] =
|
|
47
|
+
if myplan.N_i == 2:
|
|
48
|
+
diconf["Assets"]["Beneficiary fractions"] = myplan.phi_j.tolist()
|
|
49
|
+
diconf["Assets"]["Spousal surplus deposit fraction"] = myplan.eta
|
|
50
50
|
|
|
51
51
|
# Wages and Contributions.
|
|
52
|
-
diconf["Wages and Contributions"] = {"Contributions file name":
|
|
52
|
+
diconf["Wages and Contributions"] = {"Contributions file name": myplan.timeListsFileName}
|
|
53
53
|
|
|
54
54
|
# Fixed Income.
|
|
55
55
|
diconf["Fixed Income"] = {
|
|
56
|
-
"Pension amounts": (
|
|
57
|
-
"Pension ages":
|
|
58
|
-
"Pension indexed":
|
|
59
|
-
"Social security amounts": (
|
|
60
|
-
"Social security ages":
|
|
56
|
+
"Pension amounts": (myplan.pensionAmounts / 1000).tolist(),
|
|
57
|
+
"Pension ages": myplan.pensionAges.tolist(),
|
|
58
|
+
"Pension indexed": myplan.pensionIndexed,
|
|
59
|
+
"Social security amounts": (myplan.ssecAmounts / 1000).tolist(),
|
|
60
|
+
"Social security ages": myplan.ssecAges.tolist(),
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
# Rates Selection.
|
|
64
64
|
diconf["Rates Selection"] = {
|
|
65
|
-
"Heirs rate on tax-deferred estate": float(100 *
|
|
66
|
-
"Long-term capital gain tax rate": float(100 *
|
|
67
|
-
"Dividend tax rate": float(100 *
|
|
68
|
-
"TCJA expiration year":
|
|
69
|
-
"Method":
|
|
65
|
+
"Heirs rate on tax-deferred estate": float(100 * myplan.nu),
|
|
66
|
+
"Long-term capital gain tax rate": float(100 * myplan.psi),
|
|
67
|
+
"Dividend tax rate": float(100 * myplan.mu),
|
|
68
|
+
"TCJA expiration year": myplan.yTCJA,
|
|
69
|
+
"Method": myplan.rateMethod,
|
|
70
70
|
}
|
|
71
|
-
if
|
|
72
|
-
diconf["Rates Selection"]["Values"] = (100 *
|
|
73
|
-
if
|
|
74
|
-
diconf["Rates Selection"]["Standard deviations"] = (100 *
|
|
75
|
-
diconf["Rates Selection"]["Correlations"] =
|
|
76
|
-
if
|
|
77
|
-
diconf["Rates Selection"]["From"] = int(
|
|
78
|
-
diconf["Rates Selection"]["To"] = int(
|
|
71
|
+
if myplan.rateMethod in ["user", "stochastic"]:
|
|
72
|
+
diconf["Rates Selection"]["Values"] = (100 * myplan.rateValues).tolist()
|
|
73
|
+
if myplan.rateMethod in ["stochastic"]:
|
|
74
|
+
diconf["Rates Selection"]["Standard deviations"] = (100 * myplan.rateStdev).tolist()
|
|
75
|
+
diconf["Rates Selection"]["Correlations"] = myplan.rateCorr.tolist()
|
|
76
|
+
if myplan.rateMethod in ["historical average", "historical", "histochastic"]:
|
|
77
|
+
diconf["Rates Selection"]["From"] = int(myplan.rateFrm)
|
|
78
|
+
diconf["Rates Selection"]["To"] = int(myplan.rateTo)
|
|
79
79
|
else:
|
|
80
80
|
diconf["Rates Selection"]["From"] = int(FROM)
|
|
81
81
|
diconf["Rates Selection"]["To"] = int(TO)
|
|
82
82
|
|
|
83
83
|
# Asset Allocation.
|
|
84
84
|
diconf["Asset Allocation"] = {
|
|
85
|
-
"Interpolation method":
|
|
86
|
-
"Interpolation center": float(
|
|
87
|
-
"Interpolation width": float(
|
|
88
|
-
"Type":
|
|
85
|
+
"Interpolation method": myplan.interpMethod,
|
|
86
|
+
"Interpolation center": float(myplan.interpCenter),
|
|
87
|
+
"Interpolation width": float(myplan.interpWidth),
|
|
88
|
+
"Type": myplan.ARCoord,
|
|
89
89
|
}
|
|
90
|
-
if
|
|
90
|
+
if myplan.ARCoord == "account":
|
|
91
91
|
for accType in accountTypes:
|
|
92
|
-
diconf["Asset Allocation"][accType] =
|
|
92
|
+
diconf["Asset Allocation"][accType] = myplan.boundsAR[accType]
|
|
93
93
|
else:
|
|
94
|
-
diconf["Asset Allocation"]["generic"] =
|
|
94
|
+
diconf["Asset Allocation"]["generic"] = myplan.boundsAR["generic"]
|
|
95
95
|
|
|
96
96
|
# Optimization Parameters.
|
|
97
97
|
diconf["Optimization Parameters"] = {
|
|
98
|
-
"Spending profile":
|
|
99
|
-
"Surviving spouse spending percent": int(100 *
|
|
98
|
+
"Spending profile": myplan.spendingProfile,
|
|
99
|
+
"Surviving spouse spending percent": int(100 * myplan.chi),
|
|
100
100
|
}
|
|
101
|
-
if
|
|
102
|
-
diconf["Optimization Parameters"]["Smile dip"] = int(
|
|
103
|
-
diconf["Optimization Parameters"]["Smile increase"] = int(
|
|
104
|
-
diconf["Optimization Parameters"]["Smile delay"] = int(
|
|
101
|
+
if myplan.spendingProfile == "smile":
|
|
102
|
+
diconf["Optimization Parameters"]["Smile dip"] = int(myplan.smileDip)
|
|
103
|
+
diconf["Optimization Parameters"]["Smile increase"] = int(myplan.smileIncrease)
|
|
104
|
+
diconf["Optimization Parameters"]["Smile delay"] = int(myplan.smileDelay)
|
|
105
105
|
|
|
106
|
-
diconf["Optimization Parameters"]["Objective"] =
|
|
107
|
-
diconf["Solver Options"] =
|
|
106
|
+
diconf["Optimization Parameters"]["Objective"] = myplan.objective
|
|
107
|
+
diconf["Solver Options"] = myplan.solverOptions
|
|
108
108
|
|
|
109
109
|
# Results.
|
|
110
|
-
diconf["Results"] = {"Default plots":
|
|
110
|
+
diconf["Results"] = {"Default plots": myplan.defaultPlots}
|
|
111
111
|
|
|
112
112
|
if isinstance(file, str):
|
|
113
113
|
filename = file
|
|
@@ -186,7 +186,7 @@ def readConfig(file, *, verbose=True, logstreams=None, readContributions=True):
|
|
|
186
186
|
s = ["", "s"][icount - 1]
|
|
187
187
|
mylog.vprint(f"Plan for {icount} individual{s}: {inames}.")
|
|
188
188
|
p = plan.Plan(inames, yobs, expectancy, name, startDate=startDate, verbose=True, logstreams=logstreams)
|
|
189
|
-
|
|
189
|
+
p._description = diconf.get("Description", "")
|
|
190
190
|
|
|
191
191
|
# Assets.
|
|
192
192
|
balances = {}
|
owlplanner/plan.py
CHANGED
|
@@ -2077,7 +2077,6 @@ class Plan(object):
|
|
|
2077
2077
|
dic = {}
|
|
2078
2078
|
# Results
|
|
2079
2079
|
dic["Plan name"] = self._name
|
|
2080
|
-
dic["Brief description"] = self._description
|
|
2081
2080
|
dic[f"Net yearly spending basis in {now}$"] = u.d(self.g_n[0] / self.xi_n[0])
|
|
2082
2081
|
dic[f"Net yearly spending for year {now}"] = u.d(self.g_n[0] / self.yearFracLeft)
|
|
2083
2082
|
dic[f"Net spending remaining in year {now}"] = u.d(self.g_n[0])
|
owlplanner/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2025.02.
|
|
1
|
+
__version__ = "2025.02.23"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
owlplanner/__init__.py,sha256=QqrdT0Qks20osBTg7h0vJHAxpP9lL7DA99xb0nYbtw4,254
|
|
2
2
|
owlplanner/abcapi.py,sha256=LbzW_KcNy0IeHp42MUHwGu_H67B2h_e1_vu-c2ACTkQ,6646
|
|
3
|
-
owlplanner/config.py,sha256=
|
|
3
|
+
owlplanner/config.py,sha256=bvqoOWrdPrWYQF9-PS_n00MoyZkAsmMOSczhTUFRGVU,12257
|
|
4
4
|
owlplanner/logging.py,sha256=tYMw04O-XYSzjTj36fmKJGLcE1VkK6k6oJNeqtKXzuc,2530
|
|
5
|
-
owlplanner/plan.py,sha256=
|
|
5
|
+
owlplanner/plan.py,sha256=Nv7gcfmc5jCtifeLoGL_gXWLGIxUSjJqp-T3R_3M26E,113806
|
|
6
6
|
owlplanner/progress.py,sha256=8jlCvvtgDI89zXVNMBg1-lnEyhpPvKQS2X5oAIpoOVQ,384
|
|
7
7
|
owlplanner/rates.py,sha256=TN407qU4n-bac1oymkQ_n2QKEPwFQxy6JZVGwgIkLQU,15585
|
|
8
8
|
owlplanner/tax2025.py,sha256=B-A5eU3wxdcAaxRCbT3qI-JEKoD_ZeNbg_86XhNdQEI,7745
|
|
9
9
|
owlplanner/timelists.py,sha256=tYieZU67FT6TCcQQis36JaXGI7dT6NqD7RvdEjgJL4M,4026
|
|
10
10
|
owlplanner/utils.py,sha256=HM70W60qB41zfnbl2LltNwAuLYHyy5XYbwnbNcaa6FE,2351
|
|
11
|
-
owlplanner/version.py,sha256=
|
|
11
|
+
owlplanner/version.py,sha256=85qxkfG2OiCeMaWpV6ROXWN2-KYejMXo-QU_lI_mUOM,28
|
|
12
12
|
owlplanner/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
owlplanner/data/rates.csv,sha256=6fxg56BVVORrj9wJlUGFdGXKvOX5r7CSca8uhUbbuIU,3734
|
|
14
|
-
owlplanner-2025.2.
|
|
15
|
-
owlplanner-2025.2.
|
|
16
|
-
owlplanner-2025.2.
|
|
17
|
-
owlplanner-2025.2.
|
|
14
|
+
owlplanner-2025.2.24.dist-info/METADATA,sha256=SPZG_GmQNM5GBp6b129k6FN9niwL7Ja-Pn58w_ELXkg,53506
|
|
15
|
+
owlplanner-2025.2.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
owlplanner-2025.2.24.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
17
|
+
owlplanner-2025.2.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|