financial-correctness-and-math

Validate financial calculations using decimal arithmetic and strict invariants.

2|Updated Jun 30, 2026
One-click install
npx skills add https://github.com/Canhada-Labs/ceo-orchestration --skill financial-correctness-and-math
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: financial-correctness-and-math
Source: https://github.com/Canhada-Labs/ceo-orchestration/tree/main/.claude/skills/domains/fintech/skills/financial-correctness-and-math
Command: npx skills add https://github.com/Canhada-Labs/ceo-orchestration --skill financial-correctness-and-math

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires decimal.js, bignumber.js, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining precision and correctness in financial calculations, critical for avoiding costly errors in financial systems.

Core Features & Use Cases

  • Mathematical Correctness: Enforces strict rules for mathematical operations to prevent inaccuracies.
  • Decimal Arithmetic: Emphasizes the use of decimal arithmetic over floating-point to maintain precision.
  • Audit-Friendly Calculations: Provides a structured way to track calculations for audit purposes.
  • Use Case: When developing financial software, use this Skill to validate calculations related to prices, volumes, PnL, and other financial metrics.

Quick Start

Use the financial-correctness-and-math skill to validate the accuracy of the VWAP calculation in the attached file 'trading_data.json'.

Frequently Asked Questions about financial-correctness-and-math

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does floating-point arithmetic cause errors in financial calculations, and how do I fix it?

Floating-point arithmetic causes financial calculation errors due to binary precision loss. You fix it by enforcing decimal arithmetic using decimal.js or bignumber.js to maintain strict mathematical correctness and prevent inaccuracies in prices, volumes, and PnL.

How do I validate VWAP calculation accuracy in trading systems?

You validate VWAP calculation accuracy by applying decimal arithmetic and strict mathematical invariants to your trading data. This ensures volume-weighted average prices are computed with absolute precision and remain fully auditable.

Do I need decimal.js or bignumber.js to ensure mathematical correctness in financial systems?

Yes, you need either decimal.js or bignumber.js to ensure mathematical correctness in financial systems. These dependencies are required to execute the decimal arithmetic operations necessary for validating prices, volumes, and PnL without floating-point inaccuracies.

What is the best way to track financial calculations for audit purposes?

The best way to track financial calculations for audit purposes is to enforce strict mathematical rules and decimal arithmetic. This provides a structured validation process that ensures precision and auditability for prices, volumes, and PnL metrics.

Can I use decimal arithmetic to validate PnL and other financial metrics?

Yes, you can use decimal arithmetic to validate PnL and other financial metrics. By enforcing strict rules for mathematical operations, this approach prevents inaccuracies and ensures determinism across systems dealing with prices, volumes, and profit and loss.