Angelo Becchio

Computer Science and Simulation for Economics

Project work on



The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.

powered by NetLogo

view/download model file: pensions.nlogo


It is a simple simulation of a social security sistem. It tries to show the interactions between different kind of social policies in a public budget constraint context.


There are two types of agent: woker and pensioner. Workers receive a wage and chose how to allocate it between consumption, saving and investment. To do this they follow simple rules based on both global and local situation.
Consumption depends on income and wealth of the worker, on economic growth and on economic situations of agent's neighbours.
Investment depends on income and wealth of the worker, on interest rate and on financial situation of agent's neighbours. If interest rate is negative workers cash their investment as quinckly as the interest rate is negative.
Saving is a residual variable.
Workers receive an interest on invested wealth and saved wealth is unproductive.
Workers can also be in debt. In this case they pay a passive interest on their "negative wealth" and they have to return it.
Pensioners receive a pension and their behaviours are similar to workers'. However they consume and invest less than workers. Their pension is a percentage (replacemente-ratio) of the average of the wages of the last 5 years of work.
After "year of work" workers become pensioners and pensioners die, on average, at an established age.
Tournover establishes how much workers "born" every mounth because it is the result of the ratio between new pensioners and new workers.
There is a constraint on social and pension deficit. If deficit is higher than this constraint "policy maker" rise fiscal pressure and payroll tax rate and if deficit is lower they reduce them (for political reasons).
The program calculate social and pension debt and also avarage consumption, investment and wealth. The graphs represent the natural logarithm of these variables to show their dynamics.


To use it simply chose the value of the variables, setup the model and let it start. There are a lot of variables:
YEAR OF WORK: number of year workers have to work before retire
REPLACEMENT RATIO: (average of the last 5 years of work) / (pension)
GROWTH: economic growth
INTEREST RATE: return on investment
GUARANTED INCOME: percentage of per capita GDP guaranted to all agents
DEFICIT/GDP RATIO: constraint to public deficit
AVERAGE DEATH AGE: average of ages at wich people die
TOURNOVER: (new workers) / (new pensioners)
The graphs show the situation of public finance and the dynamics of consumption, wealth and investment.
The 3 monitors show years and fiscal pressure and payroll tax rate chosen by Policy maker.
The world in wich agents live since it isn't important it is very small.
There is a setup button wich setup the world and a start button to start the simulation.


Notice the graphs and the dynamics of fiscal pressure and payroll tax rate wich move to respect the constraint.


Try to modify the variables creating different economic, istitutional or demographic situation and notice differences in final fiscal pressure and payroll tax rate and the different shape of graphs.


Model can be extended with endogenous growth, interest rate, avarage death age or constraint.
Moreover agents could have different behaviours but they could also modify them according to their experience.