Quantitative methods (legacy PREREQ1-LM1) Flashcards
What are the 3 rules of money?
- Money soon is worth more than money later
- Larger cash flows are worth more than smaller
- Less risky cash flows are worth more than more risky
What are the 3 ways of thinking about interest rates?
- Required rate of return: RoR required by an investor ot lender.
Money today * (1 + r) = money tomorrow - Discount rate: rate at which some future value is discounted to arrive at a value today
Money tomorrow / (1 + r) = Money today - Opportunity cost: the value an investor or lender forgoes by chhoosing a particular action.
I.e., r is the opportunity cost of current consumption
Typically required rate of return = discount rate = opportunity cost
What 4 premiums will be built into the rate of return if I lend someone money, on top of the risk-free rate?
- Inflation premium: compensates for expected inflation ( π^e)
- Default risk premium: compensates lender for credit risk
- Liquidity premium: compensation for risk of loss versus fair value if an investment needs to be converted to cash quickly
- Maturity premium: greater interest rate risk (i.e., price risk) with longer maturities. This is because as yields increase, bond price increases. So if yields increase, your bond may be devalued.
This will also include a premium for inflation.
It is ultimately due to uncertainty: the longer the time period, the more uncertain we are about the level of expected inflation
Ideally these would be multiplicative rather than additive, but additive is just fine
What is the nominal risk-free rate?
r⌄f + π^e = nominal risk-free rate
Where r⌄f is the risk-free rate
and π^e is the inflation premium
The nominal risk-free rate might be measured by something like the return on a US Treasury 3-month T-bill
It build in an inflation premium as well as the underlying risk-free rate
What does it mean to say that r must be in the same periodicity as N when calculating the future value of a single cash flow?
r represents the interest rate, N represents the number of periods
If the interest rate was 6% per year over 10 years with an annual periodicity, the final nominal value is 100(1.06)^10
If it had semi-annual periodicity it would be 100(1.03)^20
If it had quarterly periodicity it would be 100(1.015)^40
These will result in different values so we need to match the periodicity
How do we calculate FV?
Future Value = Present Value x (1 + r)^N
Where r = interest rate
N = number of periods
What is simple interest?
Interest calculated on the original amount
Contrasted to compounded interest, which is calculated on the amount from the last period
i.e., 5% interest on £1000 over 20 years would return (0.05 * 1000 * 20) = £2000
How do you calculate future value of £10m you receive in 5yrs and invest at 9% RoR for 10 years?
It doesn’t matter when you receive it, it is still money invested for 5 years.
Method 1: FV = 10m(1.09)^10 = 23.7m
Method 2: N=10, I/Y = 9, PMT = 0
PV = -10m
CPT FV = 23.7m
To calculate value of the 10m today using this interest rate, we can discount it by (1.09)^5 and divide 10m by this amount
10m / (1.09)^5 = 6.5m
How are interest rates stated?
Rates are ALWAYS quoted annually
That means if you see a 3-month T-bill yielding 3%, you do not get 3%, only 1/4 of 3% across the 3 months (which is 0.75%)
r⌄s = stated interest rate
How do we calculate value of $1m held over 1 year with a rate of 3% that is compounded monthly?
FV = 1m (1 + (6% / 12)) ^ (12 x 1)
What is continuous compounding?
This is really just an easier way of calculating or implementing the idea of daily compounding, which can get clunky to use (dividing rates by 365)
We have to use Euler’s constant, e, for continuous compounding. We multiply the present value by e to the power of rate x number of periouds
FV = PV x e ^(r x N)
What do we press on the calculator to calculate using continuous compounding the future value of 50,000 at an interest rate of 7% held for 3 years?
On the calculator we do:
0.07 x 3 = 2nd function, LN x 50 000
We must use the equals because 0.07 x 3 should effectively be in brackets
How to calculate stated rate if we know EAR?
If we know Effective Annual Rate we can work backwards to find the effective annual rate when we also know the periodicity.
Let’s say that we have an EAR of 10%
0.1 = (1 + rs /12)^12 - 1
1.1 = (1 + rs/12)^12
(1.1)^1/12 = 1 + rs/12
(1.1)^1/12 -1 = rs/12
((1.1)^1/12 - 1) x 12 = rs
0.0957 = 9.57% = rs
9.57% = stated rate
How do we calculate stated rate if we have EAR using continuous compounding?
EAR = 5.5%
0.055 = e^rs - 1
1.055 = e^rs
ln(1.055) = rs
0.0535 = rs
5.35% = rs = stated return
What is an annuity?
A finite set of level sequential cash flows
Something cannot be an annuity if:
- the cash flow differs
- some years are missed out
- the cash flows do not have an end date
What is an ordinary annuity?
What is an annuity due?
Ordinary annuity: where the first cash flow happens at the end of the first year
Annuity due: where the first cash flow happens at the beginning of the first year
Important because the cash can earn interest over the period
How do you calculate the future value of an ordinary annuity?
Enter number of years and press N
Enter payment amount and press PMT
Enter rate and press I/Y
Enter present value and press PV
Press CPT FV to calculate
How do you calculate the future value of an annuity due?
An annuity due starts paying in from the beginning of the first year, rather than the end
This means that interest can accrue over the year starting from t=0
The first payment out can therefore grow for the entire duration of the annuity, rather than n-1
You can calculate the value of an annuity due by just calculating the value of an ordinary annuity and multiply it by (1+r) to account for that additional year of compounding
You could also enter Begin mode (BGN) on your financial calculator to perform the annuity due calculation. However it might be sometimes inconvenient or lead to errors if you keep flipping back and forth. Therefore MM keeps his calculator in END mode and just multiplies at the end
How do you calculate the future value of unequal cash flows?
It can be calculated manually or using the calculator functions
Calculating it manually involves multiplying each annuity payment by the number of years it has to gain interest. Then adding these together.
We can use the calculator function NFV to find the future value of a series of cashflows. However not all calculators have this function. If they do, it works the same as the NPV function in terms of inputs
How do you calculate the present value of a single cash flow?
Multiply the single cash flow (the future value) by:
(1 + r)^-N
Which is the same as:
FV / (1 + r)^N
How do you calculate the present value of a series of cash flows for an ordinary annuity?
PV = A [(1 - 1 / {1 + r}^N) / r ]
Where PV = Present Value
A = Annuity Due
r = rate of return / interest rate
N = number of years
i.e., if A = 1000 (payment in per year)
r = 0.07
N = 6
PV = 1000 * [(1 - 1 / 1.07^6 ) / 0.07)]
PV = 4 767
How do you calculate the present value of a series of cash flows for an annuity due?
It is the initial payment in plus the PV of a series of cash flows for an ordinary annuity for N - 1 years of the annuity
I.e. you would add
PV = A + A [(1 - 1 / {1 + r}^[N-1]) / r ]
Where PV = Present Value
A = Annuity Due
r = rate of return / interest rate
N = number of years
You can add the time value of money keys to calculate that
What is a perpetuity?
An annuity that pays out forever.
The cash flows from a perpetuity are:
- level
- sequential
- infinite
We can find the present value of a perpetuity by dividing the amount the perpetuity pays per year by r
where r is the discount rate
I.e., if our perpetuity pays out £100 per year and the discount rate is 5%, the present value is 100/0.05 = £2000
Because of the constant discounting as time progresses, no matter what time you consider the perpetuity to start it will always have the same value, if you take the discounting into account
How can we create a 7-year annuity from perpetuities?
We find 2 perpetuities that are identically matched. They pay out the same amount each period. However, one starts at t=0 and another at t=7. We go long the first one and short the second.
Until t=7, we are only exposed to cash flows from the long perpetuity. This gives us the annuity payments. When t=7 begins, we pay the perpetuity short using the cash from the perpetuity long. These balance out, and we are left with net zero cash flows.
How do we calculate the present value of a series of unequal cash flows using the NPV function on a financial calculator?
First clear the calculator pressing 2nd CF 2nd CE/C in order.
Then your screen will say CF0. This is the cash flow at the beginning.
Where there is no value press 0 and then the down arrow
In years where there is a value write the amount, press enter, and down arrow twice
At the last cash flow, press the down arrow once and then hit NPV
Then I will be displayed, This is the discount rate. Write a number, then press enter and the down arrow.
Then press NPV and CPT
Your value will be displayed
Why might you calculate the present value of a series of unequal cash flows manually rather than using the calculator’s NPV function
It’s almost the same number of keystrokes
You could simply divide each amount by 1+ the discount rate to the power of the number of years of discounting
i.e.,10 000 / (1.04)
+ 20 000 / (1.04)^2
+ 30 000 / (1.04)^3
= PV
How do we determine a growth rate given FV, PV, and N?
r = (FV/PV)^(1/N) - 1
I.e., let’s say future value = 2 000 000
present value = 450 000
N = 20 years
(2 000 000 / 450 000)^0.05 - 1 = 0.077 = 7.7%
By contrast, if FV = 1 500 000, PV = 550 000, N = 25 years:
(1 500 000 / 550 000)^0.04 - 1 = 4.1%
We can also use this to determine growth rate per year of a financial metric of a company found on its financial statements
How do we solve for N? I.e., how long would it take to turn £100 into £500 at 10% compounded annually?
Solve for N:
FV = PV (1+r)^N
(1+r)^N = FV/PV
N ln (1+r) = ln (FV / PV)
N = ln (FV / PV) / ln (1 + r)
In this case:
N = ln (500 / 100) / ln (1+0.1)
N = 16.89
How would you determine what your monthly payment for a £500,000 mortgage would be at a 4% interest rate compounded monthly over 20 years?
You can simply use the annuity formula!
If PV = A [(1 - 1 / {1 + r}^N) / r ]
then A = PV / [(1 - 1 / {1 + r}^N) / r ]
Make sure to modify the periodicity by dividing the interest rate by 12 and multiplying N by 12:
A = 500 000 / [(1 - 1 / {1 + 0.04/12}^12*20) / 0.04/12 ]
A = 500 000 / 165.022
A = £3 030 per month
How do we solve for a payment to meet a retirement goal?
I just turned 23.
At age 53, I want to retire.
I expect to live for 30 years, until 83.
I want to receive £40,000 per year during this time period.
For the next 5 years, I can save £2000 per year
From 28 onwards, how much do I need to save per year to hit my retirement goal?
Assume our return is 6.25% (1/16)
Solve by bringing the value of the retirement income back.
First let’s calculate the value of the initial payments on my 28th birthday:
FV5: N=5, PMT=2000, I/Y=6.25, PV=0 CPT FV
= £11,339
Then let’s calculate the value of the future retirement income when I hit 53:
PV30: N=30, PMT=40 000, I/Y=6.25, FV=0 CPT PV = 536 173
Third, let’s compare the value of the future retirement income at my 28th birthday:
PV5 = PV30 / (1.0625)^25
PV5 = £117 783
Now let’s see how far short I am:
117 783 - 11 339 = 106 444
The PV of my earnings from 28 to 53 must therefore equal £106,444
N=25, FV = 0, I/Y = 6.25, PV = 106,444 CPT PMT = 8 526
So I would need to pay in £8 526 per year from 28 to 53 to hit my retirement goal
How do we solve for a payment to meet a retirement goal?
I just turned 23.
At age 53, I want to retire.
I expect to live for 30 years, until 83.
I want to receive a nominal £100,000 per year during this time period.
For the next 10 years, I can save a nominal £4000 per year
From 33 onwards, how much do I need to save per year to hit my retirement goal?
Assume our return is 8%
Solve by bringing the value of initial payments forward.
First let’s calculate the value of the initial payments on my 28th birthday:
FV10: N=10, PMT=4000, I/Y=8, PV=0 CPT FV
= £57,946
Second, let’s calculate the value of the future retirement income when I hit 53:
PV30: N=30, PMT=100 000, I/Y=8, FV=0 CPT PV = £1,125,778
Third, let’s compare the value of the initial savings when I retire:
PV30 = PV10(1.08)^20 = £270 083
Fourth, let’s find the difference:
1,125,778 - 270 083 = 855 695
Fifth, let’s calculate what annual payment I would need to make over the last 20 years of working to reach this figure:
N=20, FV=855 695, I/Y=8, PV=0 CPT PMT = £18,699
Thus I would need to save £18,699 (nominal) every year whilst working from 33 to 53 to meet my retirement goals.
What is data?
A collection of numbers, characters, words or text that represents FACTS or INFORMATION
Thus,
1. Data is not knowledge
Analysis or interpretation brought to data brings knowledge
2. Data does not have to be numbers
What are the four types of data?
NOIR
Categorical data:
- Values that describe a quality or characteristic
- Mutually exclusive labels or groups (somethign cannot belong to more than one category)
Numberical data:
- Measured or counted quantities
- Quantitative
Categorical:
N for Nominal (no logical order)
O for Order (has a logical order or rank, with gaps or groups of any size)
Numerical:
I for Integer (Discrete): limited to a finite number of values
R for Ratio (Continuous): can take on any value within a range
What is the difference between cross-sectional, time series, and panel data?
Cross-sectional data involves multiple observations of a particular variable. I.e., the stock prices of 60 companies. In this case N=60
Time series data involves multiple observations of a particular variable for the same observational unit over time. For example, GM’ stock price over the last 60 months
Panel data is a combination of cross sectional and time series data. It might involve multiple observations of a particular variable (stock price of 60 companies) across a period of time (60 months).
Putting time down the y axis and companies along the x axis creates a data table of panel data.
What is a variable?
A particular quality or characteristic we are tracking, like stock price or height
What is an observation?
The value of a specific variable. E.g., GM at $53.50 (where the variable is stock price)
Tom at 93kg (where the variable is a person’s mass)
What is the difference between structured and unstructured data?
Structured data is highly organised in a pre-defined manner. I.e., stock prices, returns, earnings per share
Unstructured data has no organised form. E.g., news, social media posts, company filings, audio/video
Unstructured data is also sometimes called alternative data. it can be produced by individuals, business processes (credit card transactions), or generated by sensors. To be useful in data analysis, it must be transformed into structured data. This is what machine learning does: it adds structure to unstructured data and gets progressively better at doing this.
What is a one dimensional array? What is a two dimensional array?
- A 1D array is a column of a spreadsheet showing observations for 1 variable. It could be cross sectional or time series data.
- A 2D array is a rectangular array showing two or more variables. It is also known as a data table. It could be cross sectional or panel data.
What is frequency distribution in the context of one way tables?
The number of observations of a specific value or group of a variable. I.e., how many are there in that category. Frequency could also be relative, i.e., number in that category as a % of number in all categories.
It is sorted in ascending or descending order
How do we assess frequency when dealing with numerical data?
We create bins (aka non overlapping intervals)
- Sory data in ascending order
- Find the range: max to min
- Decide on the number of intervals (k)
- Interval width = range / k (we always round up)
Be careful when choosing k. Too few leads to too much aggregation and loss of info
Too many results in insufficient aggregation, and too much noise included (i.e., only one observation in each interval)
You may have to play around with different k values to choose a good one that gives you the right amount of information. The ML algorithm is only as good as the data you give it
Interval no.1 will be the min value + width. When we specify intervals, a square bracket means it includes the value adjacent to it, a round bracket means it does not. i.e., (0,5] will include 5 but not 0.
How do we determine the size of the bins when attempting to turn continuous data into discreet data?
- Arrange the data in ascending order
- Minus high from low to get range
- Let k = a chosen number. Divide the range by k to get bin size
- Sort the data into each bin. Count the number falling into each.
If the data is too concentrated (ie a majority falling into one bin) or too spaced out (i.e. most bins have nothing or only one data point in) adjust k accordingly
What is a cumulative frequency?
A sequence of partial sums that sum to N or 100%
So when you move from one bin to the next you add all those in previous bins (i.e., when going from bottom to top value)
What is a contingency table?
Summarises data for 2 or more categorical variables
Helps us visually find patterns
A 2 way table will have 2 variables
One variation might see 3 bins for small, mid, and large market capitalisation. These labels will be shown across the top
Then down the y axis we would see the categories of different sectors (nominal data) like communication services, consumer staples, energy etc. That way we could see where the concentration is within our data set. Along the right hand side and bottom we might see totals to compare
Every entry in the table is called a joint frequency
You could also express each item as a percentage of row total, column total, or overall total for comparability
We can pull a lot of information about a portfolio just by breaking it down and using a contingency table like this
What are some applications of contigency tables?
- Confusion matrix
Used to help assess the precision of a classification model i.e. in ML in Level - Identify potential association between 2 categorical variables
For example, we can use a contingency table to help conduct a “chi square test of independence”
We would develop 2 tables, one where we just input actual values (i.e. low or high risk across, growth or value stock down), and one where we write down what we would expect to see for each value in this matrix
Then we would do the sum of [(observed - expected)^2 / expected]
The greater the Chi squared value, the higher the probability there is an association between the tested variables
What is a histogram?
Used to present distributions of numerical data. Useful when we want to compare to a normal distribution or a log distribution that has well defined properties and look for kurtosis, skewness
What is a frequency polygon?
Created from joining together the tops of the histogram bars, giving you an understanding of the distribution without calculations.
Can also be in the form of cumulative frequency. Adds from low to high. Can see where the most observations are
What is a bar chart?
For categorical rather than numerical data. Can be horizontal or vertical, stacked showing decomposition, or grouped when there are 2 variables (including a nominal and a numerical observation)
What is a tree map?
A set of coloured rectangles used to represent groups. Area = % of that group. We can have nested rectangles to decompose.
What is a word cloud?
Depicts frequency of unstructed data i.e., text. Colour can be used to display sentiment or simply distinguish between words
What is a line chart?
- Line chart. Used to visualise ordered observations. Typically used for time series data, to show changes and underlying trends. We could add other characteristics by also adding bubbles (i.e. EPS along stock price), in colours to show positive or negative EPS
What is a scatter plot?
Used to visualise joint variation in 2 numerical values. There may be no relationship, linear relationship, or non-linear relationship. A scatter plot matrix can be used to assess pairwise association between many variables. Many scatter plots will be laid next to one another so you can spot if there are any trends
What is a heat map?
A contingency table with colour coded cells
Can be generated in BB terinal
Can also be used to visualise the degree of correlation among different variables