Regulatory Calculation Implementation
Turning CAISO charge-code requirements into Java logic, SQL mappings, and test coverage — correct on the regulatory effective date.
A CAISO tariff change introduced revised charge codes with a fixed regulatory effective date and no grace period for miscalculation.
Hard deadline, backward compatibility with historical runs, and full auditability back to tariff language on financially material charges.
Modeled the charge-code logic in Java/Spring directly against the tariff, mapped inputs through SQL, and made effective dates configurable so the switchover left prior periods untouched.
Built JUnit cases from tariff worked examples, verified outputs with business analysts, and ran regression across historical settlements to confirm no drift.
@Service
class GhgAllocationCharge {
BigDecimal compute(SettlementInterval iv) {
return iv.allocatedMwh()
.multiply(tariff.ghgRate(iv.date()))
.setScale(2, HALF_UP);
}
}
Charge codes went live on the effective date with values matching expected results — no post-go-live corrections.