Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
21 views

Chapter 3 - Market Data Analysis

Uploaded by

Vishwajit Goud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Chapter 3 - Market Data Analysis

Uploaded by

Vishwajit Goud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 55

Chapter 3

Market Data Analysis

INTRODUCTION TO
PROBABILITY DISTRIBUTIONS
RANDOM VARIABLE

• A random variable x takes on a defined set of values with


different probabilities.
• For example, if you roll a die, the outcome is random (not fixed) and there are 6
possible outcomes, each of which occur with probability one-sixth.
• For example, if you poll people about their voting preferences, the percentage of
the sample that responds “Yes on Proposition 100” is a also a random variable
(the percentage will be slightly differently every time you poll).

• Roughly, probability is how frequently we expect different


outcomes to occur if we repeat the experiment over and over
(“frequentist” view)
RANDOM VARIABLES CAN BE
DISCRETE OR CONTINUOUS
• Discrete random variables have a countable number of outcomes
• Examples: Dead/alive, treatment/placebo, dice, counts, etc.

• Continuous random variables have an infinite continuum of


possible values.
• Examples: blood pressure, weight, the speed of a car, the real numbers
from 1 to 6.
PROBABILITY FUNCTIONS

• A probability function maps the possible values of


x against their respective probabilities of
occurrence, p(x)
• p(x) is a number from 0 to 1.0.
• The area under a probability function is always 1.
DISCRETE EXAMPLE: ROLL OF A DIE

p(x)  P(x)  1
all x

1/6

x
1 2 3 4 5 6
PROBABILITY MASS FUNCTION (PMF)

x p(x)
1 p(x=1)=1/6
2 p(x=2)=1/6
3 p(x=3)=1/6
4 p(x=4)=1/6
5 p(x=5)=1/6
6 p(x=6)=1/6
1.0
CUMULATIVE DISTRIBUTION FUNCTION (CDF)

1.0 P(x)
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
CUMULATIVE DISTRIBUTION
FUNCTION

x P(x≤A)
1 P(x≤1)=1/6

2 P(x≤2)=2/6

3 P(x≤3)=3/6

4 P(x≤4)=4/6

5 P(x≤5)=5/6

6 P(x≤6)=6/6
PRACTICE PROBLEM:

• The number of patients seen in the ER in any given hour is a random variable
represented by x. The probability distribution for x is:

x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1

Find the probability that in a given hour:


a. exactly 14 patients arrive p(x=14)= 0.1
b. At least 12 patients arrive p(x12)= (0.2 + 0.1 +0.1) = 0.4
c. At most 11 patients arrive p(x≤11)= (0.4 +0.2) = 0.6
REVIEW QUESTION 1

If you toss a die, what’s the probability that you roll a 3 or less?

a. 1/6
b. 1/3
c. 1/2
d. 5/6
e. 1.0
REVIEW QUESTION 2

Two dice are rolled and the sum of the face values is six? What
is the probability that at least one of the dice came up a 3?

a. 1/5
b. 2/3
c. 1/2
d. 5/6
e. 1.0
REVIEW QUESTION 3

Two dice are rolled and the sum of the face values is six. What
is the probability that at least one of the dice came up a 3?

a. 1/5 How can you get a 6 on two dice?


b. 2/3 1-5, 5-1, 2-4, 4-2, 3-3
c. 1/2 One of these five has a 3.
d. 5/6 1/5
e. 1.0
CONTINUOUS CASE

 The probability function that accompanies a continuous random variable is a


continuous mathematical function that integrates to 1.
 For example, recall the negative exponential function (in probability, this is
called an “exponential distribution”):

f ( x)  e  x
 This function integrates to 1:
 

e
x x
 e  0 1 1
0
0
CONTINUOUS CASE: “PROBABILITY DENSITY FUNCTION”
(PDF)

p(x)=e-x

The probability that x is any exact particular value (such as 1.9976) is 0;


we can only assign probabilities to possible ranges of x.
For example, the probability of x falling within 1 to 2:

Clinical example: Survival times


after lung transplant may roughly
follow an exponential function.
p(x)=e-x
Then, the probability that a patient
will die in the second year after
surgery (between years 1 and 2) is 1
23%.

x
1 2

2 2

e
x x
P(1  x  2)   e  e  2  e 1  .135  .368  .23
1
1
EXAMPLE 2: UNIFORM DISTRIBUTION

The uniform distribution: all values are equally likely.


f(x)= 1 , for 1 x 0
p(x)

x
1

We can see it’s a probability distribution because it integrates


to 1 (the area under the curve is 1): 1 1

1  x
0
0
1 0 1
EXAMPLE: UNIFORM DISTRIBUTION

What’s the probability that x is between 0 and ½?

Clinical Research Example: When


p(x) randomizing patients in an RCT, we
often use a random number
1 generator on the computer. These
programs work by randomly
generating a number between 0 and
1 (with equal probability of every
number in between). Then a subject
0 ½ x
1 who gets X<.5 is control and a
subject who gets X>.5 is treatment.

P(½ x 0)= ½


EXPECTED VALUE AND VARIANCE

• All probability distributions are characterized by an expected value (mean) and a variance
(standard deviation squared).

EXPECTED VALUE OF A RANDOM VARIABLE

• Expected value is just the average or mean (µ) of random variable x.

• It’s sometimes called a “weighted average” because more frequent values of X are weighted
more highly in the average.

• It’s also how we expect X to behave on-average over the long run (“frequentist” view again).
EXPECTED VALUE, FORMALLY

Discrete case: E( X )  x
all x
i p(xi )

Continuous case:
E( X )   x p(x )dx
all x
i i

Symbol Interlude
E(X) = µ
these symbols are used interchangeably
EXAMPLE: EXPECTED VALUE

• Recall the following probability distribution of ER


arrivals:
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1

 x p( x)  10(.4)  11(.2)  12(.2)  13(.1)  14(.1)  11.3


i 1
i
SAMPLE MEAN IS A SPECIAL CASE OF EXPECTED
VALUE…

Sample mean, for a sample of n subjects: = Expected value


is very important
concept in
n

x
decision making

i n
1
X i 1
n
 
i 1
xi ( )
n

The probability (frequency) of each person in the


sample is 1/n.
EXAMPLE: THE LOTTERY

• The Lottery
• A certain lottery works by picking 6 numbers from 1 to 49. It
costs $1.00 to play the lottery, and if you win, you win $2
million after taxes.

• If you play the lottery once, what are your expected winnings or
losses?
LOTTERY

Calculate the probability of winning in 1 try:

1 1 1 “49 choose 6”
   7.2 x 10-8
 49  49! 13,983,816
  Out of 49
6 43!6! numbers, this is
the number of
The probability function (note, sums to 1.0): distinct
combinations of 6.
x$ p(x)
-1 0.999999928

+ 2 million 7.2 x 10--8


EXPECTED VALUE

The probability function

x$ p(x)
-1 .999999928

+ 2 million 7.2 x 10--8

Expected Value
E(X) = P(win)*$2,000,000 + P(lose)*-$1.00
= 2.0 x 106 * 7.2 x 10-8+ .999999928 (-1) = .144 - .999999928 = -$0.86
Negative expected value is never good!
You shouldn’t play if you expect to lose money!
EXPECTED VALUE

If you play the lottery every week for 10 years, what are
your expected winnings or losses?

520 x (-0.86) = -$447.20


GAMBLING (OR HOW CASINOS CAN AFFORD TO
GIVE SO MANY FREE DRINKS…)

A roulette wheel has the numbers 1 through 36, as well as 0 and 00. If you bet $1 that an
odd number comes up, you win or lose $1 according to whether or not that event occurs. If
random variable X denotes your net gain, X=1 with probability 18/38 and X= -1 with
probability 20/38.

E(X) = 1(18/38) – 1 (20/38) = -$.053


On average, the casino wins (and the player loses) 5 cents per game.
The casino rakes in even more if the stakes are higher:
E(X) = 10(18/38) – 10 (20/38) = -$.53
If the cost is $10 per game, the casino wins an average of 53 cents per game. If 10,000 games are
played in a night, that’s a cool $5300.
EXPECTED VALUE ISN’T EVERYTHING
THOUGH…

• Take the hit new show “Deal or No Deal”


• Everyone know the rules?
• Let’s say you are down to two cases left. $1 and $400,000. The
banker offers you $200,000.
• So, Deal or No Deal?
DEAL OR NO DEAL…

• This could really be represented as a probability distribution and a non-random variable:

x$ p(x)
+1 .50

+$400,000 .50

x$ p(x)
+$200,000 1.0
EXPECTED VALUE DOESN’T HELP…

x$ p(x)
+1 .50

+$400,000 .50

  E( X )   x p(x )  1(.50)  400,000(.50)  200,000


all x
i i

x$ p(x)
+$200,000 1.0

  E ( X )  200,000
HOW TO DECIDE?

Variance!
• If you take the deal, the variance/standard deviation is 0.
•If you don’t take the deal, what is average deviation from the mean?
•What’s your gut guess?
VARIANCE/STANDARD DEVIATION

2=Var(x) =E(x-)2

“The expected (or average) squared distance (or deviation) from the mean”

  Var ( x)  E[( x   ) ] 
2 2
 (x
all x
i   ) p(xi )
2
VARIANCE, CONTINUOUS

Discrete case:
Var ( X )   (x
all x
i   ) p(xi )
2

 ( xi   ) p(xi )dx
2
Continuous case: Var ( X ) 
all x
SYMBOL INTERLUDE

• Var(X)= 2
• SD(X) = 

• These symbols are used interchangeably


SIMILARITY TO EMPIRICAL VARIANCE

The variance of a sample: s2 =

 ( xi  x ) 2 N
1
i 1
n 1
 
i 1
( xi  x ) ( 2
n 1
)

Division by n-1 reflects the fact that we have lost a “degree


of freedom” (piece of information) because we had to
estimate the sample mean before we could estimate the
sample variance.
VARIANCE

2  
all x
( xi   ) 2 p(xi )

2  
all x
( x i   ) 2 p(xi ) 

 (1  200,000) 2 (.5)  ( 400,000  200,000) 2 (.5)  200,0002


  200,0002  200,000

So in short there is 50% chance that you will win $400000


Now you examine your personal risk tolerance…
PRACTICE PROBLEM

On the roulette wheel, X=1 with probability 18/38 and X= -1 with probability 20/38.

We already calculated the mean to be = -$.053.

What’s the variance of X?


ANSWER

  2
 (x   )
all x
i
2
p(xi )
 (1  (0.053)) 2 (18 / 38)  (1  (0.053)) 2 (20 / 38)
 (1.053) 2 (18 / 38)  (1  .053) 2 (20 / 38)
 (1.053) 2 (18 / 38)  (.947) 2 (20 / 38)
 .997
  .997  0.99
Standard deviation is $.99. Interpretation: On average, you’re either 1 dollar above
or 1 dollar below the mean, which is just under zero. Makes sense!
REVIEW QUESTION 3

The expected value and variance of a coin toss (H=1, T=0) are?

a. .50, .50
b. .50, .25
c. .25, .50
d. .25, .25
REVIEW QUESTION 3

The expected value and variance of a coin toss are?

a. .50, .50
b. .50, .25
c. .25, .50
d. .25, .25
Return and Risk
RATES OF RETURN

• A key measure of investors’ success is the


rate at which their funds have grown
• Holding-period return (HPR) of shares is
composed of capital gain and dividend
• RH = (C)+ (PE-PB) /PB
• This definition assumes end of period returns
and ignores re-investment of income
RATES OF RETURN
• Return Relative It is a different way to
calculate return. This method is used when a
cumulative wealth index or a geometric mean
has to be calculated.

Return Relative (RR)= C+PE/PB


RATES OF RETURN
• Dividend Yield = Percentage return from
dividends i.e. (D/PB)x100
• To calculate Holding Period Return (HPR)
over a period of time, we can use:
• Arithmetic average
• Geometric average
• Dollar weighted return
ARITHMETIC AVERAGE

• It is the sum of periodic return divided by number


of periods
Period 1 10%
Period 2 25%
Period 3 -20%
Sum 15%

• Arithmetic Average = 15/3 = 5%


GEOMETRIC AVERAGE

nth root of the product of returns for n years


Geometric mean = (1+R1)x(1+R2)x(1+R3)1/n –
1
= [(1+10%) x (1+ 25%) x(1+(-20%))] 1/3 – 1
[(1.1) x (1.25) x (.8)] 1/3 – 1
(1.1) 1/3 – 1
1.03-1
.03 or 3%
PROBLEM WITH ARITHMETIC AVERAGE

Suppose the following:

Year Begin Ending HPR


value value
2007 50 100 100%

2008 100 50 -50%

Calculating arithmetic mean gives false value of 25% return =


(100%-50%)/2

And geometric = (1+1)x(1-.5)1/2 - 1


=1-1 = 0%
Geometric Vs Arithmetic

• In highly volatile security prices, arithmetic mean is


biased upward and we should use geometric mean
• If rates of returns are the same for all years,
geometric and arithmetic averages gives same
results
Taking a Global
• When investors buy or sell securities in other
countries, they also take exchange rate risk
or currency risk
• Fluctuation in currency value can be either a
source of loss or profit
• If the foreign currency strengthens, your
returns will increase or vice versa
AN EXAMPLE
Suppose you purchased 100 shares of IBM at NYSE for
$300 each. The dollar-rupee parity was 60 rupees a dollar
at the that time. So your total investment in rupees was
100x$300 = $30000 x 60 =Rs.1800,000
At the end of the year, IBM share price was $310, giving
you $10 profit per share, your profit is = 100 x 10 =
$1000x60 = Rs.60000
But the dollar-rupee parity had jumped to 78 rupee a
dollar, now your total investment is =100x310 = $31000 x
78 = Rs.2418000
And your profit is 2,418,000-180,0000 = Rs.618,000
Or in percentage = 618,000/1800,000 = .343 or 34%
EQUATION FOR CALCULATING
RETURNS FROM FOREGIN STOCKS
= [(P1/Po)x(C1/Co)] – 1
[(310/300)x(78/60)] – 1
[(1.03) x (1.3)] – 1
1.339 – 1
0.339 or 34%
• P1 = Ending share price
• Po = Beginning share price
• C1 = Ending value of domestic currency
• Co = Beginning value of domestic currency
INTEREST RATES AND RETURNS

1. Increase in interest rates increases the required rate of


return (RRR)
RRR= Rf + Risk premium which reduces the
prices of the securities (intrinsic value)

Cashflow
IntrinsicValue  1 RRR
2. It increases cost of borrowing and hence cost of capital
3. It reduces money supply which lower demand for
securities and resultantly prices fall.
Measuring Risk
• The most commonly used measure of risk
for securities is standard deviation
• SD measure the total risk of a security or a
portfolio
• It measure deviations of each observation
from the arithmetic mean

n _
 [R i
-
 i1 R]2
n 1
STANDARD DEVIATION

n _
 [R i -
i1 R]2
n 1

139 139
 
5.89
5 1 4
INTERPRETATION

• The 5.89 SD means that the security return


can fluctuate between +/-5.89 from the mean
value of 16%
• More specifically, the return can fluctuate
between 16 - 5.89 = 10.11 or 16 + 5.89 =
21.89
Your return could fall to as low as
10.11% or could rise to 21.89 %
Realized Returns and risk from
Investing
Class of assets Average SD
S&P 500 Composite 9.21% 19.75%
S&P Industrial 9.66 21.57
S&P Utility 8.47 20.54
Small Cap Stock (S&P 600) 14.82 37.23
AAA 20-year Corp Bond 3.87 10.05
US 15-year Bond 3.25 10.22
T-Bills 1.569 4.65

You might also like