owlplanner 2025.1.24__tar.gz → 2025.1.27__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.
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/PKG-INFO +11 -1
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/README.md +9 -0
- owlplanner-2025.1.24/notebooks/case_john+sally.ipynb → owlplanner-2025.1.27/notebooks/john+sally.ipynb +1 -1
- owlplanner-2025.1.24/notebooks/case_kim+sam.ipynb → owlplanner-2025.1.27/notebooks/kim+sam.ipynb +1 -1
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/notebooks/tutorial_1.ipynb +3 -3
- owlplanner-2025.1.27/notebooks/tutorial_2.ipynb +377 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/pyproject.toml +2 -1
- owlplanner-2025.1.27/src/owlplanner/data/__init__.py +0 -0
- owlplanner-2025.1.27/src/owlplanner/data/rates.csv +98 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/plan.py +13 -5
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/rates.py +18 -658
- owlplanner-2025.1.27/src/owlplanner/timelists.py +123 -0
- owlplanner-2025.1.27/src/owlplanner/version.py +1 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Asset_Allocation.py +8 -6
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Assets.py +2 -2
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Basic_Info.py +13 -16
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Case_Results.py +25 -22
- owlplanner-2025.1.27/ui/Case_Summary.py +21 -0
- owlplanner-2025.1.27/ui/Case_Worksheets.py +25 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Documentation.py +42 -33
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Fixed_Income.py +3 -3
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Historical_Range.py +1 -1
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Logs.py +1 -1
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Monte_Carlo.py +1 -1
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Optimization_Parameters.py +9 -9
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Quick_Start.py +7 -7
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Rates_Selection.py +4 -5
- owlplanner-2025.1.27/ui/Wages_And_Contributions.py +56 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/main.py +8 -5
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/owlbridge.py +55 -35
- owlplanner-2025.1.27/ui/requirements.txt +10 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/sskeys.py +33 -5
- owlplanner-2025.1.24/FashionMNIST/raw/t10k-images-idx3-ubyte +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/t10k-images-idx3-ubyte.gz +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/t10k-labels-idx1-ubyte +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/t10k-labels-idx1-ubyte.gz +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/train-images-idx3-ubyte +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/train-images-idx3-ubyte.gz +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/train-labels-idx1-ubyte +0 -0
- owlplanner-2025.1.24/FashionMNIST/raw/train-labels-idx1-ubyte.gz +0 -0
- owlplanner-2025.1.24/examples/case_jack+jill - Copy.toml +0 -57
- owlplanner-2025.1.24/examples/jack+jill - Copy.xlsx +0 -0
- owlplanner-2025.1.24/notebooks/tutorial_2.ipynb +0 -624
- owlplanner-2025.1.24/src/owlplanner/tax2024.py +0 -234
- owlplanner-2025.1.24/src/owlplanner/timelists.py +0 -144
- owlplanner-2025.1.24/src/owlplanner/version.py +0 -1
- owlplanner-2025.1.24/test.py +0 -6
- owlplanner-2025.1.24/ttt.py +0 -13
- owlplanner-2025.1.24/ui/Case_Summary.py +0 -18
- owlplanner-2025.1.24/ui/Case_Worksheets.py +0 -23
- owlplanner-2025.1.24/ui/Wages_And_Contributions.py +0 -60
- owlplanner-2025.1.24/ui/Wages_And_Contributions.py.wierd +0 -84
- owlplanner-2025.1.24/ui/requirements.txt +0 -10
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/.devcontainer/devcontainer.json +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/.flake8 +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/.github/workflows/github-actions-runtests.yml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/.gitignore +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/INSTALL.md +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/LICENSE +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/AD-taxDef.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/AD-taxFree.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/AD-taxable.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/Hist_Bequest.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/Hist_Spending.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/MC-tutorial2a.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/MC-tutorial2b.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/OwlUI.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/allocations.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/owl.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/profile.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/ratesCorrelations.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/ratesPlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/savingsPlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/sourcesPlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/spendingPlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/taxIncomePlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/images/taxesPlot.png +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/owl.pdf +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/docs/owl.tex +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/case_jack+jill.toml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/case_joe.toml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/case_john+sally.toml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/case_kim+sam-bequest.toml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/case_kim+sam-spending.toml +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/jack+jill.xlsx +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/joe.xlsx +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/john+sally.xlsx +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/examples/template.xlsx +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/notebooks/template.ipynb +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/notebooks/tutorial_3.ipynb +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/owlplanner.cmd +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/requirements.txt +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/__init__.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/abcapi.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/config.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/logging.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/progress.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/tax2025.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/src/owlplanner/utils.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/tests/test_logger.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/tests/test_regressions.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/tests/test_repro.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/tests/test_toml_cases.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/tests/test_units.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/About_Owl.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/README.md +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/Settings.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/plots.py +0 -0
- {owlplanner-2025.1.24 → owlplanner-2025.1.27}/ui/progress.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: owlplanner
|
|
3
|
-
Version: 2025.1.
|
|
3
|
+
Version: 2025.1.27
|
|
4
4
|
Summary: Owl: Retirement planner with great wisdom
|
|
5
5
|
Project-URL: HomePage, https://github.com/mdlacasse/owl
|
|
6
6
|
Project-URL: Repository, https://github.com/mdlacasse/owl
|
|
@@ -698,6 +698,7 @@ Requires-Dist: pandas
|
|
|
698
698
|
Requires-Dist: scipy
|
|
699
699
|
Requires-Dist: seaborn
|
|
700
700
|
Requires-Dist: streamlit
|
|
701
|
+
Requires-Dist: toml
|
|
701
702
|
Description-Content-Type: text/markdown
|
|
702
703
|
|
|
703
704
|
|
|
@@ -707,6 +708,15 @@ Description-Content-Type: text/markdown
|
|
|
707
708
|
|
|
708
709
|
<img align=right src="https://raw.github.com/mdlacasse/Owl/main/docs/images/owl.png" width="250">
|
|
709
710
|
|
|
711
|
+
-----
|
|
712
|
+
|
|
713
|
+
### TLDR
|
|
714
|
+
Owl is a planning tool that uses a linear programming optimization algorithm to provide guidance on retirement decisions.
|
|
715
|
+
|
|
716
|
+
Go to [owlplanner.streamlit.app](https://owlplanner.streamlit.app) and explore the app to learn about its capabilities.
|
|
717
|
+
|
|
718
|
+
-----
|
|
719
|
+
|
|
710
720
|
This package is a retirement modeling framework for exploring the sensitivity of retirement financial decisions.
|
|
711
721
|
Strictly speaking, it is not a planning tool, but more an environment for exploring *what if* scenarios.
|
|
712
722
|
It provides different realizations of a financial strategy through the rigorous
|
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
<img align=right src="https://raw.github.com/mdlacasse/Owl/main/docs/images/owl.png" width="250">
|
|
7
7
|
|
|
8
|
+
-----
|
|
9
|
+
|
|
10
|
+
### TLDR
|
|
11
|
+
Owl is a planning tool that uses a linear programming optimization algorithm to provide guidance on retirement decisions.
|
|
12
|
+
|
|
13
|
+
Go to [owlplanner.streamlit.app](https://owlplanner.streamlit.app) and explore the app to learn about its capabilities.
|
|
14
|
+
|
|
15
|
+
-----
|
|
16
|
+
|
|
8
17
|
This package is a retirement modeling framework for exploring the sensitivity of retirement financial decisions.
|
|
9
18
|
Strictly speaking, it is not a planning tool, but more an environment for exploring *what if* scenarios.
|
|
10
19
|
It provides different realizations of a financial strategy through the rigorous
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"source": [
|
|
30
30
|
"%%time\n",
|
|
31
31
|
"import owlplanner as owl\n",
|
|
32
|
-
"plan = owl.Plan(['John', 'Sally'], [1962, 1962], [92, 92], '
|
|
32
|
+
"plan = owl.Plan(['John', 'Sally'], [1962, 1962], [92, 92], 'john+sally')\n",
|
|
33
33
|
"plan.setAccountBalances(taxable=[200, 200], taxDeferred=[750, 750], taxFree=[50, 50])\n",
|
|
34
34
|
"# Unrealistic empty contributions and wages\n",
|
|
35
35
|
"plan.readContributions('../examples/john+sally.xlsx')\n",
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
"metadata": {},
|
|
673
673
|
"outputs": [],
|
|
674
674
|
"source": [
|
|
675
|
-
"newplan = owl.readConfig('
|
|
675
|
+
"newplan = owl.readConfig('../examples/case_jack+jill')\n",
|
|
676
676
|
"newplan.resolve()"
|
|
677
677
|
]
|
|
678
678
|
},
|
|
@@ -921,8 +921,8 @@
|
|
|
921
921
|
"metadata": {},
|
|
922
922
|
"outputs": [],
|
|
923
923
|
"source": [
|
|
924
|
-
"plan2 = owl.readConfig('
|
|
925
|
-
"plan2.rename('jack+jill-bequest
|
|
924
|
+
"plan2 = owl.readConfig('../examples/case_jack+jill')\n",
|
|
925
|
+
"plan2.rename('jack+jill-bequest')"
|
|
926
926
|
]
|
|
927
927
|
},
|
|
928
928
|
{
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "05fad639-5e11-4b6c-8911-0707768ac8ad",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"# Owl\n",
|
|
9
|
+
"## A Retirement Planning Laboratory"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"cell_type": "markdown",
|
|
14
|
+
"id": "8e98ec63-fce8-4098-8179-2d597bfb4c2e",
|
|
15
|
+
"metadata": {},
|
|
16
|
+
"source": [
|
|
17
|
+
"This package is a retirement modeling framework for exploring the sensitivity of retirement financial decisions. Strictly speaking, it is not a planning tool, but more an environment for exploring *what if* scenarios. It provides different realizations of a financial strategy. One can certainly have a savings plan, but due to the volatility of financial investments, it is impossible to have a certain asset earnings plan. This does not mean one cannot make decisions. These decisions need to be guided with an understanding of the sensitivity of the parameters.This is exactly where this tool fits it. Given your savings and spending desires, it can generate different future realizations of your strategy under different market assumptions, helping to better understand your financial situation.\n",
|
|
18
|
+
"\n",
|
|
19
|
+
"The algorithm in Owl is using the open-source HiGHS linear programming solver.\n",
|
|
20
|
+
"The complete formulation and detailed description of the underlying\n",
|
|
21
|
+
"mathematical model can be found\n",
|
|
22
|
+
"[here](https://raw.githubusercontent.com/mdlacasse/Owl/main/docs/owl.pdf).\n",
|
|
23
|
+
"\n",
|
|
24
|
+
"Copyright © 2024 - Martin-D. Lacasse\n",
|
|
25
|
+
"\n",
|
|
26
|
+
"Disclaimers: *I am not a financial planner. You make your own decisions. This program comes with no guarantee. Use at your own risk.*"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"cell_type": "markdown",
|
|
31
|
+
"id": "01e6c7da-cd31-41de-9b67-e493ae77dea8",
|
|
32
|
+
"metadata": {},
|
|
33
|
+
"source": [
|
|
34
|
+
"### <span style=\"color: blue\"> README FIRST </span>\n",
|
|
35
|
+
"<span style=\"color:black;background:yellow;font-weight:bold\">\n",
|
|
36
|
+
"Don't make changes directly to this file. Keep it as a working example. Therefore, it is recommended that you build your own case by making a copy of the template files provided where you will be able to enter your own numbers and explore your own assumptions.\n",
|
|
37
|
+
"</span>"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"cell_type": "markdown",
|
|
42
|
+
"id": "f65fbb58-4975-4a0a-beae-bff23f484b66",
|
|
43
|
+
"metadata": {},
|
|
44
|
+
"source": [
|
|
45
|
+
"# Tutorial 2 - Using the case of Jack and Jill\n",
|
|
46
|
+
"This tutorial shows how to use advanced capabilities of Owl such as Monte Carlo simulations and running simulations over a historical range. We use the same case as the one in Tutorial 1. "
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"cell_type": "markdown",
|
|
51
|
+
"id": "6df2872d-93b6-47cf-9a7d-667c44901054",
|
|
52
|
+
"metadata": {},
|
|
53
|
+
"source": [
|
|
54
|
+
"### Just some Python module bookkeeping\n",
|
|
55
|
+
"This command needs to be at the beginning of every Owl notebook."
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"cell_type": "code",
|
|
60
|
+
"execution_count": null,
|
|
61
|
+
"id": "63c9604f-4e6e-4e72-93d7-cdb5788d81d5",
|
|
62
|
+
"metadata": {
|
|
63
|
+
"scrolled": true
|
|
64
|
+
},
|
|
65
|
+
"outputs": [],
|
|
66
|
+
"source": [
|
|
67
|
+
"import owlplanner as owl"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"cell_type": "markdown",
|
|
72
|
+
"id": "a1033e24-bfab-47d1-9083-e8cf739b086f",
|
|
73
|
+
"metadata": {},
|
|
74
|
+
"source": [
|
|
75
|
+
"### Creating the plan (see Tutorial 1 for details)\n",
|
|
76
|
+
"We first create a plan as we did in the *Tutorial 1*. We removed the comments for reducing the clutter."
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"cell_type": "code",
|
|
81
|
+
"execution_count": null,
|
|
82
|
+
"id": "39121d7a",
|
|
83
|
+
"metadata": {},
|
|
84
|
+
"outputs": [],
|
|
85
|
+
"source": [
|
|
86
|
+
"plan = owl.Plan(['Jack', 'Jill'], [1962, 1965], [89, 92], 'jack+jill-spending-MC', verbose=True)"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"cell_type": "code",
|
|
91
|
+
"execution_count": null,
|
|
92
|
+
"id": "ee55774b-6f33-49fa-ae5c-85d2d466e026",
|
|
93
|
+
"metadata": {},
|
|
94
|
+
"outputs": [],
|
|
95
|
+
"source": [
|
|
96
|
+
"plan.setAccountBalances(\n",
|
|
97
|
+
" taxable=[90.5, 60],\n",
|
|
98
|
+
" taxDeferred=[600.2, 150],\n",
|
|
99
|
+
" taxFree=[50 + 20.6, 40.8],\n",
|
|
100
|
+
")"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"cell_type": "code",
|
|
105
|
+
"execution_count": null,
|
|
106
|
+
"id": "3e1ac651-ef61-47c1-9d2e-c47a0475e807",
|
|
107
|
+
"metadata": {},
|
|
108
|
+
"outputs": [],
|
|
109
|
+
"source": [
|
|
110
|
+
"plan.readContributions('../examples/jack+jill.xlsx')"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"cell_type": "code",
|
|
115
|
+
"execution_count": null,
|
|
116
|
+
"id": "747f1a39-501e-4560-b856-b838720289fe",
|
|
117
|
+
"metadata": {},
|
|
118
|
+
"outputs": [],
|
|
119
|
+
"source": [
|
|
120
|
+
"plan.setInterpolationMethod('s-curve')\n",
|
|
121
|
+
"plan.setAllocationRatios(\n",
|
|
122
|
+
" 'individual',\n",
|
|
123
|
+
" generic=[[[60, 40, 0, 0], [70, 30, 0, 0]], [[60, 40, 0, 0], [70, 30, 0, 0]]],\n",
|
|
124
|
+
")\n",
|
|
125
|
+
"plan.showAllocations()"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"cell_type": "code",
|
|
130
|
+
"execution_count": null,
|
|
131
|
+
"id": "435a0599-accb-42cd-a1c2-382b97383626",
|
|
132
|
+
"metadata": {},
|
|
133
|
+
"outputs": [],
|
|
134
|
+
"source": [
|
|
135
|
+
"plan.setPension([0, 10], [65, 65])\n",
|
|
136
|
+
"plan.setSocialSecurity([28, 25], [70, 70])"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"cell_type": "code",
|
|
141
|
+
"execution_count": null,
|
|
142
|
+
"id": "0b622cd0-f176-4a2f-8470-a0b457294e87",
|
|
143
|
+
"metadata": {},
|
|
144
|
+
"outputs": [],
|
|
145
|
+
"source": [
|
|
146
|
+
"plan.setSpendingProfile('smile', 60)\n",
|
|
147
|
+
"plan.showProfile()"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"cell_type": "markdown",
|
|
152
|
+
"id": "ec690bc0-cfba-4b4d-a11d-a8fd740346c1",
|
|
153
|
+
"metadata": {},
|
|
154
|
+
"source": [
|
|
155
|
+
"### Running Monte Carlo simulations\n",
|
|
156
|
+
"Before running Monte Carlo simulations, the user has to select one of two rate-generating stochastic methods."
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"cell_type": "markdown",
|
|
161
|
+
"id": "ee6a032a-7a62-4c88-9e78-a94754265440",
|
|
162
|
+
"metadata": {},
|
|
163
|
+
"source": [
|
|
164
|
+
"#### Selecting stochastic rates\n",
|
|
165
|
+
"\n",
|
|
166
|
+
"##### The *histochastic* method\n",
|
|
167
|
+
"In Owl, there are two mechanisms that can be used to generate random series of return rates for performing statistical analysis. The first one is to pick a range of historical returns and to derive statistics out of these values. This is achieved by using what I coined the *histochastic* method that is called as follows:\n",
|
|
168
|
+
"\n",
|
|
169
|
+
" plan.setRates('histochastic', 1970, 2023)\n",
|
|
170
|
+
"\n",
|
|
171
|
+
"As called, this method will extract the statistical features of annual returns which happened from 1970 to 2023 inclusively. Using this approach, the means and covariances are all set under the hood, and the user has nothing more to specify. \n",
|
|
172
|
+
"The means and covariance matrix calculated from this time series are then used to generate a series with similar characteristics. Note that the mathematical model used assumes that the rates follow a normal distribution which is a known incorrect approximation. This implies that the distribution of events in the tails might be slightly incorrect but for the time being, there is no known distribution that will capture the tails more accurately. The mean values however, are more robust to our choice of distribution, due to a averaging effect known as the central limit theorem. \n",
|
|
173
|
+
"\n",
|
|
174
|
+
"##### The *stochastic* method\n",
|
|
175
|
+
"The means and covariance matrix can also be explicitly specified by the user. Let's look at a specific example:\n",
|
|
176
|
+
"\n",
|
|
177
|
+
" my_means = [8, 5, 4, 3]\n",
|
|
178
|
+
" my_stdev = [17, 8, 8, 2]\n",
|
|
179
|
+
" # my_corr = [[1, 0.46, 0.06, -.12], [0.46, 1, 0.68, -.27], [0.06, 0.68, 1, -.21], [-.12, -.27, -.21, 1]]\n",
|
|
180
|
+
" offdiag_corr = [.46, .06, -.12, .68, -.27, -.21]\n",
|
|
181
|
+
" plan.setRates('stochastic', values=my_means, stdev=my_stdev, corr=offdiag_corr)\n",
|
|
182
|
+
" \n",
|
|
183
|
+
"Here, we set the rates to *stochastic* with mean return values of 8% +/- 17% for the S&P 500, 5% +/- 8% for corporate bonds, 4% +/- 8% for T-notes, and 3% +/- 2% for the inflation/common assets. Specifying the correlation matrix is optional but highly recommended. The one we use here was obtained by looking at historical data using the year range of our choice, for example,\n",
|
|
184
|
+
"\n",
|
|
185
|
+
" owl.getRatesDistributions(1970, 2019)\n",
|
|
186
|
+
"\n",
|
|
187
|
+
"The matrix `my_corr` can be used to specify the correlation matrix, but to make the call less cumbersome, only the off-diagonal elements of the correlation matrix can be specified and Owl will figure it out.\n",
|
|
188
|
+
"\n",
|
|
189
|
+
"We will now enable the *stochastic* method with the values just mentioned:\n",
|
|
190
|
+
" "
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"cell_type": "code",
|
|
195
|
+
"execution_count": null,
|
|
196
|
+
"id": "726966bd-be52-464e-81a5-ac1b9323fcec",
|
|
197
|
+
"metadata": {},
|
|
198
|
+
"outputs": [],
|
|
199
|
+
"source": [
|
|
200
|
+
"# Mean returns\n",
|
|
201
|
+
"my_means = [8, 5, 4, 3]\n",
|
|
202
|
+
"# Volatility\n",
|
|
203
|
+
"my_stdev = [17, 8, 8, 2]\n",
|
|
204
|
+
"# Correlations matrix between rates of return of different assets\n",
|
|
205
|
+
"# my_corr = [[1, 0.46, 0.06, -.12], [0.46, 1, 0.68, -.27], [0.06, 0.68, 1, -.21], [-.12, -.27, -.21, 1]]\n",
|
|
206
|
+
"# These are only the off-diagonal elements\n",
|
|
207
|
+
"offdiag_corr = [.46, .06, -.12, .68, -.27, -.21]\n",
|
|
208
|
+
"plan.setRates('stochastic', values=my_means, stdev=my_stdev, corr=offdiag_corr)"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"cell_type": "code",
|
|
213
|
+
"execution_count": null,
|
|
214
|
+
"id": "cce791e5-1dd6-4b4b-9997-cb8430900034",
|
|
215
|
+
"metadata": {},
|
|
216
|
+
"outputs": [],
|
|
217
|
+
"source": [
|
|
218
|
+
"# Display a single instance resulting from this choice.\n",
|
|
219
|
+
"plan.showRatesCorrelations(shareRange=False)\n",
|
|
220
|
+
"plan.showRates()"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"cell_type": "code",
|
|
225
|
+
"execution_count": null,
|
|
226
|
+
"id": "eacb5bc8-aca8-481a-9991-6aa494b493a0",
|
|
227
|
+
"metadata": {},
|
|
228
|
+
"outputs": [],
|
|
229
|
+
"source": [
|
|
230
|
+
"plan.setHeirsTaxRate(33)\n",
|
|
231
|
+
"plan.setLongTermCapitalTaxRate(15)"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"cell_type": "markdown",
|
|
236
|
+
"id": "ec99f081-a999-4452-87f2-572c85158643",
|
|
237
|
+
"metadata": {},
|
|
238
|
+
"source": [
|
|
239
|
+
"### Preparing the case to run\n",
|
|
240
|
+
"In order to run Monte Carlo simulations, one has first to set the rates to either *stochastic* or 'histochastic*. Then a call to \n",
|
|
241
|
+
"\n",
|
|
242
|
+
" runMC(objective, options, N)\n",
|
|
243
|
+
" \n",
|
|
244
|
+
"specifying the objective and options will generate a desired number of simulations and provide statistics. The last argument $N$ is the number of cases to consider. Unlike event-driven simulator, Owl performs an optimization for each case, which adds considerable computing costs. For this reason, the default behavior of Owl is to turn off Medicare calculations for these runs. It can be turned back on using 'withMedicare' to `True` in the options, but this will significantly increase (about 3X) the computing time while providing little more insight. These simulations are performed with no verbosity as many simulations are performed, but `runMC` accepts the `verbose=True` argument for debugging or curiosity purposes.\n",
|
|
245
|
+
"\n",
|
|
246
|
+
"Running 500 cases takes about 5 min to complete. Be patient. At the end of the run, a histogram of the optimized values is displayed.\n",
|
|
247
|
+
"When running $N$ cases, the error on the estimate for the mean value being estimated decreases as $1/\\sqrt{N - 1}$. Therefore, 500 cases are more than sufficient to obtain reliable and meaningful estimates of mean statistics.\n",
|
|
248
|
+
"\n",
|
|
249
|
+
"Jack and Jill desire to leave a bequest of \\\\$500k (in today's \\\\$). \n",
|
|
250
|
+
"We limit Roth conversions to a maximum of \\\\$150k for Jack and none for Jill.\n",
|
|
251
|
+
"\n",
|
|
252
|
+
"What are these cases telling us?"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"cell_type": "code",
|
|
257
|
+
"execution_count": null,
|
|
258
|
+
"id": "856cdfb8-0472-475f-afa9-5dae92f1a52d",
|
|
259
|
+
"metadata": {},
|
|
260
|
+
"outputs": [],
|
|
261
|
+
"source": [
|
|
262
|
+
"options = {'maxRothConversion': 150, 'noRothConversions': 'Jill'}\n",
|
|
263
|
+
"# options['solver'] = 'MOSEK'"
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"cell_type": "code",
|
|
268
|
+
"execution_count": null,
|
|
269
|
+
"id": "ede7fa05-8a6e-41b4-8b7c-a217d28ad41b",
|
|
270
|
+
"metadata": {},
|
|
271
|
+
"outputs": [],
|
|
272
|
+
"source": [
|
|
273
|
+
"options['bequest'] = 500\n",
|
|
274
|
+
"plan.runMC('maxSpending', options, 500);"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"cell_type": "markdown",
|
|
279
|
+
"id": "8553d877-c44c-43f0-a015-9055f7d76e25",
|
|
280
|
+
"metadata": {},
|
|
281
|
+
"source": [
|
|
282
|
+
"All cases are successful at leaving a \\\\$500k bequest, but the net spending required for achieving this constraint can lead to small values in some scenarios. However, the median value for the net spending is about \\\\$88k, very close to the \\\\$90k desired by Jack and Jill. Recall that we are using a more conservative return of 8%, with a volatility of 17% for the S&P 500. It is therefore natural that the number we find here is slightly lower than what the historical return of the market has been able to predict. Some of these scenarios will provide more than the median (\\$M\\$), but some others will require a net spending of about \\\\$50k. All these scenarios make a probability of 100\\% for leaving a \\\\$500k bequest as requested. The mean value is indicated by $\\bar{x}$.\n",
|
|
283
|
+
"\n",
|
|
284
|
+
"A more practical example is to look at the maximum bequest left under the constraint of a fixed net spending."
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"cell_type": "code",
|
|
289
|
+
"execution_count": null,
|
|
290
|
+
"id": "2e63e1b0-480e-4065-bb73-a5d7561cb328",
|
|
291
|
+
"metadata": {},
|
|
292
|
+
"outputs": [],
|
|
293
|
+
"source": [
|
|
294
|
+
"options['netSpending'] = 90\n",
|
|
295
|
+
"plan.runMC('maxBequest', options, 500);"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"cell_type": "markdown",
|
|
300
|
+
"id": "bd6356bb-7901-4316-80d9-2ab5e0f531a8",
|
|
301
|
+
"metadata": {},
|
|
302
|
+
"source": [
|
|
303
|
+
"In this case, a relatively large percentage of scenarios are successful in providing the desired \\\\$90k net spending amount over the duration of the plan. The median bequest left at the end of the plan is close to \\\\$1 M, twice what Jack and Jill are intending to leave. This might first suggest that the amount of \\\\$90k might be too conservative on average. The success rate is 85%, which is relatively good, especially considering the fact that Jack and Jill are always able to re-adjust their net spending plan as other forecast estimates are performed in the future."
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"cell_type": "markdown",
|
|
308
|
+
"id": "5c706722-4557-4537-94ec-4d13b29e2f61",
|
|
309
|
+
"metadata": {},
|
|
310
|
+
"source": [
|
|
311
|
+
"### Running cases over a historical range or years\n",
|
|
312
|
+
"We can also run cases using the historical data over a range of years and compile the outcomes in a histogram. For this purpose, there is no need to pre-select specific rates using the `setRates()` method as the choice of *historical* rates is implicit. Only the year range is required.\n",
|
|
313
|
+
"\n",
|
|
314
|
+
"Let's look at a specific example. For optimizing the net spending amount, we specify *maxSpending* in the following call to optimize the plan over the 63 years following 1928:"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"cell_type": "code",
|
|
319
|
+
"execution_count": null,
|
|
320
|
+
"id": "6a9be559-2f2e-4326-adef-18af5c14aeb3",
|
|
321
|
+
"metadata": {},
|
|
322
|
+
"outputs": [],
|
|
323
|
+
"source": [
|
|
324
|
+
"plan.runHistoricalRange('maxSpending', options, 1928, 1990);"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"cell_type": "markdown",
|
|
329
|
+
"id": "bccce068-c9a0-4001-a42d-868bde9d481b",
|
|
330
|
+
"metadata": {},
|
|
331
|
+
"source": [
|
|
332
|
+
"When considering more historical data than a single year, we find a slightly larger net spending value than the one dictated from when only looking at the year 1969. This is not surprising as 1969 was not a good year to retire due to the high inflation rates that prevailed during the following decade. \n",
|
|
333
|
+
"\n",
|
|
334
|
+
"Let's now consider the case for *maxBequest* under a desired net spending."
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"cell_type": "code",
|
|
339
|
+
"execution_count": null,
|
|
340
|
+
"id": "6471720b-4704-4850-a341-1d9a0e5e58e2",
|
|
341
|
+
"metadata": {},
|
|
342
|
+
"outputs": [],
|
|
343
|
+
"source": [
|
|
344
|
+
"plan.runHistoricalRange('maxBequest', options, 1928, 1990);"
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"cell_type": "markdown",
|
|
349
|
+
"id": "7fa4f26a-0ea2-4804-8013-84b4b24a98e2",
|
|
350
|
+
"metadata": {},
|
|
351
|
+
"source": [
|
|
352
|
+
"The resulting success rate when considering all historical data is 100%. This is also not surprising as the original estimates for the net spending and the bequest were derived from running a case in 1969, the second next worst year of historical sequences of returns. "
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"metadata": {
|
|
357
|
+
"kernelspec": {
|
|
358
|
+
"display_name": "Python 3 (ipykernel)",
|
|
359
|
+
"language": "python",
|
|
360
|
+
"name": "python3"
|
|
361
|
+
},
|
|
362
|
+
"language_info": {
|
|
363
|
+
"codemirror_mode": {
|
|
364
|
+
"name": "ipython",
|
|
365
|
+
"version": 3
|
|
366
|
+
},
|
|
367
|
+
"file_extension": ".py",
|
|
368
|
+
"mimetype": "text/x-python",
|
|
369
|
+
"name": "python",
|
|
370
|
+
"nbconvert_exporter": "python",
|
|
371
|
+
"pygments_lexer": "ipython3",
|
|
372
|
+
"version": "3.12.7"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"nbformat": 4,
|
|
376
|
+
"nbformat_minor": 5
|
|
377
|
+
}
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "owlplanner"
|
|
7
|
-
version = "2025.01.
|
|
7
|
+
version = "2025.01.27"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Martin-D. Lacasse", email="martin.d.lacasse@gmail.com" },
|
|
10
10
|
]
|
|
@@ -31,6 +31,7 @@ dependencies = [
|
|
|
31
31
|
"openpyxl",
|
|
32
32
|
"scipy",
|
|
33
33
|
"streamlit",
|
|
34
|
+
"toml",
|
|
34
35
|
]
|
|
35
36
|
license = {file = "LICENSE"}
|
|
36
37
|
|
|
File without changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
year,S&P 500,Bonds Baa,Bonds Aaa,TBills,TNotes,Inflation
|
|
2
|
+
1928,43.81,3.22,3.22,3.08,0.84,-1.16
|
|
3
|
+
1929,-8.3,3.02,3.02,3.16,4.2,0.58
|
|
4
|
+
1930,-25.12,0.54,0.54,4.55,4.54,-6.4
|
|
5
|
+
1931,-43.84,-15.68,-15.68,2.31,-2.56,-9.32
|
|
6
|
+
1932,-8.64,23.59,23.59,1.07,8.79,-10.27
|
|
7
|
+
1933,49.98,12.97,12.97,0.96,1.86,0.76
|
|
8
|
+
1934,-1.19,18.82,18.82,0.28,7.96,1.52
|
|
9
|
+
1935,46.74,13.31,13.31,0.17,4.47,2.99
|
|
10
|
+
1936,31.94,11.38,11.38,0.17,5.02,1.45
|
|
11
|
+
1937,-35.34,-4.42,-4.42,0.28,1.38,2.86
|
|
12
|
+
1938,29.28,9.24,9.24,0.07,4.21,-2.78
|
|
13
|
+
1939,-1.1,7.98,7.98,0.05,4.41,0.0
|
|
14
|
+
1940,-10.67,8.65,8.65,0.04,5.4,0.71
|
|
15
|
+
1941,-12.77,5.01,5.01,0.13,-2.02,9.93
|
|
16
|
+
1942,19.17,5.18,5.18,0.34,2.29,9.03
|
|
17
|
+
1943,25.06,8.04,8.04,0.38,2.49,2.96
|
|
18
|
+
1944,19.03,6.57,6.57,0.38,2.58,2.3
|
|
19
|
+
1945,35.82,6.8,6.8,0.38,3.8,2.25
|
|
20
|
+
1946,-8.43,2.51,2.51,0.38,3.13,18.13
|
|
21
|
+
1947,5.2,0.26,0.26,0.6,0.92,8.84
|
|
22
|
+
1948,5.7,3.44,3.44,1.05,1.95,2.99
|
|
23
|
+
1949,18.3,5.38,5.38,1.12,4.66,-2.07
|
|
24
|
+
1950,30.81,4.24,4.24,1.2,0.43,5.93
|
|
25
|
+
1951,23.68,-0.19,-0.19,1.52,-0.3,6.0
|
|
26
|
+
1952,18.15,4.44,4.44,1.72,2.27,0.75
|
|
27
|
+
1953,-1.21,1.62,1.62,1.89,4.14,0.75
|
|
28
|
+
1954,52.56,6.16,6.16,0.94,3.29,-0.74
|
|
29
|
+
1955,32.6,2.04,2.04,1.72,-1.34,0.37
|
|
30
|
+
1956,7.44,-2.35,-2.35,2.62,-2.26,2.99
|
|
31
|
+
1957,-10.46,-0.72,-0.72,3.22,6.8,2.9
|
|
32
|
+
1958,43.72,6.43,6.43,1.77,-2.1,1.76
|
|
33
|
+
1959,12.06,1.57,1.57,3.39,-2.65,1.73
|
|
34
|
+
1960,0.34,6.66,6.66,2.87,11.64,1.36
|
|
35
|
+
1961,26.64,5.1,5.1,2.35,2.06,0.67
|
|
36
|
+
1962,-8.81,6.5,6.5,2.77,5.69,1.33
|
|
37
|
+
1963,22.61,5.46,5.46,3.16,1.68,1.64
|
|
38
|
+
1964,16.42,5.16,5.16,3.55,3.73,0.97
|
|
39
|
+
1965,12.4,3.19,3.19,3.95,0.72,1.92
|
|
40
|
+
1966,-9.97,-3.45,-3.45,4.86,2.91,3.46
|
|
41
|
+
1967,23.8,0.9,0.9,4.29,-1.58,3.04
|
|
42
|
+
1968,10.81,4.85,4.85,5.34,3.27,4.72
|
|
43
|
+
1969,-8.24,-2.03,-2.03,6.67,-5.01,6.2
|
|
44
|
+
1970,3.56,5.65,5.65,6.39,16.75,5.57
|
|
45
|
+
1971,14.22,14.0,14.0,4.33,9.79,3.27
|
|
46
|
+
1972,18.76,11.41,11.41,4.06,2.82,3.41
|
|
47
|
+
1973,-14.31,4.32,4.32,7.04,3.66,8.71
|
|
48
|
+
1974,-25.9,-4.38,-4.38,7.85,1.99,12.34
|
|
49
|
+
1975,37.0,11.05,11.05,5.79,3.61,6.94
|
|
50
|
+
1976,23.83,19.75,19.75,4.98,15.98,4.86
|
|
51
|
+
1977,-6.98,9.95,9.95,5.26,1.29,6.7
|
|
52
|
+
1978,6.51,3.14,3.14,7.18,-0.78,9.02
|
|
53
|
+
1979,18.52,-2.01,-2.01,10.05,0.67,13.29
|
|
54
|
+
1980,31.74,-3.32,-3.32,11.39,-2.99,12.52
|
|
55
|
+
1981,-4.7,8.46,8.46,14.04,8.2,8.92
|
|
56
|
+
1982,20.42,29.05,29.05,10.6,32.81,3.83
|
|
57
|
+
1983,22.34,16.19,16.19,8.62,3.2,3.79
|
|
58
|
+
1984,6.15,15.62,15.62,9.54,13.73,3.95
|
|
59
|
+
1985,31.24,23.86,23.86,7.47,25.71,3.8
|
|
60
|
+
1986,18.49,21.35,21.35,5.97,24.28,1.1
|
|
61
|
+
1987,5.81,2.81,2.81,5.78,-4.96,4.43
|
|
62
|
+
1988,16.54,14.38,14.38,6.67,8.22,4.42
|
|
63
|
+
1989,31.48,15.95,15.95,8.11,17.69,4.65
|
|
64
|
+
1990,-3.06,6.28,6.28,7.5,6.24,6.11
|
|
65
|
+
1991,30.23,18.93,18.93,5.38,15.0,3.06
|
|
66
|
+
1992,7.49,11.31,11.31,3.43,9.36,2.9
|
|
67
|
+
1993,9.97,15.47,15.47,3.0,14.21,2.75
|
|
68
|
+
1994,1.33,-0.97,-0.97,4.25,-8.04,2.67
|
|
69
|
+
1995,37.2,21.29,21.29,5.49,23.48,2.54
|
|
70
|
+
1996,22.68,3.42,3.42,5.01,1.43,3.32
|
|
71
|
+
1997,33.1,12.75,12.75,5.06,9.94,1.7
|
|
72
|
+
1998,28.34,7.63,7.63,4.78,14.92,1.61
|
|
73
|
+
1999,20.89,0.91,0.91,4.64,-8.25,2.68
|
|
74
|
+
2000,-9.03,9.39,9.39,5.82,16.66,3.39
|
|
75
|
+
2001,-11.85,8.54,8.54,3.4,5.57,1.55
|
|
76
|
+
2002,-21.97,12.14,12.14,1.61,15.12,2.38
|
|
77
|
+
2003,28.36,12.32,12.32,1.01,0.38,1.88
|
|
78
|
+
2004,10.74,10.35,10.35,1.37,4.49,3.26
|
|
79
|
+
2005,4.83,5.3,5.3,3.15,2.87,3.42
|
|
80
|
+
2006,15.61,5.2,5.2,4.73,1.96,2.54
|
|
81
|
+
2007,5.48,4.84,4.84,4.36,10.21,4.08
|
|
82
|
+
2008,-36.55,-3.54,-3.54,1.37,20.1,0.09
|
|
83
|
+
2009,25.94,20.21,20.21,0.15,-11.12,2.72
|
|
84
|
+
2010,14.82,9.41,9.41,0.14,8.46,1.5
|
|
85
|
+
2011,2.1,12.26,12.26,0.05,16.04,2.96
|
|
86
|
+
2012,15.89,9.33,9.33,0.09,2.97,1.74
|
|
87
|
+
2013,32.15,-0.98,-0.98,0.06,-9.1,1.5
|
|
88
|
+
2014,13.52,10.78,10.78,0.03,10.75,0.76
|
|
89
|
+
2015,1.38,-1.5,-1.5,0.05,1.28,0.73
|
|
90
|
+
2016,11.77,11.52,11.52,0.32,0.69,2.07
|
|
91
|
+
2017,21.61,9.23,9.23,0.93,2.8,2.11
|
|
92
|
+
2018,-4.23,-3.27,-3.27,1.94,-0.02,1.91
|
|
93
|
+
2019,31.21,15.25,15.25,2.06,9.64,2.29
|
|
94
|
+
2020,18.02,10.6,10.6,0.35,11.33,1.36
|
|
95
|
+
2021,28.47,0.93,0.93,0.05,-4.42,7.04
|
|
96
|
+
2022,-18.04,-15.14,-15.14,2.02,-17.83,6.45
|
|
97
|
+
2023,26.06,8.74,8.74,5.07,3.88,3.35
|
|
98
|
+
2024,24.88,1.74,1.74,4.97,-1.64,2.75
|
|
@@ -315,7 +315,7 @@ class Plan(object):
|
|
|
315
315
|
self._adjustedParameters = False
|
|
316
316
|
self.timeListsFileName = "None"
|
|
317
317
|
self.timeLists = {}
|
|
318
|
-
self.
|
|
318
|
+
self.zeroContributions()
|
|
319
319
|
self.caseStatus = 'unsolved'
|
|
320
320
|
self.rateMethod = None
|
|
321
321
|
|
|
@@ -900,10 +900,18 @@ class Plan(object):
|
|
|
900
900
|
try:
|
|
901
901
|
filename, self.timeLists = timelists.read(filename, self.inames, self.horizons, self.mylog)
|
|
902
902
|
except Exception as e:
|
|
903
|
-
raise Exception('Unsuccessful read: %s' % e)
|
|
903
|
+
raise Exception('Unsuccessful read of contributions: %s' % e)
|
|
904
|
+
return False
|
|
904
905
|
|
|
905
|
-
timelists.check(self.inames, self.timeLists, self.horizons)
|
|
906
906
|
self.timeListsFileName = filename
|
|
907
|
+
self.setContributions()
|
|
908
|
+
|
|
909
|
+
return True
|
|
910
|
+
|
|
911
|
+
def setContributions(self, timeLists=None):
|
|
912
|
+
if timeLists is not None:
|
|
913
|
+
timelists.check(timeLists, self.inames, self.horizons)
|
|
914
|
+
self.timeLists = timeLists
|
|
907
915
|
|
|
908
916
|
# Now fill in parameters which are in $.
|
|
909
917
|
for i, iname in enumerate(self.inames):
|
|
@@ -926,7 +934,7 @@ class Plan(object):
|
|
|
926
934
|
|
|
927
935
|
self.caseStatus = 'modified'
|
|
928
936
|
|
|
929
|
-
return
|
|
937
|
+
return self.timeLists
|
|
930
938
|
|
|
931
939
|
def saveContributions(self):
|
|
932
940
|
"""
|
|
@@ -954,7 +962,7 @@ class Plan(object):
|
|
|
954
962
|
|
|
955
963
|
return wb
|
|
956
964
|
|
|
957
|
-
def
|
|
965
|
+
def zeroContributions(self):
|
|
958
966
|
"""
|
|
959
967
|
Reset all contributions variables to zero.
|
|
960
968
|
"""
|