KatInterview

Card Launch Unit Economics Report Builder

Math & Bit ManipulationAuto-graded · 13 test cases
EasyAuto-gradedMath & Bit Manipulationmathsimulationunit-economics

Last updated

Build a fixed unit-economics report for a card launch: portfolio P&L, partnership uplift, bonus payback time, and the zero-profit loss rate.

A bank is modelling the first-year economics of a new credit card. Write a function that takes no arguments and returns a single dictionary summarising the model. All figures come from the assumptions below.

Assumptions

Customer segments

SegmentPopulationShare who become cardholdersAnnual spend per cardholder
A30,00020%$100,000
Bany0%not counted
C150,0005%$20,000

Economics

  • Revenue is 3% of total cardholder spend (0.03).
  • Credit losses cost 1% of total cardholder spend (0.01).
  • Acquisition costs $200 per cardholder, paid once.
  • Fixed costs are $10,000,000 per year.
  • The bank's annual profit is revenue, minus credit losses, minus acquisition cost, minus fixed cost. The $200 acquisition cost is charged in the year being modelled.

Partnership

A partnership adds 5,000 extra cardholders. Each one spends $40,000 per year. Fixed costs stay the same.

Signup bonus

Each partnership cardholder receives a $500 bonus. To find the payback time of this incremental $500, assume:

  • Spend accrues evenly through the year.
  • The customer is retained indefinitely.
  • There is no discounting.
  • The yearly net margin per customer is 40000 * (0.03 - 0.01).

The payback time is 500 divided by that margin, in years, rounded to 2 decimals.

Required return value

Return a dictionary with exactly these keys.

  1. "base_portfolio": a dictionary describing the portfolio without the partnership, with keys:
    • "annual_spend": total spend of all cardholders.
    • "gross_revenue": spend × 0.03.
    • "default_cost": spend × 0.01.
    • "acquisition_cost": number of cardholders × 200.
    • "fixed_cost": 10,000,000.
    • "profit": gross_revenue - default_cost - acquisition_cost - fixed_cost.
  2. "additional_costs": a list of exactly two dictionaries, in this order, each with keys "cost" and "profit_effect":
    • {"cost": "Rewards or cashback", "profit_effect": "reduces profit by the reward expense"}
    • {"cost": "Customer servicing", "profit_effect": "reduces profit by servicing expense"}
  3. "with_partnership": a dictionary with the same six keys as "base_portfolio", computed for the base cardholders plus the 5,000 partnership cardholders. The signup bonus is not included here.
  4. "partnership_incremental_profit": profit with the partnership minus base profit.
  5. "signup_bonus_breakeven": a dictionary with keys:
    • "formula": the exact string "cumulative net profit(t) = -500 + 40000 * (0.03 - 0.01) * t".
    • "breakeven_years": the payback time described above, rounded to 2 decimals.
    • "before_breakeven": the string "negative".
    • "at_breakeven": the integer 0.
    • "after_breakeven": the string "positive".
  6. "zero_profit_default_rate_base_portfolio": the credit-loss rate r at which the base portfolio's profit is exactly zero. Keep the revenue rate, acquisition cost, and fixed cost as given, and use the base portfolio's cardholder count and spend.
  7. "zero_profit_default_rate_formula": the exact string "r = revenue_rate - (acquisition_cost * active_cards + fixed_cost) / annual_spend".

Constraints

  • The function takes no parameters.
  • All numeric inputs are the fixed values given above.
  • Cardholders per segment are population × share. The 0% segment contributes nothing.
  • Dictionary keys and string values must match the spelling above exactly.
  • Money values are in dollars. Do not round anything except "breakeven_years".

Examples

Example 1

Input: build_card_launch_report()

Output: {'base_portfolio': {'annual_spend': 750000000, 'gross_revenue': 22500000, 'default_cost': 7500000, 'acquisition_cost': 2700000, 'fixed_cost': 10000000, 'profit': 2300000}, 'additional_costs': [{'cost': 'Rewards or cashback', 'profit_effect': 'reduces profit by the reward expense'}, {'cost': 'Customer servicing', 'profit_effect': 'reduces profit by servicing expense'}], 'with_partnership': {'annual_spend': 950000000, 'gross_revenue': 28500000, 'default_cost': 9500000, 'acquisition_cost': 3700000, 'fixed_cost': 10000000, 'profit': 5300000}, 'partnership_incremental_profit': 3000000, 'signup_bonus_breakeven': {'formula': 'cumulative net profit(t) = -500 + 40000 * (0.03 - 0.01) * t', 'breakeven_years': 0.63, 'before_breakeven': 'negative', 'at_breakeven': 0, 'after_breakeven': 'positive'}, 'zero_profit_default_rate_base_portfolio': 0.013066666666666664, 'zero_profit_default_rate_formula': 'r = revenue_rate - (acquisition_cost * active_cards + fixed_cost) / annual_spend'}

Hints

Hint 1

Start with the cardholder counts (population times share) for segments A and C, then total spend as cards times spend per card. Segment B contributes nothing.

Hint 2

Write one small helper that turns (total spend, total cards) into the six-key P&L dictionary, and call it once for the base portfolio and once for the expanded one.

Hint 3

Setting profit to zero gives r = revenue_rate - (acquisition_cost * cards + fixed_cost) / spend. The bonus payback is 500 divided by the yearly net margin per partnership customer, which is 40000 * (0.03 - 0.01).