Economic preprocessor

From Pardee Wiki
Revision as of 16:41, 17 May 2016 by Wikiadmin (talk | contribs)
Jump to navigation Jump to search

There are 72 series marked as "economic" in the "group" field that are read into the preprocessor. Most of them come from World_Development_Indicators (WDI). There are quite a few series marked as "IMF GFS 2013 BATCH PULL". There are a lot of data on the informal economy from ILO-WIEGO. Cyber data also appears to be read into DataEcon.

Sources

IMF, ILO, WDI, Global Trade Analysis Project (GTAP) 

Economic series used in preprocessor

SeriesGovCon%GDP
Economic Aggregate WDI  BATCH PULL Government (general) final consumption as % of GDP
SeriesGovExpense%GDP
Government Finance WDI  BATCH PULL Government expense as % of GDP (compare with govt expenditures)
SeriesGovtCalcExpendCen%GDP 
Economic
Finance
IMF GFS 2013 BATCH PULL
Health spending, government, Central government, as % of GDP
SeriesGovtCalcExpendTot%GDP  Economic Finance IMF GFS 2013 BATCH PULL Expenditure, government, total, as % of GDP
SeriesGovTotalOutlays%GDP Government Finance OECD statistics database online Government total outlays (% of GDP), including forecast
SeriesGovtCurRev%GDP Government Finance WDI  BATCH PULL Current government revenue as % of GDP
SeriesGovtCalcRevTot%GDP Economic Finance IMF GFS 2013 BATCH PULL Revenue, government, total, as % of GDP
SeriesTaxCorp%Tot Government Finance IMF Government Finance Statistics (2001) Corporate taxes as percent of total central government revenue
SeriesTaxSocSec%CurRev  Government Finance WDI  BATCH PULL Social security taxes as % of total govt revenue
SeriesTaxGoodSer%CurRev Government Finance WDI  BATCH PULL Taxes on goods and services as % of total govt revenue
SeriesGovSSWelBen%Exp Government Finance WDI 2011 Government Social Security and welfare expenditures as % of total expenditures
SeriesGovtPension%GDP Government Finance Data was processed from World Bank's  pensions site. Government (public) pensions as % of GDP
SeriesXWBLoans%GDP Economic Finance WDI  BATCH PULL IBRD loans and IDA credits as % of GDP
SeriesXIMFCredit%GDP Economic Finance WDI  BATCH PULL IMF credits as % of GDP
SeriesXDEBTPPG%GDP Economic Finance WDI  BATCH PULL External debt, public and publicly guaranteed, as percentage of gross domestic product
SeriesXDEBTPNG%GDP Economic Finance WDI  BATCH PULL External debt, private non-guaranteed, as percentage of gross domestic product
SeriesXDEBT Economic Finance WDI  BATCH PULL External long-term (more than 1 year) debt: public, publically guaranteed and priv nonguaranteed
SeriesAidDon%GNI Government Expenditure United Nations Statistics Division Aid donations as percent of GNI
SeriesAIDRec%GNI Economic Finance WDI BATCH PULL Official development assistance and official aid, net, % of GNI
SeriesAidRecGrant%Total Economic Finance WDI BATCH PULL Official development assistance and official aid, grants and other revenue, current LCU
SeriesGovtDebt%GDP Government Finance WDI BATCH PULL Central government debt as % of GDP
SeriesXReserves%GDP Economic Finance WDI BATCH PULL Gross international reserves as % of GDP
SeriesXFDIInflows%GDP Economic Finance WDI BATCH PULL Foreign direct investment net inflow as % of GDP
SeriesXFDIOutflows%GDP Economic Finance WDI BATCH PULL Foreign direct investment net outflow as % of GDP
SeriesXWorkerRemitPaid Economic, SocioPolitical Finance WDI BATCH PULL Worker remittances by country where paid
SeriesXWorkerRemitReceived Economic, SocioPolitical Finance WDI BATCH PULL Worker remittances received by home country
SeriesXIncPayments%GDP Economic Finance WDI BATCH PULL Income payments as % of GDP
SeriesXIncReceipts%GDP Economic Finance WDI BATCH PULL Income receipts as % of GDP

Initializations

Use government consumption and expenditures data to initialize SAM.

Government consumption

  • Government consumption (CGovCon) is initialized using SeriesGovCon%GDP.
    • Source: WDI
    • Definition: Government (general) final consumption as % of GDP
    • Data Description- General government final consumption expenditure (formerly general government consumption) includes all government current expenditures for purchases of goods and services (including compensation of employees). It also includes most expenditures on national defense and security, but excludes government military expenditures that are part of government capital formation.
    • If null: "GDP/Capita (PPP) Versus Govt Cons % GDP (" & CStr(BaseYear) & ")"
    • This uses the equation: GDP/Capita (PPP) Versus Govt Cons % GDP (2000)
  • CGConFromSectors = GExpDef(ICount%) + GExpEd(ICount%) + GExpRandD(ICount%) + GExpHl(ICount%) + GExpInfra(ICount%) + GExpInfraOther(ICount%)
  • Set CGovCon as the max of CGovCon and the CGovCon calculated as the sum of sectors. Bound between 9 and 35.

Government expenditures

Initialize central government expenditures and total government expenditures and then calculate local government expenditures as the difference.

  • Central government expenditures (GovExpCentral) is initialized using SeriesGovExpense%GDP
    • Source: WDI
    • Definition: Government expense as % of GDP (compare with govt expenditures)
  • If null then use SeriesGovtCalcExpendCen%GDP 
  • If still null then use: "GDP/Capita (PPP 2005) Versus Govt Expense % GDP (" & CStr(BaseYear) & ") Log"
  • This equation uses: GDP/Capita (PPP 2005) Versus Govt Expense % GDP (2010) Log
  • Note: IMF series (GovtCalcExpendCen%GDP) appears to be central government expenditures while the WDI series does not specify.


  • Use SeriesGovtCalcExpendTot%GDP to initialize total government expenditures.
    • Source: IMF GFS
    • Definition: Expenditure, government, total, as % of GDP
  • If null, then use SeriesGovTotalOutlays%GDP
    • Source: OECD Statistics Database Online
    • Definition: Government total outlays (% of GDP), including forecast
  • Note: Must make sure these two series are identical
  • Hard code 46 in for Ireland in 2010 because of bailout.


  • If no data on total expenditures still, then we cannot estimate local so we use this equation:

        If IsNull(CGovTotExp) Then
            CGovExpLocal(ICount%) = 2 + 12 * Amin(20, CGDPPCP(ICount%)) / 20
        Else
            CGovExpLocal(ICount%) = AMAX(1, CGovTotExp - GovExpCentral)
        End If

'   Go to total govt expenditures and filling holes when have data in order to compute local govt
'       When do not have total and therefore ability to compute local govt,
'       estimate at 2-14% of GDP (OECD gap between total and central is 14%)
'       North, Walli, Weingast p. 10 have table showing grows from 1-2% to 16%

  • CGovExp(ICount%) = GovExpCentral + CGovExpLocal(ICount%) 'Add Central plus local to get total

Government revenue

  • Central government revenue (GovRevCen) is initialized using SeriesGovtCurRev%GDP
    • Source: WDI
    • Definition: Current government revenue as % of GDP
    • Extended definition: blended with old Ifs data.  Revenue is cash receipts from taxes, social contributions, and other revenues such as fines, fees, rent, and income from property or sales. Grants are also considered as revenue but are excluded here.
  • If it's null or less than 5 then we use GDP per capita to estimate.
    • To fill holes: "GDP/Capita (PPP) Versus Govt Revenue (" & CStr(BaseYear) & ")"
    • This equation uses: GDP/Capita (PPP) Versus Govt Revenue (2000)


  • Total government revenue (GovRevTot) is initialized using SeriesGovtCalcRevTot%GDP
    • Source: IMF GFS
    • Definition: Revenue, government, total, as % of GDP
  • If GovRevTot is null i.e. there is no data for total government revenue for the country in SeriesGovtCalcRevTot%GDP (or the value is less than 5) then esimate using GDP per capita (2005).
    • To fill holes: "GDP/Capita (PPP 2005) Versus Govt Revenue Total (2010) Log"
  • Then set GovRevTot as the max of total government revenues and central government revenues
  • Cap total government revenues at 75
  • Set local government revenue as the difference between total and central
  • Note:This logic creates problems for countries where there is not a total government revenue data point but there is a central government data point (ex. Malawi). In this case, both total government revenue and central government revenue are initialized as the data value for central government revenue and local government revenue is set at zero (the difference between total and central).


  • Firm tax rate (CFirmTaxR) is initialized using SeriesTaxCorp%Tot
    • Source: IMF Government Finance Statistics (2001)
    • Definition: Corporate taxes as percent of total central government revenue
    • Note: Apparently not part of batch pull.
  • To fill holes:"GDP/Capita (PPP) Versus Corporate Tax % of Total (" & CStr(BaseYear) & ")"
    • This equation uses: GDP/Capita (PPP) Versus Corporate Tax % of Total (2000)


  • Social security tax (CSSWelTaxR) is initialized using SeriesTaxSocSec%CurRev 
    • Source: WDI
    • Definition: Social security taxes as % of total govt revenue
  • To fill holes: "GDP/Capita (PPP) Versus SS Tax % of Total (" & CStr(BaseYear) & ")"
    • This equation uses: GDP/Capita (PPP) Versus SS Tax % of Total (2000)


  • Indirect taxes (CIndirectTaxR) is initialized using SeriesTaxGoodSer%CurRev
    • Source: WDI
    • Definition: Taxes on goods and services as % of total govt revenue
  • To fill holes: "GDP/Capita (PPP) Versus Indirect Tax % of Total (" & CStr(BaseYear) & ")"
    • This equation uses: GDP/Capita (PPP) Versus Indirect Tax % of Total (2000)


  • Household taxes (CHHTaxR) estimated as residual from firm, welfare, and indirect taxes

Transfers

  • CGovSSWel is initialized using SeriesGovSSWelBen%Exp
    • Source: WDI
    • Definition: Government Social Security and welfare expenditures as % of total expenditures
    • Note: Not included in last WDI batch pull
  • To fill holes: "GDP/Capita (PPP 2005) Versus Govt Expense % GDP (" & CStr(BaseYear) & ") Log"
    • This equation uses: GDP/Capita (PPP 2005) Versus Govt Expense % GDP (2010) Log
    • Note: This appears to use a government expense equation to estimate SS and welfare.

Reconciliation

'       Govcon+SSWEL=GOVEXP; give priority first to boosting Govcon, then reducing sswel, then boosting Govexp
            'i.e. protext all of govcon and boost if possible; reduce sswel as needed; reduce govexp after sswel

Pensions

Government pensions (CGovHHPenT) are initalized using SeriesGovtPension%GDP

Source: Data was processed from World Bank's  pensions site.

Extended source: "International Patterns of Pension Provision" by Palacios and Pallares-Miralles,  2000; OECD Social Expenditure Database. World Bank Pensions Performance Indicators Q2, 2013.

Definition: Government (public) pensions as % of GDP

Note: Newer pension data exists in IFs but is not pulled into preprocessor

To fill holes: "GDP/Capita (PPP) Versus Public Pension % of GDP (" & CStr(BaseYear) & ")"

This equation uses:GDP/Capita (PPP) Versus Public Pension % of GDP (2000)

Reconcile with trade

Normalize Expenditure Components to 100% - (X-M)

Split into sectors

Government consumption

'   Split Government Consumption and Investment into Sectors of Origin
'   ------------------------------------------------------------------

    For ICount% = 1 To CCount
            GMN(ICount%) = 0.1 * CGCon(ICount%) 'Manufacturing spending assumed to be 10% of conumption
            GSR(ICount%) = 0.9 * CGCon(ICount%) 'Services spending assumed to be 90% of consumption
            IMN(ICount%) = CINVEST(ICount%) * 0.5 'Manufacturing investment assumed to be 50% of investment
            ISR(ICount%) = CINVEST(ICount%) * 0.5 'Services investment assumed to be 50% of investment
    Next ICount%

Personal consumption

'   Split Personal Consumption into Sectors - Use Value Added and AMAT
'   ------------------------------------------------------------------

  • Use AMAT data to initalize personal consumption for agriculture, manufacturing, and services.
  • Adjust personal energy consumption based on world energy price and energy exports (exporters tend to consume more).
  • Initalize ICT personal consumption using ICTShare
  • Normalize with total consumption.

Social Accounting Matrix

'   Social Accounting Matrix Stocks.  Begin with Stocks because some needed for flows

Stocks

IFI

'   SAM Stocks: Start with World Bank and IMF Loans and Credits - Want to be
'       sure that external debt/assets cover known values

World Bank (CXWBLOANS) is initialized using SeriesXWBLoans%GDP.

Source: WDI Batch Pull

Definition:IBRD loans and IDA credits as % of GDP

Notes: mjs: Data is transformed to percent of gdp using current us$ GDP; MJE


IMF loans (CXIMFCREDIT) are initialized using SeriesXIMFCredit%GDP.

Source: WDI Batch pull

Definiton: IMF credits as % of GDP

Notes: mjs: Data is transformed to percent of gdp using current us$ GDP; MJE


  • '   Allocate World Bank Loans to Advanced Countries

Allocate total World Bank loans to "advanced countries" (countries with GDP per capita over 10,000 USD and no World Bank loans) based on size of economy. Use one countries share of the total GDP of all advanced countries to determine the share of total WB debt that they lend.

        PerCap = CGDP(ICount%) / CPop(ICount%)
        If PerCap > 10 And CXWBLOANS(ICount%) <= 0.001 Then
            CXWBLOANS(ICount%) = -CGDP(ICount%) / AdvGDPXWBDebt * (GloXWBDebt / AMAX(1, sxwblneqr))
        End If

  • Do the same for IMF debt.

Debt

Initialize public and private guarenteed debt (PPGDEBT) using SeriesXDEBTPPG%GDP

Source: WDI Batch Pull

Definition: External debt, public and publicly guaranteed, as percentage of gross domestic product


Initialize external debt (private non-guarenteed) (PNGDEBT) using SeriesXDEBTPNG%GDP

Source: WDI Batch pull

Definition: External debt, private non-guaranteed, as percentage of gross domestic product


  • Assume firm debt (CXFIRMDEBT) is half of the sum of public and private guarenteed and private non-guarenteed.

        CXFIRMDEBT(ICount%) = PNGDEBT + PPGDEBT * 0.5
            'Need to break PPGDEBT better between private/governmental
            'Probably poorest countries have highest govt share

  • Allocate external firm debt to advanced countries using same procedure for IMF and WB debt above


  • '  Integrate Debt Caculation Using Current Account Data

This basically calculates annual exports, imports, and aid for 1960 to 2010 and sums into cumulative debt.    

      


Initialize external debt (CXDEBTRPA) using SeriesXDEBT

Source: WDI Batch Pull

Definition: External long-term (more than 1 year) debt: public, publically guaranteed and priv nonguaranteed


  • '   Augment External Debt Data with Current Account Accummulation and Compute Global Balance
  • If there is no data for CXDEBTRPA then use the cumulative sum calculated from current account above.
  • Make sure that debt is at least as big as the sum of WB, IMF, and private debt calculated above.
  • Make sure that assets are at least as big as WB donations IMF donations, and private assets.
  • 'Assume debt data better than asset and impose on assets - Scale each lender countries assets to align with global debt
  • '   Compute governmental external debt and government domestic debt - set  government debt (CXGOVTDEBT) to total debt (CXDEBTRPA) minus firm debt (CXFIRMDEBT). This assumes that there is no household external debt.
  • Set "basic" government debt (CXGOVTDEBTB) as total government debt (CXGOVTDEBT) minus IFI debt (to WB and IMF).

Aid

Initalize aid donations (CAIDDON) using SeriesAidDon%GNI

Source: United Nations Statistics Division

Original source: OECD

Definition: Aid donations as percent of GNI


Initialize aid received (CAIDREC) using SeriesAIDRec%GNI

Source: WDI Batch Pull

Original Source: Development Assistance Committee of the Organization for Economic Co-operation and Development, and World Bank and OECD GNI estimates.

Definition: Official development assistance and official aid, net, % of GNI

Extended source definition: http://databank.worldbank.org/ddp/home.do?Step=12&id=4&CNO=2


Initialize CAIDSHARE using SeriesAidRecGrant%Total

Source: WDI Batch Pull

Original source: Development Assistance Committee of the Organization for Economic Co-operation and Development, and World Bank and OECD GNI estimates.

Definition: Official development assistance and official aid, grants and other revenue, current LCU

Note: Unsure where this is actually used

'   Normalize Aid Receipts and Donations so Global Sums Match

Government Debt

Initalize government debt (CGOVDEBT) usingSeriesGovtDebt%GDP

Source: WDI Batch Pull

Definition: Central government debt as % of GDP

  • If it's null use GDP per capita i.e. the equation: "GDP/Capita (PPP) Versus Govt Debt % GDP (" & CStr(BaseYear) & ")" to estimate.
    • This equation uses: GDP/Capita (PPP) Versus Govt Debt % GDP (2000)


  • Set CGovDebt as the max of external government debt (CXGOVTDEBT) and central government debt (CGOVDEBT).

Reserves

  • Initialize government reserves (CXRESERVES) using SeriesXReserves%GDP
  • If null, set to 15.

FDI

  • Initialize FDI inflows as a stock using the sum of inflows over past 30 years from SeriesXFDIInflows%GDP
  • Initialize FDI outflows as a stock using the sum of outflows over the past 30 years from SeriesXFDIOutflows%GDP
  • '   Read Bonds and Equity and Calculate Annual Portfolio Inflows -  Take the average of bonds and equity for the past 5 years, set as CXPORTFIN
  • Make sure FDI no bigger than 5% of GDP

            If Not (IsNull(GDPANN)) Then 'Luxembourg rule; flows far too big for addition to firm income
                    'This is probably too big a cut for Hong Kong; may need more sophisticated algorithm
                        'for entrepot economies

                CXPORTFIN(ICount%) = Amin(CXPORTFIN(ICount%), 0.05 * GDPANN)
            End If

Flows

IFI

'   Read WB Net Flows and Estimate Outflows and Inflows
'       Must do after stocks because need CXWBLOANS

  • Estimate using average of last 5 years of inflows. Balance inflows and outflows so that they match.
  • The initialization of World Bank outflows (CXWBLNFOUT) requires World Bank loans (out) as a stock (CXWBLOANS). CXWBLNFOUT is initalized using the equation below, which also uses (sxwblnintr) and (sxwblnrepr).
    • Note: Unsure of exactlty what these global parameters (sxwblnintr and sxwblnrepr) are.

            CXWBLNFOUT(ICount%) = (CXWBLOANS(ICount%) * sxwblnintr / 100 _
                + CXWBLOANS(ICount%) / AMAX(1, sxwblnrepr))

'   Read IMF Net Flows and Estimate Outflows and Inflows
'       Must do after stocks because need CXIMFCREDIT

  • Same as World Bank above - use the average of the past 5 years for inflows. Use the following equation for outflows, which requires outgoing stocks, initialized above.

            CXIMFCRFOUT(ICount%) = (CXIMFCREDIT(ICount%) * sximfcrintr / 100 _
                + CXIMFCREDIT(ICount%) / AMAX(1, sximfcrrepr))

Remittances

  • Initialize outgoing remittances using SeriesXWorkerRemitPaid and incoming remittances using SeriesXWorkerRemitReceived. Normalize each country's paid and received using RemitNormReceived and RemitNormPaid, normalizing coefficient calculated elsewhere.
    • Note: I think this is normalize total paid and received i.e. total outflows for all countries and total inflows for all countries. The global balance below is to balance NET inflows and outflows.
  • '   Balance Global Remittances
    • Make sure global paid remittances equal global recieved remittances.
  • '   Fill holes on CPOPFOREIGN and fix descrepancies
    • If there is a foreign population and remittances are greater than zero, change the sign of foreign population (CPOPFOREIGN).

'jrs 2014/02/04 better to re-initialize CPOPFOREIGN which is an estimate
'and not CXWORKREMIT, which comes from data

'This assumes $1,000 annual remitances per person, which is the average from the US and EU27

  • 'Bound remittances at $5,000 per worker abroad

Balancing

  • '   ReBalance Global Remittances
  • 'Normalizing Immigrants and Emmigrants again, in case they were adjusted by Remittances
  • '   Balance global migration stocks, inward and outward
  • '   Normalize World Bank Flows in and out
  • '   Normalize IMF Flows in and out
  • 'bbh 2011/11/12  Adjusted this allocation because above now have new outflow countries also   
    • '   Allocate Portfolio Investment to Advanced Countries by Economic Size
  • '   Balance Portfolio Stocks in and Out; Adjust Stocks Out
  • ' Compute Porfolio Flows Out
  • ' Balance Portfolio Flows in and Out; Adjust Outflows
  • '   Balance FDI Stocks with Adjustments to Advanced Countries
  • '   Balance FDI Flows with Adjustments to Advanced Countries
  • '   Compute Apparent Reconciliaton of Capital and Current Account in Recent Years using accumulation of government debt and change in reserves
  • Calculate how much debt has grown from 97/98 to 99/00. Then calculate how much reserves have grown from 97/98 to 99/00. Then calculate the ratio of reserves growth to debt growth.
  • '       Compute unreconciled discrepancy between capital and current account
    • Reasons could be flight capital, unreported worker remittances, other data errors
  • Initialize foreign income payments using SeriesXIncPayments%GDP and foreign income receipts using SeriesXIncReceipts%GDP.
  • '   ReBalance Global Remittances Still Again

Household and firm income

'   Now that have tax rates as % of govt revenue
'       and have intl financial flows that affect firm income in forecasts,
'       can compute household and firm income, adjust firm by intl flows and
'       can compute tax rates as % of that income for use in forecasts

Output

  • Put everything into EcoOutput
  • '   Go to specialized routines to process input-output data for IFs
    • Call InputOutputDataAdjuster
    • Call RegionalInputOutputData

Recompute

  • Sub RecomputeAgriOutput()
    • 'Because of the different normalizations XAG has suffered, it no longer matches the SUM of AgXValues
  • Sub RecomputeOutputAgriNormalization

GDP

  • '   Fill Initial GDP Growth Rates and Income Distribution Measures
    • [incomplete]