Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

Quantitative Methods in Finance

Lecture 1

October 5, 2023

Douglas Turatti
det@business.aau.dk
Aalborg University Business School
Denmark
Practical course information
Quantitative Methods

Douglas Turatti

1 Course Description

Introduction
▶ 7 3-hour lectures on Thursdays 12.30-15.15. Lecture Review of
notes will be in Moodle (as soon as possible before the Differentiation

Rules for
class). differentiation

Higher-Order
▶ Exam: Project module. Derivatives

Derivatives of Other
Functions
▶ Dates for project submission and oral exam: Functions with more
variables
Submission: January 3, 2024
Introduction to
Oral exam: Week 3-4 2024 Optimization

▶ The above dates may be subject to changes.

Aalborg University Business


School
72 Denmark
The Project
Guidelines for Project

Quantitative Methods

Douglas Turatti

▶ This is a project module, which means that the grade 2 Course Description

relies on a written product called the project. Introduction

Review of
Differentiation
▶ Project work is the basis of the PBL framework applied
Rules for
here in AAU. differentiation

Higher-Order
Derivatives
▶ The project can be done alone or in groups. A maximum Derivatives of Other
of 3 people is allowed per group. Functions

Functions with more


variables
▶ No hard page limits are set for the project. I suggest Introduction to
around 30 should be fine for a group of 3. Literature list, Optimization

figures and tables and appendices are not included in the


specified pages.

▶ Please send me your group members by October 31.


Aalborg University Business
School
72 Denmark
The Project
Guidelines for Project

Quantitative Methods

Douglas Turatti

3 Course Description

Introduction

Review of
▶ I will be the supervisor for all groups. Differentiation

Rules for
differentiation
▶ The project is composed of two sections.
Higher-Order
Derivatives
▶ The first one is a short mathematical assignment. The Derivatives of Other
Functions
mathematical assignment has weight approx. 1/4. Functions with more
variables

▶ In November, the questions for the mathematical Introduction to


Optimization
assignment will be available in Moodle.

Aalborg University Business


School
72 Denmark
The Project
Guidelines for Project

Quantitative Methods

Douglas Turatti

4 Course Description

Introduction

▶ The second section of the project is an empirical study Review of


Differentiation
applying econometric methods. This part has weight Rules for
approx. 3/4. differentiation

Higher-Order
Derivatives
▶ The empirical study must: Derivatives of Other
Functions
1. work with empirical financial data.
Functions with more
2. make adequate and exhaustive use of quantitative variables
techniques presented in the lectures. Introduction to
Optimization
3. apply linear regression techniques to answer the project
questions.

Aalborg University Business


School
72 Denmark
The Project
Guidelines for Project

Quantitative Methods

Douglas Turatti

5 Course Description

Introduction

Review of
Differentiation
▶ The topic of the empirical study is up to you to formulate. Rules for
differentiation

▶ I will provide supervision, but I will not give you the topic Higher-Order
Derivatives

ready. Derivatives of Other


Functions

Functions with more


▶ I recommend you start thinking about the empirical study variables

already now. Introduction to


Optimization

Aalborg University Business


School
72 Denmark
The Project
Guidelines for Project

Quantitative Methods

Douglas Turatti

6 Course Description

▶ The project is a collection of both parts. I suggest around Introduction

Review of
30 pages in total (and at least 20 for the empirical study). Differentiation

Rules for
▶ There is an oral exam after submission of the project. The differentiation

Higher-Order
oral exam is in groups. Derivatives

Derivatives of Other
▶ The grade you receive at the oral examination. Functions

Functions with more


variables
▶ During the oral exam, you may be asked specific Introduction to
Optimization
questions on the project and theoretical questions on the
methods they have applied on the project. You should
know all elements of your project.

Aalborg University Business


School
72 Denmark
Practical course information
Objectives

Quantitative Methods

Douglas Turatti

7 Course Description

▶ This module provides the quantitative tools necessary for Introduction

Review of
successfully following several mandatory and elective Differentiation

courses. Rules for


differentiation

Higher-Order
▶ Several mathematical and econometric tools, which are Derivatives

important for solving problems in finance, will be Derivatives of Other


Functions
presented. This includes, for example, differentiation, Functions with more
optimization, and linear regression. variables

Introduction to
Optimization
▶ The aim of the module is to provide the student with tools
necessary to conduct quantitative applications within the
broad areas of finance.

Aalborg University Business


School
72 Denmark
Practical course information
Learning outcomes and what to expect

Quantitative Methods

Douglas Turatti

8 Course Description

Introduction

Review of
Differentiation

Rules for
▶ Differences between Quantitative methods in Finance vs differentiation

Quantitative Finance. Higher-Order


Derivatives

Derivatives of Other
▶ Expect a math/econometrics course with some Functions

applications in finance. Functions with more


variables

Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Practical course information
Course Description

Quantitative Methods

Douglas Turatti

9 Course Description

Introduction

Review of
▶ Course content: Two blocks: Differentiation

Rules for
differentiation
▶ (Basic) Mathematics for finance: Review of differentiation.
Higher-Order
Introduction to Optimization. Introduction to matrix Derivatives

algebra. (2-3 classes) Derivatives of Other


Functions

Functions with more


▶ Basic econometrics for finance: Simple and multiple linear variables

regression analysis. Non-linear regression. Endogeneity Introduction to


Optimization
and instrumental variables. (at least 4 classes)

Aalborg University Business


School
72 Denmark
Practical course information
References

Quantitative Methods
▶ For the mathematics’ block: Essential Mathematics for Douglas Turatti
Economic Analysis.
10 Course Description

Introduction
▶ For the econometrics’ block: Introductory Econometrics by
Review of
Wooldridge. Differentiation

Rules for
differentiation
▶ These books are used in similar courses in many
Higher-Order
universities. Derivatives

Derivatives of Other
Functions
▶ Note that I may bring insights and topics from other books
Functions with more
as well. variables

Introduction to
Optimization
▶ Programming: The course should be followed using a
numerical/statistical software, I suggest R-studio, which is
suitable, free and simple to use. Note that it’s not
mandatory to use R.

▶ I will apply R studio especially in the econometrics’ block Aalborg University Business
School
of the course. 72 Denmark
Introduction
Examples : CAPM

Quantitative Methods
▶ Example of a financial model in mathematical terms. Douglas Turatti

▶ The capital asset pricing model (CAPM) is a model to determine Course Description

11 Introduction
the fundamental return of an asset given the market return in a
Review of
well-diversified financial market. Differentiation

Rules for
▶ Let E[Ri ] be the expected return of asset i, E[Rm ] be the differentiation

expected return of the market, Rf is the risk-free rate of interest Higher-Order


Derivatives
such as interest arising from government bonds. The relationship
Derivatives of Other
between the return of asset i and the market is given by Functions

Functions with more


variables
E[Ri ] − Rf = αi + βi (E[Rm ] − Rf ) (1)
Introduction to
Optimization
▶ βi is the sensitivity (risk) of asset i in comparison to the market.

▶ Equation (1) is a linear deterministic function. αi is the intercept


(when x=0), and βi is the first-order derivative,

d E[Ri ]
= βi . (2)
d E[Rm ] Aalborg University Business
School
72 Denmark
Introduction
Examples : EHM

Quantitative Methods
▶ Example of a financial model in econometric terms. Douglas Turatti

▶ The Random Walk Hypothesis: Day changes in stock prices are Course Description
unpredictable (efficient market hypothesis). 12 Introduction

Review of
yt+1 = yt + εt+1 , (3) Differentiation

Rules for
∆yt+1 = εt+1 (4) differentiation

Higher-Order
where yt+1 is the price of a share of stock at time t, and εt+1 is a Derivatives

pure random disturbance coming from an unknown probability Derivatives of Other


Functions
distribution.
Functions with more
▶ If EMH holds Et [yt+1 ] = yt . "The best forecast of tomorrow’s price variables

Introduction to
is today’s price". Optimization

▶ However, if changes in prices are given by a more general


stochastic linear function

∆yt+1 = β0 + β1 yt + εt+1 . (5)

The EHM will not hold as there are predictable terms. The EHM
Aalborg University Business
and RW hypothesis require the testable restriction: β0 = β1 = 0. School
72 Denmark
Review of Differentiation
Quantitative Methods

Douglas Turatti

Course Description

▶ An important topic in many scientific disciplines, including Introduction


13 Review of
finance, is the study of how quickly quantities change over Differentiation

time. Rules for


differentiation

Higher-Order
▶ The mathematical concept of rate of change is the Derivatives

derivative. Derivatives of Other


Functions

Functions with more


▶ For now, we are interested in the definition of derivative of variables

a function and important rules for calculating it. Introduction to


Optimization

▶ Note that here we will only do a short review of derivatives.


You are expected to have some prior knowledge.

Aalborg University Business


School
72 Denmark
Introduction
Motivation I : CAPM

Quantitative Methods

Douglas Turatti

Course Description

Introduction

14 Review of
▶ Consider the previously defined CAPM model, Differentiation

Rules for
differentiation
E[Ri ] − Rf = βi (E[Rm ] − Rf ) (6) Higher-Order
Derivatives
▶ Derivatives help us to calculate: Derivatives of Other
Functions
1. The effect on the asset i when the market risk premium Functions with more
increase (decrease) 1%. variables

2. The effect on the asset i when the market risk premium Introduction to
Optimization
increase (decrease) x%.

Aalborg University Business


School
72 Denmark
Introduction
Motivation II : Portfolio Allocation

Quantitative Methods

▶ Consider the problem of deciding portolio allocation. The Douglas Turatti

investor wants to create a portfolio which maximize the Course Description

return for a given risk (or minimize risk for a given return). Introduction
15 Review of
Differentiation
▶ This brings the need to compute the so-called tangent
Rules for
portfolio, which in the optimum portfolio given the risk of differentiation

individual assets. To find the tangent portfolio, we need Higher-Order


Derivatives
derivatives. Derivatives of Other
Functions

Functions with more


variables

Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Introduction
Motivation III : The Greeks

Quantitative Methods
▶ Under the Black-Scholes model, there are four partial derivatives Douglas Turatti

which represent the sensibility of the option to underlying Course Description


parameters. Let V be the value of the option given by the BS Introduction
formula. 16 Review of
Differentiation

▶ Delta : ∆ = ∂V
: measures the rate of change of the option value
∂S
Rules for
differentiation
with respect to changes in the underlying asset’s price. Higher-Order
Derivatives
▶ Vega : ν = ∂V
∂σ
: measures sensitivity to volatility. Derivatives of Other
Functions

Functions with more


▶ Theta : Θ = ∂V∂t
: measures the sensitivity of the value of the variables

option to the passage of time. Introduction to


Optimization

▶ Rho : ρ = ∂V
∂r
: measures sensitivity to the interest rate (risk-free
rate).

▶ Why the Greeks are important: They can be used to determine


the sensitivity of the portfolio to changes in the underlying
parameters. Aalborg University Business
School
72 Denmark
Review of Differentiation
Slopes of Curves

Quantitative Methods

Douglas Turatti

Course Description
▶ When we study the graph of a function, we would like to
Introduction
have a precise measure of the steepness of the graph at a 17 Review of
point. Differentiation

Rules for
differentiation
▶ In the linear function y = px + b, the number p denotes its
Higher-Order
slope. Derivatives

Derivatives of Other
Functions
▶ If p is large and positive, then the line rises steeply from Functions with more
left to right; if p is large and negative, the line falls steeply. variables

Introduction to
Optimization
▶ For a general function, the steepness or slope of a curve
at a particular point is the tangent to the curve at that point
that the slope of the straight line which just touches the
curve.

Aalborg University Business


School
72 Denmark
Slopes of Curves
Tangent to a curve

Quantitative Methods

▶ We now give a definition of the concept of tangent to a Douglas Turatti

curve. Course Description

Introduction

▶ Consider a point P on a curve in the xy-plane. Take 18 Review of


Differentiation
another point Q on the curve. The entire straight line Rules for
through P and Q is called a secant. differentiation

Higher-Order
Derivatives
▶ If we keep P fixed, but let Q move along the curve toward Derivatives of Other
P, then the secant will rotate around P. The limiting Functions

Functions with more


straight line toward which the secant tends is called the variables

tangent (line) to the curve at P. Introduction to


Optimization

Aalborg University Business


School
72 Denmark
Slopes of Curves
Tangent to a curve

Quantitative Methods
▶ Let’s assume P = (a, f (a)), the point Q can be defined as,
Douglas Turatti

Q = (a + h, f (a + h)) (7) Course Description

Introduction
where h is the shift in the x-axis from point P to point Q,
19 Review of
and the shift in the y-axis becomes f (a + h) − f (a). A Differentiation

graphic representation is, Rules for


differentiation

Higher-Order
Derivatives

Derivatives of Other
Functions

Functions with more


variables

Introduction to
Optimization

▶ The slope mPQ of the secant PQ is obtained applying the


rules for linear functions,
f (a + h) − f (a)
mPQ = (8) Aalborg University Business

h 72
School
Denmark
Slopes of Curves
Tangent to a curve

Quantitative Methods

Douglas Turatti
▶ Note that when h = 0, the fraction becomes 0/0 and so is
Course Description
undefined. But choosing h = 0 corresponds to letting
Introduction
Q = P.
20 Review of
Differentiation
▶ However, when Q moves toward P along the graph of f (), Rules for
differentiation
the x-coordinate of Q, which is a + h, must tend to a, and
Higher-Order
so h tends to 0. Simultaneously, the secant PQ tends to Derivatives

the tangent to the graph at P. Derivatives of Other


Functions

Functions with more


▶ Hence, we can define the slope of the tangent at P (i.e. variables

f ′ (a)) as the number that mPQ approaches as h tends to 0. Introduction to


Optimization

f (a + h) − f (a)
f ′ (a) = , when h tends to 0 (9)
h
▶ In fact, the limit as h tends to zero uses the mathematical
concept of limits.
Aalborg University Business
School
72 Denmark
Derivative
Definition

Quantitative Methods

Douglas Turatti

Definition Course Description


The derivative of the function f (x) at point a, denoted by f ′ (a), Introduction
is given by the formula, 21 Review of
Differentiation

f (a + h) − f (a) Rules for


f ′ (a) = lim (10) differentiation
h→0 h Higher-Order
Derivatives

The number f ′ (a) gives the slope


 of the tangent to the curve Derivatives of Other
Functions
y = f (x) at the point a, f (a) . Recall that the equation for a Functions with more
variables
straight line passing through (x1 , y1 ) and having a slope b is
Introduction to
given by y − y1 = b(x − x1 ), hence, Optimization

Definition
The equationfor the tangent to the graph of y = f (x) at the
point a, f (a)
y − f (a) = f ′ (a)(x − a) (11)
Aalborg University Business
School
72 Denmark
Derivative
Example

Quantitative Methods
▶ We will not define the concept of limits. Douglas Turatti

▶ Example: compute f ′ (a) when f (x) = x 2 . Find in particular Course Description

Introduction
f ′ (1/2) and f ′ (−1). 22 Review of
Differentiation

▶ Solution: Rules for


differentiation
For f (x) = x 2 , we have f (a + h) = (a + h)2 = a2 + 2ah + h2 , Higher-Order
and so f (a + h) − f (a) = (a2 + 2ah + h2 ) − a2 = 2ah + h2 . Derivatives

For all h ̸= 0, we obtain, Derivatives of Other


Functions

Functions with more


f (a + h) − f (a) 2ah + h2 h(2a + h) variables
= = = 2a + h (12) Introduction to
h h h Optimization

f ′ (a) is the limit of the above expression when h → 0,

f ′ (a) = lim (2a + h) = 2a (13)


h→0

For a = 1/2, we obtain f ′ (1/2) = 2.(1/2) = 1. Similarly,


Aalborg University Business
f ′ (−1) = 2.(−1) = −2. 72
School
Denmark
Derivative
Example

Quantitative Methods

Douglas Turatti
The secant line touches the function in two points. The limit of
Course Description
the secant is the tangent at the point, and also the derivative Introduction
function. In the case of a quadratic function, the derivative is a 23 Review of
linear function in every point of the domain. Differentiation

Rules for
differentiation

Higher-Order
Derivatives

Derivatives of Other
Functions

Functions with more


variables

Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Derivative
Example: CAPM

Quantitative Methods
▶ Consider the previously defined CAPM model, Douglas Turatti

E[Ri ] = Rf + βi (E[Rm ] − Rf ) (14) Course Description

Introduction
If we assume Rf is fixed we can rewritte the CAPM as, 24 Review of
Differentiation

E[Ri ] − Rf = βi (MRP) (15) Rules for


differentiation

where MRP is the market risk premium. Higher-Order


Derivatives

Derivatives of Other
▶ Calculate f ′ () at any point of the domain: Functions

Solution: Functions with more


variables
Compute f (a + h) = βi (MRP + h) Introduction to
Compute f (a + h) − f (a) = βi .h Optimization

Compute f (a+h)−fh
(a)
= βi .

Compute f (a) = βi as it is a constant.

▶ The derivative is a constant function as the CAPM is a


linear function. βi is the variation in the asset return when Aalborg University Business
the market risk premium varies 1 unit. 72
School
Denmark
Derivative
Notation

Quantitative Methods

Douglas Turatti

Course Description

Introduction
25 Review of
Differentiation
▶ We often denote the derivative simply by y ′ . Rules for
differentiation

▶ Differential notation: If y = f (x), then in place of f ′ (x), Higher-Order


Derivatives
we write, Derivatives of Other
Functions

dy df (x) d Functions with more


= dy /dx or = df (x)/dx or f (x) variables
dx dx dx Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Derivative
Increasing and Decreasing Functions

Quantitative Methods

Douglas Turatti

Course Description
▶ A function f (x) is called increasing if x1 < x2 implies
Introduction
f (x1 ) ≤ f (x2 ). A function f (x) is called strictly increasing if 26 Review of
x1 < x2 implies f (x1 ) < f (x2 ). Differentiation

Rules for
differentiation
▶ We can define increasing and decreasing functions using
Higher-Order
derivatives. Derivatives

Derivatives of Other
Functions
▶ To find out on which intervals a function is (strictly) Functions with more
increasing or (strictly) decreasing using the definitions, we variables

have to consider the sign of f (x2 ) − f (x1 ) whenever Introduction to


Optimization
x2 > x1 .

▶ It is easy to determine the sign of f (x2 ) − f (x1 ) using


derivatives.

Aalborg University Business


School
72 Denmark
Derivative
Increasing and Decreasing Functions

Quantitative Methods

Douglas Turatti

▶ In terms of the sign of its derivative: Course Description

Introduction
▶ If f ′ (x) ≥ 0 for all x in the interval I then f (x) is increasing 27 Review of
in I. Differentiation

Rules for
differentiation
▶ If f ′ (x) > 0 for all x in the interval I then f (x) is strictly Higher-Order
Derivatives
increasing in I.
Derivatives of Other
Functions

▶ If f (x) ≤ 0 for all x in the interval I then f (x) is decreasing Functions with more
variables
in I.
Introduction to
Optimization
▶ If f ′ (x) < 0 for all x in the interval I then f (x) is stictly
decreasing in I.

▶ If f ′ (x) = 0 for all x in the interval I then f (x) is constant in


I.
Aalborg University Business
School
72 Denmark
Rules for differentiation
Quantitative Methods
▶ Recall the definition of derivative, Douglas Turatti

f (x + h) − f (x) Course Description


f ′ (x) = lim (16) Introduction
h→0 h
Review of
Differentiation
▶ If this limit exists, we say that f () is differentiable at x. The
28 Rules for
process of finding the derivative of a function is called differentiation

differentiation. Higher-Order
Derivatives

Derivatives of Other
▶ Think of diferentiation as a transformation of f () into another Functions
function f ′ (). Functions with more
variables

▶ f ′ () is pronounced as f prime. Introduction to


Optimization

▶ f ′ () is a general function, and when applied in x = a yields the


derivative at the point a.

▶ We are interested in a systematic procedure to find derivatives of


common functions. However, note that some functions do not
Aalborg University Business
have a formula for their derivative. School
72 Denmark
Rules for differentiation
Quantitative Methods
▶ We start with some simple rules. Douglas Turatti
▶ If f () is a constant function, then its derivative is 0:
Course Description

f (x) → f ′ (x) = 0
Introduction
(17)
Review of
Differentiation
it makes sense as the derivative is the rate of change. 29 Rules for
differentiation
▶ Additive constants disappear:
Higher-Order
Derivatives
y = A + f (x) → y ′ = f ′ (x) (18) Derivatives of Other
Functions
▶ Multiplicative constants are preserved: Functions with more
variables

y = Af (x) → y ′ = Af ′ (x) (19) Introduction to


Optimization

Aalborg University Business


School
72 Denmark
Rules for differentiation
Illustration

Quantitative Methods

Douglas Turatti

▶ The proof for this rule is simple and relies on the properties of Course Description

limits (if you are interested check the main book). Introduction

Review of
Differentiation
▶ Economic illustration:
30 Rules for
differentiation
▶ Suppose f (t) denotes the sales revenue at time t of firm A, and Higher-Order
Derivatives
firm B sales revenue g(t) at each time is 3 times as large as that
Derivatives of Other
of A. Functions

Functions with more


▶ Hence, the growth rate of firm B revenues is 3 times as large as variables

that of A. In mathematical notation: Introduction to


Optimization

g(t) = 3f (t) → g ′ (t) = 3f ′ (t) (20)

▶ However, the firms relative growth rates f ′ (t)/f (t) and g ′ (t)/g(t)
will be equal.

Aalborg University Business


School
72 Denmark
Rules for differentiation
Power rule

Quantitative Methods
▶ The power rule is simple, but still one of the most used rules for
Douglas Turatti
differentiation.
Course Description

▶ Let f (x) be a power function, Introduction

a Review of
f (x) = x (21) Differentiation
31 Rules for
where a is a constant. differentiation

Higher-Order
▶ The derivative function of f (x) is computed by, Derivatives

Derivatives of Other
f ′ (x) = ax a−1 (22) Functions

Functions with more


variables
▶ Let f (x) = bx a + c. Using the rule of additive and multiplicative
Introduction to
constants, Optimization

f ′ (x) = b.a.x a−1 (23)

▶ Note that the derivative function is of one power lower than the
original function.

▶ Example: f (x) = 3x 4 + 20 Aalborg University Business


School
f ′ (x) = 12x 3 (24) 72 Denmark
Rules for differentiation
Sums, Products, and Quotients

Quantitative Methods

Douglas Turatti

Course Description

Introduction

▶ Suppose f () and g() are both defined in a set A of real numbers. Review of
Differentiation
32 Rules for
▶ If both f () and g() are differentiable at x, then the sum f + g and differentiation

the difference f − g are both differentiable at x, and, Higher-Order


Derivatives

F (x) = f (x) ± g(x) → F ′ (x) = f ′ (x) ± g ′ (x) (25) Derivatives of Other


Functions

Functions with more


In Leibniz’s notation: variables

Introduction to
d  d d Optimization
f (x) ± g(x) = f (x) ± g(x) (26)
dx dx dx

Aalborg University Business


School
72 Denmark
Rules for differentiation
Polynomials

Quantitative Methods
▶ Let the polynomial, Douglas Turatti

n n−1 Course Description


F (x) = an x + an−1 x + · · · + a1 x + a0 (27)
Introduction

combining the power rule and the sum rule we can easily find the Review of
Differentiation
derivative, 33 Rules for
differentiation

▶ First redefine, Higher-Order


Derivatives

Derivatives of Other
F (x) = f (x) + g(x) + · · · + a0 (28) Functions

Functions with more


where f (x) = an x n , and g(x) = an−1 x n−1 . variables

Introduction to
Optimization
▶ Using the sum rule and then the power rule,

F ′ (x) = an .n.x n−1 + an−1 .(n − 1)x n−2 + · · · + a1 (29)

▶ Example: F (x) = 5x 3 + 10x 2 + 2x + 5 then,

F ′ (x) = 15x 2 + 20x + 2 (30) Aalborg University Business


School
72 Denmark
Rules for differentiation
Products

Quantitative Methods
▶ If both f () and g() are differentiable at the point x, then so is
Douglas Turatti
F () = f ().g().
Course Description

▶ The derivative of F () is given by, Introduction

Review of
F ′ (x) = f ′ (x).g(x) + f (x).g ′ (x) (31) Differentiation
34 Rules for
differentiation
The derivative of the product of two functions is equal to the
Higher-Order
derivative of the first times the second, plus the first times the Derivatives
derivative of the second. Derivatives of Other
Functions

▶ In Leibniz’s notation, Functions with more


variables
     
d d d Introduction to
f (x).g(x) = f (x) .g(x) + f (x). g(x) (32) Optimization
dx dx dx

▶ Example, h(x) = (x 3 − x).(5x 4 + x 2 ). Here, f (x) = (x 3 − x), and


g(x) = (5x 4 + x 2 ). Hence,
h′ (x) = f ′ (x).g(x) + f (x).g ′ (x),

h (x) = (3x 2 − 1).(5x 4 + x 2 ) + (x 3 − x).(20x 3 + 2x) Aalborg University Business
School
72 Denmark
Rules for differentiation
Quotients

Quantitative Methods

Douglas Turatti
▶ The rule for quotients can easily be obtained from the rule for
Course Description
products.
Introduction

▶ Suppose F (x) = f (x)/g(x), where f () and g() are differentiable Review of


Differentiation
in x with g(x) ̸= 0, then, 35 Rules for
differentiation
f (x) Higher-Order
F (x) = (33) Derivatives
g(x)
Derivatives of Other
Functions
and the derivative, Functions with more
variables
′ ′
f (x).g(x) − f (x).g (x)
F ′ (x) = 2 (34) Introduction to
Optimization
g(x)

▶ The derivative of a quotient is equal to the derivative of the


numerator times the denominator minus the numerator times the
derivative of the denominator, this difference then being divided
by the square of the denominator.
Aalborg University Business
School
72 Denmark
Rules for differentiation
Chain Rule

Quantitative Methods

Douglas Turatti
▶ Suppose that y is a function of u, and that u is a function of x.
Course Description
Then y is a composite function of x.
Introduction

y = u(f (x)) (35) Review of


Differentiation
36 Rules for
▶ Suppose also that y is a differentiable function of u, and u is a differentiation

differentiable function of x. Higher-Order


Derivatives

Derivatives of Other
▶ If we know du/dx and dy /du, then the derivative dy /dx can be Functions

calculated as, Functions with more


dy dy du variables
= . (36) Introduction to
dx du dx Optimization

▶ Example: Find dy /dx when y = u 5 and u = 1 − x 3 .


Solution : Since dy /du = 5u 4 and du/dx = −3x 2 , we have,

dy
= 5u 4 (−3x 2 ) = −15x 2 u 4 = −15x 2 (1 − x 3 )4 (37)
dx
Aalborg University Business
School
72 Denmark
Higher-Order Derivatives
Introduction

Quantitative Methods

Douglas Turatti

▶ The derivative f ′ () of a function f () is often called the first Course Description


derivative of f (). Introduction

Review of
▶ If f ′ () is also differentiable, then we can differentiate f ′ () to obtain Differentiation

Rules for
the derivative of the derivative. differentiation
37 Higher-Order
▶ This new derivative function is the second-order derivative, also Derivatives

called (f ′ )′ = f ′′ (x). We use f ′′ (x) to denote the second Derivatives of Other


Functions
derivative of f evaluated at the particular point x. Functions with more
variables

▶ f ′′ () is pronounced as f double prime. Introduction to


Optimization

▶ Example : Find f ′ (x) and f ′′ (x) when f (x) = 2x 5 − 3x 3 + 2x.


Solution : The rules for differentiating polynomials imply that
f ′ (x) = 10x 4 − 9x 2 + 2. Then we differentiate again to get
f ′′ (x) = 40x 3 − 18x.

Aalborg University Business


School
72 Denmark
Higher-Order Derivatives
Notation

Quantitative Methods

Douglas Turatti

Course Description

Introduction
▶ f ′′ (x) usually denotes the second derivative of the function f (). Review of
Differentiation

▶ If y = f (x), y ′′ also denotes the second derivative. Rules for


differentiation
38 Higher-Order
▶ Also in Leibniz’s notation: Derivatives

Derivatives of Other

′′ d d d 2 f (x) Functions
f (x) = f (x) = Functions with more
dx dx dx 2 variables

or, Introduction to
Optimization
d 2y
y ′′ =
dx 2

Aalborg University Business


School
72 Denmark
Higher-Order Derivatives
Convex and Concave Functions

Quantitative Methods
▶ The first derivative allows us to determine whether a function is
Douglas Turatti
increasing or decreasing on an interval I.
Course Description

▶ If f ′ (x) ≥ 0(f ′ (x) ≤ 0) on I , then f () is increasing (decreasing) Introduction

Review of
on I. Differentiation

Rules for
▶ The second derivative f ′′ (x) is the derivative of f ′ (x): differentiation

1. If f ′′ (x) ≥ 0 for all x in the interval I then f ′ (x) is increasing 39 Higher-Order


Derivatives
in I. Derivatives of Other
Functions

2. If f ′′ (x) ≤ 0 for all x in the interval I then f ′ (x) is decreasing Functions with more
variables
in I.
Introduction to
Optimization

In the first (second) figure the slope of the tangent increases Aalborg University Business
(decreases). 72
School
Denmark
Higher-Order Derivatives
Convex and Concave Functions

Quantitative Methods

Douglas Turatti
▶ Suppose that f () is twice differentiable in the interior of I, i.e. f ()
Course Description
has at least two derivatives well defined. Then we can define, Introduction
1. f () is convex on I if f ′′ (x) ≥ 0 for all x in the interval I. Review of
Differentiation
′′
2. f () is concave on I if f (x) ≤ 0 for all x in the interval I. Rules for
differentiation
40 Higher-Order
▶ The concept of concave/convex is very important, especially in Derivatives

the context of optimization. Derivatives of Other


Functions

Functions with more


variables

Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Higher-Order Derivatives
Convex and Concave Functions : Example

Quantitative Methods

▶ Determine the convexity/concavity of the following function: Douglas Turatti

Course Description
y = f (x) = ax 2 + bx + c (38)
Introduction

Review of
The first derivative is Differentiation

Rules for
y ′ = f ′ (x) = 2ax + b (39) differentiation

41 Higher-Order
Note that the sign of f ′ (x) depends on the interval of x, hence f () Derivatives

Derivatives of Other
is increasing and decreasing. Functions

Functions with more


▶ The second derivative is, variables

Introduction to

y ′′ = f ′′ (x) = 2a
Optimization
(40)

Thus f ′′ (x) > 0 (convex) if a > 0, and concave f ′′ (x) < 0 if a < 0.
Hence, the function f () can be increasing AND decreasing in the
whole domain, but only convex OR concave.

▶ What about the function f (x) = ax 3 + bx 2 + cx + d ? Aalborg University Business


School
72 Denmark
Higher-Order Derivatives
Higher Derivatives

Quantitative Methods

Douglas Turatti

Course Description

▶ If y = f (x), the derivative of y ′′ = f ′′ (x) is called the third Introduction

Review of
derivative, customarily denoted by y ′′′ = f ′′′ (x). Differentiation

Rules for
▶ The fourth derivative and so on is usually is usually denoted by differentiation

y (4) = f (4) (x). In general, 42 Higher-Order


Derivatives

Derivatives of Other
d ny Functions
y (n) = f (n) (x) or (41)
dx n Functions with more
variables

is the nth derivative of f (). Introduction to


Optimization

▶ If a function f (x) has n derivatives, we say f (x) is n-times


differentiable.

Aalborg University Business


School
72 Denmark
Derivatives of Exponential Functions
Quantitative Methods

Douglas Turatti
▶ Exponential Functions are very important in finance. They are
Course Description
able to describe the behavior of asset prices and their volatilities,
Introduction
especially in the natural base. Review of
Differentiation
▶ The natural exponential function, Rules for
differentiation

y = ex , or y = exp(x). (42) Higher-Order


Derivatives
43 Derivatives of Other
▶ The natural exponential function f (x) = eX has the remarkable Functions

property that its derivative is equal to the function itself. Functions with more
variables

f (x) = ex → f ′ (x) = ex (43) Introduction to


Optimization

▶ Combining the above derivative with the chain rule allows some
complicated functions to be differentiated,

y = eg(x) → y ′ = eg(x) .g ′ (x) (44)


Aalborg University Business
School
72 Denmark
Derivatives of Exponential Functions
Quantitative Methods

Douglas Turatti

Course Description

Introduction

Review of
▶ We can summarize the properties of exponential functions (on Differentiation

the natural base) f (x) = ex : Rules for


differentiation

1. Strictly increasing Higher-Order


Derivatives

2. Convex 44 Derivatives of Other


Functions

Functions with more


3. f ′ (x) = ex variables

Introduction to
4. ex → 0 as x → − inf, ex → ∞ as x → inf. Optimization

Aalborg University Business


School
72 Denmark
Derivatives of Logarithmic Functions
Quantitative Methods
▶ The natural logarithmic function, g(x) = ln(x).
Douglas Turatti

▶ The natural logarithmic function is the inverse of the natural Course Description

exponential function, i.e, Introduction

x Review of
y =e → x = ln(y ) (45) Differentiation

Rules for
differentiation
▶ The equality holds:
eln(x) = x
Higher-Order
(46) Derivatives
45 Derivatives of Other
▶ Given the natural logarithmic function, let’s define g(x) = ln(x) Functions

Functions with more


then variables
eg(x) = x (47) Introduction to
Optimization
the derivative of the above expression is,
eg(x) .g ′ (x) = 1. (48)
g(x) ′
Since e = x, this implies xg (x) = 1, and thus
1
g ′ (x) = (49)
x
Aalborg University Business
School
▶ The derivative of lnx at x is simply the number 1/x. 72 Denmark
Derivatives of Logarithmic Functions
Quantitative Methods

Douglas Turatti

Course Description

Introduction

Review of
Differentiation

▶ Let y = g(x) = lnx so y ′ = 1/x. Rules for


differentiation

Higher-Order
▶ For x > 0, we have g(x)′ > 0, so that g(x) is strictly increasing. Derivatives
46 Derivatives of Other
Functions
▶ Note that g ′′ (x) = −1/x 2 , which is less than 0 for all x > 0, so
Functions with more
that g(x) is concave. How to obtain the derivative of 1/x? variables

Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Derivatives of Logarithmic Functions
Properties

Quantitative Methods

Douglas Turatti

Course Description

Introduction

Review of
▶ The natural logarithm function g(x) = ln(x), Differentiation

1. Strictly increasing Rules for


differentiation

Higher-Order
2. Concave Derivatives

47 Derivatives of Other
3. g ′ (x) = 1/x Functions

Functions with more


variables
4. g ′′ (x) = −1/x 2
Introduction to
Optimization
5. ln(x) → −∞ as x → 0, ln(x) → ∞ as x → inf.

Aalborg University Business


School
72 Denmark
Derivatives of Logarithmic Functions
Rates of Growth

Quantitative Methods

Douglas Turatti

Course Description
▶ Log functions and derivatives can be understood as rates of
Introduction
growths.
Review of
Differentiation
▶ Let the variable P(t) be a function of time. P(t) can be an asset Rules for
differentiation
price, or an index for example. The derivative of the natural
Higher-Order
logarithm is (applying chain rule), Derivatives
48 Derivatives of Other
d 1 dP(t) Ṗ(t) Functions
ln P(t) = = (50)
dt P(t) dt P(t) Functions with more
variables

Introduction to
is the relative rate of growth of P(t). Optimization

▶ This explains why many financial models are defined in terms of


logarithms. The derivative of the logarithm is the rate of growth of
the variable (in percentage).

Aalborg University Business


School
72 Denmark
Derivatives of Logarithmic Functions
Approximating the rate of growth

Quantitative Methods

Douglas Turatti

Course Description

Introduction

▶ As the derivative of the logarithm function is the the rate of Review of


Differentiation
growth, it offers an estimator for returns when using financial Rules for
data. differentiation

Higher-Order
Derivatives
▶ However, on empirical data is not possible to obtain the 49 Derivatives of Other
derivative operator if we do not specify a full model (i.e. a Functions

function) for the (log)prices. Functions with more


variables

Introduction to
▶ However, we can approximate the rate of growth by using Optimization

log-returns.

Aalborg University Business


School
72 Denmark
Functions with more variables
Quantitative Methods

Douglas Turatti

Course Description
▶ Many important models depend on several variables.
Introduction

▶ For example, the Fama-French asset pricing model specifies the Review of
Differentiation
expected returns as a function of 3 market factors. Rules for
differentiation

▶ Hence, we will expand the analysis of two-variable functions to Higher-Order


Derivatives
the n-case. Derivatives of Other
Functions

▶ The set of independent variables is collected into a vector, an 50 Functions with more
variables
n-vector,
Introduction to
x = (x1 , x2 , . . . , xn ) (51) Optimization

▶ The scalar-value function will transform this vector in R n to an


unique scalar value f (x) ∈ R 1 . Note that there are infinite vectors
x.

Aalborg University Business


School
72 Denmark
Functions with more variables
Quantitative Methods

Douglas Turatti

Course Description
Definition Introduction
Given any set D of n-vectors, a function f of n variables Review of
x1 , . . . , xn with domain D is a rule that assigns a specified Differentiation

Rules for
number f (x) = f (x1 , ..., xn ) to each n-vector x = (x1 , . . . , xn ) in differentiation

D. The usual representation is f : Rn → R1 Higher-Order


Derivatives
▶ The simplest case is in the style of the APT model. A linear Derivatives of Other
Functions
multivariate function such as,
51 Functions with more
variables
f (x1 , . . . , xn ) = a1 x1 + a2 x2 + · · · + an xn + b (52) Introduction to
Optimization

where ai and b are constants.

▶ Formally, if b ̸= 0 we call this function affine, and linear if b = 0.


However, both terms are used exchangeably.

Aalborg University Business


School
72 Denmark
Functions with more variables
Examples

Quantitative Methods

Douglas Turatti

▶ In statistics, several different measures for their average value Course Description
are used: Introduction

Review of
▶ The arithmetic mean: Differentiation

Rules for
1 differentiation
x̄A = (x1 + x2 + · · · + xn ) (53) Higher-Order
N Derivatives

▶ The geometric mean: Derivatives of Other


Functions


N
52 Functions with more
x̄G = x1 .x2 . . . . .xN (54) variables

Introduction to
Optimization
▶ The harmonic mean:
1
x̄H =   (55)
1 1 1 1
n x1
+ x2
+ ··· + xn

Aalborg University Business


School
72 Denmark
Functions with more variables
Partial Derivatives

Quantitative Methods

Douglas Turatti

Course Description

Definition Introduction

If z = f (x) = f (x1 , x2 , . . . , xn ), then ∂f /∂xi , for i = 1, 2, . . . , n, Review of


Differentiation
means the partial derivative of f (x1 , x2 , ..., xn ) w.r.t. xi when all Rules for
the other variables xj (j ̸= i) are held constant. differentiation

Higher-Order
▶ Other notation: Derivatives

Derivatives of Other
Functions
∂f ∂z
= = ∂z/∂xi = zi′ = fi′ (x1 , . . . , xn ) (56) 53 Functions with more
∂xi ∂xi variables

Introduction to
▶ Find the partial derivatives of Optimization

f (x1 , x2 , x3 ) = 5x12 + x1 x23 − x22 x32 + x33 :

∂f /∂x1 = 10x1 +x23 ∂f /∂x2 = 3x1 x22 −2x2 x32 ∂f /∂x3 = −2x22 x3 +3x22

Aalborg University Business


School
72 Denmark
Functions with more variables
Partial Derivatives: Formal definition

Quantitative Methods

Douglas Turatti

Course Description
Definition Introduction
The partial derivative ∂f /∂xi is approximately equal to the per Review of
Differentiation
unit change in f (x1 , x2 , . . . , xn ) caused by an increase in xi ,
Rules for
while holding constant all the other xj(j ̸= i). This derivative is differentiation

formally defined as, Higher-Order


Derivatives

Derivatives of Other
f (x1 , . . . , xi + h, . . . , xn ) − f (x1 , . . . , xi , . . . , xn ) Functions
∂f /∂xi = lim
h→0 h 54 Functions with more
variables
(57)
Introduction to
Optimization
▶ We may also have second-order partial derivatives,

∂2f
 
∂ ∂f
= (58)
∂xj ∂xi ∂xj ∂xi

Aalborg University Business


School
72 Denmark
Functions with more variables
Partial Derivatives: Hessian Matrix

Quantitative Methods
▶ Note that in a n-variables function we potentially have n2 Douglas Turatti
second-order partial derivatives. A function with 2 variables may
Course Description
have 4 second-order partial derivatives.
Introduction

▶ It is customary to arrange these second-order partial derivatives Review of


Differentiation
in a matrix, called the Hessian matrix. Rules for
differentiation

Definition Higher-Order
Derivatives
Suppose f : Rn → R1 is a function taking as input a vector x ∈ Rn and Derivatives of Other
outputting a scalar f (x) ∈ R1 . If all second partial derivatives of f exist Functions

and are continuous over the domain of the function, then the Hessian 55 Functions with more
variables
matrix H of f is a square n × n matrix, usually arranged as follows:
Introduction to
 2 Optimization
∂2f ∂2f

∂ f
2 ∂x ∂x
. . . ∂x ∂x
 ∂x21 1 2 1 n
∂2f ∂2f 

 ∂ f . . .
 ∂x2 ∂x1 ∂x2 2 ∂x ∂xn
2
H=  . . .
 (59)
 .. .. . .. .. 

 
∂2f ∂2f ∂2f
∂xn ∂x ∂xn ∂x
... ∂x 2
1 2 n Aalborg University Business
School
72 Denmark
Functions with more variables
Partial Derivatives: Hessian Matrix

Quantitative Methods

Douglas Turatti

Course Description
▶ Hessian matrices are very important in multivariate optimization
Introduction
and econometrics.
Review of
Differentiation
▶ In multivariate optimization we use the hessian to determine if a Rules for
differentiation
candidate stationary point is a maximum or minimum
Higher-Order
(second-order derivative test). Derivatives

Derivatives of Other
▶ Find the hessian matrix of f (x1 , x2 , x3 ) = 5x12 + x1 x23 − x22 x32 + x33 Functions
56 Functions with more
variables
3x22
 
10 0
Introduction to
H = 3x22 6x1 x2 − 2x22 −4x2 x3  (60) Optimization

0 −4x2 x3 −2x22 + 6x3

▶ It is interesting to note that the hessian matrix is a symmetric


matrix

Aalborg University Business


School
72 Denmark
Functions with more variables
Partial Derivatives: Young’s Theorem

Quantitative Methods

Douglas Turatti

Course Description

▶ Young’s Theorem : If f (x1 , . . . , xi , . . . , xn ), then the two Introduction

Review of
second-order cross-partial derivatives ∂f /∂xi ∂xj and ∂f /∂xj ∂xi Differentiation
usually equal,     Rules for
∂ ∂f ∂ ∂f differentiation
= (61) Higher-Order
∂xj ∂xi ∂xi ∂xj Derivatives

Derivatives of Other
Theorem Functions
57
Suppose that all the mth-order partial derivatives of the Functions with more
variables
function f (x1 , x2 , . . . , xn ) are continuous. If any two of them Introduction to
Optimization
involve differentiating w.r.t. each of the variables the same
number of times, then they are necessarily equal.
Proof can be found in advanced books.

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Quantitative Methods

Douglas Turatti

Course Description

Introduction
▶ Mathematical optimization is the selection of a best
Review of
element (with regard to some criterion) from some set of Differentiation

available alternatives. Rules for


differentiation

Higher-Order
▶ In the simplest case, an optimization problem consists of Derivatives

Derivatives of Other
maximizing or minimizing a real function by choosing x Functions

from within an allowed domain and computing the value of Functions with more
variables
the function. 58 Introduction to
Optimization
▶ Optimization is one of the most important mathematical
techniques for finance.

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Example in Finance

Quantitative Methods

▶ Optimization problems are very common in Finance. For example: Douglas Turatti

Course Description
▶ Suppose two risky assets, A and B. Asset A has expected log-returns
Introduction
E(Ra ), and variance σA2 . Asset B has expected log-returns E(RB ), and
Review of
variance σB2 . The correlation between assets is ρAB . Differentiation

Rules for
▶ Suppose you want to form a portfolio with both assets. Let wa be the differentiation

weight on asset A, and (1 − wa ) the weight on asset B. The mean of the Higher-Order
Derivatives
portfolio is then
Derivatives of Other
Functions
E[P] = wa E(Ra ) + (1 − wa )E(RB ) (62)
Functions with more
It is easy to show that the variance of this portfolio is variables
59 Introduction to
σP2 = wa2 σA2 + (1 − wa )2 σB2 + 2wa (1 − wa )σA σB ρAB (63) Optimization

where 0 ≤ wa ≤ 1.

▶ Note this is a quadratic equation and σ 2 = F (wa ).


P

▶ If you want to find the portfolio with the lowest risk, you have to minimize
(63) to find the optimal wa . Aalborg University Business
School
72 Denmark
Introduction to Optimization
Introduction : Notation and Terminology

Quantitative Methods

Douglas Turatti

▶ Those points in the domain of a function where it reaches its Course Description

largest and its smallest values are usually referred to as Introduction

maximum and minimum points. They are also usually referred as Review of
Differentiation
extreme points.
Rules for
differentiation
Definition Higher-Order
Derivatives
c ∈ D is a maximum point for f if f (x) ≤ f (c) for all x ∈ D.
Derivatives of Other
d ∈ D is a minimum point for f if f (x) ≥ f (d) for all x ∈ D. Functions

Functions with more


▶ We call f (c) the maximum value and f (d) the minimum value. variables
60 Introduction to
Optimization
▶ If the value of f at c(d) is strictly larger (smaller) than at any other
point in D, then c(d) is the global maximum (minimum) point.

▶ We also use the terms optimal points and values, or extreme


points and values.

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Introduction : Notation and Terminology

Quantitative Methods

Douglas Turatti
▶ We use the following notation,
Course Description

Introduction
minx∈R f (x) (64)
Review of
Differentiation
This mean the minimum value of f () when x is in the real Rules for
differentiation
numbers set.
Higher-Order
Derivatives
▶ Consider the following notation, Derivatives of Other
Functions

Functions with more


arg minx∈R f (x) (65) variables
61 Introduction to
Optimization
This means the argument x which minimizes the function
f (x).

▶ f (x) is usually referred as objective function or output.

▶ x as referred as argument or arg max(min), or also input.


Aalborg University Business
School
72 Denmark
Introduction to Optimization
Introduction

Quantitative Methods

Douglas Turatti

▶ Consider f (x) = 3 − (x 2 ) Course Description

Introduction
▶ Solution: Because x 2 ≥ 0 for all x, it follows that f (x) ≤ 3 for all Review of
x. But f (x) = 3 when x 2 = 0 at x = 0. Therefore, x = 0 is a Differentiation

Rules for
maximum point for f . Because f (x) → −∞ as x → −∞, the differentiation
function f has no minimum. Higher-Order
Derivatives

▶ It is not usually easy to obtain extreme points. In fact, for most Derivatives of Other
Functions
functions of interest in applied work, it can be a challenging task. Functions with more
variables

▶ Here, we aim to present a technique to find extreme points for 62 Introduction to


Optimization
common functions.

▶ The technique does not work for all cases. Be aware that for
most functions it is not possible to find the extreme point without
resorting to numerical approximations.

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Necessary Condition

Quantitative Methods

▶ Necessary Condition: Douglas Turatti

Course Description
▶ If f is a differentiable function that has a maximum or minimum at Introduction
an interior point c of its domain, then the tangent line to its graph Review of
Differentiation
must be horizontal (parallel to the x-axis) at that point. Why?
Rules for
differentiation
▶ If f ′ (x) > 0, the function is increasing, if f ′ (x) < 0 decreasing. Higher-Order
Hence, a maximum/minimum can only happen when f ′ (x) = 0. Derivatives

Derivatives of Other
Functions
▶ Points c at which f ′ (c) = 0 are called stationary (or critical)
Functions with more
points for f (). variables
63 Introduction to
Optimization
Theorem
Suppose that a function f is differentiable in an interval I and
that c is an interior point of I. For x = c to be a maximum or
minimum point for f in I , a necessary condition is that it is a
stationary point for f i.e. that x = c satisfies the equation
f ′ (x) = 0. This is called the first-order condition. Aalborg University Business
School
72 Denmark
Introduction to Optimization
Necessary Condition

Quantitative Methods

Douglas Turatti

▶ The previous theorem states that f ′ (x) = 0 is a necessary Course Description

condition for a differentiable function f to have a maximum or Introduction

minimum at an interior point x in its domain. It is not a sufficient Review of


Differentiation
condition. What it means not being sufficient?
Rules for
differentiation
▶ Necessary vs sufficient conditions: A necessary condition is Higher-Order
Derivatives
one which must be present in order for another condition to
Derivatives of Other
occur, while a sufficient condition is one which produces the said Functions
condition. Functions with more
variables

▶ This means that f ′ (c) = 0 does not guarantee that the c is an 64 Introduction to
Optimization
extreme pont. Points not extreme can also have f ′ (x) = 0.
However, all (interior) points have f ′ (x) = 0.

▶ Inflection point: a point with f ′ (x) = 0, which is not a


maximum/minimum.
Aalborg University Business
School
72 Denmark
Introduction to Optimization
Necessary Condition

Quantitative Methods

Douglas Turatti

Course Description

Introduction

Review of
Differentiation

Rules for
differentiation

Higher-Order
Derivatives

Derivatives of Other
Functions

Functions with more


variables
65 Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Necessary Condition

Quantitative Methods

Douglas Turatti

▶ Figure 2 shows the graph of a function f defined in an interval Course Description


[a, b] having two stationary points, c and d. At c, there is a Introduction
maximum; at d, there is a minimum. Review of
Differentiation

▶ In Fig 3, the function has no stationary points. There is a Rules for


differentiation
maximum at the end point b and a minimum at d. At d, the Higher-Order
Derivatives
function is not differentiable. At b, the derivative (the left-hand
Derivatives of Other
derivative) is not 0. Functions

Functions with more


▶ In Fig 4, the function has three stationary points x0 , x1 , x2 . x0 is a variables

local maximum, x1 is a local minimum, and x2 is neither a local 66 Introduction to


Optimization
maximum nor a local minimum. It is an inflection point.

▶ Note that x0 and x1 are only local maximum and minimum points.
They are not the global maximum of the function in its full
domain, but only in neighbouring point.
Aalborg University Business
School
72 Denmark
Introduction to Optimization
Necessary Condition : Local Maximum

Quantitative Methods
▶ A stationary point can only happen when f ′ (c) = 0, this is a Douglas Turatti
necessary condition.
Course Description

Introduction
▶ Suppose f ′ (x) ≥ 0 for all x in I such that x ≤ c, whereas
Review of
f ′ (x) ≤ 0 for all x in I such that x ≥ c. Then f (x) is increasing to Differentiation

the left of c and decreasing to the right of c. Rules for


differentiation

▶ The point c can then be a local maximum, or a maximum in the Higher-Order


Derivatives
(restricted) domain x ∈ I. Derivatives of Other
Functions

▶ In general, we cannot guarantee that this local maximum is also Functions with more
variables
a global maximum. 67 Introduction to
Optimization

▶ Note that if f ′ (x) ≥ 0 for x ≤ c and x ≥ c. Then, c cannot be a


local maximum. On the other hand, it can be an inflection point if
f ′ (c) = 0.
Theorem
If f ′ (x) ≥ 0 for x ≤ c and f ′ (x) ≤ 0 for x ≥ c, then x = c is a local
Aalborg University Business
maximum point for f . School
72 Denmark
Introduction to Optimization
Necessary Condition: Local Minimum

Quantitative Methods

Douglas Turatti
▶ Now, suppose f ′ (x) ≤ 0 for all x in I such that x ≤ c,whereas
Course Description
f ′ (x) ≥ 0 for all x in I such that x ≥ c. Then f (x) is decreasing to Introduction
the left of c and increasing to the right of c. Review of
Differentiation

▶ The point c is then a local minimum, or a minimum in the Rules for


differentiation
(restricted) domain x ∈ I. Higher-Order
Derivatives
▶ In general, we cannot guarantee that this local minimum is also a Derivatives of Other
Functions
global minimum.
Functions with more
variables

▶ Note that if f (x) ≤ 0 for x ≤ c and x ≥ c. Then, c cannot be a 68 Introduction to
Optimization
local minimum. On the other hand, it can be an inflection point if
f ′ (c) = 0.
Theorem
If f ′ (x) ≤ 0 for x ≤ c and f ′ (x) ≥ 0 for x ≥ c, then x = c is a local
minimum point for f .
Aalborg University Business
School
72 Denmark
Introduction to Optimization
Necessary Condition : Convex and Concave functions

Quantitative Methods

Douglas Turatti

▶ Recall that if f ′′ (x) < 0 for all x ∈ I, the function is concave in Course Description

I. Introduction

Review of
▶ This implies that f ′ (x) is decreasing for all x ∈ I. Suppose a Differentiation

Rules for
stationary point c. differentiation

Higher-Order
▶ If f ′ (c) = 0 at an interior point c of I , then f ′ (x) ≥ 0 to the left of Derivatives

c, while f ′ (x) ≤ 0 to the right of c. c is a local maximum Derivatives of Other


Functions

Functions with more


▶ Now, if f ′′ (x) > 0 for all x ∈ I, the function is convex in I. variables
69 Introduction to
Optimization
▶ This implies that f ′ (x) is increasing for all x ∈ I. Suppose a
stationary point c.

▶ If f ′ (c) = 0 at an interior point c of I , then f ′ (x) ≤ 0 to the left of


c, while f ′ (x) ≥ 0 to the right of c. c is a local minimum.

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Necessary Condition : Convex and Concave functions

Quantitative Methods

Douglas Turatti

Course Description

Introduction

Review of
Differentiation

Rules for
Remark differentiation
′′
if f (x) < 0 for all x ∈ I. The function is then concave in I, and Higher-Order
Derivatives
a stationary point c in I must be a local maximum. Derivatives of Other
Functions
′′
if f (x) > 0 for all x ∈ I. The function is then convex in I, and a Functions with more
variables
stationary point c in I must be a local minimum.
70 Introduction to
Optimization

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Example : Portfolio

Quantitative Methods

Douglas Turatti

Course Description
▶ Suppose a portfolio with two risky assets A and B. E(Ra ) is 10%,
Introduction
and E(RB ) = 7%. The risk of asset A is σA2 = 16%, and the risk
Review of
of asset B is σB2 = 4%. The assets have a negative correlation Differentiation

ρAB = −0.2. Rules for


differentiation

▶ Find the wA and wB which yields the lowest risk. Higher-Order


Derivatives

Derivatives of Other
▶ Solution: From slide (2) apply the risk of portfolio formula Functions

Functions with more

σP2 = wa2 .16 + (1 − wa )2 .4 + 2.wa .(1 − wa ).4.2(−0.2)


variables
(66)
71 Introduction to
Optimization
simplify this equation to obtain,
116 2 56
σP2 = wa − wa + 4 (67)
5 5

Aalborg University Business


School
72 Denmark
Introduction to Optimization
Example : Portfolio

Quantitative Methods

▶ The necessary condition for a minimum is f ′ (wa ) = 0, Douglas Turatti

Course Description

232 56 Introduction
wa − =0 (68)
5 5 Review of
Differentiation

Rules for
Now, we can find the proportion on asset A which yields differentiation

the lowest risk portfolio Higher-Order


Derivatives

wa∗ = 56/232 = 0.241 wB∗ = 1 − wa∗ = 0.759


Derivatives of Other
(69) Functions

Functions with more


▶ To check if this is a minimum, we should check if the variables

72 Introduction to
function f (wa ) is convex. So we find f ′′ (wa ): Optimization

232
f ′′ (wa ) = >0 (70)
5
▶ The function is convex, so wa∗ is indeed the minimum
variance portfolio (MVP). Aalborg University Business
School
72 Denmark

You might also like