# Step 18: Basic NTA Indicators (Lee & Mason 2017)¶

## Overview¶

At this step we add a module for the calculation of basic NTA indicators - the Support Ratio and the Impact Index as suggested by Lee & Mason (2017). Indices are calculated and updated in yearly steps on the State level. To do so, we add an actor “State” performing these updates, and a module StateCore.mpp.

## The new NtaIndicators.mpp Module¶

This module calculates a set of yearly NTA indicators following the approach presented by Lee & Mason (2017) “Some Economic Impacts of Changing Population Age Distributions—Capital, Labor and Transfers”. We model a simple economy with a Cobb Douglas production function without productivity growth in two scenarios: a closed economy where interest rate and wages are endogenous, and a open economy where wages and interest rates stay constant. The two indicators calculated are the “Support Ratio” and the “Impact Index”. Both measures have the “Effective consumers” - i.e. the age re-weighted consumption based on the reference year - in the denominator. The nominator of the Support Ratio is the projected total labor. In contrast, the “Impact Index” puts the total consumption assuming constant saving rates by age and accounting for the changes in wages and interest rates into the nominator.:

```Variables:

- yl(x)   Average labor income age x
- yk(x)   Average capital income age x
- P(x)    Population age x
- i(x)    Average savings age x
- s(x)    Saving rate age x - constant
- c(x)    Average Consumption age x (reference values for calculation of N) - reference

- L       Labor
- K       Capital
- I       Saving
- S       Saving rate
- C       Consumption
- r       Interest rate
- w       Wage
- Yl      Labor Income
- YK      Capital Income
- Y       Total Income Yl+Yk
- α       Alpha – constant
- N       Effective Consumers (population-weighted base-year consumption)
- l(x)    Average labor age x – constant
- k(x)    Average capital age x – constant

Cobb Douglas:

Y = L^α K^(1- α)
Y = wL + rK
w = αY / L
r = (1- α) Y / K
Yl = wL = αY
Yk = rK = (1- α)Y

Known:

yl(x)   NTA data of reference year
yk(x)   NTA data of reference year
i(x)    NTA data of reference year
c(x)    NTA data of reference year
P(x)    NTA data of reference year
r       parameter for reference year (used also to estimate stock from capital income flow)

Calculated for initial year:

Yl   = ∑ yl(x) * P(x)
Yk   = ∑ yk(x) * P(x)
Y    = Yl + Yk
α    = Yl / Y
K    = Yk / r
L    = ( Y / K^(1- α))^(1/α)
w    = Yl / L
s(x) = i(x) / (yl(x) + ykx))
l(x) = yl (x) / w
k(x) = yk (x) / r
N    = ∑ cl(x) * P(x)

Simulation: calculate for an updated population by age P(x)

Closed Economy

L     = ∑ l(x)* P(x)
K     = ∑ k(x)* P(x)
Y     = L^α K^(1- α)
Yl    = αY
YK    = (1- α)Y
w     = αY / L
r     = (1- α) Y / K
N     = ∑ c(x) * P(x)
yl(x) = w * l(x)
yk(x) = r * k(x)
C     = ∑ (1-s(x)) * (yl(x) + yk(x) ) * P(x)

Open Economy (difference to closed)

Y     = w * L + r * K
Yl    = w * L
YK    = r * K

Indices

SR    = L / N  Support Ratio (same for open and closed economy)
IMP   = C / N  Impact Index (different for closed and open economy)
```

This module is optional. It feeds on the NTA variables (by age, sex, education, family) calculated and maintained in the NtaBase.mpp module. The only model parameters are the reference year of the NTA data and the initial interest rate. All calculations are performed in a yearly update event of the actor State.

```

////////////////////////////////////////////////////////////////////////////////////////////////////
// Parameters
////////////////////////////////////////////////////////////////////////////////////////////////////

parameter_group PG_NTA_CONST                        //EN NTA Indicators
{
NtaInitialInterestRate, NtaBaseYear
};

parameters
{
int    NtaBaseYear;                            //EN NTA Base Year
double NtaInitialInterestRate;                 //EN Initial Interest Rate
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// State Actor states and functions
////////////////////////////////////////////////////////////////////////////////////////////////////

actor State
{
double  nta_initial_Y = { 0.0 };                //EN Initial year total income Y
double  nta_initial_Yl = { 0.0 };               //EN Initial year labor income Yl
double  nta_initial_Yk = { 0.0 };               //EN Initial year capital income Yk
double  nta_initial_K = { 0.0 };                //EN Initial year capital stock
double  nta_alpha = { 0.0 };                    //EN Alpha of Cobb Douglas Function
double  nta_initial_L = { 0.0 };                //EN Initial year total labor L
double  nta_initial_w = { 0.0 };                //EN Initial year wage w
double  nta_initial_SR = { 1.0 };               //EN Initial Support Ratio
double  nta_initial_closed_IMP = { 1.0 };       //EN Initial Impact Factor closed economy
double  nta_initial_open_IMP = { 1.0 };         //EN Initial Impact Factor open economy

double  nta_current_N = { 0.0 };                //EN Current reference consumers N
double  nta_current_L = { 0.0 };                //EN Current total Labor N
double  nta_current_C = { 0.0 };                //EN Current total Consumption
double  nta_current_C_open = { 0.0 };           //EN Current total Consumption (open economy)
double  nta_current_Y = { 0.0 };                //EN Current total Y
double  nta_current_K = { 0.0 };                //EN Current total Capital K
double  nta_current_w = { 0.0 };                //EN Current wage w
double  nta_current_r = { 0.0 };                //EN Current interest rate r
double  nta_current_SR = { 1.0 };               //EN Current Support Ratio
double  nta_current_closed_IMP = { 1.0 };       //EN Current Impact Factor closed economy
double  nta_current_open_IMP = { 1.0 };         //EN Current Impact Factor open economy

logical nta_is_updated = { FALSE };

TIME    time_nta_update = { 0.0 };              //EN Time of next NTA update
event   timeUpdateNtaEvent, UpdateNtaEvent;     //EN Update NTA production function

SIM_YEAR_RANGE tab_state_year = COERCE(SIM_YEAR_RANGE, state_year); //EN Calendar Year
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// Implementation
////////////////////////////////////////////////////////////////////////////////////////////////////

TIME State::timeUpdateNtaEvent()
{
if (time_nta_update < NtaBaseYear ) return NtaBaseYear + 0.5;
else return time_nta_update;
}

void State::UpdateNtaEvent()
{
nta_is_updated = FALSE;

// Population size
//long nPersons = asAllPersons->Count();
long nPersons = asAllResidents->Count(); //CHANGE19
//    nta_total_pop = nPersons;

if (state_year == NtaBaseYear)
{
// Values of initial year
for (long nI = 0; nI < nPersons; nI++)
{
//auto prPerson = asAllPersons->Item(nI);
auto prPerson = asAllResidents->Item(nI);//CHANGE19
nta_initial_Yl = nta_initial_Yl + prPerson->base_YL;
nta_initial_Yk = nta_initial_Yk + prPerson->base_YAF + prPerson->base_YAG;
}
nta_initial_Y = nta_initial_Yl + nta_initial_Yk;
nta_initial_K = nta_initial_Yk / NtaInitialInterestRate;
nta_alpha = nta_initial_Yl / nta_initial_Y;
nta_initial_L = pow(nta_initial_Y / pow(nta_initial_K,1-nta_alpha), 1.0 / nta_alpha);
nta_initial_w = nta_initial_Yl / nta_initial_L;
}

if (state_year >= NtaBaseYear)
{
double dNta_sx = 0.0;          // applicable individual saving rate as in initial year
double dNta_lx = 0.0;          // applicable individual labor input as in initial year
double dNta_kx = 0.0;          // applicable individual capital as in initial year
double dNta_cx = 0.0;          // applicable individual consumption as in initial year

nta_current_L = 0.0;           // Current total Labor N
nta_current_K = 0.0;           // Current total Capital K
nta_current_N = 0.0;           // Current reference consumers N
nta_current_C = 0.0;           // Current total Consumption
nta_current_C_open = 0.0;      // Current total Consumption in open economy
nta_current_Y = 0.0;           // Current total Y

for (long nI = 0; nI < nPersons; nI++)
{
//auto prPerson = asAllPersons->Item(nI);
auto prPerson = asAllResidents->Item(nI);//CHANGE19
dNta_lx = prPerson->base_YL / nta_initial_w;
dNta_kx = (prPerson->base_YAF + prPerson->base_YAG) / NtaInitialInterestRate;
dNta_cx = prPerson->base_CFE + prPerson->base_CFH + prPerson->base_CFX + prPerson->base_CGE
+ prPerson->base_CGH + prPerson->base_CGX;
nta_current_L = nta_current_L + dNta_lx;
nta_current_K = nta_current_K + dNta_kx;
nta_current_N = nta_current_N + dNta_cx;
}
nta_current_Y = pow(nta_current_L, nta_alpha) * pow(nta_current_K, 1 - nta_alpha);
nta_current_w = nta_alpha * nta_current_Y / nta_current_L;
nta_current_r = (1 - nta_alpha) * nta_current_Y / nta_current_K;

for (long nI = 0; nI < nPersons; nI++)
{
//auto prPerson = asAllPersons->Item(nI);
auto prPerson = asAllResidents->Item(nI);//CHANGE19
dNta_lx = prPerson->base_YL / nta_initial_w;
dNta_kx = (prPerson->base_YAF + prPerson->base_YAG) / NtaInitialInterestRate;
dNta_sx = 0.0;
if (prPerson->base_YL + prPerson->base_YAF + prPerson->base_YAG > 0.0 && prPerson->base_SF + prPerson->base_SG > 0.0 &&
prPerson->base_YL + prPerson->base_YAF + prPerson->base_YAG > prPerson->base_SF + prPerson->base_SG)
{
dNta_sx = (prPerson->base_SF + prPerson->base_SG) / (prPerson->base_YL + prPerson->base_YAF + prPerson->base_YAG);
}
nta_current_C = nta_current_C + (1 - dNta_sx) * (nta_current_w * dNta_lx + nta_current_r * dNta_kx);
nta_current_C_open = nta_current_C_open + (1 - dNta_sx) * (nta_initial_w * dNta_lx + NtaInitialInterestRate * dNta_kx);
}
}

// Indices

if (state_year == NtaBaseYear)
{
nta_initial_SR = nta_initial_L / nta_current_N;
nta_initial_closed_IMP = nta_current_C / nta_current_N;
nta_initial_open_IMP = nta_current_C_open / nta_current_N;

}

if (state_year >= NtaBaseYear)
{
nta_current_SR = (  nta_current_L / nta_current_N   ) / nta_initial_SR;
nta_current_closed_IMP = ( nta_current_C / nta_current_N ) / nta_initial_closed_IMP;
nta_current_open_IMP = ( nta_current_C_open / nta_current_N ) / nta_initial_open_IMP;
}

// Update Clock
nta_is_updated = TRUE;
time_nta_update = WAIT(1.0);
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// Table Output
////////////////////////////////////////////////////////////////////////////////////////////////////

table_group TG_NTAIndicators                    //EN NTA Indicators and Impact Index Lee 2017
{
TabNTAIndicators
};

table State TabNTAIndicators                    //EN NTA Indicators and Impact Index Lee 2017
[WITHIN(SIM_YEAR_RANGE,state_year) && nta_is_updated]
{
{
max_value_in(nta_current_SR),           //EN Support Ratio SR decimals=4
max_value_in(nta_current_closed_IMP),   //EN Impact Index IMP closed economy decimals=4
max_value_in(nta_current_open_IMP),     //EN Impact Index IMP open economy decimals=4
max_value_in(nta_current_N),            //EN Current reference consumers N
max_value_in(nta_current_L),            //EN Current total Labor L
max_value_in(nta_current_C),            //EN Current total Consumption
max_value_in(nta_current_Y),            //EN Current total Income Y
max_value_in(nta_current_K),            //EN Current total Capital K
max_value_in(nta_current_w),            //EN Current wage w closed economy decimals=4
max_value_in(nta_current_r)             //EN Current interest rate r closed economy decimals=4
}
* tab_state_year
};
```

## The new StateCore.mpp Module¶

The welfare state core actor file introduces a ‘State’ actor. The actor maintains a state_year which is synchronized with the clock actor. The “State” is used for welfare state accounting

```

actor State                                         //EN State Actor
{
void    Start();                                //EN Start Function
int     state_year = lClock->clock_year;        //EN Calendar year
void    StateYearStart();                       //EN Year End Function
};

actor_set State asState;                            //EN The State Actor Set

void State::Start()
{
// Setting the actor weight
Set_actor_weight(asGlobals->Item(0)->person_weight);
Set_actor_subsample_weight(asGlobals->Item(0)->person_weight);

lClock = asTheClock->Item(0);
time = lClock->time;
}
```

## Initiating the State actor in model_core.mpp¶

The actor State has to be created after the clock actor (to which it links itself in order to synchronizes time)

```
// Create the Clock
auto prClock = new Clock();
prClock->Start();