v.25.7New Feature

Financial Functions

Add financial functions: financialInternalRateOfReturnExtended (XIRR), financialInternalRateOfReturn (IRR), financialNetPresentValueExtended (XNPV), financialNetPresentValue (NPV). #81599 (Joanna Hulboj).
Added new financial functions to ClickHouse: financialInternalRateOfReturnExtended (XIRR), financialInternalRateOfReturn (IRR), financialNetPresentValueExtended (XNPV), and financialNetPresentValue (NPV).

Why it matters

These functions provide users with built-in capabilities to calculate key financial metrics such as internal rate of return and net present value, both in standard and extended forms. This enables efficient and accurate financial analysis directly within ClickHouse without needing external tools.

How to use it

Users can invoke the new functions in their SQL queries as follows: use financialInternalRateOfReturnExtended or financialInternalRateOfReturn to calculate IRR, and use financialNetPresentValueExtended or financialNetPresentValue to calculate NPV. Simply include these functions in the SELECT statement with appropriate parameters to perform financial calculations.