Tech

Before Adjusting a Fee Rate, Identify Which Transactions Will Be Affected

Recalculate payment fee rate changes using two public hard problems from DABstep: how conditions map to MCC codes, how the affected transaction set is determined, why fixed amounts offset in the differential, and how individual differentials are independently verified.

Tech #Data Agent#Data Analysis Practice#Evaluation#DABstep#Business Analysis

Step-by-step differential calculation from rule conditions to the affected set

If a payment fee rate is reduced from 14 basis points to 1 basis point, how much can a merchant save in a month?

While this appears to be a multiplication problem, the actual challenge lies before the multiplication: determining which transactions are affected. This analysis recalculates two “hard” problems from DABstep, with a focus on defining the scope and performing independent verification.

Data and Problems

DABstep, built by Adyen and Hugging Face, assesses multi-step analysis across tables and documents. This exercise utilizes 138,236 synthetic payment transactions from 2023, 1,000 fee rules, along with merchant profiles, industry code dictionaries, and business manuals.

Problem 1: For a transaction of 10 EUR, what is the average fee calculated according to applicable rate rules? The conditions are Account Type H, the Food & Beverage industry, and GlobalCard.

Problem 2: For a specified merchant in January 2023, if the rate for Rule 384 is changed from 14 to 1 while keeping other conditions constant, what is the change in fees?

Both problems require reading the manual first to confirm units and rule definitions before performing filtering and calculations.

Problem 1: Map Conditions First, Then Calculate Line-by-Line

The conditions include “Food & Beverage industry,” but the data uses MCC codes. The first step is to map the industry description to MCC 5812 and then filter for applicable rules based on this code.

After filtering down to 46 applicable rules, calculate separately for each rule:

Fee = Fixed Fee + rate × Transaction Amount ÷ 10,000

Taking the arithmetic mean of these 46 results yields 0.123217 EUR.

It is crucial to clarify a methodological point here: the average represents the fees calculated individually for each of the 46 rules, without weighting by actual transaction distribution. Therefore, it cannot be treated as the merchant’s actual average fee per transaction; rather, it should be understood as “the average rate level of the rule set under these conditions.”

Additionally, pay attention to units: rate=14 represents 14 basis points (0.14%), not 14%. Misinterpreting this as 14% would inflate the transaction-amount-based portion of the fee by a factor of 100 (two orders of magnitude). The total fee, which includes fixed costs, does not necessarily change by the same multiple.

Problem 2: Identify the Affected Set First

The key to Problem 2 is not calculating the difference but determining which transactions match Rule 384.

The merchant had 1,201 transactions that month. After filtering by card scheme, credit type, and ACI conditions, only 12 transactions matched, totaling 729.31 EUR.

The hit rate is approximately 1%. This ratio is itself part of the conclusion: the scope of impact from a rate reduction is far smaller than “all transactions.” Skipping this step and calculating directly against the total volume would overestimate the savings by two orders of magnitude.

Differential Calculation: Why Fixed Amounts Cancel Out

Fee change:

(1 − 14) × 729.31 ÷ 10,000 = −0.948103 EUR

This indicates that under a fixed transaction sample, this rule contributes to a fee reduction of approximately 0.95 EUR.

Note that the formula does not include the fixed fee. The reason is that the fixed amount remains identical under both the old and new rates, canceling each other out during the differential calculation. This is not an omission but a property of differential calculation: only components that vary with parameters enter the result.

Simultaneously, another boundary must be maintained: other transactions cannot be subjected to the new rate. Rule 384 applies only to the 12 matched transactions; unmatched transactions continue to be calculated according to their respective rules.

An Assumption That Must Be Disclosed

The manual explicitly states that null represents a wildcard but does not equally clearly define an empty list []. In this analysis, [] is interpreted as “no additional restrictions.”

This is a judgment call, not a fact. If in actual business operations [] signifies “not applicable to any transactions,” the affected set would be entirely different, and the conclusion would be reversed. Therefore, this assumption must be explicitly stated upon delivery.

This highlights the role of data quality checks here: analyze-data-quality verifies keys and granularity for transactions, merchants, and rules to ensure joins do not drop or inflate rows; however, semantic conventions regarding null values still require manual confirmation.

Skill Division of Labor

SkillResponsibility
gather-business-contextRead the manual to confirm units and rule definitions
analyze-data-qualityCheck keys and granularity for transactions, merchants, and rules
jupyter-notebooksExecute rule matching and calculate old vs. new fees line-by-line
visualize-dataDisplay filtering scope and fee changes
validate-dataVerify transaction sets with SQL and amounts with Decimal

The final step warrants separate explanation: amounts are calculated using Decimal rather than floating-point numbers to avoid accumulation errors; the transaction set is re-filtered independently via SQL to confirm that exactly 12 transactions are included, neither more nor fewer.

Conclusion Boundaries

  • This is a teaching recalculation using public synthetic data; answers are visible and not a blind test.
  • Empty lists are treated as “no restrictions,” which is a disclosed assumption.
  • The calculation does not simulate changes in customer behavior and does not represent real-world rate reduction effects.
  • Results cover only the specified merchant, month, and rule.

Transferable Methodology

This path can be applied to cloud billing calculations, platform commission adjustments, or price change estimations:

  1. Define the Change: Identify which parameter is changing and from what value to what value.
  2. Identify the Affected Set: Map business conditions to data conditions to filter out records that are truly affected.
  3. Freeze Other Conditions: Change only one variable while keeping all others constant.
  4. Calculate Differences Item-by-Item: Only components varying with parameters enter the result; fixed components cancel out.
  5. Independent Verification: Recalculate the set and amounts using an alternative method.

Among these five steps, Step 2 is the most easily omitted and the most prone to error. If the scope is incorrect, subsequent calculations are meaningless regardless of their precision.

References: DABstep Dataset · OpenAI Data Analytics Skills Public Reference Repository