1. Learn
  2. /
  3. Courses
  4. /
  5. Financial Forecasting in Python

Exercise

Build a sensitivity analysis for the net profit

Txs Tools has provided the following forecast admin cost in USD based on full-time employees:

Jul = 1500 Aug = 1500 Sep = 1500

Build the forecast net profit forecast_net_profit when emp_leave = [6, 6, 0] and the cost per temp employee is 80 USD.

In addition to emp_leave and admin_usd, forecast gross profit has already been provided for you as forecast_gross_profit.

Instructions

100 XP
  • Create an index variable and initialize this index to 0.
  • Create the dependency by looping through the admin_usd list, using your index to access the correct month in your lists.
    • Set the number of temporary employees (temp) by referencing your emp_leave list at the current index
    • If there are temporary employees, your admin dependencies (admin_dep) should reflect the additional cost of the temporary employees (plus the standard admin costs)
    • Else, admin_dep should reflect the standard admin costs.
  • Calculate forecast_net_profit as forecast_gross_profit (at the index) minus the calculated admin_dep.
  • Print the forecast_net_profit.