Skip to content

Commit

Permalink
FutureWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed May 9, 2024
1 parent ee93b29 commit 50e30d5
Show file tree
Hide file tree
Showing 7 changed files with 1,136 additions and 10,643 deletions.
4 changes: 4 additions & 0 deletions code/estimark/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# income uncertainty doubles at retirement
# only estimate CRRA, Bequest params

import warnings

warnings.simplefilter(action="ignore", category=FutureWarning)

import numpy as np
from HARK.Calibration.Income.IncomeTools import (
Cagetti_income,
Expand Down
10 changes: 5 additions & 5 deletions code/notebooks/Portfolio.ipynb

Large diffs are not rendered by default.

91 changes: 61 additions & 30 deletions code/notebooks/SCF_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,38 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n",
"/home/alujan/micromamba/envs/estimatingmicrodsops/lib/python3.12/site-packages/statsmodels/stats/weightstats.py:308: FutureWarning: The provided callable <function sum at 0x7fb65411ef20> is currently using DataFrameGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n",
" dfg = df.groupby(\"vec\").agg(np.sum)\n"
]
}
],
"source": [
"moments = get_weighted_moments(\n",
" data=scf_data,\n",
Expand All @@ -181,18 +212,18 @@
{
"data": {
"text/plain": [
"{'(25,30]': 0.6576324884792626,\n",
" '(30,35]': 0.9736088481325308,\n",
" '(35,40]': 1.781723874904653,\n",
" '(40,45]': 2.389100631076241,\n",
" '(45,50]': 3.236815284741492,\n",
" '(50,55]': 4.244881311689372,\n",
" '(55,60]': 5.328767471857411,\n",
" '(70,75]': 8.802984212552946,\n",
" '(75,80]': 9.853136010240991,\n",
" '(80,85]': 8.755303437164338,\n",
" '(85,90]': 11.361794223826717,\n",
" '(90,95]': 9.975607096117496}"
"{'(25,30]': array([0.65763249]),\n",
" '(30,35]': array([0.97360885]),\n",
" '(35,40]': array([1.78172387]),\n",
" '(40,45]': array([2.38910063]),\n",
" '(45,50]': array([3.23681528]),\n",
" '(50,55]': array([4.24488131]),\n",
" '(55,60]': array([5.32876747]),\n",
" '(70,75]': array([8.80298421]),\n",
" '(75,80]': array([9.85313601]),\n",
" '(80,85]': array([8.75530344]),\n",
" '(85,90]': array([11.36179422]),\n",
" '(90,95]': array([9.9756071])}"
]
},
"execution_count": 4,
Expand All @@ -212,18 +243,18 @@
{
"data": {
"text/plain": [
"([<matplotlib.axis.XTick at 0x7f277d91e780>,\n",
" <matplotlib.axis.XTick at 0x7f277d91e2d0>,\n",
" <matplotlib.axis.XTick at 0x7f2884502000>,\n",
" <matplotlib.axis.XTick at 0x7f277dc04410>,\n",
" <matplotlib.axis.XTick at 0x7f277d95aea0>,\n",
" <matplotlib.axis.XTick at 0x7f277d95b7d0>,\n",
" <matplotlib.axis.XTick at 0x7f277d738200>,\n",
" <matplotlib.axis.XTick at 0x7f277d738bc0>,\n",
" <matplotlib.axis.XTick at 0x7f277d95b050>,\n",
" <matplotlib.axis.XTick at 0x7f277d7394f0>,\n",
" <matplotlib.axis.XTick at 0x7f277d739e80>,\n",
" <matplotlib.axis.XTick at 0x7f277d73a7b0>],\n",
"([<matplotlib.axis.XTick at 0x7fb5524c86b0>,\n",
" <matplotlib.axis.XTick at 0x7fb5524c8650>,\n",
" <matplotlib.axis.XTick at 0x7fb5529db680>,\n",
" <matplotlib.axis.XTick at 0x7fb5529e6000>,\n",
" <matplotlib.axis.XTick at 0x7fb552500bf0>,\n",
" <matplotlib.axis.XTick at 0x7fb552501550>,\n",
" <matplotlib.axis.XTick at 0x7fb552501e80>,\n",
" <matplotlib.axis.XTick at 0x7fb5525027b0>,\n",
" <matplotlib.axis.XTick at 0x7fb552503170>,\n",
" <matplotlib.axis.XTick at 0x7fb552502150>,\n",
" <matplotlib.axis.XTick at 0x7fb552503a40>,\n",
" <matplotlib.axis.XTick at 0x7fb5525283e0>],\n",
" [Text(0, 0, '(25,30]'),\n",
" Text(1, 0, '(30,35]'),\n",
" Text(2, 0, '(35,40]'),\n",
Expand Down Expand Up @@ -514,11 +545,11 @@
{
"data": {
"text/plain": [
"([<matplotlib.axis.XTick at 0x7f277d95a090>,\n",
" <matplotlib.axis.XTick at 0x7f277d759d00>,\n",
" <matplotlib.axis.XTick at 0x7f277d959ee0>,\n",
" <matplotlib.axis.XTick at 0x7f277d7ab560>,\n",
" <matplotlib.axis.XTick at 0x7f277d7abe90>],\n",
"([<matplotlib.axis.XTick at 0x7fb552537290>,\n",
" <matplotlib.axis.XTick at 0x7fb552536360>,\n",
" <matplotlib.axis.XTick at 0x7fb55252bbc0>,\n",
" <matplotlib.axis.XTick at 0x7fb552346900>,\n",
" <matplotlib.axis.XTick at 0x7fb552347290>],\n",
" [Text(0, 0, '(70,75]'),\n",
" Text(1, 0, '(75,80]'),\n",
" Text(2, 0, '(80,85]'),\n",
Expand Down
12 changes: 6 additions & 6 deletions code/notebooks/WarmGlowPortfolio.ipynb

Large diffs are not rendered by default.

80 changes: 69 additions & 11 deletions code/notebooks/WealthPortfolio.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 50e30d5

Please sign in to comment.