Skip to content

Commit

Permalink
Deploying to gh-pages from @ f850d81 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Feb 5, 2024
1 parent f0d78a0 commit bd920a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
15 changes: 12 additions & 3 deletions _modules/taxcalc/calcfunctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>


<span class="nd">@iterate_jit</span><span class="p">(</span><span class="n">nopython</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">SSBenefits</span><span class="p">(</span><span class="n">MARS</span><span class="p">,</span> <span class="n">ymod</span><span class="p">,</span> <span class="n">e02400</span><span class="p">,</span> <span class="n">SS_thd50</span><span class="p">,</span> <span class="n">SS_thd85</span><span class="p">,</span>
<span class="k">def</span> <span class="nf">SSBenefits</span><span class="p">(</span><span class="n">MARS</span><span class="p">,</span> <span class="n">ymod</span><span class="p">,</span> <span class="n">e02400</span><span class="p">,</span> <span class="n">SS_all_in_agi</span><span class="p">,</span> <span class="n">SS_thd50</span><span class="p">,</span> <span class="n">SS_thd85</span><span class="p">,</span>
<span class="n">SS_percentage1</span><span class="p">,</span> <span class="n">SS_percentage2</span><span class="p">,</span> <span class="n">c02500</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Calculates OASDI benefits included in AGI, c02500.</span>
Expand All @@ -985,6 +985,8 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="sd"> Variable that is used in OASDI benefit taxation logic</span>
<span class="sd"> e02400: float</span>
<span class="sd"> Total social security (OASDI) benefits</span>
<span class="sd"> SS_all_in_agi: bool</span>
<span class="sd"> Whether all social security benefits are included in AGI</span>
<span class="sd"> SS_thd50: list</span>
<span class="sd"> Threshold for social security benefit taxability (1)</span>
<span class="sd"> SS_thd85: list</span>
Expand All @@ -1010,6 +1012,8 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="n">SS_percentage1</span> <span class="o">*</span>
<span class="nb">min</span><span class="p">(</span><span class="n">e02400</span><span class="p">,</span> <span class="n">SS_thd85</span><span class="p">[</span><span class="n">MARS</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">-</span>
<span class="n">SS_thd50</span><span class="p">[</span><span class="n">MARS</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]),</span> <span class="n">SS_percentage2</span> <span class="o">*</span> <span class="n">e02400</span><span class="p">)</span>
<span class="k">if</span> <span class="n">SS_all_in_agi</span><span class="p">:</span>
<span class="n">c02500</span> <span class="o">=</span> <span class="n">e02400</span>
<span class="k">return</span> <span class="n">c02500</span>


Expand Down Expand Up @@ -1990,7 +1994,7 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="n">CG_nodiff</span><span class="p">,</span> <span class="n">PT_EligibleRate_active</span><span class="p">,</span> <span class="n">PT_EligibleRate_passive</span><span class="p">,</span>
<span class="n">PT_wages_active_income</span><span class="p">,</span> <span class="n">PT_top_stacking</span><span class="p">,</span>
<span class="n">CG_rt1</span><span class="p">,</span> <span class="n">CG_rt2</span><span class="p">,</span> <span class="n">CG_rt3</span><span class="p">,</span> <span class="n">CG_rt4</span><span class="p">,</span> <span class="n">CG_brk1</span><span class="p">,</span> <span class="n">CG_brk2</span><span class="p">,</span> <span class="n">CG_brk3</span><span class="p">,</span>
<span class="n">dwks10</span><span class="p">,</span> <span class="n">dwks13</span><span class="p">,</span> <span class="n">dwks14</span><span class="p">,</span> <span class="n">dwks19</span><span class="p">,</span> <span class="n">c05700</span><span class="p">,</span> <span class="n">taxbc</span><span class="p">):</span>
<span class="n">dwks10</span><span class="p">,</span> <span class="n">dwks13</span><span class="p">,</span> <span class="n">dwks14</span><span class="p">,</span> <span class="n">dwks19</span><span class="p">,</span> <span class="n">dwks43</span><span class="p">,</span> <span class="n">c05700</span><span class="p">,</span> <span class="n">taxbc</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> GainsTax function implements (2015) Schedule D Tax Worksheet logic for</span>
<span class="sd"> the special taxation of long-term capital gains and qualified dividends</span>
Expand Down Expand Up @@ -2120,6 +2124,8 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="sd"> Maximum of 0 and dwks1 - dwks13</span>
<span class="sd"> dwks19: float</span>
<span class="sd"> Maximum of dwks17 and dwks16</span>
<span class="sd"> dwks43: float</span>
<span class="sd"> separate tax on long-term capital gains and qualified dividends</span>
<span class="sd"> c05700: float</span>
<span class="sd"> Lump sum distributions</span>
<span class="sd"> taxbc: float</span>
Expand All @@ -2135,6 +2141,8 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="sd"> Maximum of 0 and dwks1 - dwks13</span>
<span class="sd"> dwks19: float</span>
<span class="sd"> Maximum of dwks17 and dwks16</span>
<span class="sd"> dwks43: float</span>
<span class="sd"> separate tax on long-term capital gains and qualified dividends</span>
<span class="sd"> c05700: float</span>
<span class="sd"> Lump sum distributions</span>
<span class="sd"> taxbc: float</span>
Expand Down Expand Up @@ -2229,12 +2237,13 @@ <h1>Source code for taxcalc.calcfunctions</h1><div class="highlight"><pre>
<span class="n">dwks13</span> <span class="o">=</span> <span class="mf">0.</span>
<span class="n">dwks14</span> <span class="o">=</span> <span class="mf">0.</span>
<span class="n">dwks19</span> <span class="o">=</span> <span class="mf">0.</span>
<span class="n">dwks43</span> <span class="o">=</span> <span class="mf">0.</span>

<span class="c1"># final calculations done no matter what the value of hasqdivltcg</span>
<span class="n">c05100</span> <span class="o">=</span> <span class="n">c24580</span> <span class="c1"># because foreign earned income exclusion is assumed zero</span>
<span class="n">c05700</span> <span class="o">=</span> <span class="mf">0.</span> <span class="c1"># no Form 4972, Lump Sum Distributions</span>
<span class="n">taxbc</span> <span class="o">=</span> <span class="n">c05700</span> <span class="o">+</span> <span class="n">c05100</span>
<span class="k">return</span> <span class="p">(</span><span class="n">dwks10</span><span class="p">,</span> <span class="n">dwks13</span><span class="p">,</span> <span class="n">dwks14</span><span class="p">,</span> <span class="n">dwks19</span><span class="p">,</span> <span class="n">c05700</span><span class="p">,</span> <span class="n">taxbc</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">dwks10</span><span class="p">,</span> <span class="n">dwks13</span><span class="p">,</span> <span class="n">dwks14</span><span class="p">,</span> <span class="n">dwks19</span><span class="p">,</span> <span class="n">dwks43</span><span class="p">,</span> <span class="n">c05700</span><span class="p">,</span> <span class="n">taxbc</span><span class="p">)</span>


<span class="nd">@iterate_jit</span><span class="p">(</span><span class="n">nopython</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
Expand Down
2 changes: 1 addition & 1 deletion _modules/taxcalc/taxcalcio.html
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ <h1>Source code for taxcalc.taxcalcio</h1><div class="highlight"><pre>
<span class="n">decile_details</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">pop_quantiles</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">weight_by_income_measure</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">gdfx</span> <span class="o">=</span> <span class="n">dfx</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;table_row&#39;</span><span class="p">,</span> <span class="n">as_index</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">gdfx</span> <span class="o">=</span> <span class="n">dfx</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;table_row&#39;</span><span class="p">,</span> <span class="n">as_index</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">observed</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">rtns_series</span> <span class="o">=</span> <span class="n">gdfx</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="n">unweighted_sum</span><span class="p">,</span> <span class="s1">&#39;s006&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">values</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]</span>
<span class="n">xinc_series</span> <span class="o">=</span> <span class="n">gdfx</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="n">weighted_sum</span><span class="p">,</span> <span class="s1">&#39;expanded_income&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">values</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]</span>
<span class="n">itax_series</span> <span class="o">=</span> <span class="n">gdfx</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="n">weighted_sum</span><span class="p">,</span> <span class="s1">&#39;iitax&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">values</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]</span>
Expand Down
Loading

0 comments on commit bd920a6

Please sign in to comment.