Taxation Extension#

Used in Section 3.10.2 structural experiments of Delli Gatti et al. (2011)

The taxation extension adds profit taxation to firms. Tax revenue is removed from the economy (no redistribution); this is designed for structural experiments testing the role of automatic stabilizers and entry dynamics.

Quick Start#

import bamengine as bam
from extensions.taxation import TAXATION

sim = bam.Simulation.init(seed=42, profit_tax_rate=0.20)
sim.use(TAXATION)

results = sim.run(n_periods=1000, collect=True)

Note

The taxation extension has no role; it operates directly on the existing Borrower role fields (net_profit and total_funds).

Events#

Event

Hook

Description

FirmsTaxProfits

after firms_validate_debt_commitments

Deduct profit_tax_rate * max(0, net_profit) from firm funds

Configuration#

Parameter

Default

Description

profit_tax_rate

0.0

Tax rate on positive net profit (0.0 = no tax)

API Reference#

Profit taxation extension for structural experiments.

This extension implements a simple profit tax that removes revenue from the economy without redistribution. It is used in the entry neutrality experiment (Section 3.10.2) to increase bankruptcies and test whether the automatic firm entry mechanism artificially drives recovery.

Usage:

from extensions.taxation import TAXATION

sim = bam.Simulation.init(**config)
sim.use(TAXATION)
results = sim.run()

Or manually:

from extensions.taxation import FirmsTaxProfits, TAXATION_EVENTS, TAXATION_CONFIG

sim = bam.Simulation.init(**config)
sim.use_events(*TAXATION_EVENTS)
sim.use_config(TAXATION_CONFIG)
results = sim.run()
class extensions.taxation.FirmsTaxProfits[source]#

Apply profit taxation to firms with positive net profit.

Tax revenue vanishes (no redistribution). This is intentional: the experiment tests whether firm entry alone can sustain recovery when profits are heavily taxed.

Tax = rate * max(0, net_profit) net_profit -= tax total_funds -= tax

Requires extension parameter: profit_tax_rate (float, 0 to 1).

Note: Positioned after firms_validate_debt_commitments (before firms_pay_dividends) so tax is deducted before dividend distribution. Apply with sim.use_events(*TAXATION_EVENTS).

execute(sim)[source]#

Execute the event’s logic.

Mutates simulation state in-place. This method must be implemented by all Event subclasses.

Parameters:

sim (Simulation) – The simulation instance containing all state and configuration.

Returns:

All mutations are in-place.

Return type:

None

Examples

Implement execute in a custom event:

>>> from bamengine import event, ops
>>>
>>> @event
... class CustomPricingEvent:
...     def execute(self, sim):
...         prod = sim.get_role("Producer")
...         # Apply 10% markup to all prices
...         new_prices = ops.multiply(prod.price, 1.1)
...         ops.assign(prod.price, new_prices)

Access configuration and RNG:

>>> @event
... class StochasticEvent:
...     def execute(self, sim):
...         shock = sim.config.h_rho
...         random_values = sim.rng.uniform(0, shock, size=sim.n_firms)
...         # Use random_values in calculations

Notes

The execute method receives full Simulation access, including: - All roles: sim.get_role(“RoleName”) or sim.prod, sim.wrk, etc. - Configuration: sim.config - RNG: sim.rng - Economy state: sim.ec

name = 'firms_tax_profits'#

Taxation events for the entry neutrality experiment.

Implements a simple profit tax that deducts from net_profit and total_funds without redistributing the revenue. This creates fiscal drag that increases bankruptcy rates, testing whether the automatic firm entry mechanism artificially drives recovery (Section 3.10.2).

class extensions.taxation.events.FirmsTaxProfits[source]#

Apply profit taxation to firms with positive net profit.

Tax revenue vanishes (no redistribution). This is intentional: the experiment tests whether firm entry alone can sustain recovery when profits are heavily taxed.

Tax = rate * max(0, net_profit) net_profit -= tax total_funds -= tax

Requires extension parameter: profit_tax_rate (float, 0 to 1).

Note: Positioned after firms_validate_debt_commitments (before firms_pay_dividends) so tax is deducted before dividend distribution. Apply with sim.use_events(*TAXATION_EVENTS).

execute(sim)[source]#

Execute the event’s logic.

Mutates simulation state in-place. This method must be implemented by all Event subclasses.

Parameters:

sim (Simulation) – The simulation instance containing all state and configuration.

Returns:

All mutations are in-place.

Return type:

None

Examples

Implement execute in a custom event:

>>> from bamengine import event, ops
>>>
>>> @event
... class CustomPricingEvent:
...     def execute(self, sim):
...         prod = sim.get_role("Producer")
...         # Apply 10% markup to all prices
...         new_prices = ops.multiply(prod.price, 1.1)
...         ops.assign(prod.price, new_prices)

Access configuration and RNG:

>>> @event
... class StochasticEvent:
...     def execute(self, sim):
...         shock = sim.config.h_rho
...         random_values = sim.rng.uniform(0, shock, size=sim.n_firms)
...         # Use random_values in calculations

Notes

The execute method receives full Simulation access, including: - All roles: sim.get_role(“RoleName”) or sim.prod, sim.wrk, etc. - Configuration: sim.config - RNG: sim.rng - Economy state: sim.ec

name = 'firms_tax_profits'#

See also