Omniscope Custom Blocks › Analytics/Investment-Appraisal

Investment Appraisal

NPV, IRR / XIRR, MIRR, payback, discounted payback and profitability index per project from cash flows, with NPV profiles and multiple-IRR warnings.

Analytics › Finance Python visokio-agents

Open the demo in Omniscope Download demo.ioz Sample data: capital-requests.csv Source on GitHub

Items tagged visokio-agents are community examples built by Visokio's agents, to extend Omniscope's core blocks and views with popular, specialist and more unusual use cases, and to show what anyone, people or agents, can build on Omniscope. They are tested by automated tests and were run on a real Omniscope server. They were not reviewed by Omniscope's core team, so they are not on a par with the core blocks and views, which have years of manual, functional and unit tests behind them. About

Omniscope custom block · Analytics

NPV, IRR, MIRR, payback and profitability index for every project from its cash flows, with NPV profiles and a warning when IRR cannot be trusted.

Python · pandas, numpy · nothing extra to install

The problem it solves

Capital requests and business cases arrive as cash-flow tables, and are compared on a mix of NPV, IRR and payback worked out in spreadsheets, each slightly differently. IRR in particular misleads when cash flows change sign more than once, and ranks projects of different sizes in the wrong order.

This block calculates the standard measures consistently for every project, by period or on actual dates, ranks by NPV, and flags projects with more than one IRR.

How it works

What goes in

Capital requests

Five invented projects, cash flows in £ thousands.

Project Year Cash Flow (GBP k)
Warehouse automation 0 -2400
Warehouse automation 1 380
Warehouse automation 2 620
Warehouse automation 3 700
Warehouse automation 4 720
Warehouse automation 5 720
Warehouse automation 6 700
Warehouse automation 7 650

35 rows in the sample file.

The options

Option Demo setting What it does
Project field Project Names the project each cash flow belongs to.
Period or date field Year Period number (0 = today) or the date of each cash flow, to match Timing.
Cash flow field Cash Flow (GBP k) Outflows negative, inflows positive.
Discount rate 0.08 Per period, or annual for dates. For example 0.08.
Timing Period numbers (0, 1, 2...) Period numbers for NPV and IRR; dates for XNPV and XIRR on actual days.

What comes out

Projects

Project NPV IRR MIRR Profitability Index Payback Discounted Payback Sign Changes IRR Note Decision Rank By NPV
Warehouse automation 879 0.172 0.129 1.37 3.97 4.88 1 Accept 1
New CRM system 379 0.212 0.164 1.46 3.33 3.78 1 Accept 2
Fleet replacement 163 0.128 0.102 1.11 2.88 3.73 1 Accept 3
Store refit with closure costs 30 0.044 0.085 1.01 0.56 0.6 2 2 IRRs found (4.4%, 61.6%); use NPV Accept 4
Solar panels on depots -77 0.06 0.07 0.91 7.48 1 Reject 5

Warehouse automation cash flows

Project Period Cash Flow Discount Factor Present Value Cumulative Cash Flow Cumulative Present Value
Warehouse automation 0 -2,400 1 -2,400 -2,400 -2,400
Warehouse automation 1 380 0.93 351.85 -2,020 -2,048.15
Warehouse automation 2 620 0.86 531.55 -1,400 -1,516.60
Warehouse automation 3 700 0.79 555.68 -700 -960.92
Warehouse automation 4 720 0.74 529.22 20 -431.69
Warehouse automation 5 720 0.68 490.02 740 58.33
Warehouse automation 6 700 0.63 441.12 1,440 499.44
Warehouse automation 7 650 0.58 379.27 2,090 878.71
Ranked by NPV, the measure that adds up across projects (illustrative figures).
Ranked by NPV, the measure that adds up across projects (illustrative figures).

Ranked by NPV, the measure that adds up across projects (illustrative figures).

The store refit's line crosses zero twice: two IRRs, so only its NPV is meaningful.
The store refit's line crosses zero twice: two IRRs, so only its NPV is meaningful.

The store refit's line crosses zero twice: two IRRs, so only its NPV is meaningful.

Where it pays off

Finance: Capital allocation

Rank capital requests consistently at the company's hurdle rate, with payback for the cash-constrained.

Energy and property: Long-lived investments

Solar, refits and leases with irregular dated cash flows (XNPV / XIRR).

IT and change: Business cases

Compare programme options on NPV and discounted payback with a rate per risk class.

Private equity and lending: Deal returns

XIRR on dated drawdowns and distributions per fund or loan.

Use cases describe typical scenarios and are illustrative.

Why do this in Omniscope

How it fits into an Omniscope workflow

Business cases (spreadsheet or database), with cost ranges from Monte Carlo Cost Risk if needed → Investment Appraisal → Report (ranking, NPV profile)

Collect cash flows per project in one table; Monte Carlo Cost Risk can give the range of the costs that feed it.

Show the ranked projects and the NPV profile chart to the investment committee.

In one step

All the standard measures, dated or by period, with a check for multiple IRRs.

Try it

  1. Open the demo project (demo.iox on the demo server, or import demo.ioz from this folder): five invented capital requests.
  2. The question: which should we fund at our 8% hurdle rate?
  3. Run the block: NPV, IRR, MIRR, payback and a decision per project.
  4. Look at the ranking: warehouse automation adds most value (£879k NPV) although the CRM has the higher IRR.
  5. Look at the NPV profile: the store refit crosses zero twice, so its IRR is not a reliable guide.

Running in Omniscope

Omniscope workflow
Omniscope workflow

The demo project's workflow: the sample data, the block, and a Validate data check on its output.

Language and libraries

Python. It uses pandas and numpy.

pandas and numpy are part of Omniscope's Docker Python image, and the block was run in both host mode and Docker mode on an Omniscope server, with the same results. It needs nothing else installed.

Tested

Run on an Omniscope server, the demo workflow finished without errors (5 records in Projects, 35 in Cash flows and 155 in NPV profile). Automated tests also cover normal data, empty input, wrong types and large input.

Reference

Fields it reads

NameTypeWhat it does
Project fieldFieldNames the project each cash flow belongs to.
Period or date fieldFieldPeriod number (0 = today) or the date of each cash flow, to match Timing.
Cash flow fieldFieldOutflows negative, inflows positive.
Rate per project (optional)Field

Options

NameTypeWhat it does
TimingChoicePeriod numbers for NPV and IRR; dates for XNPV and XIRR on actual days.
Discount rateNumberPer period, or annual for dates. For example 0.08.
NPV profile up to rateNumber

Outputs

OutputWhat it holds
ProjectsPer project: rate, flows, NPV, IRR, MIRR, profitability index, payback, discounted payback, notes, decision, rank.
Cash flowsPer project and time: cash flow, discount factor, present value, cumulative cash flow and present value.
NPV profilePer project: NPV at rates from 0% to the maximum in 1% steps.