xuyuxuan2570 / GLC_Replication.jl

0 stars 0 forks source link

Overview

The paper we replicated is: Growing Like China

These scripts are used to set up the model parameters, perfrom simulation and visualize the results, which are used to simulate various economic phenomena during China's economic transition as discussed in the paper.

Scripts Description and Relationship

parameter.jl

pre_transition.jl

transition.jl

result.jl

six_panel.jl

Figures

Execution Order and Dependencies

1.Run main_parameter.jl will automatically perform the following steps:

To be more specific,

  1. Economy Before Transition
    • Run pre_transition.jl to model any pre-transition economic conditions and behaviors.
  2. Run Transition Simulation
    • Run transition.jl to simulate adjustments to the economic transition.
  3. Analysis of Results
    • result.jl aggregates data from previous process and conduct a comprehensive economic analysis.
  4. Visualization
    • Finally, six_panel.jl visualizes the results of the economic model and its predictions.

Figures

Replication of the result

Replication of the result

Replication of the result

Replication of the result

Replication of the result

Replication of the result

Replication of the result

Replication of the result

The six-panel figure presents a comparison of various economic indicators between the model's predictions and actual data.

Panel 1: Rate of Return in F Firms

Panel 2: E Firm Employment Share

Panel 3: Aggregate Saving Rate

Panel 4: Aggregate Investment Rate

Panel 5: Foreign Reserve / GDP

Panel 6: TFP Growth Rate

Overall Conclusions from the Six-Panel Figure

  1. Model Validation: The six-panel comparison shows that the model generally aligns well with actual data trends, providing validation for the model's assumptions and parameters.
  2. Trend Capturing: The model is effective in capturing long-term trends in key economic indicators such as the rate of return, employment share, saving rate, investment rate, foreign reserves, and TFP growth.
  3. Fluctuations and Volatility: While the model captures overall trends, it may not fully account for short-term fluctuations and volatility seen in the actual data. This suggests potential areas for further refinement in the model.
  4. Policy Implications: The close alignment between the model's predictions and actual data trends suggests that the model can be a useful tool for policymakers in forecasting and planning. Understanding these economic indicators helps in designing informed economic policies.

Conclusion

The model effectively captures the trends of key economic variables such as economic growth, employment, wages, capital returns, investment, and saving rates. Despite some discrepancies in certain periods or variables, the model performs well in replicating the major characteristics of economic transformation.

Comparison

Then, we compare our replication results and the original results. We can see from the two figures that our replication is mostly the same as the paper had. So the result would be similar.

Replication of the result Transition in the Calibrated Economy

This figure depicts the evolution of key variables during and after the economic transition in a calibrated economic model. The solid and dashed lines in the figure represent the simulation results of the model and the actual data, respectively. The figure illustrates the speed of employment reallocation, the evolution of the savings rate (in a U-shaped dynamic), and the trend in the foreign exchange surplus. The increase in the savings rate is associated with a higher savings rate for E-firm managers, which is the main mechanism driving the increase in savings. At the same time, the model accurately predicts the trend in the foreign exchange surplus, albeit with a slight bias in some years. These demonstrate the degree of agreement and discrepancy between the model and China's actual economic data.

Now we are going to details about the function and the logic.

Life-Cycle Savings and Consumption Model

This repository contains a Julia implementation of a life-cycle savings and consumption model as part of a macroeconomic analysis. The key functions compute the wealth and consumption profiles of newly born workers, existing workers, newly born entrepreneurs, existing entrepreneurs, and individuals in the pre-transition phase over their lifetime.

Function: fun_saving_F_newly_born

Description

The function fun_saving_F_newly_born simulates the life-cycle savings and consumption behavior of newly born workers based on various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of workers over their lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of workers.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each age, adjusted for growth and interest rates. Workers earn wages until they reach retirement age age_T_w.
  3. Lifetime Wealth Calculation:

    • Computes total lifetime wealth as the sum of the discounted life-cycle earnings.
  4. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  5. Output:

    • Returns a dictionary with :wealth and :consumption.

Function: fun_saving_F_existing

Description

The function fun_saving_F_existing simulates the life-cycle savings and consumption behavior of existing workers based on their current age and wealth, along with various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of workers over their remaining lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of workers.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each remaining age, adjusted for growth and interest rates. Workers earn wages until they reach retirement age age_T_w.
  3. Lifetime Wealth Calculation:

    • Computes total remaining lifetime wealth as the sum of the discounted life-cycle earnings and current wealth.
  4. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  5. Output:

    • Returns a dictionary with :wealth and :consumption.

Function: fun_saving_E_newly_born

Description

The function fun_saving_E_newly_born simulates the life-cycle savings and consumption behavior of newly born entrepreneurs based on various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of entrepreneurs over their lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of entrepreneurs.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each age, adjusted for growth and interest rates. Entrepreneurs earn wages until they reach a certain age age_T.
  3. Adjusting Rate of Return:

    • Adjusts the rate of return due to the endogenous borrowing constraint using the parameters rho_t, r, ice_t, and eta.
  4. Lifetime Wealth Calculation:

    • Computes total lifetime wealth as the sum of the discounted life-cycle earnings.
  5. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  6. Output:

    • Returns a dictionary with :wealth and :consumption.

Function: fun_saving_E_existing

Description

The function fun_saving_E_existing simulates the life-cycle savings and consumption behavior of existing entrepreneurs based on their current age and wealth, along with various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of entrepreneurs over their remaining lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of entrepreneurs.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each remaining age, adjusted for growth and interest rates. Entrepreneurs earn wages until they reach retirement age age_T.
  3. Adjusting Rate of Return:

    • Adjusts the rate of return due to the endogenous borrowing constraint using the parameters rho_t, r, ice_t, and eta.
  4. Lifetime Wealth Calculation:

    • Computes total remaining lifetime wealth as the sum of the discounted life-cycle earnings and current wealth.
  5. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  6. Output:

    • Returns a dictionary with :wealth and :consumption.

Function: fun_saving_pre_transition

Description

The function fun_saving_pre_transition simulates the life-cycle savings and consumption behavior of individuals in the pre-transition phase based on their current age, wage, and wealth, along with various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of individuals over their lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of individuals.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each remaining age, adjusted for growth and interest rates. Individuals earn wages until they reach retirement age age_T_w.
  3. Lifetime Wealth Calculation:

    • Computes total remaining lifetime wealth as the sum of the discounted life-cycle earnings and current wealth.
  4. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  5. Output:

    • Returns a vector with savings, wealth_prime, sr, and consumption.

Function: fun_saving_pre_transition_E

Description

The function fun_saving_pre_transition_E simulates the life-cycle savings and consumption behavior of entrepreneurs in the pre-transition phase based on their current age, wage, and wealth, along with various economic parameters.

Inputs

Outputs

Function Logic

  1. Initialization:

    • wealth: An array to store the wealth of entrepreneurs over their lifetime, initialized to zeros.
    • w: An array to store the life-cycle earnings of entrepreneurs.
  2. Life-Cycle Earnings Computation:

    • Calculates earnings for each remaining age, adjusted for growth and interest rates. Entrepreneurs earn wages until they reach retirement age age_T_w.
  3. Lifetime Wealth Calculation:

    • Computes total remaining lifetime wealth as the sum of the discounted life-cycle earnings and current wealth.
  4. Optimal Consumption and Savings:

    • Computes the ratio of optimal consumption over time, adjusted based on the discount factor, interest rate, and growth rate.
    • Updates wealth to reflect the savings after accounting for consumption.
  5. Output:

    • Returns a vector with savings, wealth_prime, sr, and consumption.