Skip to content

Modern Finance ProfitabilityIndex

Paul Squires edited this page Oct 19, 2026 · 4 revisions

Home › Finance › Finance › ProfitabilityIndex

ProfitabilityIndex

Returns the present value of the later flows divided by the initial outlay.

Syntax

ProfitabilityIndex( flows( ), ratePerPeriod )

Examples

#import "std/money"
using money

'' The present value of everything after t = 0, over the initial outlay.
'' Above one exactly when the NPV is positive.
dim as Decimal f( 0 to 4 ) = { DecimalParse( "-1000" ).Value( ), _
                               DecimalParse( "300" ).Value( ), _
                               DecimalParse( "400" ).Value( ), _
                               DecimalParse( "500" ).Value( ), _
                               DecimalParse( "200" ).Value( ) }

print ProfitabilityIndex( f( ), DecimalParse( "0.10" ).Value( ) ).Value( ).ToStringFixed( 8 )   '' 1.11556588

'' The two measures agree by construction, and still do at a discount
'' rate above the internal rate of return.
dim as Decimal high = DecimalParse( "0.30" ).Value( )
print ( ProfitabilityIndex( f( ), high ).Value( ) < DecimalOne( ) )     '' true
print ( NetPresentValue( f( ), high ).Value( ) < DecimalZero( ) )       '' true

'' A zero initial outlay is a named refusal, not an infinity.
dim as Decimal z( 0 to 2 ) = { DecimalZero( ), DecimalFromInt( 100 ), _
                               DecimalParse( "-50" ).Value( ) }
print ProfitabilityIndex( z( ), DecimalParse( "0.10" ).Value( ) ).Failure( ).Message( )

Library: Finance
Category: Finance
Documented under: Nothing Becomes A Keyword
Source: pkg/std/money/fincash.tiko in the tiko repository.

Clone this wiki locally