Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of Financial Data Spring 2012 Lecture: Introduction Priyantha Wijayatunga Department of Statistics, Umeå University

Similar presentations


Presentation on theme: "Analysis of Financial Data Spring 2012 Lecture: Introduction Priyantha Wijayatunga Department of Statistics, Umeå University"— Presentation transcript:

1 Analysis of Financial Data Spring 2012 Lecture: Introduction Priyantha Wijayatunga Department of Statistics, Umeå University Priyantha.wijayatunga@stat.umu.se Course homepage: http://www8.stat.umu.se/kursweb/vt012/staa2st017mom2/ http://www8.stat.umu.se/kursweb/vt012/staa2st017mom2/

2 Time variation of price of a stock Daily opening price of a certain stock (07.09.04–08.02.04) Also one should concern about if he/she needs long-term or short term change depending his/her on the investment is concerned Where can the price go: up, down or no change? How much it can change? This is some probability for happening each of these events

3 Graphing the data A time plot like above can tell much information about future long term change (see the increasing behaviour of the stock price) One can make a histogram: but for this data it does not say much!!

4 Probability / Statistical Models A probability model may give probabilities for stock price going up or down by certain amounts A statistical model may give expected future price (like in regression models) All these models use past behaviour of the price (its variation) Applying wrong models (those do not capture, for example, time variation pattern, etc.) will give you wrong predictions!! Any assumptions that we may use in our models should be close to the reality. Otherwise unrealistic conclusions! Our data are a realized sample from (a) certian probability distribution(s) on which we are going to build our models

5 Measures of Location Mean Median Mode Statistics Price N Valid102 Missing0 Mean11,2277 Median10,6550 Mode9,13

6 6 Sample of size n for a variable x is x 1,x 2,..., x n Data: 23,18,21,24,20,18,20,20,19,20; Sample size=n=10, x 1 is 23, x 2 ís 8,.. Order them: 18,18,19,20,20,20,20,21,23,24 mean=(18+18+19+20+20+20+20+21+23+24)/10= 20.3 median=5.5 th observarion= (20+20)/2=20 mode=20 Measures of Location

7 Measures of Dispersion Minimum, maximum and range Sample variance and sample standard deviation Inter–quartile range Statistics Price NValid102 Missing0 Std. Error of Mean,17278 Std. Deviation1,74502 Variance3,045 Range6,08 Minimum8,41 Maximum14,49

8 Measures of Distribution/Position Quartiles : IQR – interquartile range Percentiles Statistics Price NValid102 Missing0 Percentiles259,7350 5010,6550 7512,6750 Statistics Price N Valid102 Missing0 Percentiles 109,1510 209,5160 309,8370 4010,1680 5010,6550 6012,0100 7012,5130 8012,8040 9013,9510

9 Measures of dispersion (spread or variability) Measures of position Ex: data={0,4,4,5,7,10}  mean is 5

10 1.Positive and zero when all the data are equal 2.Larger value means greater variability about the mean 3.Using (n-1) instead of n for sample size of n is technical –to get an unbaised estimate for the population standard deviation and for desired distributional properties 4.If the data are rescaled then standard deviation will also be rescaled 5.Observations: Sample Standard Deviation

11 Measures of Shape Skewness – degree of asymmetry symmetry means skewness =0, Positive skewness (skewed to right) means relatively longer right tail compared to left) Negative skewness (skewed to left): relatively longer left tail compared to right) Tail region: from extreme to the Mean± 2*StandardDeviation Statistics Price NValid102 Missing0 Skewness,301 Std. Error of Skewness,239 Kurtosis-1,253 Std. Error of Kurtosis,474

12 Measures of Shape Sample (excess) kurtosis –Usually compared with the normal distribution. –High = ”Fat tails”. More extreme observations. –Low = ”Thin tails”. Less extreme obserations. Statistics Price NValid102 Missing0 Skewness,301 Std. Error of Skewness,239 Kurtosis-1,253 Std. Error of Kurtosis,474

13 Random Variable, Probability All the above measures were defined for a sample of values of a random variable A random variable: a quantify that takes some values according to some chance/probability Telia’s closing stock price today: what are the most probable values? What are less probable? What are improbable? If some values are probable, then to what degree? The above histogram showed how frequent certain values are: frequency distribution -> relative frequncy distribution (empirical distribution) from the sample However there can be a general pattern of it – a probability distribution ( for the population ) All the measures we discussed so far have their general counterparts – general measures on probability distribution

14 Probability distribution Telia’s stock price: Let X=1 if it goes up today (from yesterday) and X=0 otherwies. X is a discrete random variable taking either 0 or 1 What are the most general possibilities for X to take these two values. Let probability that X taking the value 1, written as P[X=1]=0.6, then P[X=0]=1-P[X=1]=0.4 Probability distribution of X. X has a random walk model. X has a Bernoulli probability distribution: X~Ber(0.6) General Bernoulli distribution with P[X=1]=p is witten as Y ~ Ber(p), where 0 < p < 1 However we may want to now, what the stock price would be today not just if it goes up or down from yesterday

15 Probability density Stock price, X: in principle it can take any non-negative value X is a continuous random variable taking values from 0 to infinity. But assume, taking values from 0 to some big number, say, 40 !! What are the most general possibilities for X to take these values? Probability that X taking any value from 0 to 40 is 1. A random variable taking its values from some interval of numbers is called a continuous random variable If the probability density function of X is written as f(x) where f(x) ≥0 for all possible x, then X taking any value from 12 to 14 is the area under the curve from 12 to 14. Area under the curve from 0 to 40 is 1

16 Normal Probability Density Let stock price on a given day, X, be normally distributed with mean 12 and variance 4 witten as X~N(12,4) What is the probability that tomorrow’s stock price is in between 12.5 and 15.5? Normal distribution is symmetric about its mean, skewness=0

17 Standard Normal Prob Density Standard normally distribution has with mean 0 and variance 1 witten as Z~N(0,1) When X ~N(m,s 2 ) then Z=(X-m)/s is N(0,1) It is used to calculeted probabilties of any normal random variable Standard normal distribution is symmetric about 0, skewness=0

18 Source: http://www.stat.wisc.edu/~larget/normal-table.pdf Standard Normal Probabilities

19 19 Symmetric, bell–shaped and mean=0 Standard deviation is bit larger than 1, thicker tails than N(0,1) When n is large ( >30) t–distribution will become N(0,1) Source: http://en.wikipedia.org/wiki/T_distributionhttp://en.wikipedia.org/wiki/T_distribution Student’s t distribution

20 20 Student’s t Probabilities Source: http://rvgs.k12.va.us/statman/Table-B.jpg

21 Chi–squared Probability Density Sometimes we need to use a skewed distribution Use chi–squared distribution with degrees of freedom 12 (mean=12, variance=2x12=24) Notice the present probability change from earlier case Chi–squared distrubution is much skewed when degrees of freedom are low. When degrees of freedom become large it is closer to the normal distrbution

22 Cumulative Distribution Function Probability that X taking a value less than a given value Ex: let’s assume X, be normally distributed with mean 12 and varaince 4 witten as X~N(12,4) What is the probability that X taking a value less than 14?

23 Quantiles of Prob Dist Let’s assume X, be normally distributed with mean 12 and variance 4 witten as X~N(12,4) First quantile is shown

24 Quantile-Quantile Plot Are our data coming from a standard normal distribution? If they (the points in the graph ) are, they should be closely following the line

25 Sample and Population Even if our sample is coming from a certain population we may not see the our empirical relative frequency distribution (histogram) identical to the general popution distribution: when the size of the sample grows bigger and bigger it will become closer and closer to the population probability distribution. For a random sample of size n, of a random variable X with a common mean µ, then the sample mean approaches to popluation mean when sample size becomes larger (law of large numbers) Further if X has the common variance σ 2 then the sample variance also approaches to the population variance as n grows

26 Sample and Poputaion Central Limit theorem For a random sample of size n, of a random variable X with a common mean µ and common variance σ 2 the sample mean approaches normal distribution with mean µ and variance σ 2 /n as n grows

27 Dependence between two r.v.s There can be a dependence between two random variables. For example, stock price of Telia and bank interest rates may be dependent When the variables are interval we use correlation coefficient to define their dependence Correlation can only measure linear dependence

28 Dependence Between Two R.V.s If you have data on random variables X and Y sample covariance is Sample correlation coefficient is When we have sample size large this approaches to population correlation coefficient

29 Source: http://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/Correlation Correlation Coefficient R 1. It measures only linear dependence 2. R=0, no relationship between X and Y 3.R=1 positive correlation 4.R= –1 negative correlation 5.Larger the absolute value of R better the linear relationship between X and Y 6.Value of R is independent of units of X and Y


Download ppt "Analysis of Financial Data Spring 2012 Lecture: Introduction Priyantha Wijayatunga Department of Statistics, Umeå University"

Similar presentations


Ads by Google