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

Exercise

Assigning dependencies for sales and COGS

Txs Tools have built a monthly forecast for their gross profit. This will rely on dependencies for Sales and COGS.

Set the dependencies for sales and cogs based on the information below:

  • Sales dependency sales_dep: The sale price is the net price after 1 USD commission. Commissions paid increase from 1 USD per unit to 2 USD per unit for every unit above 350 units sold.
  • Cost dependency cost_dep: When sales per unit increase above 500 units, an additional production line needs to be used, causing an increase in the cost per unit above 500 of 2 USD per unit.

The baseline sale price per unit (base_sales_price) is 15 USD and the baseline cost per unit (base_cost_price) is 7 USD.

Instructions 1/2

undefined XP
  • 1
    • Set the dependency calculations to sales_dep such that the first 350 sales are calculated at the base_sales_price, and the remaining sales are calculated with the increased commission.
    • Print sales_dep.
  • 2
    • Set the dependency calculations to cost_dep such that the first 500 sales are calculated at the base_cost_price, and any additional sales are calculated with the increased production costs.
    • Print cost_dep.