owlplanner 2025.5.2__tar.gz → 2025.5.5__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 (121) hide show
  1. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/.devcontainer/devcontainer.json +32 -32
  2. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/.flake8 +0 -1
  3. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/.gitignore +1 -0
  4. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/PKG-INFO +1 -1
  5. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_jon+jane.toml +57 -57
  6. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/kim+sam.ipynb +222 -222
  7. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/template.ipynb +944 -944
  8. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/tutorial_1.ipynb +1078 -1078
  9. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/tutorial_2.ipynb +377 -377
  10. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/tutorial_3.ipynb +410 -410
  11. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/pyproject.toml +1 -6
  12. owlplanner-2025.5.5/pytest.ini +7 -0
  13. owlplanner-2025.5.5/src/owlplanner/__init__.py +6 -0
  14. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/abcapi.py +14 -7
  15. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/config.py +5 -5
  16. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/plan.py +329 -587
  17. owlplanner-2025.5.5/src/owlplanner/plots.py +296 -0
  18. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/rates.py +42 -59
  19. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/tax2025.py +2 -1
  20. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/timelists.py +1 -1
  21. owlplanner-2025.5.5/src/owlplanner/version.py +1 -0
  22. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/tests/test_regressions.py +2 -2
  23. owlplanner-2025.5.5/tests/test_ui_asset_allocation.py +14 -0
  24. owlplanner-2025.5.5/tests/test_ui_compare_summaries.py +18 -0
  25. owlplanner-2025.5.5/tests/test_ui_sskeys.py +24 -0
  26. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Documentation.py +0 -9
  27. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Optimization_Parameters.py +4 -4
  28. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Quick_Start.py +2 -2
  29. owlplanner-2025.5.5/ui/__init__.py +0 -0
  30. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/main.py +2 -1
  31. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/owlbridge.py +4 -4
  32. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/requirements.txt +1 -1
  33. owlplanner-2025.5.2/Papers/BF01580653.pdf +0 -0
  34. owlplanner-2025.5.2/Papers/FE00006821-Class-VI-Injection-Permit--Salient-Features-and-Regulatory-Challenges_Final.pdf +0 -0
  35. owlplanner-2025.5.2/Papers/Kou-OptionPricingDouble-2004.pdf +0 -0
  36. owlplanner-2025.5.2/Papers/Multi-Period Mean Expected-Shortfall Strategies Cut Your Losses and Ride Your Gains .pdf +24 -45650
  37. owlplanner-2025.5.2/Papers/Optimal Asset Allocation for Retirement Saving Deterministic Vs. Time Consistent Adaptive Strategies.pdf +13 -42971
  38. owlplanner-2025.5.2/Papers/Rule-based_strategies_for_dynamic_life_cycle_inves.pdf +0 -0
  39. owlplanner-2025.5.2/Papers/Snyder-LinearProgrammingSpecial-1984.pdf +0 -0
  40. owlplanner-2025.5.2/Papers/WileyModelBuildinginMathematicalProgramming5th2013.sharethefiles.com.pdf +0 -0
  41. owlplanner-2025.5.2/Papers/bv_cvxbook.pdf +0 -0
  42. owlplanner-2025.5.2/Papers/s10436-006-0062-y.pdf +0 -0
  43. owlplanner-2025.5.2/docs/newowl.tex +0 -1356
  44. owlplanner-2025.5.2/git-cheats +0 -11
  45. owlplanner-2025.5.2/src/owlplanner/__init__.py +0 -6
  46. owlplanner-2025.5.2/src/owlplanner/version.py +0 -1
  47. owlplanner-2025.5.2/ui/main+fonts.py +0 -55
  48. owlplanner-2025.5.2/ui/sskeys.py.color +0 -579
  49. owlplanner-2025.5.2/ui/style.css +0 -8
  50. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/.gitattributes +0 -0
  51. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/.github/workflows/github-actions-runtests.yml +0 -0
  52. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/INSTALL.md +0 -0
  53. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/LICENSE +0 -0
  54. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/README.md +0 -0
  55. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/USER_GUIDE.md +0 -0
  56. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docker/Dockerfile +0 -0
  57. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docker/README.md +0 -0
  58. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docker/docker-compose.yml +0 -0
  59. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docker/fastentrypoint.sh +0 -0
  60. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/AD-taxDef.png +0 -0
  61. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/AD-taxFree.png +0 -0
  62. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/AD-taxable.png +0 -0
  63. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/Hist_Bequest.png +0 -0
  64. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/Hist_Spending.png +0 -0
  65. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/MC-tutorial2a.png +0 -0
  66. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/MC-tutorial2b.png +0 -0
  67. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/OwlUI.png +0 -0
  68. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/allocations.png +0 -0
  69. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/owl.png +0 -0
  70. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/profile.png +0 -0
  71. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/ratesCorrelations.png +0 -0
  72. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/ratesPlot.png +0 -0
  73. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/savingsPlot.png +0 -0
  74. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/sourcesPlot.png +0 -0
  75. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/spendingPlot.png +0 -0
  76. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/taxIncomePlot.png +0 -0
  77. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/images/taxesPlot.png +0 -0
  78. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/owl.pdf +0 -0
  79. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/docs/owl.tex +0 -0
  80. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_jack+jill.toml +0 -0
  81. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_joe.toml +0 -0
  82. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_john+sally.toml +0 -0
  83. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_kim+sam-bequest.toml +0 -0
  84. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/case_kim+sam-spending.toml +0 -0
  85. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/jack+jill.xlsx +0 -0
  86. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/joe.xlsx +0 -0
  87. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/john+sally.xlsx +0 -0
  88. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/jon+jane.xlsx +0 -0
  89. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/examples/template.xlsx +0 -0
  90. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/notebooks/john+sally.ipynb +0 -0
  91. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/owlplanner.cmd +0 -0
  92. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/owlplanner.sh +0 -0
  93. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/requirements.txt +0 -0
  94. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/data/__init__.py +0 -0
  95. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/data/rates.csv +0 -0
  96. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/logging.py +0 -0
  97. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/progress.py +0 -0
  98. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/src/owlplanner/utils.py +0 -0
  99. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/tests/test_logger.py +0 -0
  100. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/tests/test_repro.py +0 -0
  101. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/tests/test_toml_cases.py +0 -0
  102. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/tests/test_units.py +0 -0
  103. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/About_Owl.py +0 -0
  104. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Asset_Allocation.py +0 -0
  105. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Create_Case.py +0 -0
  106. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Current_Assets.py +0 -0
  107. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Fixed_Income.py +0 -0
  108. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Graphs.py +0 -0
  109. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Historical_Range.py +0 -0
  110. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Logs.py +0 -0
  111. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Monte_Carlo.py +0 -0
  112. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Output_Files.py +0 -0
  113. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/README.md +0 -0
  114. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Rates_Selection.py +0 -0
  115. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Settings.py +0 -0
  116. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Wages_And_Contributions.py +0 -0
  117. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/Worksheets.py +0 -0
  118. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/plots.py +0 -0
  119. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/progress.py +0 -0
  120. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/sskeys.py +0 -0
  121. {owlplanner-2025.5.2 → owlplanner-2025.5.5}/ui/tomlexamples.py +0 -0
@@ -1,33 +1,33 @@
1
- {
2
- "name": "Python 3",
3
- // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
4
- "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
5
- "customizations": {
6
- "codespaces": {
7
- "openFiles": [
8
- "README.md",
9
- "ui/main.py"
10
- ]
11
- },
12
- "vscode": {
13
- "settings": {},
14
- "extensions": [
15
- "ms-python.python",
16
- "ms-python.vscode-pylance"
17
- ]
18
- }
19
- },
20
- "updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
21
- "postAttachCommand": {
22
- "server": "streamlit run ui/main.py --server.enableCORS false --server.enableXsrfProtection false"
23
- },
24
- "portsAttributes": {
25
- "8501": {
26
- "label": "Application",
27
- "onAutoForward": "openPreview"
28
- }
29
- },
30
- "forwardPorts": [
31
- 8501
32
- ]
1
+ {
2
+ "name": "Python 3",
3
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
4
+ "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
5
+ "customizations": {
6
+ "codespaces": {
7
+ "openFiles": [
8
+ "README.md",
9
+ "ui/main.py"
10
+ ]
11
+ },
12
+ "vscode": {
13
+ "settings": {},
14
+ "extensions": [
15
+ "ms-python.python",
16
+ "ms-python.vscode-pylance"
17
+ ]
18
+ }
19
+ },
20
+ "updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
21
+ "postAttachCommand": {
22
+ "server": "streamlit run ui/main.py --server.enableCORS false --server.enableXsrfProtection false"
23
+ },
24
+ "portsAttributes": {
25
+ "8501": {
26
+ "label": "Application",
27
+ "onAutoForward": "openPreview"
28
+ }
29
+ },
30
+ "forwardPorts": [
31
+ 8501
32
+ ]
33
33
  }
@@ -1,6 +1,5 @@
1
1
  [flake8]
2
2
  max-line-length = 120
3
- max-complexity = 70
4
3
  # These checks violate PEP8 so let's ignore them
5
4
  extend-ignore = E203
6
5
  # extend-exclude = */site-packages/*
@@ -4,6 +4,7 @@ dist
4
4
  *~
5
5
  *.aux
6
6
  *.log
7
+ .coverage
7
8
  otherFiles
8
9
  myfiles
9
10
  secrets
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: owlplanner
3
- Version: 2025.5.2
3
+ Version: 2025.5.5
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
@@ -1,57 +1,57 @@
1
- "Plan Name" = "Jon+Jane"
2
- Description = "This case reproduces a similar case discussed a while back on i-orp. It involves Jon and Jane close to retirement, and assumes a base case of optimistic returns of 10% with an inflation of 3.5%. A wages and contributions file called 'jon+jane.xlsx' is associated with this case."
3
-
4
- ["Basic Info"]
5
- Status = "married"
6
- Names = [ "Jon", "Jane",]
7
- "Birth year" = [ 1965, 1968,]
8
- "Life expectancy" = [ 92, 92,]
9
- "Start date" = "01-01"
10
-
11
- [Assets]
12
- "taxable savings balances" = [ 50.0, 0.0,]
13
- "tax-deferred savings balances" = [ 900.0, 500.0,]
14
- "tax-free savings balances" = [ 0.0, 0.0,]
15
- "Beneficiary fractions" = [ 1.0, 1.0, 1.0,]
16
- "Spousal surplus deposit fraction" = 0.0
17
-
18
- ["Wages and Contributions"]
19
- "Contributions file name" = "edited values"
20
-
21
- ["Fixed Income"]
22
- "Pension amounts" = [ 0.0, 0.0,]
23
- "Pension ages" = [ 65, 65,]
24
- "Pension indexed" = [ false, false,]
25
- "Social security amounts" = [ 21.0, 21.0,]
26
- "Social security ages" = [ 65, 65,]
27
-
28
- ["Rates Selection"]
29
- "Heirs rate on tax-deferred estate" = 30.0
30
- "Long-term capital gain tax rate" = 15.0
31
- "Dividend tax rate" = 2.0
32
- "TCJA expiration year" = 2026
33
- Method = "user"
34
- Values = [ 10.0, 0.0, 0.0, 3.5000000000000004,]
35
- From = 1928
36
- To = 2024
37
-
38
- ["Asset Allocation"]
39
- "Interpolation method" = "linear"
40
- "Interpolation center" = 15.0
41
- "Interpolation width" = 5.0
42
- Type = "individual"
43
- generic = [ [ [ 100, 0, 0, 0,], [ 100, 0, 0, 0,],], [ [ 100, 0, 0, 0,], [ 100, 0, 0, 0,],],]
44
-
45
- ["Optimization Parameters"]
46
- "Spending profile" = "flat"
47
- "Surviving spouse spending percent" = 60
48
- Objective = "maxSpending"
49
-
50
- ["Solver Options"]
51
- maxRothConversion = 0.0
52
- noRothConversions = "None"
53
- withMedicare = true
54
- bequest = 30.0
55
-
56
- [Results]
57
- "Default plots" = "today"
1
+ "Plan Name" = "Jon+Jane"
2
+ Description = "This case reproduces a similar case discussed a while back on i-orp. It involves Jon and Jane close to retirement, and assumes a base case of optimistic returns of 10% with an inflation of 3.5%. A wages and contributions file called 'jon+jane.xlsx' is associated with this case."
3
+
4
+ ["Basic Info"]
5
+ Status = "married"
6
+ Names = [ "Jon", "Jane",]
7
+ "Birth year" = [ 1965, 1968,]
8
+ "Life expectancy" = [ 92, 92,]
9
+ "Start date" = "01-01"
10
+
11
+ [Assets]
12
+ "taxable savings balances" = [ 50.0, 0.0,]
13
+ "tax-deferred savings balances" = [ 900.0, 500.0,]
14
+ "tax-free savings balances" = [ 0.0, 0.0,]
15
+ "Beneficiary fractions" = [ 1.0, 1.0, 1.0,]
16
+ "Spousal surplus deposit fraction" = 0.0
17
+
18
+ ["Wages and Contributions"]
19
+ "Contributions file name" = "edited values"
20
+
21
+ ["Fixed Income"]
22
+ "Pension amounts" = [ 0.0, 0.0,]
23
+ "Pension ages" = [ 65, 65,]
24
+ "Pension indexed" = [ false, false,]
25
+ "Social security amounts" = [ 21.0, 21.0,]
26
+ "Social security ages" = [ 65, 65,]
27
+
28
+ ["Rates Selection"]
29
+ "Heirs rate on tax-deferred estate" = 30.0
30
+ "Long-term capital gain tax rate" = 15.0
31
+ "Dividend tax rate" = 2.0
32
+ "TCJA expiration year" = 2026
33
+ Method = "user"
34
+ Values = [ 10.0, 0.0, 0.0, 3.5000000000000004,]
35
+ From = 1928
36
+ To = 2024
37
+
38
+ ["Asset Allocation"]
39
+ "Interpolation method" = "linear"
40
+ "Interpolation center" = 15.0
41
+ "Interpolation width" = 5.0
42
+ Type = "individual"
43
+ generic = [ [ [ 100, 0, 0, 0,], [ 100, 0, 0, 0,],], [ [ 100, 0, 0, 0,], [ 100, 0, 0, 0,],],]
44
+
45
+ ["Optimization Parameters"]
46
+ "Spending profile" = "flat"
47
+ "Surviving spouse spending percent" = 60
48
+ Objective = "maxSpending"
49
+
50
+ ["Solver Options"]
51
+ maxRothConversion = 0.0
52
+ noRothConversions = "None"
53
+ withMedicare = true
54
+ bequest = 30.0
55
+
56
+ [Results]
57
+ "Default plots" = "today"
@@ -1,222 +1,222 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "id": "b39a3609-b306-470f-89d5-4710794b2008",
6
- "metadata": {},
7
- "source": [
8
- "## Another short example to use as a template."
9
- ]
10
- },
11
- {
12
- "cell_type": "code",
13
- "execution_count": null,
14
- "id": "63c9604f-4e6e-4e72-93d7-cdb5788d81d5",
15
- "metadata": {},
16
- "outputs": [],
17
- "source": [
18
- "import owlplanner as owl"
19
- ]
20
- },
21
- {
22
- "cell_type": "code",
23
- "execution_count": null,
24
- "id": "40025313-4ed5-4e6e-8eca-dc084830ca21",
25
- "metadata": {},
26
- "outputs": [],
27
- "source": [
28
- "p = owl.Plan(['Kim', 'Sam'], [1966, 1967], [86, 89], 'kim+sam-spending', verbose=True)"
29
- ]
30
- },
31
- {
32
- "cell_type": "code",
33
- "execution_count": null,
34
- "id": "435a0599-accb-42cd-a1c2-382b97383626",
35
- "metadata": {},
36
- "outputs": [],
37
- "source": [
38
- "# p.setPension([0, 0], [65, 65])\n",
39
- "p.setSocialSecurity([45, 25], [70, 68])"
40
- ]
41
- },
42
- {
43
- "cell_type": "code",
44
- "execution_count": null,
45
- "id": "0b622cd0-f176-4a2f-8470-a0b457294e87",
46
- "metadata": {},
47
- "outputs": [],
48
- "source": [
49
- "p.setSpendingProfile('smile', 60)\n",
50
- "# p.setSpendingProfile('flat', 60)\n",
51
- "p.showProfile()"
52
- ]
53
- },
54
- {
55
- "cell_type": "code",
56
- "execution_count": null,
57
- "id": "dbbf9e2f-7fb1-4861-874f-0d987966ebfb",
58
- "metadata": {},
59
- "outputs": [],
60
- "source": [
61
- "#p.setRates('historical', 1998)\n",
62
- "p.setRates('conservative')\n",
63
- "#p.setRates('historical', 1966)\n",
64
- "p.showRates()"
65
- ]
66
- },
67
- {
68
- "cell_type": "code",
69
- "execution_count": null,
70
- "id": "31eec280-acdb-40d0-9404-d508a60cf206",
71
- "metadata": {},
72
- "outputs": [],
73
- "source": [
74
- "p.setAccountBalances(taxable=[1000, 0], taxDeferred=[2000, 800], taxFree=[500, 25])"
75
- ]
76
- },
77
- {
78
- "cell_type": "code",
79
- "execution_count": null,
80
- "id": "45f2bb63-f6c6-42a1-a112-fd8e8146f470",
81
- "metadata": {},
82
- "outputs": [],
83
- "source": [
84
- "p.readContributions('../examples/template.xlsx')"
85
- ]
86
- },
87
- {
88
- "cell_type": "code",
89
- "execution_count": null,
90
- "id": "747f1a39-501e-4560-b856-b838720289fe",
91
- "metadata": {},
92
- "outputs": [],
93
- "source": [
94
- "p.setHeirsTaxRate(33)\n",
95
- "p.setLongTermCapitalTaxRate(15)\n",
96
- "p.setInterpolationMethod('s-curve')\n",
97
- "p.setAllocationRatios(\n",
98
- " 'individual',\n",
99
- " generic=[[[60, 40, 0, 0], [70, 30, 0, 0]], [[60, 40, 0, 0], [70, 30, 0, 0]]]\n",
100
- ")\n",
101
- "p.showAllocations()"
102
- ]
103
- },
104
- {
105
- "cell_type": "markdown",
106
- "id": "0e153434-a9ba-4ced-b138-4dc0e844ac0f",
107
- "metadata": {},
108
- "source": [
109
- "### Optimize spending and save workbook."
110
- ]
111
- },
112
- {
113
- "cell_type": "code",
114
- "execution_count": null,
115
- "id": "ede7fa05-8a6e-41b4-8b7c-a217d28ad41b",
116
- "metadata": {},
117
- "outputs": [],
118
- "source": [
119
- "%%time\n",
120
- "options = {'maxRothConversion': 300, 'bequest': 2000}\n",
121
- "p.solve('maxSpending', options=options)\n",
122
- "p.saveConfig()\n",
123
- "p.summary()"
124
- ]
125
- },
126
- {
127
- "cell_type": "code",
128
- "execution_count": null,
129
- "id": "525f22e2-d241-4fa8-bc95-82d758238326",
130
- "metadata": {},
131
- "outputs": [],
132
- "source": [
133
- "p.setDefaultPlots('today')\n",
134
- "p.showNetSpending()\n",
135
- "p.showGrossIncome()\n",
136
- "p.showTaxes()\n",
137
- "p.showSources()\n",
138
- "p.showAccounts()\n",
139
- "p.showAssetDistribution()"
140
- ]
141
- },
142
- {
143
- "cell_type": "code",
144
- "execution_count": null,
145
- "id": "1202e86b-4f08-4158-8546-6105da68f77a",
146
- "metadata": {},
147
- "outputs": [],
148
- "source": [
149
- "p.saveWorkbook(True)"
150
- ]
151
- },
152
- {
153
- "cell_type": "markdown",
154
- "id": "a7469daf-61b8-42a4-bcb8-22c801014d8c",
155
- "metadata": {},
156
- "source": [
157
- "### Optimize bequest and save workbook."
158
- ]
159
- },
160
- {
161
- "cell_type": "code",
162
- "execution_count": null,
163
- "id": "73c77134-4b50-42f4-bd2d-d7eb59c5e750",
164
- "metadata": {},
165
- "outputs": [],
166
- "source": [
167
- "%%time\n",
168
- "options = {'maxRothConversion': 300, 'netSpending': 180}\n",
169
- "p.rename('case_kim+sam-bequest')\n",
170
- "p.solve('maxBequest', options=options)\n",
171
- "p.saveConfig()\n",
172
- "p.summary()"
173
- ]
174
- },
175
- {
176
- "cell_type": "code",
177
- "execution_count": null,
178
- "id": "0164a9df-1943-4ead-a0af-71ed502c6417",
179
- "metadata": {},
180
- "outputs": [],
181
- "source": [
182
- "p.showNetSpending()\n",
183
- "p.showGrossIncome()\n",
184
- "p.showTaxes()\n",
185
- "p.showSources()\n",
186
- "p.showAccounts()\n",
187
- "p.showAssetDistribution()"
188
- ]
189
- },
190
- {
191
- "cell_type": "code",
192
- "execution_count": null,
193
- "id": "2206eda7-7534-4b78-a58b-ad9879295fae",
194
- "metadata": {},
195
- "outputs": [],
196
- "source": [
197
- "p.saveWorkbook(True)"
198
- ]
199
- }
200
- ],
201
- "metadata": {
202
- "kernelspec": {
203
- "display_name": "Python 3 (ipykernel)",
204
- "language": "python",
205
- "name": "python3"
206
- },
207
- "language_info": {
208
- "codemirror_mode": {
209
- "name": "ipython",
210
- "version": 3
211
- },
212
- "file_extension": ".py",
213
- "mimetype": "text/x-python",
214
- "name": "python",
215
- "nbconvert_exporter": "python",
216
- "pygments_lexer": "ipython3",
217
- "version": "3.12.7"
218
- }
219
- },
220
- "nbformat": 4,
221
- "nbformat_minor": 5
222
- }
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "b39a3609-b306-470f-89d5-4710794b2008",
6
+ "metadata": {},
7
+ "source": [
8
+ "## Another short example to use as a template."
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "code",
13
+ "execution_count": null,
14
+ "id": "63c9604f-4e6e-4e72-93d7-cdb5788d81d5",
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "import owlplanner as owl"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": null,
24
+ "id": "40025313-4ed5-4e6e-8eca-dc084830ca21",
25
+ "metadata": {},
26
+ "outputs": [],
27
+ "source": [
28
+ "p = owl.Plan(['Kim', 'Sam'], [1966, 1967], [86, 89], 'kim+sam-spending', verbose=True)"
29
+ ]
30
+ },
31
+ {
32
+ "cell_type": "code",
33
+ "execution_count": null,
34
+ "id": "435a0599-accb-42cd-a1c2-382b97383626",
35
+ "metadata": {},
36
+ "outputs": [],
37
+ "source": [
38
+ "# p.setPension([0, 0], [65, 65])\n",
39
+ "p.setSocialSecurity([45, 25], [70, 68])"
40
+ ]
41
+ },
42
+ {
43
+ "cell_type": "code",
44
+ "execution_count": null,
45
+ "id": "0b622cd0-f176-4a2f-8470-a0b457294e87",
46
+ "metadata": {},
47
+ "outputs": [],
48
+ "source": [
49
+ "p.setSpendingProfile('smile', 60)\n",
50
+ "# p.setSpendingProfile('flat', 60)\n",
51
+ "p.showProfile()"
52
+ ]
53
+ },
54
+ {
55
+ "cell_type": "code",
56
+ "execution_count": null,
57
+ "id": "dbbf9e2f-7fb1-4861-874f-0d987966ebfb",
58
+ "metadata": {},
59
+ "outputs": [],
60
+ "source": [
61
+ "#p.setRates('historical', 1998)\n",
62
+ "p.setRates('conservative')\n",
63
+ "#p.setRates('historical', 1966)\n",
64
+ "p.showRates()"
65
+ ]
66
+ },
67
+ {
68
+ "cell_type": "code",
69
+ "execution_count": null,
70
+ "id": "31eec280-acdb-40d0-9404-d508a60cf206",
71
+ "metadata": {},
72
+ "outputs": [],
73
+ "source": [
74
+ "p.setAccountBalances(taxable=[1000, 0], taxDeferred=[2000, 800], taxFree=[500, 25])"
75
+ ]
76
+ },
77
+ {
78
+ "cell_type": "code",
79
+ "execution_count": null,
80
+ "id": "45f2bb63-f6c6-42a1-a112-fd8e8146f470",
81
+ "metadata": {},
82
+ "outputs": [],
83
+ "source": [
84
+ "p.readContributions('../examples/template.xlsx')"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type": "code",
89
+ "execution_count": null,
90
+ "id": "747f1a39-501e-4560-b856-b838720289fe",
91
+ "metadata": {},
92
+ "outputs": [],
93
+ "source": [
94
+ "p.setHeirsTaxRate(33)\n",
95
+ "p.setLongTermCapitalTaxRate(15)\n",
96
+ "p.setInterpolationMethod('s-curve')\n",
97
+ "p.setAllocationRatios(\n",
98
+ " 'individual',\n",
99
+ " generic=[[[60, 40, 0, 0], [70, 30, 0, 0]], [[60, 40, 0, 0], [70, 30, 0, 0]]]\n",
100
+ ")\n",
101
+ "p.showAllocations()"
102
+ ]
103
+ },
104
+ {
105
+ "cell_type": "markdown",
106
+ "id": "0e153434-a9ba-4ced-b138-4dc0e844ac0f",
107
+ "metadata": {},
108
+ "source": [
109
+ "### Optimize spending and save workbook."
110
+ ]
111
+ },
112
+ {
113
+ "cell_type": "code",
114
+ "execution_count": null,
115
+ "id": "ede7fa05-8a6e-41b4-8b7c-a217d28ad41b",
116
+ "metadata": {},
117
+ "outputs": [],
118
+ "source": [
119
+ "%%time\n",
120
+ "options = {'maxRothConversion': 300, 'bequest': 2000}\n",
121
+ "p.solve('maxSpending', options=options)\n",
122
+ "p.saveConfig()\n",
123
+ "p.summary()"
124
+ ]
125
+ },
126
+ {
127
+ "cell_type": "code",
128
+ "execution_count": null,
129
+ "id": "525f22e2-d241-4fa8-bc95-82d758238326",
130
+ "metadata": {},
131
+ "outputs": [],
132
+ "source": [
133
+ "p.setDefaultPlots('today')\n",
134
+ "p.showNetSpending()\n",
135
+ "p.showGrossIncome()\n",
136
+ "p.showTaxes()\n",
137
+ "p.showSources()\n",
138
+ "p.showAccounts()\n",
139
+ "p.showAssetDistribution()"
140
+ ]
141
+ },
142
+ {
143
+ "cell_type": "code",
144
+ "execution_count": null,
145
+ "id": "1202e86b-4f08-4158-8546-6105da68f77a",
146
+ "metadata": {},
147
+ "outputs": [],
148
+ "source": [
149
+ "p.saveWorkbook(True)"
150
+ ]
151
+ },
152
+ {
153
+ "cell_type": "markdown",
154
+ "id": "a7469daf-61b8-42a4-bcb8-22c801014d8c",
155
+ "metadata": {},
156
+ "source": [
157
+ "### Optimize bequest and save workbook."
158
+ ]
159
+ },
160
+ {
161
+ "cell_type": "code",
162
+ "execution_count": null,
163
+ "id": "73c77134-4b50-42f4-bd2d-d7eb59c5e750",
164
+ "metadata": {},
165
+ "outputs": [],
166
+ "source": [
167
+ "%%time\n",
168
+ "options = {'maxRothConversion': 300, 'netSpending': 180}\n",
169
+ "p.rename('case_kim+sam-bequest')\n",
170
+ "p.solve('maxBequest', options=options)\n",
171
+ "p.saveConfig()\n",
172
+ "p.summary()"
173
+ ]
174
+ },
175
+ {
176
+ "cell_type": "code",
177
+ "execution_count": null,
178
+ "id": "0164a9df-1943-4ead-a0af-71ed502c6417",
179
+ "metadata": {},
180
+ "outputs": [],
181
+ "source": [
182
+ "p.showNetSpending()\n",
183
+ "p.showGrossIncome()\n",
184
+ "p.showTaxes()\n",
185
+ "p.showSources()\n",
186
+ "p.showAccounts()\n",
187
+ "p.showAssetDistribution()"
188
+ ]
189
+ },
190
+ {
191
+ "cell_type": "code",
192
+ "execution_count": null,
193
+ "id": "2206eda7-7534-4b78-a58b-ad9879295fae",
194
+ "metadata": {},
195
+ "outputs": [],
196
+ "source": [
197
+ "p.saveWorkbook(True)"
198
+ ]
199
+ }
200
+ ],
201
+ "metadata": {
202
+ "kernelspec": {
203
+ "display_name": "Python 3 (ipykernel)",
204
+ "language": "python",
205
+ "name": "python3"
206
+ },
207
+ "language_info": {
208
+ "codemirror_mode": {
209
+ "name": "ipython",
210
+ "version": 3
211
+ },
212
+ "file_extension": ".py",
213
+ "mimetype": "text/x-python",
214
+ "name": "python",
215
+ "nbconvert_exporter": "python",
216
+ "pygments_lexer": "ipython3",
217
+ "version": "3.12.7"
218
+ }
219
+ },
220
+ "nbformat": 4,
221
+ "nbformat_minor": 5
222
+ }