Example 1-7: Net Cash Flow in a Simplified Production Sharing Contract

Anthony Jimenez
16 August 2021


Pandas Dataframe Computations for Cash Flow Analysis

Import necessary libraries
Define input streams (from text)
Main function for computing net cash flow (NCF)
Main function for generating the output summary tables
Net Cash Flow Table (NCF)
Cost Recovery Table
Production Sharing Contract (PSC) Income Tax Table

Visualizing the Outputted Cash Flow Tables

Net Cash Flow Visuals

Utilizing the Plotly plotting library, we can create interactive plots. However, plotly works best with data in long-form, not wide-form (as is a typical cash flow table.

Thus, we should first reformat our data to long-form by using the Pandas function pd.melt().

Basic line plot illustrating how Net Cash Flow (NCF) is computed

The basic equation for NCF in this case is:

$NCF = NOI - Investment$

Because no additional investments are made after the first year, we see that NOI equals NCF for years 2-8.