You are on page 1of 81

Credit Analysis Model & Public Functions in VBA®

Outline Credit Analysis Model & Public Functions in VBA®

During this presentation you will learn the following :

• Fundamentals of Credit Analysis


 Credit-Related Risks
 Credit Ratings
 Risks of Relying on Credit Ratings
 4 C’s in Credit Analysis
 Financial Ratios used in Credit Analysis
• Modeling a Real-Life Revolving Credit Analysis Model
• Creating Public Functions in VBA
• Calling Public Functions from VBA to Excel
 Public Functions-DDM: Multi-Stage Model
 Eliminating the Weakness of the LookUp Functions
 Modeling Efficient frontiers using VBA
 Creating Public Functions that can Assess Assets Efficiency
Credit Analysis Model

Credit-Related Risks
Credit risk: Risk of losses if borrower fails to pay interest or principal

Default risk: Probability of default

Loss severity: Amount or percentage of principal and interest lost if


borrower defaults

Expected loss = default risk × loss severity

Recovery rate = 1 – loss severity in %


Credit Analysis Model

Credit-Related Risks
Spread risk: Risk of spread widening, primarily from

 Credit migration (downgrade) risk: Issuer becomes less


creditworthy, ratings downgrade

 Market liquidity risk: Receive less than market value when selling
bond, increases required yield spread
Credit Analysis Model

Credit Ratings
Rating agencies: Moody’s, S&P, Fitch

Corporate family rating (CFR): Issuer credit rating, applies to senior


unsecured debt

Corporate credit rating (CCR): Applies to specific debt issue; may be


notched up or down from CFR
Credit Analysis Model

Credit Ratings
Investment Grade Non-Investment Grade
Moody’s S&P, Fitch Moody’s S&P, Fitch Moody’s S&P, Fitch
Aaa AAA Ba1 BB+ Caa1 CCC+
Aa1 AA+ Ba2 BB Caa2 CCC
Aa2 AA Ba3 BB– Caa3 CCC–
Aa3 AA– B1 B+ Ca CC
A1 A+ B2 B C C
A2 A B3 B– C D
A3 A–
Baa1 BBB+
Baa2 BBB In default

Baa3 BBB–
Credit Analysis Model

Risks in Relying on Credit Ratings


 Credit rating may change: Downgrade, upgrade
 Rating agencies make mistakes (subprime mortgages)
 Issuer-specific risks may be unpredictable (litigation, natural disasters,
leveraged buyouts)
 Prices/spreads adjust faster than credit ratings

Ratings assess default risk, spreads reflect expected loss


Credit Analysis Model

Four Cs of Credit Analysis


Capacity: Ability to pay on time and in full, industry
structure/competition, industry and company fundamentals

Collateral: Value of assets, depreciation/book value, intangible assets


that can be sold

Covenants: Legal stipulations of bond issue

Character: Management integrity, history, accounting, treatment of


debtholders vs. equity
Credit Analysis Model

Financial Ratios in Credit Analysis


Credit analysts focus on leverage ratios and coverage ratios

Profit and cash flow metrics:


 EBITDA, EBIT
 Funds from operations (FFO)
 Free cash flow before/after dividends
Credit Analysis Model

Leverage Ratios
 Leverage. Coverage ratios of operating earnings, EBITDA, or some
measure of free cash flow to interest expense or total debt make up
the most important part of the credit rating formula

 Higher leverage → higher credit risk


 Adjust debt to include all obligations (underfunded pensions, off-
balance-sheet liabilities, DTLs expected to reverse)
Debt-to-capital, debt-to-EBITDA:
 Higher ratio → higher leverage
 May adjust capital for writedown of goodwill

FFO-to-debt: Higher ratio → lower leverage


Credit Analysis Model

Leverage Ratios
Off-balance-sheet finance

•Finance leases vs. operating leases


•Equity accounted SPEs vs. non-qualifying SPEs
•Sale of accounts receivable

More Information on SPE’s –Qualifying vs. Non-Qualifying


(See Next Slide)
Credit Analysis Model

Leverage Ratios

Qualifying SPE (OSPE)—A Special Purpose Entity that is very limited in its activities
and in the types of assets it can hold. It is a passive entity and may not engage in
active decision making. QSPE status allows the seller to remove assets transferred to
the QSPE from its books, achieving sale accounting. QSPEs are not consolidated by
the seller or the investors in the QSPE.

Usually QSPEs primarily hold residential mortgage loans and they are Limited
Liability Companies.

SPEs are typically used by companies to isolate the firm from financial risk.

They are also commonly used to hide debt (inflating profits), hide ownership,
and obscure relationships between different entities which are in fact related to
each other.
Credit Analysis Model

Coverage Ratios
Measure earnings relative to interest obligations

Higher coverage → lower credit risk

EBITDA-to-interest expense

EBIT-to-interest expense: More conservative


Credit Analysis Model

Yield Spreads: Level and Volatility


Yield spread = credit spread + liquidity premium
Spreads seem to be more volatile for lower-quality bonds than for higher-
quality bonds

Factors affecting yield spreads:


 Credit cycle
 Economic conditions
 Market performance, including equities
 Broker/dealer capital
 Supply of new issues
Credit Analysis Model

A Real Life Credit Analysis Model


1. Input the Financial Statements (example ;Balance sheet 2013-2014, Income statement 2014)
2. Input the Ratios (Liquidity, activity, Debt Management …) and link each ratio with its correspondents
in the Financial Statements.
3. Create the Cash flow statement using the indirect method and then test it (change any value in the
Balance sheet or Income statement and check for the balance in the accounting equation:
Total Assets = Total Liabilities + Total Shareholders Equity)
Equity
1. Create a new sheet named " Model " in which different scenarios will be tested
2. In the Model sheet, assign a cell for the loan Amount, a cell for the % in Current Portion of long term
debt, and a dropdown box for the scenarios (name this cell "Model").
3. Assign initial amount (in separated cells) for every Balance sheet item related/affected by the
Scenarios discussed in the Model.
4. Create (in the item's cell) an " IF " function that is to be executed once the Model Cell is changed.
[Ex: IF(Model="Finance a Sale",Initial A/R + (LoanAmount/COGS Margin), Initial A/R) ]
8. Test the Model
Credit Analysis Model

Apply your Credit Analysis Concepts in a Fully Revolving Model

Assume yourself a credit officer at a reputable bank. An investor who owns


large company, approached your bank to get a loan. One of the major
questions that arise for the credit officer is: “What is the purpose for getting this
Loan?”. The main purposes are the following:

1- Financing a Probable Sale on Credit


2- Purchase of Inventory
3- Purchase of PPE
4- Financing Accounts Payables
5- Disclosing that the loan is to be used for petty cash purposes

Now what does the banker think if the investor required the loan for any of
these purposes?
Credit Analysis Model

If the investor required the loan to:

Financing a Sale  Bank provides commercial bills


service to corporate enterprises or other
economic institutions, whose registrations have
been approved by relevant industrial and
commercial management authorities.
The client can fund a sale on credit if the firm wasn’t able to replace the sold asset using their own
internal financing.

Purchase of Inventory  Overdraft or Direct Discount Bills


The suppliers will be paid by the Bank as per the investors instructions

Purchase of PPE  The investor should get a Long-term loan

Financing Accounts Payables  Direct Discount Bills


The suppliers will be paid by the Bank as per the investors instructions

All for Cash Purposes  The investor should get a Revolving Loan
An overdraft is a type of a revolving loan
Credit Analysis Model
Apply your Credit Analysis Concepts in a Fully Revolving Model

Actually when an investor requires a loan to finance a sale, purchase Inventory,


or finance A/P  Usually the current portion of long term debt will increase by
at least 80% except for financing a sale the current portion of long term debt
might be 100%.

However, when an investor requires a loan to purchase a property, plant, or


equipment Usually the current portion of long term debt will increase by 20%
or less.
Credit Analysis Model
Here how it Goes!

As a banker, you order audited financial statements from your client (the one
asking for a loan). The financial statements should be of the past two years
(Most recent year, and the year before) i.e., if you are in the beginning of year
2016, you will require the financial statements of December 2015 and
December 2014.

Ask yourself now, what is the purpose of the whole analysis?

The answer should be, “Assessing if your client will be able to pay his/her loan
including its incurred interest”.

So, how can we answer this question now?


Credit Analysis Model

Actually, you will forecast for your client a new Balance Sheet updated for the
loan.

The balance sheet should be extremely dynamic (in a way if the investor would
like to take a loan to Finance a Sale and then he changes his/her mind and
would like to purchase PPE with this loan It should automatically balance
the accounting equation, update the financial ratios, and calculate the new
cash conversion cycle for the company)

The fully revolving model will dynamically be able to test the impact of this
“Loan” on the financials of the client’s company (i.e., Leverage ratios,
Profitability, Liquidity, Cash Conversion Cycle, Coverage ratios…etc)

Finally, the model should automatically write a brief report to be read by the
management . This report should be dynamically generated and linked to the
inputs of the investor (i.e., Loan amount, Company’s previous Net
Income…etc) in which the management will analyze to decide upon granting
the loan to the investor!
Credit Analysis Model

Balance Sheet
Balance Sheet of Year 0 (Provided by your Client)
in 000's of $
2013/12/31
ASSETS
Cash and equivalents $34.60
Accounts Receivable $74.80
Inventories $132.60
Total Current Assets $242.00 All figures in this balance sheet are given. What
PP&E $212.70 you should do is to link the cells with each other
Intangibles
Deferred Taxes
$34.20
$12.60
(i.e., the “Total Assets” = Sum (Cash, A/R, Inv,
Other Long Term Assets $123.90 PPE, Intangibles, DT, OLTA)
Total Assets $625.40

LIABILITIES
Accounts payable $120.50 The same applies for Total Current Assets,
Notes payable
Current portion of LTD
$23.50
$49.60
Current Liabilities, Total Liabilities, and Total
Current Liabilities $193.60 Liabilities & Stockholders Equity
Long-term debt $214.00
Deferred taxes $43.50
Total Liabilities $451.10 Retained Earnings =TA-TL-PS-CS-APIC- (-TS)
Shareholder's equity
Preferred Stock $12.40
Common Stock par value $5.60
Additional paid-in-capital $146.40
Treasury Stock -$112.30
Retained Earnings $122.20
Total liabilities and SE $625.40
Credit Analysis Model

Balance Sheet of Year 1 (Provided by your Client)


Balance Sheet in 000's of $
2014/12/31
ASSETS
Cash and equivalents $52.10 This sheet is the current balance
Accounts Receivable $82.40
Inventories $145.70 sheet of the client WITHOUT the
Total Current Assets $280.20
impact of the new Loan required by
PP&E $259.30 your bank.
Goodwill & Intangibles $42.50
Deferred Taxes $34.60
Other Long Term Assets $145.30
Total Assets $761.90 What concerns you the most in this
LIABILITIES
balance sheet is the amount
Accounts payable $130.50 available in each of the following
Notes payable $34.20
Current portion of LTD $68.40 (Assume now the client approached your
Current Liabilities $233.10 bank at the beginning of year 2015):
Long-term debt $214.00
Deferred taxes
Total Liabilities
$52.30
$499.40
•A/R amount in 2014
•Inventory amount in 2014
Shareholder's equity
Preferred Stock $13.50 •A/P amount 2014
Common Stock par value $7.40
Additional paid-in-capital $163.50 •Current Portion of LTD 2014
Treasury Stock
Retained Earnings
-$123.20
$201.30
•PPE 2014
Total liabilities and SE $761.90 •LTD 2014
Credit Analysis Model

Income Statement of Year 1 (Provided by your Client)

Income Statement in 000's of $


2014/12/31
Net Revenues $860.00
Cost of Goods Sold (COGS) $432.40
Selling, general, &
Administrative $123.40 As a banker, you can calculate from
Research and development $56.30
Depreciation & Amortization $20.00 this statement the historical
Other operating expenses $12.30 average interest rate charged, and
Net Interest expense $45.60
assess all profitability and coverage
Pretax income $170.00
Income tax expense (35%) $59.50 measures.
Net income $110.50
Dividends $31.40

Amortization expense $5.00


Depreciation Expense
$15.00
Tax rate 35%
Credit Analysis Model
What you will NOT be Provided With?
It’s a Cash Flow Statement!
Cash Flow Statement
2014/12/31
Net Income
Depreciation and amortization
$110.50
$20.00
We use the indirect method to
Changes in working capital report the cash flow statement.
Accounts Receivable -$7.60
Inventories -$13.10
Accounts payable $10.00
Deferred taxes -$13.20 The cash flow statement should
Cash from operations $106.60 be dynamically linked to the
Capital expenditures -$61.60 income statement balance
Increases in all other long-term assets -$34.70
Cash from investing -$96.30 sheet in all its accounts.
Increase in bank loan $10.70
Increase in long term debt $18.80 The Ending Cash Flow balance
Increase in preferred stock $1.10
Increase in common stock $1.80 should be the balance that is
Increase in APIC
Increase in Treasury stock
$17.10
-$10.90
showed on the balance sheet of
Dividends -$31.40 that year (i.e., Dec. 31, 2014)
Cash from financing $7.20

Beginning cash balance (12/2012) $34.60


Total change in cash $17.50
Ending cash balance (12/2013) $52.10
Credit Analysis Model
Some Computations you Should Know!

PP&E (Beginning Balance) Inventory (Beginning Balance)


Less: Depreciation Expense Less: COGS
Add: CapEx Add: Purchases

PP&E (Ending Balance) Inventory (Ending Balance)

Intangibles (Beg. Bal.)


Important:
Less: Amortization
Add: New Purchases
Goodwill is not amortized, it is
tested for impairment at least
Intangibles & GW (End. Bal.)
annually!
Credit Analysis Model

Now, remember what are the accounts that concern you the most?

They are:

•A/R amount in 2014


•Inventory amount in 2014
•A/P amount 2014
•Current Portion of LTD 2014
•PPE 2014
•LTD 2014
•Initial Total Equity 2014
•Initial Total Assets 2014
•Initial Debt (CPLTD + LTD) 2014
•Initial Sales
•Initial COGS

Only, for those accounts  take the number manually from the provided
balance sheet (Hard coding) and input them aside on your activated
spreadsheet (the one you are using for modeling the credit analysis model)
Credit Analysis Model

Manually inputted Initial balances of the concerned accounts


Credit Analysis Model

The assumptions of the credit analysis model are(Sheet named: “Assumptions”):

1- Company will continue to operate for the foreseeable future


(The going concern assumption)

2- All debt considered are from banks

3- Straight line method is used for Depreciation

4- Company's strategy is to pay dividends

5- Indirect method is used for presenting Cash flow statement


Credit Analysis Model

Here is our “Model” Sheet. The issue here is that the banker would like his model
to be user friendly with some easily created List Drop Down Boxes.

1. To create this List do the following: Go to cells “T6”, “T7”, “T8”, “T9”, & “T10” and write the following
respectively: “All Cash”, “Finance A/P”, “Purchase Inventory”, “Finance a Sale”, and “Purchase PPE”

2. Go to “Data Tab” , In
the “Data Tools”,
you will find “Data
Validation”.

3. Choose “List” and


mark in the source
cells
“=$T$6:$T$10”

Note:
Don’t forget before
pressing on “Data
Validation” to select
cell “C5”. This cell is
the cell where the
drop down box will
appear in.
Credit Analysis Model

Naming the Cells


Naming cells in Excel will ease the way for you as modeler to work between
spreadsheets and when you are creating formulas in the cells.

For example, cell “C6” is the cell that corresponds for the “Operating Debt Required”
or “Over Draft Required “ or the “Loan Amount”. In my credit analysis model, I will
frequently use this cell for my formulas. Instead of going to cell “C6” each time to
select it from the sheet named “Model”, I can easily call this cell after I NAME it
anywhere in the worksheets.
Now, Press “CTRL + F3”, you will be
directed to the “Name Manager”.

Or you can use the long way: Go to


“Formulas” Tab, under “Defined
Names”, click on “Name Manager”.
Credit Analysis Model

In the model given to you, you can see that the cells are already named as
“Model” for cell ($C$5), “Odreq” for cell “$C$6”, and “PerinCPLTD” for cell $C$7”.
Credit Analysis Model

Now Look How “Naming” Makes your Life Easier!

Remember, what is the purpose of this model?


It is to figure out if the client will not default on the banks over draft.

Then let’s see how it works!

1- Create the Indirect Cash Flow Statement. All cells should be linked to the
B/S and I/S It should not embed any manual input!

2- Start with the Balance Sheet.


Link the Cash account in the B/S to the “Ending Cash Balance” in the
Cash Flow Statement.
Now here we will start : (Please follow on the next slide)
New Balance of Account Receivables Credit Analysis Model

A/R in year 2014 is: =If the named cell “Model” stated or the banker selected
from the Drop Down List Box to “Finance a Sale”, then [A/R initial Amount in
2014 + Odreq/(COGS Margin)], or If model didn’t state to “Finance a Sale”,
then do nothing and just leave the A/R account as is (i.e., equals the “A/R
initial Amount in 2014”).

Of course you cannot write in Excel the above. However, the above is the
explanation of what we will mention now.

=IF(Model="Finance a Sale",$H$27+(ODreq/($H$37/$H$36)), $H$27)

Now do you realize why we wrote manually the initial amount of the important
accounts that concerns us.

$H$27  Initial Amount of A/R (The one we wrote mannually in previous slides)
Odreq is the Over Draft required that we named it before as cell ($C$6) in the
“Model” Sheet (Here it’s usually equal to the cost of inventory sold).
$H$37/$H$36  is the COGS/Sales (i.e., COGS Margin). It’s used to calculate sales
assuming that the overdraft is equal to the COGS.
New Balance of Account Receivables Credit Analysis Model

What happens to your income statement with a sale transaction?

Actually, your income statement should be adjusted to reflect an increase in


sale amount (typically equals the amount of the overdraft required plus the
firm’s actual gross profit on the sale).

COGS will be adjusted upwards by the overdraft assuming that COGS is


equal to Odreq (i.e., the overdraft).

Consequently, Net income will increase by the after-tax effect of the sale profit
[(i.e., Selling Price – Cost of the Good) x ( 1 – Marginal Tax Rate)]
New Balance of Account Receivables Credit Analysis Model

What happens to your balance sheet with a sale transaction?

At the Assets side:

Actually, your accounts receivable will increase by the sale amount (typically
the change in the sales account in the income statement).

Inventory will be adjusted downwards by the overdraft assuming that the


change in COGS is similar to the change in the inventory account.

At the Liabilities and Equity side:

Current portion of long term debt will increase by: perinCPLTD x Odreq
Long term portion will increase by: ( 1 – perinCPLTD) x Odreq
Retained Earnings will increase by the after-tax effect of the sale profit.

Now, the balance sheet is balanced!


New Balance of Account Receivables Credit Analysis Model

Consider this example by applying the following on your credit analysis model:

If “Finance a Sale” is equal to 100 and the perinCPLTD is 100%, then the effect
on the balance sheet is the following:

Assets: Liabilities:
•A/R will increase by $199 •CPLTD will increase by $100
•Inventory will decrease by $(100) •R.E. will increase by $64.35
•Cash will increase by $65.35

Total Increase in Assets $164.35 = Total Increase in Liab. $164.35

Accounting Equation is Balanced


New Balance of Inventory Credit Analysis Model
Inventory in year 2014 is: =If the named cell “Model” stated or the banker
selected from the Drop Down List Box to “Purchase Inventory”, then [Inventory
initial Amount in 2014 + (ODreq × PerinCPLTD)], or If model didn’t state to
“Purchase Inventory”, then check if it’s “Finance a Sale” or if none of the two
IF(s) are true then do nothing and just leave the Inventory account as is (i.e.,
equals the “Inventory initial Amount in 2014”).

Of course you cannot write in Excel the above. However, the above is the
explanation of what we will mention now.

= IF (Model = “Purchase Inventory”, $H$28 + Odreq x perinCPLTD, IF (Model =


“Finance a Sale”, ($H$28 – Odreq), $H$28))

This is a nested IF Statement.

$H$28 Initial Amount of Inventory (The one we wrote mannually in previous slides)
Odreq is the Over Draft required that we named it before as cell ($C$6) in the “Model”
Sheet
PerinCPLTD is the percent of overdraft that will be allocated as a current portion of
Long Term Debt (We named it before as cell ($C$7)
Credit Analysis Model

Now, you are asking yourself several questions:

1. What is the PerinCPLTD?


2. How much it should be?
3. Why are we adding above the Inventory the amount of the loan that will be
allocated to current portion or the full Odreq amount when it comes to Financing
a Sale?

Here are the answers:

Answer to questions:1,2, & 3.


The perinCPLTD is the Percentage In Current Portion of Long Term Debt. This
percentage is usually 80% or above if the client would like to take a loan to
purchase additional current assets such as Inventory, or finance a sale on
credit. For example, assume yourself now the client, if you would like to get a
loan to purchase additional inventory, then you will definitely use 80% or above
of that loan amount to purchase the inventory. Now where does the remaining
amount go (the 20% remaining)? It will actually be the portion that will be added
to long-term debt! The same applies for Accounts Receivables.
New Balance of Property, Plant, & Equipment Credit Analysis Model

PP&E in year 2014 is: =If the named cell “Model” stated or the banker
selected from the Drop Down List Box to “Purchase PP&E”, then [PPE initial
Amount in 2014 + (ODreq × (1-PerinCPLTD))], or If model didn’t state to
“Purchase PP&E”, then do nothing and just leave the PP& E account as is (i.e.,
equals the “PP&E initial Amount in 2014”).

Of course you cannot write in Excel the above. However, the above is the
explanation of what we will mention now.

=IF(Model="Purchase PPE",$H$31+ODreq*(1-perinCPLTD),$H$31)

$H$31 Initial Amount of PPE (The one we wrote mannually in previous slides)
Odreq is the Over Draft required that we named it before as cell ($C$6) in the “Model”
Sheet
PerinCPLTD is the percent of overdraft that will be allocated as a current portion of
Long Term Debt (We named it before as cell ($C$7)

Now you are thinking, why is it (1-perinCPLTD) and not only as we did before : × perinCPLTD?
New Balance of Property, Plant, & Equipment Credit Analysis Model
The answer is a logical concept. Property, Plant & Equipment are non-current assets and
consequently, they should be funded with a long-term debt (Matching the Duration of the Loan
with the Depreciable life of the PPE).

It is usually the case, that when the banker is being approached by a client to accept a loan that
satisfies the purpose of purchasing PP&E, the banker will allocate 20% of this loan to the “Current
Portion of Long Term Debt-CPLTD” and the remaining portion will be allocated to the Long-Term
Debt under Liabilities.

Now, you are adding another question! If the Assets part will increase by

“Odreq × (1- perinCPLTD)”,

and the liabilities part will increase by:

ODreq ×perinCPLTD for the Current Portion of Long-term Debt


&
ODreq × (1-perinCPLTD) for the Long-Term Debt

Then, how will the accounting equation (Assets = Liabilities + Equity) be balanced?
New Balance of Property, Plant, & Equipment Credit Analysis Model

Actually, here comes the work of the Cash Flow Statement. The Cash flow
statement will have CFF (Cash Flow from Financing) that is higher than CFI
(Cash flow from investing). Consequently, the cash balance in the cash flow
statement will increase by that difference and it will show in the cash
balance of the balance sheet.

For illustration, let’s try to input ($1,000,000) as Over draft required by the
client to purchase PP&E. In the model, you should input (1,000) since the
numbers are in 000, $. Moreover, input 20% in the cell that is related for
CPLTD-Current Portion of Long Term Debt.

Look what will happen in the Balance sheet:

Assets: Liabilities:
•PPE will increase by $800 •CPLTD will increase by $200
≠ •LTD will increase by $800
Total Increase in Liab. $1,000
Accounting Equation is NOT Balanced
New Balance of Property, Plant, & Equipment Credit Analysis Model

•The Cash flow from Financing (CPLTD + LTD) had increased by +$1,000
•The Cash flow from Investing (CapEx) had showed a Cash out flow of $-800
(The amount allocated to purchase PPE)

The net effect will be : The “Change in Cash Balance is $+200 (+1,000 – 800)

This positive increase in cash balance will show in the cash balance of the
balance sheet. Now here how it looks like:

Assets: Liabilities:
•PPE will increase by $800 •CPLTD will increase by $200
•Cash will increase by $200 •LTD will increase by $800
Total Increase in Assets $1,000 = Total Increase in Liab. $1,000
Accounting Equation is Balanced
Credit Analysis Model

Goodwill and Intangibles  Those numbers are taken from the investor but
we can use this number to calculate “New Purchases” of intangibles using this
method:

Intangibles (BOP)
Less: Amortization
Add: New Purchases
Intangibles (EOP)  The new Balance Sheet account of GW & Intangibles

Deferred Tax Assets (DTAs)  This number is taken as is from your client
Important:

Goodwill is not amortized, it is tested


for impairment at least annually!

Other Long Term Assets  This number is taken as is from your client
Liabilities Credit Analysis Model

When working with Liabilities and if the client would like to get a loan to payoff some
of his/her accounts payables, then the logic here is that the new amount the client
took to payoff the A/P should be eliminated from the initial amount of the accounts
payables.

New Accounts Payables: A/P in year 2014 is: =If the named cell “Model” stated or
the banker selected from the Drop Down List Box to “Finance A/P” then [A/P initial
Amount in 2014 – (ODreq × PerinCPLTD)]
or If model didn’t state to “Finance A/P”, then do nothing and just leave the A/P
account as is (i.e., equals the “A/P initial Amount in 2014”).

This translates in Excel as the following:

=IF(Model="Finance A/P",$H$29-(ODreq*perinCPLTD),$H$29)
$H$29 Initial Amount of Accounts Payables (The one we wrote mannually in previous slides)
Odreq is the Over Draft required that we named it before as cell ($C$6) in the “Model” Sheet
PerinCPLTD is the percent of overdraft that will be allocated as a current portion of Long
Term Debt (We named it before as cell ($C$7)
Liabilities Credit Analysis Model

New Notes Payables: This number is taken as is from your client.

New Current Portion of LTD: It is the already available CPLTD + the added CPLTD
that resulted from taking a loan or an overdraft.

In Excel this translates to:

=$H$30+(perinCPLTD*ODreq)

$H$30  Is the already available CPLTD before taking the new loan.
Odreq is the Over Draft required that we named it before as cell ($C$6) in the “Model” Sheet
PerinCPLTD is the percent of overdraft that will be allocated as a current portion of Long
Term Debt (We named it before as cell ($C$7)
Liabilities Credit Analysis Model

New Long Term Debt: It is the already available LTD + the added LTD that
resulted from taking a loan or an overdraft.

In Excel this translates to:

=$H$32+ODreq*(1-perinCPLTD)

$H$32  Is the already available LTD before taking the new loan.
Odreq is the Over Draft required that we named it before as cell ($C$6) in the “Model” Sheet
PerinCPLTD is the percent of overdraft that will be allocated as a current portion of Long
Term Debt (We named it before as cell ($C$7)

New Deferred Tax Liabilities  This number is taken as is from your client.
Credit Analysis Model
Model: “ALL CASH”

Now what if the client wants an overdraft for cash purposes?

If Model chosen to be “All Cash”  Then the amount of loan taken for cash purposes
should show exactly as an additional amount above the old cash balance. Why? And how
will the model adjust for this?

Assume you want a $1,000,000 an overdraft for cash purposes. Try it and see what will
happen.

• If PerinCPLTD is left 0%  Then the loan amount will show in cash balance (TA will
increase by $1,000) and the LTD will increase by $1,000 too (TL will increase by
$1,000)  The accounting equation is balanced.

• If PerinCPLTD is 60%  Then the loan amount will show in cash balance (TA will
increase by $1,000), the CPLTD will increase by $600 (1,000* 0.60), and the LTD will
increase by $400 (TL will increase by $1,000)  The accounting equation is balanced.

Actually, the CFF increased in general by +$1,000 in the cash flow statement and
automatically this increase in CFF is reflected in an increase in the ending cash
balance in the balance sheet  Accounting Equation will be always Balanced
Stockholder’s Equity Credit Analysis Model

New Preferred Stock  This number is taken as is from your client.

New Common Stock This number is taken as is from your client.

New Additional Paid in Capital This number is taken as is from your client.

New Treasury Stock (Negative Account) This number is taken as is from your client.

New Retained Earnings This number should be computed as the following:

Retained Earnings (BOP)


Less: Dividends Declared
Add: Net Income
Retained Earnings (EOP)

In Excel this is translated to : =C34+K7-H17

Cell “C34”  R.E. Beginning of Period


Cell “K7”  Net Income of the latest accounting year
Cell “H17”  Dividends Declared in the latest accounting year
Credit Analysis Model

• One of the important analysis that you should do as a credit analyst is to show
how the “Extra Interest from Overdraft” is affecting the financial statements of
your client.

• In particular, we should link our credit analysis model dynamically to compute


the “Extra Interest from Overdraft” consequently to compute the new coverage
and profitability ratios.

• Extra Int. from OD = [ODreq * (Average Interest rate)]

 Average Interest rate = Old Interest Expense/ (CPLTD + LTD)

• All other ratios should be dynamically linked to the output of the credit analysis
model.

• The ratios should reflect a trend analysis (for years 2013 and 2014)
Credit Analysis Model

The Cash Conversion


Cycle (CCC) is
calculated
dynamically.

The same for Liquidity


ratios, Asset
management ratios,
Debt management
ratios, and profitability
ratios.
Automatic & Dynamic Report Writing Credit Analysis Model

This table adjusts automatically by stating 0s or 1s when all the mentioned


conditions are true. Let’s take an example:

1 a percentage increase in Total asset higher than that of total liabilities


0 an increase in total assets and a decrease in total liabilities
0 a decrease in Total liabilities given that total assets has sustained its value
0 a percentage decrease in total liabilities by that was higher than the opposing percentage decrease in total assets

The 1st row states: “The % increase in TA is higher than Total Liabilities”If this is
true, then the 1st column will return a “1”, however, if this is false, then the 1 st
column will return a 0.

As you can see in the Balance sheet each account has a %Change form year to
year in Column “D”.

How does the 1st row in the table above return 1s or 0s?
Automatic & Dynamic Report Writing Credit Analysis Model

The conditions to return a “1”:

1- The % change in Total assets (i.e., (TA in 2014-TA in 2013)/ TA in 2013) increased
2- The % change in Total liabilities (i.e., (TL in 2014-TL in 2013)/ TL in 2013) increased
3- The % increase in Total Assets is GREATER than the % increase in TL

If all the conditions are true (Using the “IF” and “AND” function), then this will return a
“1”, which means that all conditions are true and satisfied. If any condition of the
above is not satisfied, then this will return a “0”, which means that one or two or all
the conditions are false.

Here how it looks in Excel:

=IF(AND(D17>0,D27>0,D17>D27),1,0)

D17 % Change in Total Assets


D27 % Change in Total Liabilities
Automatic & Dynamic Report Writing Credit Analysis Model

The same applies for the other rows in the table:

There is an increase in total assets and a decrease in total liabilities:

=IF(AND(D17>0,D27<0),1,0)

There is a decrease in Total liabilities given that Total Assets has sustained its
value

=IF(AND(D17=0,D27<0),1,0)

The percentage decrease in Total Liabilities by that year was higher than the
opposing percentage decrease in Total Assets

=IF(AND(D17<0,D27<0,ABS(D27)>ABS(D17)),1,0)

“ABS” Function  Returns the absolute value of number (i.e., A number without a sign)
Automatic & Dynamic Report Writing Credit Analysis Model

In cell “U37” in the “Credit Analysis Model”

="Compared to year "&YEAR(C6)&" "&IF(E67>C67,"Debt ratio has increased


from"&" "&ROUND(C67,2)*100&"%"&" "&"to"&"
"&ROUND(E67,2)*100&"%",IF(E67<C67,"Debt ratio has decreased from"&"
"&ROUND(C67,2)*100&"%"&" "&"to"&" "&ROUND(E67,2)*100&"%",""))

In cell “U38” in the “Credit Analysis Model”

=IF(OR(E67>0,C67>0),"This is due to","")&" "& VLOOKUP(1,U32:AA35,2,FALSE)

Debt Management Report:

=U37&" ."&U38&". "


Automatic & Dynamic Report Writing Credit Analysis Model

Example:

1 a percentage increase in Total asset higher than that of total liabilities


0 an increase in total assets and a decrease in total liabilities
0 a decrease in Total liabilities given that total assets has sustained its value
0 a percentage decrease in total liabilities by that was higher than the opposing percentage decrease in total assets

Cell “U37” Output:

Compared to year 2013, Debt Ratio has decreased from 72% to 66%

Cell “U38” Output:

This is due to a percentage increase in total assets higher than that of total liabilities

Debt Management Report:

Compared to year 2013, Debt Ratio has decreased from 72% to 66%. This is due to a
percentage increase in total assets higher than that of total liabilities
Public Functions in VBA Credit Analysis Model

This part is another interesting part of the CAFM® certificate. It will equip the
candidates with the tools to create functions that do not exist in Excel according to
their preferences. For example, you can create a function, name it STDEVP, that
can calculate the Standard Deviation of the portfolio. This function doesn’t exist in
Excel.

Excel only provides you with a function that calculates the standard deviation of a
security and not the standard deviation of the portfolio.

When we mention a “Public Function”, this function, when created in VBA, can be
called in Excel and it will automatically appear in the functions wizard (similar to
PMT, IF, AND, OR functions…etc).

When we mention a “Private Function”, this function, when created in VBA, cannot
be called in Excel and it will NOT automatically appear in the functions wizard
(similar to PMT, IF, AND, OR functions…etc). This function, when created, can be
used in Subs generated (“Subs” or “procedures” or “programs” are technical terms
that are used interchangeably).
Introducing VBA and VBE Credit Analysis Model

 VBA is a programming language that is built into Excel and other Microsoft
Office applications.

 It is important for you to remember that VBA is a language, and you should
try to learn it the same way you learned your mother tongue language-by
imitating how others use it to say different things instead of memorizing the
rules of grammar, studying vocabulary lists, and so on.

 A program is a step-by-step instructions that a computer can follow to do


what you want to be done.

 These instructions have to be written in one of a group of specially designed


languages, called programming languages.

 You will learn more about this language and you will definitely be a
professional advanced programmer after the completion of the last week of
this course.
Introducing VBA and VBE Credit Analysis Model

Different Names of Programs

 Programs are also called procedures, codes, and macros.

 Most individuals use these different names interchangeably, and this is what
we will do throughout this day.

 In VBA, you will write only two kinds of programs: Sub procedures and
Function procedures.

 The names program, code, and macro are not generally used in this context,
that is, Sub procedures are not called Sub codes, Sub macros, and so on.
Introducing VBA and VBE Credit Analysis Model

Let’s Start using the Visual Basic Editor in Ms Excel!


1. This step is done once in a life time! Go to: Ms Office Button Excel Options 
Popular  Check the checkbox (Show Developer Tab in Ribbon) –As shown in
the figure below

2. OR in Ms Excel 2013, Go to Ms Office Button  Excel Options Customize


Ribbon  Check the checkbox of “Developer”.

3. The Developer Tab will appear in the Ribbon.


Introducing VBA and VBE Credit Analysis Model

Let’s Start using the Visual Basic Editor in Ms Excel!


3. In the Developer Tab, under Code Press the “Visual Basic”
Introducing VBA and VBE Credit Analysis Model

Let’s Start using the Visual Basic Editor in Ms Excel!


Press: ALT+F11 to open the VBA wizard (Shortcut Key)

 At the moment, we only need to make sure that the code window and the
project explorer are open.

 The Code window is the large window that takes up most of the right-hand
side of the VBE window.
Introducing VBA and VBE Credit Analysis Model

 The Project Explorer window is a narrow long window along the left side
of your screen. The box title is “Project” in its title bar.

 If you don’t see it, press Ctrl+R to open it!


Creating Public Functions Credit Analysis Model

Creating a New NPV function that calculates the Net Present Value of an
investment by including the initial investment between the cash flows.

Public Function QNPV(CF As Range, wacc, count)


The
For n = 1 To count
For ___ to ___
QNPV = (CF(n) / (1 + wacc) ^ (n - 1)) + QNPV
Next
Next
is used to Loop
End Function

You can call this function now in Excel using : =QNPV


The inputs of this function are: Cash flow range, WACC, and the number of
Cash flows in the range you marked.
Creating Public Functions Credit Analysis Model

Creating a function that calculates the price of a security using Gordon Growth
Model (One stage Model that assumes a constant perpetual growth rate)

Public Function GGM(D0, k, Gm)

D1 = D0 * (1 + Gm)
GGM = D1 / (k - Gm)

End Function

You can call this function now in Excel using : =GGM


The inputs of this function are: Last Dividend Paid, Cost of Equity, and the
constant growth rate assumed.
Creating Public Functions Credit Analysis Model

Creating a function that calculates the price of a security using the Dividend
Discount Model (Two stage Model that assumes a certain growth rate in the first
stage of the model and another constant perpetual growth rate that will sustain till
perpetuity)
Public Function Twostage(n, g1, Gm, D0, k)

For t = 1 To n The

S1DV = ((D0 * ((1 + g1) ^ t)) / ((1 + k) ^ t)) + S1DV For ___ to ___

Next Next

TV = ((D0 * (1 + g1) ^ n) * (1 + Gm)) / (k - Gm) is used to Loop


Twostage = S1DV + (TV / ((1 + k) ^ (n)))
End Function
You can call this function now in Excel using : =Twostage
The inputs of this function are: The number of years in the 1st stage, the Growth rate in the 1st
stage, the constant growth rate assumed thereafter, Last Dividend Paid, and Cost of Equity.
Creating Public Functions Credit Analysis Model

Creating a function that calculates the price of a security using the Dividend
Discount Model (Three stage Model that assumes a certain growth rate in the first
stage of the model, different supernormal growth rate in the 2nd stage, and another
constant perpetual growth rate that will sustain till perpetuity)
Public Function Threestage(n1, g1, n2, g2, Gm, D0, k) You can call this function now
in Excel using : =Threestage
For t = 1 To n1
The inputs of this function are:
S1DV = ((D0 * ((1 + g1) ^ t)) / ((1 + k) ^ t)) + S1DV
The number of years in the 1st
stage, the Growth rate in the 1st
Next stage, the number of years in the
2nd stage, the Growth rate in the
For p = 1 To n2 2nd stage, the constant growth rate
assumed thereafter, Last
S2DV = ((D0 * ((1 + g1) ^ n1) * ((1 + g2) ^ p))) / ((1 + k) ^ (n1 + p)) + S2DV Dividend Paid, and Cost of Equity.

The
Next

TV = ((D0 * (1 + g1) ^ n1) * ((1 + g2) ^ n2) * (1 + Gm)) / (k - Gm) For ___ to ___

Threestage = S1DV + S2DV + (TV / ((1 + k) ^ (n1 + n2))) Next


End Function is used to Loop
Creating Public Functions Credit Analysis Model

Creating a function that calculates the standard deviation of a portfolio of two


assets.

Public Function STDVP(Wa, Wb, STDa, STDb, Corrl)

Vari = (Wa ^ 2) * (STDa ^ 2) + (Wb ^ 2) * (STDb ^ 2) +(2* Wa * Wb * STDa * STDb *


Corrl)
STDVP = Vari ^ 0.5

End Function

You can call this function now in Excel using : =STDVP


The inputs of this function are: The weight invested in asset A, the weight invested in asset B,
the standard deviation of Asset A, the standard deviation of Asset B, and the Correlation
between Asset A and Asset B.
Creating Public Functions Credit Analysis Model

Creating a function that corrects the weakness of the embedded Vlookup function
that Microsoft created in Excel.

Public Function Newlookup(A As Range, B As Range, lookup, count)

For n = 1 To count
The
If A(n) = lookup Then
Newlookup = B(n) For ___ to ___
n = count + 1
End If Next

Next is used to Loop

End Function

You can call this function now in Excel using : =Newlookup


The inputs of this function are: 1st Range or 1st array, 2nd Range or 2nd array, the lookup value,
and the number of rows in the range.
Creating Public Functions Credit Analysis Model

Creating a function that identifies if a security is Efficient or Not (By comparing


return and risk)
Public Function EffA(k As Range, STD As Range, count, Kasset, STDasset)

EffA = "EFF"
'"EFF" stands for "Efficient“
The
For n = 1 To count
For ___ to ___
If Kasset < k(n) Then

If STDasset >= STD(n) Then Next

EffA = "Not EFF" is used to Loop

End If
End If

Next
End Function

You can call this function now in Excel using : =EFFA


The inputs of this function are: Range of Assets Returns, Range or Assets Standard Deviation, the number of rows in the
range, the Return of a specific assets, and the Standard Deviation of that Single Asset.
Creating Public Functions Credit Analysis Model

This code looks simple but it’s a tough code due to the nested IF used and
combined with a looping structure.

If you understand one example, you will understand it all!

Take this example:

On your Excel sheet, you have the following:

Asset K Std Dev CV

A 13% 15% 1.15


B 15% 17% 1.13
C 12% 15% 1.25
D 14% 18% 1.29
E 12% 16% 1.33
F 8% 2% 0.25
Creating Public Functions Credit Analysis Model

You should read the code as the following:

Whenever the function is called at anytime without any inputs, EFFA will return an
“EFF”. The memory of this function, whenever it commences, it will store initially
“EFF”. If this memory is overridden by “Not EFF” by the last test, then the public
function will return “Not EFF”.

For example Take Asset “C”  Kasset = 12% and its Standard Deviation is 15%.

When you call the function to inspect if Asset C is Efficient or Not, you should
write in Excel:

=effa($B$6:$B$11,$C$6:$C$11,COUNT($B$6:$B$11),B8,C8)

$B$6:$B$11 The range of Returns that should be always fixed by ($) so as when we drag the function
downwards, this range will remain fixed.
$B$6:$B$11 The range of Standard Deviations that should be always fixed by ($) so as when we drag
the function downwards, this range will remain fixed.
COUNT($B$6:$B$11) Counts the number of Assets in the range.
B8 The Return of Asset C.
C8The Standard Deviation of Asset C.
Creating Public Functions Credit Analysis Model

NOTE: At that point, don’t get lost at all or else you will never get the point
behind using VBA in public functions!

When the function starts, it will do the following:

1. Initially EFFA has a text value that is “EFF”


2. Count function will count the number of assets in the range and Count will have
a value of 6.
3. Kasset will have a value of 12%Cell B6
4. STDasset will have a value of 15%Cell C6
5. Initially n=1
Creating Public Functions Credit Analysis Model

• At n=1

K(1) = 13%Return of Asset A. Is the Return of Asset C lower than the Return of
Asset A?
The answer is: True! Why?
Because Asset C has a return of 12% which is lower than the return of asset C!

Since the answer is “True”, it will move to the second IF Statement that tests the
following:

STD (1) = 15%Standard Deviation of Asset A. Is the Standard Deviation of Asset


C Higher or Equal to the Standard Deviation of Asset A?
The answer is: True! Why?
Because Asset C has a standard deviation of 15% which is equal to the standard
deviation of Asset A.

Since the second test is True, it will move to a state that till now asset C is “Not EFF”
Now NEXT will change the value of “n” from “1” to become “2”
Creating Public Functions Credit Analysis Model

• At n=2

K(2) = 15%Return of Asset B. Is the Return of Asset C lower than the


Return of Asset B?
The answer is: True! Why?
Because Asset C has a return of 12% which is lower than the return of asset
B!

Since the answer is “True”, it will move to the second IF Statement that tests
the following:

STD (2) = 17%Standard Deviation of Asset B. Is the Standard Deviation of


Asset C Higher or Equal to Standard Deviation of Asset B?
The answer is: FALSE! Why?
Because Asset C has a standard deviation of 15% which is less than the
standard deviation of Asset B.

Since the second test is False, no changes will overwrite the memory of
Asset A, and EFFA Function is still “Not EFF”.
Creating Public Functions Credit Analysis Model

• At n=3

K(3) = 12%Return of Asset C. Is the Return of Asset C lower that the


Return of Asset C?
The answer is: False! Why?
Because Asset C has a return of 12% which is NOT Less than the return of
asset C!

Since the 1st answer is “False”, it will not test for the second IF. It will directly
jump to the END IF and it will loop. In our case, the previous value of EFFA
was “NOT EFF”, so nothing will change and till now EFFA is still “Not EFF”!
Creating Public Functions Credit Analysis Model

• At n=4

K(4) = 14%Return of Asset D. Is the Return of Asset C lower that the


Return of Asset D?
The answer is: True! Why?
Because Asset C has a return of 12% which is Less than the return of asset
D!

Since the answer is “True”, it will move to the second IF Statement that tests
the following:

STD (4) = 18%Standard Deviation of Asset D. Is the Standard Deviation of


Asset C Higher or Equal to Standard Deviation of Asset D?
The answer is: FALSE! Why?
Because Asset C has a standard deviation of 15% which is less than the
standard deviation of Asset D.

Since the second test is False, no changes will overwrite the memory of
Asset A, and EFFA Function is still “Not EFF”.
Creating Public Functions Credit Analysis Model

• At n=5

K(5) = 12%Return of Asset E. Is the Return of Asset C lower that the


Return of Asset E?
The answer is: False! Why?
Because Asset C has a return of 12% which is NOT Less than the return of
asset E!

Since the 1st answer is “False”, it will not test for the second IF. It will directly
jump to the END IF and it will loop. In our case, the previous value of EFFA
was “NOT EFF”, so nothing will change and till now EFFA is still “Not EFF”!
Creating Public Functions Credit Analysis Model

• At n=6

K(6) = 8%Return of Asset F. Is the Return of Asset C lower that the Return
of Asset F?
The answer is: False! Why?
Because Asset C has a return of 12% which is NOT Less than the return of
asset F!

Since the 1st answer is “False”, it will not test for the second IF. It will directly
jump to the END IF and it will loop. In our case, the previous value of EFFA
was “NOT EFF”, so nothing will change and till now EFFA is still “Not EFF”!
This time, the NEXT will turn the n value to 7 which is higher than the count
value which was decided initially by the count function and that is 6! In this
case, the loop will break and stop.

Now what was the last thing in the memory of the EFFA function?
The answer is : “Not EFF” So the output of the function is “Not EFF”.
Creating Public Functions Credit Analysis Model

A summary of the comparison of Asset C with all the range of assets is


presented in the table below:
Asset Testing Return Testing STDEV EFFA Memory
A True True Changed from “EFF” to “Not
(k=13%), (σ=15%) EFF”
B True False Didn’t overwrite and the
(k=15%), (σ=17%) memory is still “Not EFF”
C False We don’t Care! Didn’t overwrite and the
(k=12%), (σ=15%) (Since it already jumped to memory is still “Not EFF”
End IF and then looped to
compare with D)
D True False Didn’t overwrite and the
(k=14%), (σ=18%) memory is still “Not EFF”
E False We don’t Care! Didn’t overwrite and the
(k=12%), (σ=16%) (Since it already jumped to memory is still “Not EFF”
End IF and then looped to
compare with F)
F False We don’t Care! Didn’t overwrite and the
(k=8%), (σ=2%) (Since it already Jumped to memory is still “Not EFF”
End IF and then looped but EFFA ‘NOT EFF’
the loop will break!)
Creating Public Functions Credit Analysis Model
A summary of the comparison of Asset A with all the range of assets is presented in
the table below:
Asset Testing Return Testing STDEV EFFA Memory
A False We don’t Care! EFFA is still “EFF” since the
(k=13%), (σ=15%) (Since it already jumped to 1st test was False
End IF and then looped to
compare with B)

B True False EFFA was not overwritten by


(k=15%), (σ=17%) “NOT EFF” since the 2nd test
was False

C False We don’t Care! EFFA was not overwritten by


(k=12%), (σ=15%) (Since it already jumped to “NOT EFF” since the 1ST test
End IF and then looped to was False
compare with D)

D True False Didn’t overwrite and the


(k=14%), (σ=18%) memory is still “EFF”

E False We don’t Care! EFFA was not overwritten by


(k=12%), (σ=16%) (Since it already jumped to “NOT EFF” since the 1ST test
End IF and then looped to was False
compare with F)

F False We don’t Care! Didn’t overwrite and the


(k=8%), (σ=2%) (Since it already jumped to memory is still “EFF”
End IF and then looped but EFFA ‘EFF’
the loop will break!)
Books References Principles of CAFM®
1. Aswath Damodaran (2001), The dark side of valuation: Valuing young, distressed,
and complex Businesses( 2nd ed.) ,FT Press.
2. Alastair L. Day (2012), Mastering financial modeling in Microsoft excel(3rd ed.), FT
Publishing.
3. Simon Benninga (2008), Financial modeling (3rd ed.) MIT Press.
4. Chandan Sengupta (2010), Financial analysis and modeling( 2nd ed.), Wiley Finance.
5. Masari, M., & Gianfrate, G. (2014). The valuation of financial companies: Tools and
techniques to value banks, insurance companies, and other financial institutions (1st
ed.). Wiley Finance.
6. Koller, T., & Goedhart, M. (2010). Valuation: Measuring and managing the value of
companies (5th ed.). Hoboken, N.J.: John Wiley & Sons.
7. Kieso, D., Weygandt, J., & Warfield, T. (2014). Intermediate accounting (15th ed.).
Wiley John, & Sons, Incorporated

You might also like