Академический Документы
Профессиональный Документы
Культура Документы
Eric Zivot
Summer 2015
{. . . , X1 , . . . , XT , . . .} = {Xt }
Recall,
E[Xt ] = µ indep of t
var(Xt ) = σ 2 indep of t
Observed Sample:
{X1 = x1 , . . . , XT = xT } = {xt }T
t=1
Descriptive Statistics:
Hisogram Construction:
1 Order data from smallest to largest values
2 Divide range into N equally spaced bins
[−| − | − | · · · | − | − |−]
Function Description
hist() compute histogram
density() compute smoothed histogram
Percentiles:
For α ∈ [0, 1], the 100 × αth percentile (empirical quantile) of a sample
of data is the data value q̂α such that α · 100% of the data are less than
q̂α .
Quartiles:
Function Description
sort() sort elements of data vector
min() compute minimum value of data vector
max() compute maximum value of data vector
range() compute min and max of a data vector
quantile() compute empirical quantiles
median() compute median
IQR() compute inter-quartile range
summary() compute summary statistics
Let {Rt }T
t=1 denote a sample of T simple monthly returns on an
investment, and let $W0 be the initial value of an investment. For
α ∈ (0, 1), the historical VaRα is:
$W0 × q̂αR
$W0 × (exp(q̂αr ) − 1)
Sample Variance:
T
1 X
(xt − x̄)2 = sx2 = σ̂x2
T − 1 t=1
Sample Skewness:
T
1 X
(xt − x̄)3 /sx3 = skew
[
T − 1 t=1
Sample Kurtosis:
T
1 X
(xt − x̄)4 /sx4 = kurt
d
T − 1 t=1
FX (x) = Pr(X ≤ x)
Moderate Outlier:
Extreme Outlier:
R functions
Scatterplot:
Sample Covariance:
T
1 X
(xt − x̄)(yt − ȳ) = sxy = σ̂xy
T − 1 t=1
Sample Correlation:
sxy
= rxy = ρ̂xy
sx sy
Sample Autocovariance:
T
1
γ̂j = (xt − x̄)(xt−j − x̄) j = 1, 2, . . .
X
T − 1 t=j+1
Sample Autocorrelation:
γ̂j
ρ̂j = , j = 1, 2, . . .
σ̂ 2
Sample Autocorrelation Function (SACF):
faculty.washington.edu/ezivot/