Created
November 22, 2024 20:53
-
-
Save tavallaie/485770e9cc1cbb64386275a02f729011 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- Input Data --- | |
# Nominal GDP in USD | |
nominal_GDP_current = 640.59 * 1e9 # Convert billion USD to USD | |
# Population | |
population = 46.65 * 1e6 # Convert million to individuals | |
# Nominal GDP per Capita (Y) | |
Y = nominal_GDP_current / population | |
# CPI Data | |
CPI_current = 7314.95 | |
CPI_base = 7122.24 # Assume base year CPI | |
# GDP Deflator Data | |
GDP_deflator_current = 76926.30 | |
GDP_deflator_base = 62540.60 # Assume base year GDP Deflator | |
# Inflation Rates | |
I_initial = 17000 # Hyperinflation rate in percent | |
I_new = 2.4 # Controlled inflation rate in percent | |
# Employment Data | |
fired_people = 50000 # Number of people fired | |
total_labor_force = 3.5*1e6 # Total labor force | |
# Poverty Rate | |
PR_initial = 41 # Initial poverty rate in percent | |
# Alpha and Beta | |
alpha = 0.5 # Measures the sensitivity of the poverty rate to changes in unemployment. | |
beta = 0.002 # Measures the sensitivity of the poverty rate to changes in inflation. | |
# --- Calculations --- | |
# Real GDP using GDP Deflator | |
real_GDP_current = (nominal_GDP_current / GDP_deflator_current) * GDP_deflator_base | |
# Real GDP per Capita | |
real_GDP_per_capita_current = real_GDP_current / population | |
# Nominal GDP per Capita (Y) | |
print("Nominal GDP per Capita (Y): ${:.2f}".format(Y)) | |
# Real GDP per Capita (current) | |
print("Real GDP per Capita (current): ${:.2f}".format(real_GDP_per_capita_current)) | |
# CPI under hyperinflation | |
CPI_hyper = CPI_base * (1 + (I_initial / 100)) | |
# Real GDP per Capita under hyperinflation (without policies) | |
Real_GDP_per_capita_hyper = Y / (CPI_hyper / CPI_base) | |
# CPI after policies (controlled inflation) | |
CPI_new = CPI_base * (1 + (I_new / 100)) | |
# Real GDP per Capita after policies (with controlled inflation) | |
Real_GDP_per_capita_new = Y / (CPI_new / CPI_base) | |
# --- Real Income Comparison --- | |
print("\n--- Real GDP per Capita ---") | |
print("Real GDP per Capita under hyperinflation (without policies): ${:.2f}".format(Real_GDP_per_capita_hyper)) | |
print("Real GDP per Capita after policies (with controlled inflation): ${:.2f}".format(Real_GDP_per_capita_new)) | |
# --- Poverty Rate Analysis --- | |
# Unemployment impact | |
delta_U = (fired_people / total_labor_force) * 100 | |
# Poverty rate increase due to unemployment | |
delta_PR_unemployment = alpha * delta_U | |
# New poverty rate with policies | |
PR_with_policies = PR_initial + delta_PR_unemployment | |
# Inflation impact without policies | |
delta_I = I_initial - I_new | |
# Poverty rate increase due to hyperinflation | |
delta_PR_inflation = beta * delta_I | |
# Hypothetical poverty rate without policies | |
PR_without_policies = PR_initial + delta_PR_inflation | |
# --- Display Results --- | |
print("\n--- Poverty Rate Analysis ---") | |
print("Initial Poverty Rate: {:.1f}%".format(PR_initial)) | |
print("Increase in unemployment rate due to firing {:,} people: {:.2f}%".format(int(fired_people), delta_U)) | |
print("Increase in poverty rate due to unemployment: {:.2f}%".format(delta_PR_unemployment)) | |
print("New Poverty Rate with policies: {:.2f}%".format(PR_with_policies)) | |
print("\nInflation rate difference without policies: {:.2f}%".format(delta_I)) | |
print("Increase in poverty rate due to hyperinflation: {:.2f}%".format(delta_PR_inflation)) | |
print("Hypothetical Poverty Rate without policies: {:.2f}%".format(PR_without_policies)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment