fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

ROIC Calculation

Install and import#

bash
npm install fintech-algorithms
ts
import { roicCalculation } from "fintech-algorithms/fundamental-analysis-and-valuation/statement-ratios/roic-calculation";

Signature#

roicCalculation(input)

Computes NOPAT as operating profit less tax at a normalized rate, then divides it by average invested capital, where invested capital at each end of the period is operating assets minus operating liabilities.

Parameters#

NameTypeNotes
input{ operating_profit: number; normalized_tax_rate: number; beginning_operating_assets: number; beginning_operating_liabilities: number; ending_operating_assets: number; ending_operating_liabilities: number }A plain object. operating_profit and normalized_tax_rate produce NOPAT; beginning_operating_assets minus beginning_operating_liabilities and ending_operating_assets minus ending_operating_liabilities give the two capital snapshots that are averaged. Every key must be a finite number.

Returns#

{ nopat: number; beginning_invested_capital: number; ending_invested_capital: number; average_invested_capital: number; roic: number | null; state: string; reason: string }

nopat is operating profit times one minus the tax rate. beginning_invested_capital, ending_invested_capital and average_invested_capital expose the capital base, and roic is NOPAT over that average. When the average is not positive, roic is null, state is not-meaningful and reason is nonpositive-average-invested-capital; otherwise state is loss for negative NOPAT or calculated, with reason package-operating-capital-definition.

Errors#

  • When any of the six inputs is not a finite number — throws RangeError
  • When normalized_tax_rate is below 0 or above 1 — throws RangeError

Complexity: time O(1), space O(1).

Worked example#

verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.

Input#

input
{
  "operating_profit": 180,
  "normalized_tax_rate": 0.25,
  "beginning_operating_assets": 900,
  "ending_operating_assets": 1000,
  "beginning_operating_liabilities": 250,
  "ending_operating_liabilities": 270
}

Call#

roicCalculation(input)

Returns#

object with 7 fields: nopat, beginning_invested_capital, ending_invested_capital, average_invested_capital, roic, state, reason

{
  "nopat": 135,
  "beginning_invested_capital": 650,
  "ending_invested_capital": 730,
  "average_invested_capital": 690,
  "roic": 0.195652173913,
  "state": "calculated",
  "reason": "package-operating-capital-definition"
}

Other exports#

This module also exports dupontDecomposition, cashConversionCycle, interestCoverageRatio, netDebtToEbitda, commonSizeStatements, calculate. Every module additionally exports run as an alias of its primary function, and a meta object carrying its catalog id, domain, family, shape and article URL.

Diagrams#

ROIC Calculation — article hero
ROIC Calculation — definition comparison
ROIC Calculation — evidence lineage
ROIC Calculation — formula anatomy
ROIC Calculation — system map
ROIC Calculation — worked example

How it works#

This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.

Read the article →

References#

The rest of the Statement Ratios family#