Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH 374

MARCH 2022 CLASS TEST

Statistical Methods in Insurance and Finance

1.   (a) Define strong stationarity and weak stationarity.                      [2 marks]

(b)  Give an example of which the two stationarity properties are equivalent. [1 mark]

(c) Describe the difference between unsupervised and supervised learning. [2 marks]

(d)  Give an example of each type of learning mentioned in part (c). [2 marks] [7 marks]

Solution:  (Based on lecture notes - maps to CS2 2.1.1, 5.1)

(a)  Strong stationarity is a property on the whole distribution of a pro-

cess. It represents the situation that the distribution of the time series is invariant to the time shifts, i.e.  the distribution of a time-series is exactly the same trough time.                                  [1 mark]

{Xt } is weakly stationary if

(i) µX (t) is independent of t,

and

(ii) γX (t + h,t) is independent of t for each h.                           [1 mark]

(b) If the variance of a strongly stationary process exists, then it is also weakly stationary.   In particular, if the process is Gaussian, i.e.   the distribution of Xt   for any t  ∈ T is normal, then the two stationary properties are equivalent to each other.                                      [1 mark]

(c) - In supervised learning, the machine is given a specified output or aim.

- This might be the prediction of a specific numerical value

- (e.g. a future lifetime) or the prediction of which category

- ... an individual will fall into (e.g. default on a loan or not).

- In unsupervised  learning the machine is set the task without a specific target to aim at. For example

- identifying clusters within a set of data without the number or nature of the clusters needing to be pre-specified).     [2 marks]

(d) Linear regression is an example for supervised learning and cluster- ing is an example of unsupervised learning.         [2 marks]


2. A second-order moving average process is defined by the following equation:

Xt  = µ + ϵt + β1 ϵt 1 + β2 ϵt 2

where ϵt  is a white noise process with variance σ 2 .

(a) Determine E (Xt ) and Var(Xt ).                                                [2 marks]

(b) Determine the autocovariance function, γk , of Xt  for k ≥ 0.

(Show all the steps of the calculations.)                                    [3 marks] [5 marks]

Solution:(Based on lecture notes - maps to CS2 2.1, 2.1.5)

(a)

E[Xt]   =   µ + E(ϵt ) + β1 E(ϵt 1 ) + β2 E(ϵt 2 )

=   µ + 0 + β1 * 0 + β2 * 0

=   µ [1 mark]

Var[Xt]   =   Var(ϵt ) + β1(2)Var(ϵt 1 ) + β2(2)Var(ϵt 2 ) =   (1 + β1(2) + β2(2))σ2 [1 mark]

(b)

γ0     =   Var(Xt ) = (1 + β1(2) + β2(2))σ2

γ1     =   Cov(β1 ϵt 1 ,ϵt 1 ) + Cov(β2 ϵt 2 ,β1 ϵt 2 ) [1 mark]

as covariances of all other cross-multiplied terms are 0

γ1     =   (β1 + β1 β2 )σ2

γ2     =   Cov(β2 ϵt 2 ,ϵt 2 ) [1 mark]

as covariances of all other cross-multiplied terms are 0

γ2     =   β2 σ 2

γk     =   0   for   k > 2. [1 mark]


3. Find out which of the following ARMA processes are causal stationary and/or invertible. Which are neither causal stationary nor invertible?

(a) Xt  = 0.3Xt 1 0.4Xt 2 + 1.3et 1 + 0.7et 2 + et ,

(b) Xt  = 1.1Xt 1 − 0.3Xt 2 + 1.2et 1 + et ,

(c) Xt  = 0.7Xt 1 + 0.6Xt 2 − 0.5et 1 + 0.4et 2 + et ,

(d) Xt  = 0.8Xt 1 + 0.3Xt 2 + 0.6et 1 − 0.5et 2 + et ,

where et  are i.i.d. N(0, 1) random variables. [8 marks]

Solution:(Based on tutorial exercise - new - maps to CS2 2.1, 2.1.5)

We have to check whether the AR part is causal stationary (ϕ1 + ϕ2  < 1,ϕ2 − ϕ 1  < 1 and −1 < ϕ2  < 1) and whether the MA part is invertible (ψ1 + ψ2  > −1,ψ1 − ψ2  < 1 and −1 < ψ2  < 1 ).

(a) This process is causal stationary and invertible, because all of the above mentioned conditions are fulfilled.            [2 marks]

(b) This process is causal stationary, because ϕ 1  and ϕ2  satisfy the required conditions.   But it is non-invertible, because the MA(1) part is with coefficient ψ = 1.2. [2 marks]

(c) This process is invertible, because |ψ1 | + |ψ2 | < 1 for the MA(2) part. But it is not causal stationary, because ϕ 1 + ϕ2  > 1 for the AR(2) part. [2 marks]

(d) This process is neither causal stationary, because ϕ 1  + ϕ2   > 1 for the AR(2) part, nor invertible, because ψ 1  − ψ2   > 1 for the MA(2) part. [2 marks]

4. Below R code generates a time series model where X0  = 0.

X = 2*rbinom(100,1,0.7)-1

Y = c(0, cumsum(X))

plot(Y,type=”l”, col=2)

 

 

(a) Define the model generated by the R code. (b)  Show that the model is not stationary.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[3 marks] [4 marks]

[7 marks]

Solution:(Based on lecture notes and R tutorials - different from the exam- ple in the notes - maps to CS2 2.1.6)

(a) The R code generates a non-symmetric Random Walk process taking

values {-1,1} with probabilities p = 0.7 and q = 0.3.                [2 marks]

Y100  = X1 + X2 + ··· + X100 [1 mark]

(b) If {Yt } is the random walk defined above with  {Xt },  then E(Yt )  = 0,E (Yt2 ) = tσ 2  < ∞ for all t, and, for h ≥ 0,            [2 marks]

γY (t + h,t) = Cov (Yt+h,Yt )

= Cov (Yt + Xt+1 + ··· + Xt+h,Yt ) = Cov (Yt ,Yt )

= tσ 2 .

Since γy (t + h,t) depends on t, the series {Yt } is not stationary. [2 marks]

5.   (a) Write the R codes which generate below autocorrelation and partial autocorrelation graphs for the given AR(1) model with ψ = 0.75[4 marks]

 

(b) Write the R codes to simulate the given model (n=400) and produce below autocorrelation and partial autocorrelation plots. [3 marks]

Xt  = 0.9Xt − 1 + 0.6et − 1 + 1.2et −2 + et

 

(c) The plot below shows an empirical autocorrelation function estimated from some time series data.  Based on this plot, would you model the data as coming from a white-noise process? Justify your answer.

  [3 marks] [10 marks]

Solution:(Based on lecture notes and R tutorials - different from the exam- ple in the notes - unseen - maps to CS2 2.1.1, 2.2)

(a) par(mfrow=c(1,2))

barplot(ARMAacf(ma=0 ,ar=c(0.75),lag.max = 24)[-1], main = ”ACF of AR(1)”,col=”pink”)

barplot(ARMAacf(ma=0,ar=0.75,lag.max =24,pacf = TRUE), main = ”PACF of AR(1)”,col=”pink”) [4 marks]

(b) output1=arima.sim(list(order=c(1,0,2),ar=c(0.9),ma=c(0.6,1.2)), n=400) acf2(output1) [3 marks]

(c) This data shows statistically significant autocorrelation at lag 1, which would not be present in white-noise data.  A white-noise model is not appropriate here. [3 marks]

6. The graph displays the components of a time series after fitting an additive model. Answer the questions based on the figure given below.

(a) Describe the general time series model for Xt  considering the additive components presented and discuss if the model fits well. [3 marks]

(b) Write the R codes to produce the components of the time series and the plot below. [3 marks]

  [6 marks]

Solution:(Based on lecture notes and R tutorials - unseen - maps to CS2 2.2)

(a) Xt  = mt + st + ϵt

where

mt : trend component

st : seasonal component

ϵt : zero-mean error

The model seems additive because the additive decomposition fits the time series well. The variance in the seasonality and the error terms are constant after fitting the additive model. [3 marks]

(b) ad=decompose(x, type=”a”)

plot(ad) [3 marks]

7.   (a) Explain why Augmented Dickey-Fuller Test is used in time series anal- ysis. State the hypothesis. [2 marks]

(b) Write the R code for the Augmented Dickey-Fuller Test for time series x. [2 marks]

(c) Interpret the R output for the Augmented Dickey-Fuller Test given be- low.

—————————–

Augmented Dickey-Fuller Test

data: x

Dickey-Fuller = -1.4678, Lag order = 12, p-value = 0.8013

—————– [3 marks] [7 marks]

Solution:(Based on lecture notes and R tutorials - maps to CS2 2.2)

(a) The Augmented Dickey-Fuller Test is used to test the stationarity of the time series.

The null hypothesis: time series is non stationary

The alternative hypothesis: time series is stationary [2 marks]

(b) adf.test(x, alternative=”stationary”, k=12) [2 marks]

(c) The output indicates that the time series is stationary since the p-value is quite big. [3 marks]