Isard to Chenery-Moses#
This notebook converts the packaged SUT test table to the Chenery-Moses format.
Core method#
The relevant entry point is Database.to_chenery_moses.
What changes#
This transformation changes the international trade modelling assumption underlying the database
Isard model: goods are differentiated by place of origin (R1 or R2). Each demand flow (intermediate or final) is explicitly allocated across distinct regional or foreign suppliers. The SUT therefore records who supplies whom, keeping trade flows separated by origin. This yields a detailed representation of trade without assuming perfect substitutability between sources.
Chenery-Moses model: In the Chenery–Moses approach, goods are treated as homogeneous regardless of origin. Total supply (domestic + imports) is pooled and then allocated to uses (intermediate and final demand) using average import shares. The supplying origin is no longer tracked for each use; instead, a common domestic/import proportion is applied across all demand, simplifying the trade structure.
Updates the relevant SUT matrices for the selected scenarios and then resets those scenarios to flow matrices so coefficient-side matrices can be rebuilt consistently on demand.

[1]:
import mario
[2]:
isard_sut = mario.load_test("SUT")
INFO Parser: excel reading SUT flows from /Users/lorenzorinaldi/Documents/GitHub/MARIO/mario/test/tables/test_SUT_standard.xlsx.
INFO Parser: state payload ready with 10 canonical blocks.
INFO Parser: excel state ready for SUT.
INFO Metadata: initialized.
Inspect the starting table#
[3]:
isard_sut.table_type
[3]:
'SUT'
[4]:
isard_sut.U
[4]:
| Region | Region 1 | Region 2 | ||||
|---|---|---|---|---|---|---|
| Level | Activity | Activity | ||||
| Item | Manufacturing | Services | Manufacturing | Services | ||
| Region | Level | Item | ||||
| Region 1 | Commodity | Goods | 3.334903e+11 | 1.657755e+11 | 1.487965e+11 | 6.895332e+10 |
| Services | 3.261811e+11 | 7.254021e+11 | 1.176727e+10 | 3.588505e+10 | ||
| Region 2 | Commodity | Goods | 1.922623e+11 | 4.099986e+10 | 3.038628e+13 | 1.157115e+13 |
| Services | 2.614852e+10 | 5.823465e+10 | 1.154871e+13 | 3.075294e+13 | ||
[12]:
isard_sut.Yc
[12]:
| Region | Region 1 | Region 2 | ||
|---|---|---|---|---|
| Level | Consumption category | Consumption category | ||
| Item | Final demand | Final demand | ||
| Region | Level | Item | ||
| Region 1 | Commodity | Goods | 3.452438e+11 | 2.491705e+11 |
| Services | 1.239017e+12 | 4.451280e+10 | ||
| Region 2 | Commodity | Goods | 1.358686e+11 | 2.070121e+13 |
| Services | 5.020717e+10 | 6.211882e+13 |
[5]:
isard_sut.S
[5]:
| Region | Region 1 | Region 2 | ||||
|---|---|---|---|---|---|---|
| Level | Commodity | Commodity | ||||
| Item | Goods | Services | Goods | Services | ||
| Region | Level | Item | ||||
| Region 1 | Activity | Manufacturing | 1.240653e+12 | 3.487923e+10 | 0.000000e+00 | 0.000000e+00 |
| Services | 7.077650e+10 | 2.347886e+12 | 0.000000e+00 | 0.000000e+00 | ||
| Region 2 | Activity | Manufacturing | 0.000000e+00 | 0.000000e+00 | 6.243698e+13 | 6.506942e+11 |
| Services | 0.000000e+00 | 0.000000e+00 | 5.907938e+11 | 1.039044e+14 | ||
[6]:
isard_sut.is_isard()
INFO Resolver: resolving Z for baseline.
INFO Resolver: trying Z via concat.
INFO Resolver: resolved Z via concat.
INFO Test: table is in Isard format
[6]:
True
Convert the SUT#
[7]:
chenery_moses_sut = isard_sut.to_chenery_moses(inplace=False)
INFO Test: table is not in Chenery-Moses format
INFO Database: Transforming the database into Chenery-Moses
INFO Resolver: resolving Y for baseline.
INFO Resolver: trying Y via concat.
INFO Resolver: resolved Y via concat.
INFO Resolver: resolving s for baseline.
INFO Resolver: trying s via extract.
INFO Resolver: trying s via formula build_sut_s_from_S_Xc.
INFO Resolver: resolved s via formula build_sut_s_from_S_Xc.
INFO Resolver: resolving U for baseline.
INFO Resolver: trying U via extract.
INFO Resolver: resolved U via extract.
INFO Resolver: resolving S for baseline.
INFO Resolver: trying S via extract.
INFO Resolver: resolved S via extract.
INFO Resolver: resolving Ya for baseline.
INFO Resolver: trying Ya via extract.
INFO Resolver: resolved Ya via extract.
INFO Resolver: resolving Yc for baseline.
INFO Resolver: trying Yc via extract.
INFO Resolver: resolved Yc via extract.
INFO Databases: reset to flows.
INFO Transformation of the database from into Chenery-Moses
[8]:
chenery_moses_sut.U
[8]:
| Region | Region 1 | Region 2 | ||||
|---|---|---|---|---|---|---|
| Level | Activity | Activity | ||||
| Item | Manufacturing | Services | Manufacturing | Services | ||
| Region | Level | Item | ||||
| Region 1 | Commodity | Goods | 5.257525e+11 | 2.067754e+11 | 0.000000e+00 | 0.000000e+00 |
| Services | 3.523296e+11 | 7.836367e+11 | 0.000000e+00 | 0.000000e+00 | ||
| Region 2 | Commodity | Goods | 0.000000e+00 | 0.000000e+00 | 3.053508e+13 | 1.164010e+13 |
| Services | 0.000000e+00 | 0.000000e+00 | 1.156048e+13 | 3.078883e+13 | ||
[11]:
chenery_moses_sut.Yc
[11]:
| Region | Region 1 | Region 2 | ||
|---|---|---|---|---|
| Level | Consumption category | Consumption category | ||
| Item | Final demand | Final demand | ||
| Region | Level | Item | ||
| Region 1 | Commodity | Goods | 4.811124e+11 | 0.000000e+00 |
| Services | 1.289224e+12 | 0.000000e+00 | ||
| Region 2 | Commodity | Goods | 0.000000e+00 | 2.095038e+13 |
| Services | 0.000000e+00 | 6.216333e+13 |
[9]:
chenery_moses_sut.S
[9]:
| Region | Region 1 | Region 2 | ||||
|---|---|---|---|---|---|---|
| Level | Commodity | Commodity | ||||
| Item | Goods | Services | Goods | Services | ||
| Region | Level | Item | ||||
| Region 1 | Activity | Manufacturing | 7.989323e+11 | 3.353010e+10 | 4.417211e+11 | 1.349125e+09 |
| Services | 4.557730e+10 | 2.257070e+12 | 2.519920e+10 | 9.081599e+10 | ||
| Region 2 | Activity | Manufacturing | 3.656706e+11 | 8.376176e+08 | 6.207131e+13 | 6.498566e+11 |
| Services | 3.460064e+09 | 1.337527e+11 | 5.873338e+11 | 1.037706e+14 | ||
[13]:
chenery_moses_sut.is_isard()
INFO Resolver: resolving Z for baseline.
INFO Resolver: trying Z via concat.
INFO Resolver: resolved Z via concat.
INFO Test: table is not in Isard format
[13]:
False