Special PHDwin Functions (Cash Formulas)

<< Click to Display Table of Contents >>

Navigation:  Editing Case Data > Fiscal Models > Cash Formulas >

Special PHDwin Functions (Cash Formulas)

Navigation: Editing Case Data > Fiscal Models > Cash Formulas >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

Show/Hide Hidden Text

When writing cash formulas, users can grab certain elements and attach one or more 'modifiers' or 'parameters' to them in order to generate the values needed. For example, to grab the depreciation for income tax purposes it might look like: GetDepr(“Income Tax”, “All”, Tan, Monthly)

This section lists the special PHDwin functions and formulas. Use these in combination with the standard functions and tokens and modifiers in order to write cash formula models.

Basic syntax for cash formula functions

All functions will require the function name followed by a set of parameters entered in parenthesis (), like this:

Function(Parameters)

Most functions require that all of the parameters listed are included in the parenthesis in order for the function to work. Parameters that are optional are noted.

hmtoggle_plus1 AddBalPool

Purpose

Adds a specified amount to a balance pool on a specified date, returns the amount added.

Syntax

AddBalPool(pool ID, amount, date)

Parameters

pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. It is possible to create a static variable and give it that unique number and just reference the static variable name.

amount - the amount that should be added to the pool

date - optional input - the date that the amount is added to the pool. If date is omitted, the amount is added in the current period.

Examples

AddBalPool(CostRecoveryPool, GetInv(“All”, Total, Grs, Monthly))

hmtoggle_plus1 Compare

Purpose

Compares a text input field in PHDwin to see if it is a certain value. Use this function to compare what the current qualifier is. If it is a match, it will return a 1 for true, it returns a zero for false.

Syntax

Compare(text field, "text string")

Parameters

text field - the text input field in PHDwin that you'd like to compare it to. This could be something like Reserve Class, Reservoir, Country, etc.

text string - the string of text that must match the 'text field' to be considered a match. Must be in double quotes(" ").

 

Examples

Compare(Country, "United States")

Compare(OwnQual, "Government")

hmtoggle_plus1 DeductBalPool

Purpose

Deducts a specified amount from a balance pool in the current period and returns the amount deducted. You cannot deduct a value greater than the pool balance.

Syntax

DeductBalPool(pool ID, amount)

Parameters

pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. It is possible to create a static variable and give it that unique number and just reference the static variable name.

amount - the amount that should be deducted from the pool

hmtoggle_plus1 EnergyFactor

Purpose

Returns the energy factor for the specified product.

Syntax

EnergyFactor(Product[ID])

Parameters

Product - specify the name of the product to use, followed by the modifier [ID] - see examples

 

Examples

EnergyFactor(Gas[ID])

hmtoggle_plus1 GetBalPool

Purpose

Gets the current balance of the pool.

Syntax

GetBalPool(pool ID)

Parameters

pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. Users can also create a static variable and give it that unique number and just reference the static variable name.

Examples

GetBalPool(CostRecovery)

hmtoggle_plus1 GetDepr

Purpose

Gathers the depreciated values of investments for the chosen purpose. Depreciation categories for each purpose are set up in the database settings.

Syntax

GetDepr("depr purpose", "inv category", tangibility, interest, timing, scope)

Parameters

depr purpose - the depreciation purpose that you'd like to gather depreciation values for. There is no “All” purpose; each purpose must be specifically entered. Must be in double quotes (“).

inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes(").

tangibility - choose from:

otan - tangible amount

ointan - intangible amount

ototal - combined tangible and intangible

interest - choose from:

ogrs - the gross, 8/8ths value of the investment, as entered

oWI - the working interest value of the investment, regardless of custom interest

oNet - the net value of the investment

timing - choose from:

oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat.

oCum - the cumulative value up until the current date.

oECLRem - the remaining value from the current date until the economic limit.

oMonthly - the value for the current month.

oPrior - the value from the prior month.  

oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year.

oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat.

oStartToECL - the value from the case start date to the economic limit.

oTechEUR - the value from the case start date up until the technical EUR.

oTechRem - the remaining value from the current date until the technical EUR.

scope - optional input - you can enter "child" to gather investments from child cases

 

Examples

GetDepr(“Income Tax”, “Completion”, Total, Net, Monthly)

hmtoggle_plus1 GetExpensed

Purpose

Gathers the expensed values of investments for the chosen purpose. Depreciation categories(or which investments should be expensed) for each purpose are set up in the database settings.

Syntax

GetExpensed("depr purpose", "inv category", tangibility, interest, timing, scope)

Parameters

depr purpose - the depreciation purpose that you'd like to gather depreciation values for. There is no “All” purpose; each purpose must be specifically entered. Must be in double quotes (“).

inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes(").

tangibility - choose from:

otan - tangible amount

ointan - intangible amount

ototal - combined tangible and intangible

interest - choose from:

ogrs - the gross, 8/8ths value of the investment, as entered

oWI - the working interest value of the investment, regardless of custom interest

oNet - the net value of the investment

timing - choose from:

oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat.

oCum - the cumulative value up until the current date.

oECLRem - the remaining value from the current date until the economic limit.

oMonthly - the value for the current month.

oPrior - the value from the prior month.  

oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year.

oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat.

oStartToECL - the value from the case start date to the economic limit.

oTechEUR - the value from the case start date up until the technical EUR.

oTechRem - the remaining value from the current date until the technical EUR.

scope - optional input - you can enter "child" to gather investments from child cases

 

Examples

GetExpensed(“Cost Recovery”, “All”, Intan, WI, Annual)

GetExpensed(“Income Tax”, “Abandonment”, Intan, Grs, Annual, Child)

hmtoggle_plus1 GetInv

Purpose

Gathers investment values.

Syntax

GetInv("inv category", tangibility, interest, timing, scope)

Parameters

inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes(").

tangibility - choose from:

otan - tangible amount

ointan - intangible amount

ototal - combined tangible and intangible

interest - choose from:

ogrs - the gross, 8/8ths value of the investment, as entered

oWI - the working interest value of the investment, regardless of custom interest

oNet - the net value of the investment

timing - choose from:

oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat.

oCum - the cumulative value up until the current date.

oECLRem - the remaining value from the current date until the economic limit.

oMonthly - the value for the current month.

oPrior - the value from the prior month.  

oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year.

oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat.

oStartToECL - the value from the case start date to the economic limit.

oTechEUR - the value from the case start date up until the technical EUR.

oTechRem - the remaining value from the current date until the technical EUR.

scope - optional input - you can enter "child" to gather investments from child cases

 

Examples

GetInv(“Completion”, Total, Net, Monthly)

GetInv(“All”, Tan, WI, Annual)

GetInv(“Abandonment”, Intan, Grs, Annual, Child)

hmtoggle_plus1 MajSeg*

Purpose

Returns the start date of the the specified segment.

Syntax

MajSeg(Segment number)

Parameters

Segment number -The number for the segment whose start date is desired.

Examples

MajSeg(1)

If(CurrentDate>MajSeg(1), oneResult, anotherResult)

 

*MinSeg() is an alternate function that retrieves information based on the minor phase.

hmtoggle_plus1 OilEqVol

Purpose

Returns the oil equivalent volume(in BOE) for the product volume that you enter. It will always be a monthly value.

Syntax

OilEqVol(Product Name[ID], product volume)

Parameters

product Name [ID] - specifies the conversion rate to use. Should be the product name with an ID modifier. See examples.

product volume - specifies what volume to convert to BOE.

 

Examples

OilEqVol(Gas[ID], Gas[Monthly, Grs])

OilEqVol(NGL[ID], NGL[Annual])

hmtoggle_plus1 SlidingScaleFactor

Purpose

You can create a set of thresholds and return factors(values) as a sliding scale. This function will return the appropriate factor based on where the input value falls in the sliding scale.

Syntax

SlidingScaleFactor(sliding scale name, input value)  

Parameters

sliding scale name - the name of the sliding scale that you created

input value - the input value that you'd like to test to see where it falls in the sliding scale

 

Examples

SlidingScaleFactor(RfactorScale, Rfactor)

hmtoggle_plus1 SlidingScaleValue

After creating a set of inputs and return values with a 'SlidingScaleName', this function will find the appropriate return value(sliding scale factor) based on the 'InputValue' specified here. It will then multiply the sliding scale factor by the 'Value' to get the SlidingScaleValue.

Purpose

You can create a set of inputs and return factors(values) as a sliding scale. The function will take the input value, see where it falls in the sliding scale, and multiply the return factor by the input value.

Syntax

SlidingScaleValue(sliding scale name, input value)

Parameters

sliding scale name - the name of the sliding scale that you created

input value - the input value that you'd like to test to see where it falls in the sliding scale

 

Examples

SlidingScaleValue(RfactorScale, Rfactor)

hmtoggle_plus1 TrancheFactor

Purpose

You can create a set of thresholds and return factors(values) as a tranche. This function will return the appropriate weighted tranche factor based on where the input value falls in the tranche.

Syntax

TrancheFactor(tranche name, input value)  

Parameters

tranche name - the name of the tranche that you created

input value - the input value that you'd like to test to see where it falls in the tranche

 

Examples

TrancheFactor(RoyaltyRateScale, DailyOilRate)

hmtoggle_plus1 TrancheValue

Purpose

You can create a set of inputs and return factors(values) as a tranche. The function will take the input value, see where it falls in the tranche, find the weighted tranche factor, and multiply it by the input value.

Syntax

TrancheValue(tranche name, input value)

Parameters

tranche name - the name of the tranche that you created

input value - the input value that you'd like to test to see where it falls in the tranche

 

Examples

TrancheValue(RoyaltyRateScale, DailyOilRate)

hmtoggle_plus1 Functions that require no parameters

You also have access to the following functions which do not require any parameters or modifiers after them. You might use them in combination with the standard functions.

For example:

If(Country = United States, 1, 0)    - or  -

If(CurrentDate>FirstProduction, oneResult, anotherResult)

 

Function

Description of what is returned

CaseMult

The case multiplier that is entered on the Eco Options form.

CaseStart

The case start date that is entered on the Eco Options form.

Country

The country specified on the General Info form.

County

The county specified on the General Info form.

CurrentDate

The current economic month. Will always be the first day of the month.

CurrentMonth

The current economic month. Will return 1 for January, 2 for February, etc.

CurrentYear

The current economic  year. Will return a 4 digit year.

DaysInMonth

The actual number of days in the month, accounting for leap years.

DaysInYear

The actual number of days in the year, accounting for leap years.

ECL

Returns the economic limit of the case and is typically used in conditional statements such as If(CurrentDate<ECL, Gas*0.25, 0).

FirstMonthOfYear

The first economic month of the fiscal year.

LastMonthOfYear

The last economic month of the fiscal year. Might be different for the year with the economic limit.

MonthFrac

The number of economic days divided by the total number of days in the month. It will always be a 1 except for the month of the economic limit.

Field

The field specified on the general info form.

FirstProduction

The date of first production whether it is historical or projected.

LseNRI

The Lease NRI specified on the ownership form.

MajorPhase

The major phase specified for the case.

NPInt

The net profits interest specified on the ownership form.

Reservoir

The reservoir specified on the general info form.

RevInt

The revenue interest specified on the ownership form.

StartHist

The start of historical production on the monthly history form.

State

The state specified on the general info form.

WorkInt

The working interest specified on the ownership form.

 

Related topics:

Cash Formulas

Standard Functions

Other cash formula tokens/functions

Static Variables