开始使用免费开始使用

预测薪资增长与生活成本

受通货膨胀和随经验提升带来的生产率提高影响,您的薪资会根据岗位以不同速度增长。现在,鉴于您从事的是增长迅速且需求旺盛的数据科学岗位,您可以根据绩效假设每年年度薪资都有稳定增长。

您可以假设年度薪资增长率为 5%。这意味着如果您的起薪为每年 $85,000,15 年后每年可望超过 $176,000。税后、且假设税率不变,则大约为每年 $125,000——对数据科学家来说并不夸张。事实上,您也许在几年内就能达到这个水平!但为了稳妥起见,做预测时仍应保守一些。

在本应用中,假设通胀和薪资增长都以每月的小幅增量发生,而不是在年末一次性大幅调整。

上一练习中的 monthly_takehome_salary 可用。

本练习是课程的一部分

Python 金融概念入门

查看课程

练习说明

  • 推导等效的月度薪资增长率(公式见提示!)。
  • 使用我们为您定义的 cumulative_salary_growth_forecast,推导您随时间变化的实际薪资预测。

交互式实操练习

通过完成这段示例代码来试试这个练习。

import numpy as np

# Create monthly forecasts up to 15 years from now
forecast_months = 12*15

# Set your annual salary growth rate
annual_salary_growth = 0.05

# Calculate your equivalent monthly salary growth rate
monthly_salary_growth = ____

# Forecast the cumulative growth of your salary
cumulative_salary_growth_forecast = np.cumprod(np.repeat(1 + monthly_salary_growth, forecast_months))

# Calculate the actual salary forecast
salary_forecast = ____

# Plot the forecasted salary
plt.plot(salary_forecast, color='blue')
plt.show()
编辑并运行代码