Anteprima
Vedrai una selezione di 3 pagine su 8
Matematica e statistica applicata - Notes Pag. 1 Matematica e statistica applicata - Notes Pag. 2
Anteprima di 3 pagg. su 8.
Scarica il documento per vederlo tutto.
Matematica e statistica applicata - Notes Pag. 6
1 su 8
D/illustrazione/soddisfatti o rimborsati
Disdici quando
vuoi
Acquista con carta
o PayPal
Scarica i documenti
tutte le volte che vuoi
Estratto del documento

Logreturns of SDE are i.i.d.

Lecture 27-3-2017

Likelihood function: we supposed to have a sample of observations (realization of random variables)

from a set of i.i.d. random variables and each has the same probability law. This probability is a

function of two variables. θ is a vector containing all parameters.

The joint probability is function off the vector containing the parameters.

Why do you use density instead of probability? Because in continuous random variables the

probability of X: %

Prob( ≤ ≤ ) = 8 ()

&

In continuous case: &

Prob( = ) = 8 () = 0 ≤≤

&

If we use θ instead of θ it gives more probability to the event you observe in the market. The

1 2

strategy is to maximize the likelihood function with respect to θ . This approach works also if we

1

consider the joint density. If we maximize the joint density, in the continuous case the idea is to

maximize the joint density with respect to theta:

0

max c ( , )

* - .

/ -1.

If we maximize the joint density, you maximize also the probability of the event

= ( ≤ ; … ; ≤ )

. . 0 0

*

* * #

" ! )

Prob() = 8 8 … 8 ( , … , ∙ … ∙

. 0 . 0

+, +, +,

( , , … , , ) ≥ ( , , … , , )

. # 0 . . # 0 #

arg max is the maximizer of the problem maxL (θ).

n

# # #

), (, )

If X~(, then = ∈ , ≥ 0

Log-likelihood function(l): l ()

= arg max =

0

213 ())

= arg max ln (

0

213

L is the likelihood function. #

= (̂ , p )

0 0

Vedere foto

Lecture 28-3-2017

MLE function =”optim” function.

With MLE, you obtain a result “fit”. There are also other methods to obtain the same result of MLE:

• logLik(fit)

• vcov(fit)

• confint(fit) to compute the confidence intervals

à

• summary(fit)

How to implement the MLE in the stochastic process: usually we observe the data on an irregular

grid (= the distance between t and t is different from the distance between t and t ) and we need

1 2 i n

to compute the joint density in a closed form formula. In models like GARCH, you can’t consider the

irregularities of the grid. To compute joint density, we need to know the transition density:

()

= ( = ; = ; … ; = ; )

0 ! ! ! ! ! !

# # #$" #$" % %

is the solution of SDE at , while x is the observation

! 0

#

u ; … ; v = u , … , v ∙ u , … , v

/ ! ! / ! ! ! !

# % #$" % #$" %

sinceu , … , v ∈ ℱ , I can rewrite the joint density of the first step as

! ! !

#$" % #$" u |ℱ v ∙ u , … , v

/ ! ! ! !

# #$" #$" %

= u |ℱ v ∙ u |ℱ v ∙ u , … , v

/ ! ! / ! ! / ! !

# #$" #$" #$! #$! %

We apply the Bayes theorem in the first step: P(A∩B) = P(A|B), P(B).

If the grid is regular, you have independence and each increment is identically distributed, so they

have the same density. If the increments are identically distributed, we have the standard

representation of the maximum likelihood function.

When the transition density is unknown, we apply the Quasi-Likelihood estimation procedure. The

distribution of GMM estimation estimator is normal.

Density of normal with μ and σ: #

(

1 − )

(, , ) = 7−0.5 :

#

#

√2

I need this formula to compute the log-likelihood.

Lecture 3-4-2017

To compute the risk, I need a loss function. First, I have to define the filtered space. Then, I can

compute the probability of each event I know. In general, my position is a portfolio, but it can be

also a single asset. The loss function can be used to define the value of risk.

Confidence represents the probability to have a loss greater or equal to the value of risk.

Expected shortfall is the conditional expected value when you have a loss greater or equal of the

corresponding level of risk. It is the quantile associated to the probability 1-.

When I solve 4&5

F() = 8 () = 1 −

+,

with respect to value at risk (VaR), I get the quantile function.

Brownian motion with drift and scale

:

= ∙ +

! − |ℱ ~

! 6 6

but by Markovian property, #

( (

− | ~( ∙ − ); ∙ − ))

! 6 6

Our aim is to implement this function: 0

logL = ˆ loguΔ v

! &

-1. #

(Δ)= density of a Normal with mean αΔt and variance Δ

#

(

1 1 − Δ)

= ∙ 7− :

#

2 Δ

#

√2 Δ

STfin is lognormal.

Lecture 4-4-2017

Log returns are uncorrelated but in some cases, there may be dependence in square returns. Using

Ljung-Box and Lagrange multiplier tests, we can remove this dependence.

Ljung Box test:

H : p(1)=p(2)=…=p(m)=0

0

Lagrange multiplier test:

H : = =…= =0

0 1 2 m

Euclidean distance you can construct between the time series the Euclidean norm

à • # # #

7 : || || = + +

#

0 0

∈ ∈

|| − || = || − ||

#

|||| = 0 ⟹ = 0

#

|| − || = 0 ⟺ =

#

(, ) = || − || = 0

# )

The Euclidean distance is a dissimilarity measure defined as ( = || − ||

! ! #

* +*

' '$(

Short-Time-Series distance If we consider short time series, the Slope and the STS=

=

à ! 8

||Slope − Slope ||

! ! #

The slope is a local approximation of the asset

l is the estimator of the transition density.

8

Lecture 10-4-2017

Exercise 7 set 3

1.

First, I have to set X =x

0 0

We use Euler discretization scheme when the transition density is unknown and it is important to

use a small .

Δ

!

Given a regularly spaced grid, 0 t t …. t t …. t =T

1 2 i i+1 n

(

The grid is regular if where N is the number of intervals in [0;T].

∀: ∆ = − =

- - -+. 9

We define the Euler discretized process for the Vasicek process as follows:

= + u − v ∙ Δ + u − v Eq.1

! ! ! ! !

& &$" &$" & &$"

=

! '

% )

Using the property of increments of Brownian motion W (i.e. − ~ (0; −

t ! ! - -+.

& &$"

)&*'+&,-'&.#

− = • − ~(0; 1) since ∀i − =1

! ! - -+. - -+.

& &$" )

− = ∙ Eq.2

√Δ

! ! -

& &$"

Using 2 into 1, we have: = + u − v ∙ Δ + ∙ ∙ ∀ ~(0,1) i.i.d. Eq.3

√Δ

! ! ! - -

& &$" &$"

2.

We can choose whether to write the transition density of the process (for the simulation of the

trajectory) of the transition density of the increments (in the construction of the likelihood

function).

Transition density of the process:

We want to establish the transition density of X on our irregularly spaced grid of random variable

given the information at t . satisfies the equation 3.

i-1

! !

& &

by Markovian property, we can consider the distribution of

|ℱ | ~u +

! ! ! ! !

-+.

& & &$" &$"

#

u − v; Δv

! &$"

Transition density of increments:

by Markovian property is equal to

− |ℱ

! ! !

& &$" &$" #

− | ~u + u − v∆ − ; Δ v

! ! ! ! ! !

& &$" &$" &$" &$" &$"

3. u ∈ [ , ]|ℱ v = u ∈ [ , ]| v

! . ! ! . !

&$( & &$"

In order to compute the probability of X belonging to [a,b], we use the cumulative distribution

function. So, we have u ∈ [ , ]| v = u ≤ | v − u < | v =

! . ! ! ! ! . !

& &$" & &$" & &$"

The approximated transition density of from the previous exercise is:

! &$"

# and

| ~u + u − v∆; Δ v ≤

! ! ! ! !

&$" &$" &$" &$" &

where

+ u − v ∙ Δ + ∙ ∙ ≤ ~(0; 1)

√Δ

! ! - -

&$" &$" v

− − u − ∙ Δ

. ! !

&$" &$"

- √Δ

v v

− − u − ∙ Δ − − u − ∙ Δ

! ! . ! !

&$" &$" &$" &$"

u ∈ [ , ]| v = 7 :−7 :

! . ! & √Δ √Δ

where N(x) is the cumulative distribution function of the standard normal

* #

1

() = 8 ∙ exp 7−0.5 ∗ :

1

√2

+,

4.

We write the quasi-Likelihood function. We use the approximated transition density for the

increments .

! & (, , ) = u∆ ; ∆ , … , ∆ v

! ! !

# #$" &

where f is the joint density of the increments on my grid. Using the transition density of the

incremental 0

(, , ) = c u∆ |ℱ v

&::;<* ! !

& &$"

-1. A∆) C∆C

+&A%+)

. . '& '&$"

From point 2, we know u∆ |ℱ v = ∙ 7− :

&::;<* ! ! !

!

& &$" √>?@ # @ 8

8

Then, qL bec

Dettagli
Publisher
A.A. 2019-2020
8 pagine
SSD Scienze matematiche e informatiche MAT/06 Probabilità e statistica matematica

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher Ce.R di informazioni apprese con la frequenza delle lezioni di Matematica e statistica applicata e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Università Cattolica del "Sacro Cuore" o del prof Boieri Paolo.