# Universal basic income and negative income tax

**URL:** https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316
**Category:** Uncategorized
**Created:** [October 30, 2024, 8:31pm UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316 "2024-10-30T20:31:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aledinola](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)
#### Post date: [October 30, 2024, 8:31pm UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/1 "2024-10-30T20:31:49Z")

</div>

I came across this really nice paper on UBI and negative income tax. The paper explores a relevant and timely issue that has been debated a lot in a very simple model.

Replicating this paper can be a nice exercise for someone who wants to learn the VFI toolkit. Steady-state and transition can be done on a laptop GPU, from what I have seen.

> **[Negative income tax and universal basic income in the eyes of Aiyagari |...](https://www.cambridge.org/core/journals/macroeconomic-dynamics/article/negative-income-tax-and-universal-basic-income-in-the-eyes-of-aiyagari/00FEC4C9D02026504E18270ABF9ED82D)**
>
> Negative income tax and universal basic income in the eyes of Aiyagari - Volume 28 Issue 4

---

<div class="post-metadata">

### Author: ![yechen](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/y/5fc32e/32.png) [@yechen](https://discourse.vfitoolkit.com/u/yechen)
#### Post date: [February 8, 2026, 3:39am UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/2 "2026-02-08T03:39:02Z")

</div>

I’m doing the exercise using the VFI toolkit. Thanks for the example script of Aiyagari (1994)—it’s easy to ‘replicate’ the benchmark and UBI cases. The quotes around ‘replicate’ are because there are a few details regarding the numerical solution that are lacking in the paper, such as the number of grid points and the method for discretizing the AR(1) process. As a result, I cannot get the exact results.

 ![image](https://discourse.vfitoolkit.com/uploads/default/original/1X/d19a7a1b4b1579a608b0948d18ce94886c812749.png)

```auto
===========Benchmark=============
Tax rate : 0.000 
Transfer at y=0 : 0.000 
relative to y_bar : 0.000 
Output : 0.589 
Capital : 1.521 
Hours worked : 0.321 
Effective labor : 0.346 
Wage rate : 1.091 
Interest rate : 3.952 
Mean(y_bar) : 0.437 
Median : 0.321 
Mean-Median ratio : 1.362 
Before-tax Gini : 0.389 
After-tax Gini : 0.389 
Wealth Gini : 0.691 
Tax/GDP : 0.000 
==================================
===========UBI reform============
Tax rate : 0.200 
Transfer at y=0 : 0.062 
relative to y_bar : 0.200 
Output : 0.484 
Capital : 1.130 
Hours worked : 0.265 
Effective labor : 0.300 
Wage rate : 1.031 
Interest rate : 5.425 
Mean(y_bar) : 0.371 
Median : 0.263 
Mean-Median ratio : 1.411 
Before-tax Gini : 0.422 
After-tax Gini : 0.422 
Wealth Gini : 0.700 
Tax/GDP : 0.153 
==================================

```

However, I ran into trouble while writing code for the NIT case. My question is how to properly set up the FnsToEvaluate function when the budget constraint is piecewise linear. The issue is that some agents pay proportional taxes while others receive transfers, depending on their income relative to a cutoff. Moreover, this cutoff income can be endogenously determined by the government budget balance constraint. A few papers feature this structure, such as [Ventura (1999)](https://www.sciencedirect.com/science/article/pii/S0165188998000797#SEC3) and [Hsu et al. (2013)](https://www.sciencedirect.com/science/article/pii/S0047272713001308#ab0010).

---

<div class="post-metadata">

### Author: ![MichaelTiemann](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/michaeltiemann/32/220_2.png) [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)
#### Post date: [February 8, 2026, 4:44am UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/3 "2026-02-08T04:44:39Z")

</div>

The file `https://github.com/vfitoolkit/IntroToOLGModels/blob/main/OLGModel5_ProgressiveIncomeTaxFn.m` provides an example of a computed income tax. In this case, the computation is a clever combination of parameters that yield a continuous function that is both an accurate approximation of the US Tax system and also allows for GE models to tweak the parameters to find equilibriums.

I suspect that if you hard-code a set of rules such as

```auto
if Income > 0 && Income < 0.1
    tax1 = 0.01 * Income; % The nuisance of taxing the poor
    if Income==0.0123
        tax1=-10; % Lucky people with precisely this income get a transfer
    end
end
if Income >=0.1 && Income < 0.3
    tax2 = 0.07 * Income-0.1; % The next progressive chunk
end
if Income >=0.3 && Income < 0.8
    tax3 = 0.15 * Income-0.3; % The next progressive chunk
end
if Income >=0.8 && Income < 2
    tax4 = 0.25 * Income-0.8; % The next progressive chunk
end
if Income >=2 && Income < 4
    tax5 = 0.39 * Income-2; % The next progressive chunk
end
if Income > 4
    tax6 = 0.45 * Income-4; % The last progressive chunk
end

tax6=min(1, tax6); % Psych! Tax breaks for the rich on that last piece

tax = tax1+tax2+tax3+tax4+tax5+tax6;
% overall tax rate = tax/Income; billionaires have infinitesimal tax rates

```

This will give you a progressive tax, but one that is fixed. So it can force your GE to find solutions by changing things other than tax. Was that the problem you were trying to solve?

---

<div class="post-metadata">

### Author: ![yechen](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/y/5fc32e/32.png) [@yechen](https://discourse.vfitoolkit.com/u/yechen)
#### Post date: [February 8, 2026, 5:24am UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/4 "2026-02-08T05:24:16Z")

</div>

Appreciate the details. I’ll go through them and follow up with my progress.

---

<div class="post-metadata">

### Author: ![aledinola](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)
#### Post date: [February 8, 2026, 10:49pm UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/5 "2026-02-08T22:49:11Z")

</div>

In that case the best way is to define the function to be evaluated as a M-file.

First, you define a fucntion that given the variables (a’,a,z) and some parameters computes the income tax liability:

```auto
function tax = f_income_tax(aprime,a,z,alpha,r,delta,tau)
% Linear income tax

w = (1-alpha)*((r+delta)/alpha)^(alpha/(alpha-1));
income = w*z+r*a;

% Here it will be more complicated: add tax brackets and tax rates
tax = tau*income;

end

```

Second, you add this function to the functions to evaluate

```auto
FnsToEvaluate.income_tax = @(aprime,a,z,alpha,r,delta,tau) f_income_tax(aprime,a,z,alpha,r,delta,tau);

```

Then the toolkit will compute the total income tax as `AggVars.income_tax.Mean`. The variable `income_tax` can be used as an input to general equilibrium conditions. Suppose for example you want to add a condition for government budget constraint:

```auto
GeneralEqmEqns.Gov = @(G,income_tax) G - income_tax;

```

where you impose that in equilibrium total income taxes equal government spending G.

**Note** : if your model features endogenous labor supply, the ‘always required variables’ are not (a’,a,z) but (d,a’,a,z).

---

<div class="post-metadata">

### Author: ![robertdkirkby](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/robertdkirkby/32/287_2.png) [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)
#### Post date: [February 22, 2026, 5:32am UTC](https://discourse.vfitoolkit.com/t/universal-basic-income-and-negative-income-tax/316/6 "2026-02-22T05:32:22Z")

</div>

> [@yechen](#):
>
> I’m doing the exercise using the VFI toolkit. Thanks for the example script of Aiyagari (1994)—it’s easy to ‘replicate’ the benchmark and UBI cases. The quotes around ‘replicate’ are because there are a few details regarding the numerical solution that are lacking in the paper, such as the number of grid points and the method for discretizing the AR(1) process. As a result, I cannot get the exact results.

I always think of the purpose of replication for the results of quantitative exercises with computational models is to get as close as possible to the ‘true results’, not the ‘original paper results’. In this sense I wouldn’t worry about getting slight differences from the original as long as you think your results are likely close to the ‘true’ answer (yours are likely more accurate, and once you solve things you can always rerun your code with more grid points to be confident you are accurate).

PS. The discretization of AR(1) can generate substantial differences in results, partly due to the number of grid points, but mostly due to how you set the max/min grid points.

PPS. ‘were the original results accurate’ is an interesting question, but an even more interesting question to my mind is ‘what are the correct results’. Obviously we hope the original results are close to the true results, but really what we want is confidence in what the ‘true’ results are.
