Professional Documents
Culture Documents
Lecture Notes - Google Dokument
Lecture Notes - Google Dokument
Q
● uiz data: Athena, different for each group, available just before the quiz starts.
● Quiz code: available just before the quiz starts.
● Note! Students can only go to their registered group to do the quizzes. Otherwise the
results are not counted! Please register a group in Athena and Moodle (choose the
same group!)
Exam:
● Multiply choice
● Some calculations
● Not heavy
P
● re-read and Read (textbooks, lecture notes, lecture slides)
● Review basic statistics and elementary matrix algebra
Go to the lectures
●
● Attend all the computer labs
● Preview and review the video tutorials for computer labs
● Practice the mock quizzes
● Discuss with your peer students
● Ask questions
______
Functions
- We’ll build a function and describe the relationship!
● A function is a mapping or relationship between an input or set of inputs and an
output
● We write that y, the output, is a function f(x), the input, or y =f(x)
● y could be a linear function of x where the relationship can be expressed on a straight
line
● Or it could be non-linear where it would be expressed graphically as a curve
● If the equation islinear, we would write the relationshipas
𝑦 = 𝑎 + 𝑏𝑥
Ex.
Ex.
ifferential Calculus
D
VI MÅSTE EJ DERIVERA I DENNA KURS! Detta är bara good to know info.
● T he effect of the rate of change of one variable on the rate of change of another is
measured by a mathematical derivative
● If the relationship between the two variables can be represented by a curve, the
gradient of the curve will be this rate of change
● Consider a variable y that is a function f of another variable x, i.e. y = f(x): the
derivative of y with respect to x is written
Integration
● This term measures the instantaneous rate of change of y with respect to x, or in other
words, the impact of an infinitesimally small change in x
● Notice the difference between the notations ∆y and dy
Probability
- Kan ej va negativ eller mindre 1
Random variables
● A variable whose value at least in part is determined by the outcome of a chance
experiment is called a random variable. Random variables are usually denoted by the
capital letters X, Y, Z and so on, the values taken by them are denoted bysmall
letters x, y, z
● A random variable may be either discrete or continuous.
○ A discrete RV takes on only a finite number of values.
■ e.g., in throwing dice, if the random variable X is the numbers showing
on the dice, then X can take 1, 2, 3, 4, 5, 6. Hence, it is a discrete
random variable.
○ A continuous RV can take on any value in some interval of values.
■ ex height and weight
x stock price for a stock, we can predict some of tomorrows stock price. So
E
we assume todays price + something.
= nr showing on dice
X
P to show 1 = ⅙
VIKTIG!
ue
m
sigma = standard deviation
he normal distribution
T
X follows N
Expected value
● The expected value of a random variable X, denoted by E(X) has the following
properties:
hen collecting data we’ll have a lot of information, then we’ll look easier at expected value
W
and variance.
Covariance
Matrices - Background
● Some useful terminology:
○ Ascalaris simply asingle number(although it neednot be a whole number –
e.g. 3, −5, 0.5 are all scalars)
○ Avectoris aone-dimensional array of numbers
○ Amatrixis atwo-dimensional collection or arrayof numbers. The size of a
matrix is given by its numbers of rows and columns.
■ good to organize and derive formulas
● Matrices are very useful and important ways for organising sets of data together,
which make manipulating and transforming them easy
● Matrices are widely used in econometrics and finance for solving systems of linear
equations, for deriving key results, and for expressing formula.
Vector and Matrix
● A matrix is a rectangular array of numbers with elements arranged in rows and
columns.
● M: rows x columns
● m: refers to the elements in the rows and column ex. m11 = 1
Matrix Multiplication
● Multiplying or dividing a matrix by a scalar (that is, a single number), implies that
every element of the matrix is multiplied by that number
● M
ore generally, for two matrices A and B of the same order and for c a scalar, the
following results hold
BA is not the same: and therefore it does not hold →AB ̸= BA
he Transpose of a Matrix
T
Swisching the rows with columns
The Inverse of a Matrix
T
● he inverse of a matrix exists only when the matrix issquareandnon-singular.
● U seMINVERSEfunction in excel
-->
Regression analysis
- Ordinary Least Squareis used to do regression analysis!
egression analysis is used to describes and evaluates the relationship between a given
R
variable (the dependent variable, y) and one or more other variables (the independent
variable(s), x)
Some notations:
● Denote the dependent variable by y and the independent variables (s) by x1, x2, … , xk
where there are k independent variables
● Some alternative names for the y and x variables:
● N
ote that there can be many x variables but we will limit ourselves to the case where
there is only one x variable to start with
● Cross sectional denote:yi,xi
○ y = ex. individual firms, countries etc
● Time series:yt, xt
● Pentalty: ...
Simple regression
● For simplicity, say k=1. This is the situation where y depends on only one x variable.
Example:
- y depends on only one x here
uppose that we have the following data on the excess returns on a fund XXX and the excess
S
returns on a market index:
y = fund
x = market portfolio/index
● W
e have some intuition that the beta on this fund is ? (postive or negative) want to
find whether there is a relationship between y and x given the data.
○ when the exc on market (x) is high the exc on fund (y) is high vice versa.
● The first stage would be to form a scatter plot of the two variables.
Plot in a scatter diagram
We use the vertical line in order to the wish to minimize the error.
Actual and Fitted Value
- s o we want to find the alpha and beta that minimize the differenc between the actual
pint and the line.
- we can see that its more risky than on the market
NOW WE’LL SEE WHY THE OLS IS POPULAR AND HOW IT CAN BE USED:
The Population and the Sample
opulation
P
Thepopulationis the total collection of all objectsor people to be
studied, for example:
ample
S
Asampleis a selection of just some items from thepopulation.
● Ideal sample: is arandom sampleis a sample in whicheach individual item in the
population is equally likely to be drawn.
Estimator or Estimate?
● Estimatorsare the formula used to calculate the coefficients,
○ e.g., the αˆ and βˆ of the OLS
■ with now ^ above = population parameters
● Estimatesare the actual numerical values for thecoefficients, will be a set of numbers
ampling
S
In order to find the population parameters we start with finding the sampling:
T
● he manner in which these estimates are distributed is the sampling distribution of βˆ
● The properties of sampling distribution can be used to characterize and evaluate the
estimator
● Look at the Unbiasedness, Efficiency and Asympototic properties of an estimator
Unbiasedness
- First property
T
● he property does not mean that βˆ = β
● If we could undertake repeated sampling an infinite number of times, we would get
the correct estimate on average.
- 5) we test if OLS generates unbiased estimators for a and B and hat a and hat B
Efficiency
Asymptotic Properties
● Justify an estimator on the basis of its asymptotic properties of sampling distribution
in extremely large samples
○ If the asymptotic distribution of βˆ becomes concentrated on a particular value
β as the sample size approaches infinity, β is said to be the probability limit of
βˆ and is written plim(βˆ) = β. βˆ is said to beconsistentif
- if we can increase the nr of observations the parameter will converge to the two
parameter or population.
ould like to know how good are these estimates. We need some measure of the reliability or
W
precision of the estimators (αˆ and βˆ). The precision of the estimate is given by its standard
error. Given assumptions 1 - 4 above, then the standard errors can be shown to be given by,
ould like to know how good are these estimates. We need somemeasure of the reliability or
W
precision of the estimators (ˆαandˆβ). Theprecision of the estimate is given by its standard
error. Givenassumptions 1 - 4 above, then the standard errors can be shown tobe given by,
here are twon common ways to conduct a hypothesis test: thetest of significance approach,
T
or via the confidence intervalapproach.
A simple demonstration
● Consider a large pool filled with red and yellow balls. We areinterested in the
fractionpof red balls in this pool. Now we take arandom sample ofNballs (do not look
at all other balls) withreplacement.
● Denote y1 = 1 if ball i is red and yi= 0 if it isyellow
P = (yi = 1) = P
● N
ow: estimate P from the sample
Assume that our sample contains N1= Σiyi red and N−N1 yellow balls, the probability
of obtaining such a sample is given by,
= 100
N
N1 = 60 → red
N-N1 = Yellow
● F
or computational purposes it is often more convenient tomaximize the (natural)
logarithm,
● Maximize LnL(p) w.r.t. p, and solve the first order condition, weget:
● T
he ML estimator thus corresponds with the sample proportionof red balls, and
probability also corresponds with your bestguess for p based on the sample that was
drawn.
he intuition of MLE
T
The maximum likelihood principle is as follows.
1. Determine/assume the distribution of the data (e.g.,yi),
2. From the assumed data, we determine the likelihood ofobserving the sample as a
function of the unknown parametersthat characterize the distribution
3. Estimate the values for the unknown parameters that gives usthe highest likelihood.
- N = nr of observations
Inference with ML
ptional: What if the assumptions in CLRM areviolated? Other possible problems in
O
regressionanalysis?
BEHÖVER EJ KUNNA
● Heteroskedasticity
● Serial (Auto) correlation
● Other softwares
● See Athena- Resources-Other supplementary materials(optional)
● Multilinearility
● Discrete, ordinal independant variable
● Discrete dependant variable
On whiteboard
Method Models rror term Estimator
E No. of obs
distribution
OLS min ∑u^2t linear models ut ~ N(0,σ2) BLUE o requirement, small or
N
big
OLS
- W e’re estimating the linear regression
- Minimize the residual sum of square
MLE
- more flexible and powerful, we can estimate both linear and non linear models
(2-0)/1 = 2
est st = 1,8
T
1,8 < 1,96 so we fail to reject
P-value ≈ 4,5%
Beta 2 is positive, meaning that any increase in xt will result in an increase in yt.
_ __
There is a positive relationship between liquidity and trading activity:
liquidityi = a + 0,8 Trading activity +...+ ut
Lecture 7 - Test of The Capital Asset Pricing Model
CAPM
Dickey-fuller test
● To check if a time series contains a unit root or not, or if yt is stationary or not
● Null hypothesis says that psi=0
○ if its 0 = random walk model and contain unit root.
● U
nconditional single period CAPM model: the expected return ofan asset must be
linearly related to the covariance of its returnwith the return of the market
portfolio.
○ The investors are risk averson, meaning if someone wants to invest in
stocks instead of in the bank the investor will have a higher risk and
higher expected return.
● I n order to test the models empirically we normally assume IID returns and joint
multivate normality.
● There are different approaches focus on different aspects of an assetpricing
model.
est 2:
T
Examine if the assets’ loadings on the factors can explain the variations in expected
returns across assets
● Use the cross-sectional regressions approach (CSR), i.e. aregression on data for
different firms, which can be repeated fordifferent time periods.
est 3:
T
Test if the factorrisk premiumsare significantlydifferent from zero.
● Depending on how we model the factor risk premium, can beanalyzed by both
the CSR and the TSR approaches
= the premium
ald test
W
Wald test on the intercepts of
here Rt denotes the vector of excess returns on riskyassets, and Rmt is the excess return on
w
the market portfolio.
ssuming thet there are N risky assets, Rt is an (Nx 1) vector, a and B are (N x 1) vectors of
A
parameters, and εt is an (N x 1) vector of residuals,susch that:
If all alpha hare jointly zero the CAPM model is suitable!
In order to have the Sharpe-Lintner CAPM then all elements of the vector alpha are zero.
=Variance covariance
As long as one alpha is not significant diff from zero, then we can reject the null hypothesis.
Wald test statistics:
~ N(0,1)
X
= X2 +...+X21 00 then this will follow “Chisquare distribution”X2 ~ N(0,100)
ärav när vi räknar ut Critical value och P-value använder vi oss av CHIINV (Tc) och
D
CHIDIST (P-value).
Black’s Zero-Beta version of CAPM implies that the expectedreturn vector is
● w here γ is the return of the zero-beta portfolio with the market(treated as an
unobserved quantity)
● ι is an(N×1)vector of ones
We reject means that we reject the blacks verson of the CAPM model.
AR(p) model:
AR(1) model:
MA(q) model:
MA(1) model:
ARMA (1,1)