Provides specialized function for computing the Irregular Internal Rate of Return (XIRR).
financial
extension already enabled, so there’s no need to run create extension
.
transactions
Tablepg_financial
:
xirr(amount, transaction_date)
computes the internal rate of return for cash flows occurring at irregular intervals.
Negative amounts typically represent investments, while positive amounts represent returns.pg_financial
extension in PostgreSQL provides essential financial calculation capabilities, particularly for evaluating investment returns with irregular cash flows. It is useful for financial modeling and investment analytics.
For more details, refer to the pg_financial
GitHub repository.