Know these first
- M-A02 Rearranging equations
- M-A03 Exponents
Math Atoms
By the end you will be able to
- 1Describe a function as a rule that turns each input into one output, and use the notation f(x).
- 2Read outputs off a graph, and work out a value from a formula.
- 3Tell a straight-line function from a curved one, and an increasing function from a decreasing one.
- 4Read and sketch a piecewise function such as max(x − K, 0).
Why you need it
Put a yield in, get a bond price out. Put a share price in, get an option payoff out. Finance is full of rules that turn one number into another, and a graph lets you see the whole rule at a glance.
These Core Path lessons lean on functions and their graphs:
L1.4.04
A bond's price is a function of its yield. Finding the yield means reading that function backwards.
L1.4.06
The price-yield graph is curved and decreasing; its shape is the whole lesson.
L1.7.07
Option payoffs are piecewise functions such as max(S − K, 0), drawn as hockey sticks.
The idea
A machine that turns inputs into outputs
A function is a rule. You feed it a number, the input, and it hands back one number, the output. Same input, same output, every time. Try three machines.
The function machine
Type any inputChoose a machine
A graph shows every input and output at once. Inputs run along the bottom; above each input, at the height of its output, we put a dot. All the dots together make a line or a curve. To read a value, go up from the input to the curve, then across to the vertical axis.
Two questions describe most graphs. Is it straight or curved? And, moving left to right, does it go up or down? A function going up is increasing; going down, decreasing.
The rules
First, the notation. It looks odd at first, but it says exactly what goes in and what comes out.
Straight lines. The simplest functions add the same amount to the output every time the input goes up by 1. Their graphs are straight.
Curves. Anything else bends. For example falls by less and less as rises: curved and decreasing. Note that the letter for the input need not be ; here it is , for yield.
Piecewise functions. Some functions switch rule part of the way along. The most famous in finance uses .
Reading a function, in four questions
- What goes in, and what comes out? (Name and units of each.)
- Straight or curved? (Does each step in the input change the output by the same amount?)
- Increasing or decreasing, and where?
- Any corners or switches? (A piecewise rule, such as max.)
Try it
Drag the dot along the graph, or use the input slider, and read the output. For mx + c, set the slope to a negative number. For the price curve, watch how a 1-point rise in yield costs less and less as yields rise. For the hockey sticks, move K and drag across the corner.
Try itFunction plotter
Open the numerical calculus calculator →Function
Output at 2
1
Worked examples
1. Evaluating a curved function
Step 1 of 3- 1
The set-up
The price of a bond paying 100 in 5 years, with nothing before, is , where is the yield, a decimal. Find and .
2. A hockey stick, point by point
Step 1 of 3- 1
The set-up
. Find the output at 40, 50, 65.
3. A straight line, forwards and backwards
Step 1 of 4- 1
The set-up
A broker in Singapore charges a fee of S$5 plus 0.1% of the trade value : . What is the fee on S$10,000? And what trade value gives a fee of S$20?
Common mistakes
Each line below is a tempting slip. Spot what is wrong, then check.
Reaction
Check what stuck
Question 1 · objective 1
f(x) = 3x − 2. What is f(4)?
Question 2 · objective 4
f(S) = max(S − K, 0) with K = 95. What is f(80)?
Question 3 · objective 3
Which of these functions is decreasing for x ≥ 0?
Question 4 · objective 2
P(y) = 100 ÷ (1 + y)². What is P(0.05), to two decimal places?
Question 5 · objective 4
What does the graph of max(x − K, 0) look like?
Glossary
- Function
- A rule that turns each input into exactly one output.
- Input
- The number you put into a function, usually called x. Also called the argument.
- Output
- The number a function gives back, written f(x) and often called y.
- Graph
- A picture of a function: every input along the bottom, its output as the height above it.
- Intercept
- Where a graph crosses the vertical axis: the output when the input is 0.
- Slope
- How much the output changes for each 1 that the input rises. Constant for a straight line.
- Increasing
- A function is increasing where its graph goes up as you move to the right.
- Decreasing
- A function is decreasing where its graph goes down as you move to the right.
- Piecewise function
- A function that uses different rules on different stretches of its inputs.
- max(a, b)
- The larger of the two numbers a and b.