Lecture 1 Slides
Lecture 1 Slides
Lecture 1 Slides
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
Quantitative Methods
Douglas Turatti
▶ This is a project module, which means that the grade 2 Course Description
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
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
Quantitative Methods
Douglas Turatti
4 Course Description
Introduction
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.
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
Quantitative Methods
Douglas Turatti
6 Course Description
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
Quantitative Methods
Douglas Turatti
7 Course Description
Review of
successfully following several mandatory and elective Differentiation
Higher-Order
▶ Several mathematical and econometric tools, which are Derivatives
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.
Quantitative Methods
Douglas Turatti
8 Course Description
Introduction
Review of
Differentiation
Rules for
▶ Differences between Quantitative methods in Finance vs differentiation
Derivatives of Other
▶ Expect a math/econometrics course with some Functions
Introduction to
Optimization
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
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
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
Introduction to
is today’s price". Optimization
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
Higher-Order
▶ The mathematical concept of rate of change is the Derivatives
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%.
Quantitative Methods
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
Introduction to
Optimization
Quantitative Methods
▶ Under the Black-Scholes model, there are four partial derivatives Douglas Turatti
▶ 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
▶ Rho : ρ = ∂V
∂r
: measures sensitivity to the interest rate (risk-free
rate).
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.
Quantitative Methods
Introduction
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
Quantitative Methods
▶ Let’s assume P = (a, f (a)), the point Q can be defined as,
Douglas Turatti
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
Higher-Order
Derivatives
Derivatives of Other
Functions
Introduction to
Optimization
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
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
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
Introduction
f ′ (1/2) and f ′ (−1). 22 Review of
Differentiation
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
Introduction to
Optimization
Quantitative Methods
▶ Consider the previously defined CAPM model, Douglas Turatti
Introduction
If we assume Rf is fixed we can rewritte the CAPM as, 24 Review of
Differentiation
Derivatives of Other
▶ Calculate f ′ () at any point of the domain: Functions
Compute f (a+h)−fh
(a)
= βi .
′
Compute f (a) = βi as it is a constant.
Quantitative Methods
Douglas Turatti
Course Description
Introduction
25 Review of
Differentiation
▶ We often denote the derivative simply by y ′ . Rules for
differentiation
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
Quantitative Methods
Douglas Turatti
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.
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 (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
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
▶ However, the firms relative growth rates f ′ (t)/f (t) and g ′ (t)/g(t)
will be equal.
Quantitative Methods
▶ The power rule is simple, but still one of the most used rules for
Douglas Turatti
differentiation.
Course Description
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
▶ Note that the derivative function is of one power lower than the
original function.
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
Introduction to
d d d Optimization
f (x) ± g(x) = f (x) ± g(x) (26)
dx dx dx
Quantitative Methods
▶ Let the polynomial, Douglas Turatti
combining the power rule and the sum rule we can easily find the Review of
Differentiation
derivative, 33 Rules for
differentiation
Derivatives of Other
F (x) = f (x) + g(x) + · · · + a0 (28) Functions
Introduction to
Optimization
▶ Using the sum rule and then the power rule,
Quantitative Methods
▶ If both f () and g() are differentiable at the point x, then so is
Douglas Turatti
F () = f ().g().
Course Description
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
Quantitative Methods
Douglas Turatti
▶ The rule for quotients can easily be obtained from the rule for
Course Description
products.
Introduction
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
Derivatives of Other
▶ If we know du/dx and dy /du, then the derivative dy /dx can be Functions
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
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
Quantitative Methods
Douglas Turatti
Course Description
Introduction
▶ f ′′ (x) usually denotes the second derivative of the function f (). Review of
Differentiation
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
Quantitative Methods
▶ The first derivative allows us to determine whether a function is
Douglas Turatti
increasing or decreasing on an interval I.
Course Description
Review of
on I. Differentiation
Rules for
▶ The second derivative f ′′ (x) is the derivative of f ′ (x): differentiation
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
Introduction to
Optimization
Quantitative Methods
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
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.
Quantitative Methods
Douglas Turatti
Course Description
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
Derivatives of Other
d ny Functions
y (n) = f (n) (x) or (41)
dx n Functions with more
variables
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
property that its derivative is equal to the function itself. Functions with more
variables
▶ Combining the above derivative with the chain rule allows some
complicated functions to be differentiated,
Douglas Turatti
Course Description
Introduction
Review of
▶ We can summarize the properties of exponential functions (on Differentiation
Introduction to
4. ex → 0 as x → − inf, ex → ∞ as x → inf. Optimization
▶ The natural logarithmic function is the inverse of the natural Course Description
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
Douglas Turatti
Course Description
Introduction
Review of
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
Quantitative Methods
Douglas Turatti
Course Description
Introduction
Review of
▶ The natural logarithm function g(x) = ln(x), Differentiation
Higher-Order
2. Concave Derivatives
47 Derivatives of Other
3. g ′ (x) = 1/x Functions
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
Quantitative Methods
Douglas Turatti
Course Description
Introduction
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
Introduction to
▶ However, we can approximate the rate of growth by using Optimization
log-returns.
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
▶ 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
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
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
√
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
Quantitative Methods
Douglas Turatti
Course Description
Definition Introduction
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 = 10x1 +x23 ∂f /∂x2 = 3x1 x22 −2x2 x32 ∂f /∂x3 = −2x22 x3 +3x22
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
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
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
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
Quantitative Methods
Douglas Turatti
Course Description
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.
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
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.
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.
▶ 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
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
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
Quantitative Methods
Douglas Turatti
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
▶ 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.
Quantitative Methods
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
▶ 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.
Quantitative Methods
Douglas Turatti
Course Description
Introduction
Review of
Differentiation
Rules for
differentiation
Higher-Order
Derivatives
Derivatives of Other
Functions
Quantitative Methods
Douglas Turatti
▶ 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
▶ In general, we cannot guarantee that this local maximum is also Functions with more
variables
a global maximum. 67 Introduction to
Optimization
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
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
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
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
Derivatives of Other
▶ Solution: From slide (2) apply the risk of portfolio formula Functions
Quantitative Methods
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
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