Capital allocation functions
Decide whether capital earns its keep.
Syntax
Write the function's name and its arguments. Rates are fractions, so 8 percent is 0.08.
WACC(equity, debt, cost_of_equity, cost_of_debt, tax_rate)
CAPM(risk_free_rate, beta, market_return)
COST_OF_DEBT(interest_rate, tax_rate)
NOPAT(ebit, tax_rate)
ROIC(nopat, invested_capital)
ECONOMIC_PROFIT(roic, wacc, invested_capital)
EVA(nopat, wacc, capital_invested)
SHARPE_RATIO(portfolio_return, risk_free_rate, std_dev)
INVESTED_CAPITAL(inventory, net_book_value, prepaid, working_capital)
VALUE_AT_RISK(
portfolio_value,
mean_return,
std_dev,
confidence,
time_horizon
)Parameters and arguments
Arguments are written in brackets, separated by commas. An argument in square brackets is optional.
WACC
Required: Yesequity
Required: Yesdebt
Required: Yescost_of_equity
Required: Yescost_of_debt
Required: Yestax_rateCAPM
Required: Yesrisk_free_rate
Required: Yesbeta
Required: Yesmarket_returnCOST_OF_DEBT
Required: Yesinterest_rate
Required: Yestax_rateNOPAT
Required: Yesebit
Required: Yestax_rateROIC
Required: Yesnopat
Required: Yesinvested_capitalECONOMIC_PROFIT
Required: Yesroic
Required: Yeswacc
Required: Yesinvested_capitalEVA
Required: Yesnopat
Required: Yeswacc
Required: Yescapital_investedSHARPE_RATIO
Required: Yesportfolio_return
Required: Yesrisk_free_rate
Required: Yesstd_devINVESTED_CAPITAL
Required: Yesinventory
Required: Yesnet_book_value
Required: Yesprepaid
Required: Yesworking_capitalVALUE_AT_RISK
Required: Yesportfolio_value
Required: Yesmean_return
Required: Yesstd_dev
Required: Yesconfidence
Required: Yestime_horizon
Examples
A business funded by 600 of equity and 400 of debt: the cost of equity from the market, the cost of debt after tax and the blended cost.
Return type and behaviour
Each function returns one value. The table shows its type, what it does and one way to write it; the examples use the functions in realistic statements.
| Function | Returns | Behaviour | Form |
|---|---|---|---|
WACC | decimal | The weighted average cost of capital | WACC(600, 400, 0.1, 0.05, 0.3) |
CAPM | decimal | The expected return on the asset | CAPM(0.03, 1.2, 0.08) |
COST_OF_DEBT | decimal | The cost of debt after tax | COST_OF_DEBT(0.06, 0.3) |
NOPAT | decimal | Operating profit after tax | NOPAT(100, 0.3) |
ROIC | decimal | The return on invested capital | ROIC(100, 1000) |
ECONOMIC_PROFIT | decimal | The profit above the cost of capital | ECONOMIC_PROFIT(0.12, 0.08, 1000) |
EVA | decimal | Economic value added: operating profit less the charge for capital | EVA(100, 0.08, 1000) |
SHARPE_RATIO | decimal | The return above the risk free rate for each unit of risk | SHARPE_RATIO(0.1, 0.03, 0.15) |
INVESTED_CAPITAL | decimal | The capital tied up in the business: the four amounts added | INVESTED_CAPITAL(500000, 700000, 50000, 200000) |
VALUE_AT_RISK | decimal | The value at risk: a negative amount, the loss that is not exceeded at the confidence | VALUE_AT_RISK(1000000, 0.001, 0.02, 0.95, 10) |
Errors and exceptions
| Error | What happened | How to recover |
|---|---|---|
HTQL-5001 | The function was given the wrong number of arguments. The message names the function and the counts | Give it the arguments listed under Parameters |
HTQL-1004 Unsupported function | The name is not a function this engine runs | Check the name and its spelling against this entry |
HTQL-5004 Not enough params | An argument is missing. The message lists the names the function expects | Give every argument it lists |
HTQL-5005 | An argument is not allowed, such as a standard deviation of 0 or capital of 0, or a finance function's result passed in | Pass a positive number that you typed in |
Limitations
WACCtakes the value of equity and of debt as amounts, and the rates as fractions.- The functions take values you supply. They do not read your records.
- A capital amount, the total capital of
WACCor the standard deviation ofSHARPE_RATIOmust be positive, or the function answersHTQL-5005(for example "Invested capital must be positive"). - Coming: a finance function's result cannot be an argument of another finance function:
WACC(600, 400, CAPM(0.03, 1.2, 0.08), 0.05, 0.3)andROIC(NOPAT(150, 0.3), 1000)answer[HTQL-5005] Invalid params for FinanceFunctions: Expected number, got Func(Finance(…)). Type the value in, as the examples do; the result can be compared inIF,MULTIPLYandDIVIDE.
Permissions and security
These functions read nothing from your tables and write nothing.
When a function is applied to a column or a variable, the statement that reads the data needs read access, as its own entry says.
Best practices
- Compare ROIC with WACC: value is created when it is higher.
- Use the same tax rate throughout a calculation.