Risk Methodologies Examination
Risk Methodologies Examination
■ Answer what is asked for in each point, including any assumptions used. If you don't know a definition for
questions 4 and 5, make it up, define it, and use it according to its definition.
In this case the limit is designated by f (a) and is called the derivative of f in a. We also say that f is differentiable
0
Question 2 Intuitively (not formally), what does the second derivative of a function represent? As an informal
review, we say that a function f is convex on an interval, if for all a and b of this interval, the rectilinear segment
that joins (a, f (a)) with (b, f (b )) is above the graph of f (∪-shaped graph); The function f is concave if said
rectilinear segment is below the graph of f (∩-shaped graph). Thus, if f > 0 it means that f is increasing, and by
00 0
theorems of elementary calculus, f is convex. Otherwise, if f < 0, f is decreasing and therefore f is concave.
00 0
This is what the second derivative of a function f represents. An important use of the second derivative in locating
maxima and minima is the following theorem, which we state formally.
Suppose f (a) = 0. If f (a) > 0, then f has a local minimum at a; if f (a) < 0, then f has a local maximum at a.
0 00 00
Question 3 What is a likelihood function and what is its use in parameter estimation? Prior to the answer, the
reader is put in context for a better understanding of the definition that will be given shortly.
An F-statistical model is a set of distributions (or densities or regression functions). A parametric model is a set F
that can be parameterized by a finite number of parameters. For example, if we assume that the data come from
a nor distribution wrong, then the model is
This is a two-parameter model. We have written the density as f (x; µ, σ) to show that x is a value of the random
variable, while µ and σ are parameters. In general, a parametric model takes the form
F = {f(x; θ) : θ ∈ Θ}
where θ is an unknown parameter (or vector of parameters) that can take values in the parameter space Θ.
Essentially, the maximum likelihood principle assumes that the sample is representative of the population and
chooses as the estimator the value of the parameter that maximizes the probability density function (hereinafter
pdf) f(x; θ ). Below we give the definition of the likelihood function.
Let (X 1 , . . . , X n ) a random vector with pdf f (x 1 , . . . , x n ; θ), θ ∈ Θ. The function
L(θ; x 1 , . . . , x n ) = f(x 1 , . . . , x n ; θ)
1
considered as a function of θ, it is called the likelihood function.
If X , . . . , X are independent and identically distributed (hereinafter iid) with pdf f (x; θ), the likelihood function is
1 n
On the other hand, let Θ ⊆ R and X = (X , . . . , X ). The likelihood function is used to, from it, find an estimator
k
1 n
Θ(X) that maximizes it, that is, find a function Θ ˆ : R → R that satisfies
n k
Constants are not supported as estimators. If a θ that satisfies (1) exists, we call it maximum likelihood estimator
(hereinafter MLE).
Question 4 You have a credit portfolio, the portfolio is composed only of 3 credits at a certain reference date f 1
and you know that all the credits have a maturity less than or equal to one year either; This portfolio is monitored
during the 12 months following the reference date and the following distribution of defaults is observed:
With the above information, obtain the best possible estimate of the probability that a loan will default in the next
year.
As mentioned in problem 3, the maximum likelihood principle assumes that the sample is representative of the
population and chooses as the estimator the value of the parameter that maximizes af (x; θ). It is assumed that
the monthly payments of each credit are independent.
Consider the random variable X ij = 0 if loan i defaults in month j (i = 1, . . . , 3, j = 1, . . . , 12) or X j = 1 if loan i is
i
due in month j; Let p denote the probability of fulfilling or paying. Then, we write the likelihood function according
to the sample of payoffs that the problem provides (X = (X 11 . . . , X 3 12 )).
2
3 12
L(p,X) = YY p x ij
(1 - p) 1-x ij
i=1 j=1
= p (1 - p) p (1 - p) p (1 - p)
12 0 11 1 10 2
= p (1 - p) .33 3
Therefore
d
(log(L(p,X)))= 33 - 3
dp p1-p (2)
So
d
d
(log(L(p, X))) = dp
↔ 0
33 3
p 1p
↔
p= 0
1p
↔
33
p=
3
d
2
33 3
(log(L(p, X))) dp
p 2
(1 - p) 2
= - / 33 3N
p 2
(1 - p) 2
Question 5 It is known that the probability that a loan with a maturity of 6 months falls pla in the next 6 months is p
1 (0 < p 1 < 1), what is the probability that this loan will default in the next year?
Question 5 It is known that the probability of a loan maturing in 6 months defaulting in the next 6 months is p (0 <
p < 1). What is the probability that this loan will default in the next year?
I suppose it has to do with issues of probability of default; It has not been possible for me to model it as such.
3
[x 1 , . . . , x n ] [y , . . . , and ]
1 m
where m and n are different positive integers, both vectors are ordered so that x ≤ x 2 ≤ . . . ≤ x n yy 1 ≤ y 2 ≤ . . . ≤
1
and m . Create a pseudocode to join both vectors into a single vector w that contains both vectors ordered in
ascending order, that is, w = [w 1 , w 2 , . . . , w m+n ] such that w i is an element of x or i is an element of y.
Furthermore, the vector w must satisfy that w ≤ w ≤ . . . w . Hint: Uses the fact that both vectors are ordered.
1 2 m+n
otherwise
The values that were possibly left over are added to w given that the two vectors, x and y, are of different lengths.
Since the x and y vectors were already sorted, these remaining values no longer need to be sorted.