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.
This exercise is part of the course
Financial Forecasting in Python
Exercise instructions
- Create an
indexvariable and initialize this index to 0. - Create the dependency by looping through the
admin_usdlist, using yourindexto access the correct month in your lists.- Set the number of temporary employees (
temp) by referencing youremp_leavelist at the currentindex - 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_depshould reflect the standard admin costs.
- Set the number of temporary employees (
- Calculate
forecast_net_profitasforecast_gross_profit(at theindex) minus the calculatedadmin_dep. - Print the
forecast_net_profit.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
admin_usd = [1500, 1500, 1500]
emp_leave = [6, 6, 0]
forecast_gross_profit = [4850, 2800, 4600]
index = ____
for admin in admin_usd:
temp = ____[index]
if temp > 0:
admin_dep = ____ * 80 + admin
else:
admin_dep = ____
forecast_net_profit = forecast_gross_profit[____] - ____
print(forecast_net_profit)
index += 1
print("The forecast net profit is:")