Random Walks, Efficient Markets & Stock Prices

70
Random Walks, Efficient Markets & Stock Prices Luigi Cenatti Gianni NEO Empresarial

description

The famous financial theory of Efficient Markets is associated with the idea of a Random Walk. If the theory holds true, that makes prices unpredictable, and therefore it'd be impossible to consistently beat the market. The seminar discusses the mathematical idea of a random walk, then moves on to understand what makes a market efficient. Finally, we conduct a Monte Carlo Simulation on Wolfram Mathematica, to forecast the behaviour of Google's stock price one year from now.

Transcript of Random Walks, Efficient Markets & Stock Prices

Page 1: Random Walks, Efficient Markets & Stock Prices

Random Walks,

Efficient Markets &

Stock Prices

Luigi Cenatti Gianni NEO Empresarial

Page 2: Random Walks, Efficient Markets & Stock Prices

Why is it so hard to BEAT THE MARKET?

Page 3: Random Walks, Efficient Markets & Stock Prices

What should be the STRATEGY

of a SMALL INVESTOR?

Page 4: Random Walks, Efficient Markets & Stock Prices

How to forecast

the RISK and RETURN of an asset?

Page 5: Random Walks, Efficient Markets & Stock Prices

Table of Contents

Random Walks

Efficient Market Hypothesis

Playing with Wolfram Mathematica

ยป

ยป

ยป

Page 6: Random Walks, Efficient Markets & Stock Prices

Table of Contents

Random Walks

Efficient Market Hypothesis

Playing with Wolfram Mathematica

ยป

Page 7: Random Walks, Efficient Markets & Stock Prices

What makes a process random?

1. Sequence of random variables

2. independent from each other

3. and determined by a distribution

outcome

time

f(t)

Page 8: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

Flip a coin 10 times

If heads, +1

If tails, -1

Page 9: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

- 2

t

F(t)

Is this a random process?

Page 10: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

Whatโ€™s the expected outcome?

- 2

t

F(t)

Page 11: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

Whatโ€™s the expected outcome?

We have a feeling that, if we play it

many times, in most of them we will

end up with 0

Page 12: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

Whatโ€™s the expected outcome?

We have a feeling that, if we play it

many times, in most of them we will

end up with 0

And weโ€™re right

Page 13: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

But what if the distribution looks like this?

Page 14: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

What is the expected outcome?

But what if the distribution looks like this?

Page 15: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

If we know the distribution, we can

simulate the process

Page 16: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

If we know the distribution, we can

simulate the process

Page 17: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

If we know the distribution, we can

simulate the process

Page 18: Random Walks, Efficient Markets & Stock Prices

Heads or tails?

This is commonly referred to as a

Monte Carlo Simulation

Page 19: Random Walks, Efficient Markets & Stock Prices

Table of Contents

Random Walks

Efficient Market Hypothesis

Playing with Wolfram Mathematica

ยป

Page 20: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

Prices reflect all relevant information

Page 21: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

Prices reflect all relevant information

If information is immediately reflected on

stock prices, tomorrowโ€™s price change will

reflect only tomorrowโ€™s news

Page 22: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

Prices reflect all relevant information

Tomorrowโ€™s price change is independent

of the price changes today

If information is immediately reflected on

stock prices, tomorrowโ€™s price change will

reflect only tomorrowโ€™s news

Page 23: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

The Efficient Market hypothesis is

associated with the idea of a โ€œrandom

walkโ€

Page 24: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

The Efficient Market hypothesis is

associated with the idea of a โ€œrandom

walkโ€

Therefore, itโ€™s impossible to consistently

beat the market

Page 25: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

Private investment funds canโ€™t beat the

market

Source: Varga, G., รndice de Sharpe e outros indicadores de performance aplicados a fundos de aรงรตes brasileiros

Page 26: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

Private investment funds canโ€™t beat the

market

Source: Varga, G., รndice de Sharpe e outros indicadores de performance aplicados a fundos de aรงรตes brasileiros

Page 27: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

BOVA11 beat 60% of active funds and

100% of passive funds, prior to 2009

According to Bloomberg:

Page 28: Random Walks, Efficient Markets & Stock Prices

Efficient Markets

BOVA11 beat 60% of active funds and

100% of passive funds, prior to 2009

With lower volatility (risk) than 78% of

active funds and 100% of passive

According to Bloomberg:

Page 29: Random Walks, Efficient Markets & Stock Prices

Non-Efficient Markets?

Behavioral Finances: imperfections in financial

markets due to overconfidence, overreaction, and

other biases

Page 30: Random Walks, Efficient Markets & Stock Prices

Non-Efficient Markets?

Behavioral Finances: imperfections in financial

markets due to overconfidence, overreaction, and

other biases

Economic Bubbles

Page 31: Random Walks, Efficient Markets & Stock Prices

Non-Efficient Markets?

Behavioral Finances: imperfections in financial

markets due to overconfidence, overreaction, and

other biases

Economic Bubbles

Markets are efficient for small investors

Page 32: Random Walks, Efficient Markets & Stock Prices

Table of Contents

Random Walks

Efficient Market Hypothesis

Playing with Wolfram Mathematica

ยป

Page 33: Random Walks, Efficient Markets & Stock Prices

Problem

Today is January 1st, 2011. We want to

figure out the price of GOOG in one year

$ 593.97

Page 34: Random Walks, Efficient Markets & Stock Prices

Assumptions

1. Markets are efficient, so daily returns

are random variables, independent from

each other

2. Daily returns follow a determined

probability distribution

Page 35: Random Walks, Efficient Markets & Stock Prices

Framework

1. Fit a distribution to past returns

Page 36: Random Walks, Efficient Markets & Stock Prices

Framework

1. Fit a distribution to past returns

2. Simulate n random walks

Page 37: Random Walks, Efficient Markets & Stock Prices

Framework

1. Fit a distribution to past returns

2. Simulate n random walks

3. Price of stock will be mean of

outcomes

Page 38: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

๐†๐Ž๐Ž๐†๐‘๐ž๐ญ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”

= ๐…๐ข๐ง๐š๐ง๐œ๐ข๐š๐ฅ๐ƒ๐š๐ญ๐š["๐†๐Ž๐Ž๐†", "๐‘๐ž๐ญ๐ฎ๐ซ๐ง", ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”, ๐Ÿ, ๐Ÿ , ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ, ๐Ÿ, ๐Ÿ , "๐•๐š๐ฅ๐ฎ๐ž" ;

{0.0229993, 0.0134759, 0.0319564, 0.00266289, 0.00612551, 0.00398076, -0.0169624, 0.00565106, 0.0018445, -0.0475263, -0.0190151, -0.084752, 0.0701948, 0.0363275, -0.0226396, ...

Page 39: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

๐†๐Ž๐Ž๐†๐‘๐ž๐ญ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”

= ๐…๐ข๐ง๐š๐ง๐œ๐ข๐š๐ฅ๐ƒ๐š๐ญ๐š["๐†๐Ž๐Ž๐†", "๐‘๐ž๐ญ๐ฎ๐ซ๐ง", ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”, ๐Ÿ, ๐Ÿ , ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ, ๐Ÿ, ๐Ÿ , "๐•๐š๐ฅ๐ฎ๐ž" ;

{0.0229993, 0.0134759, 0.0319564, 0.00266289, 0.00612551, 0.00398076, -0.0169624, 0.00565106, 0.0018445, -0.0475263, -0.0190151, -0.084752, 0.0701948, 0.0363275, -0.0226396, ...

NormalDistribution[0.0005029, 0.0227045

๐†๐Ž๐Ž๐†๐ƒ๐ข๐ฌ๐ญ

= ๐„๐ฌ๐ญ๐ข๐ฆ๐š๐ญ๐ž๐๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐†๐Ž๐Ž๐†๐‘๐ž๐ญ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”, ๐๐จ๐ซ๐ฆ๐š๐ฅ๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐, ๐ˆ

Page 40: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

Is the normal distribution a good fit?

Page 41: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

Is the normal distribution a good fit?

๐“— = DistributionFitTest[GOOGRet2006, GOOGDist, "HypothesisTestData"]

Page 42: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

Problem of โ€œfat tailsโ€

Page 43: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

The stable distribution allows us to solve

this problem, because of two additional

parameters (alpha & beta)

Page 44: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

๐†๐Ž๐Ž๐†๐’๐ญ๐›๐ƒ๐ข๐ฌ๐ญ

= ๐„๐ฌ๐ญ๐ข๐ฆ๐š๐ญ๐ž๐๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐†๐Ž๐Ž๐†๐‘๐ž๐ญ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”, ๐’๐ญ๐š๐›๐ฅ๐ž๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐Ÿ, ๐›‚, ๐›ƒ, ๐›, ๐›”

StableDistribution[1, 1.5313, โˆ’0.0097, 0.0004, 0.0110

Page 45: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

๐†๐Ž๐Ž๐†๐’๐ญ๐›๐ƒ๐ข๐ฌ๐ญ

= ๐„๐ฌ๐ญ๐ข๐ฆ๐š๐ญ๐ž๐๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐†๐Ž๐Ž๐†๐‘๐ž๐ญ๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”, ๐’๐ญ๐š๐›๐ฅ๐ž๐ƒ๐ข๐ฌ๐ญ๐ซ๐ข๐›๐ฎ๐ญ๐ข๐จ๐ง[๐Ÿ, ๐›‚, ๐›ƒ, ๐›, ๐›”

StableDistribution[1, 1.5313, โˆ’0.0097, 0.0004, 0.0110

๐“— = DistributionFitTest[GOOGRet2006, GOOGStbDist, "HypothesisTestData"]

Page 46: Random Walks, Efficient Markets & Stock Prices

Fitting data to a distribution

The stable distribution is a better fit.

Page 47: Random Walks, Efficient Markets & Stock Prices

Simulating future prices

๐ฌ๐ข๐ฆ๐‘๐ž๐ญ๐ฌ = ๐‘๐š๐ง๐๐จ๐ฆ๐•๐š๐ซ๐ข๐š๐ญ๐ž[๐†๐Ž๐Ž๐†๐’๐ญ๐›๐ƒ๐ข๐ฌ๐ญ, ๐Ÿ๐Ÿ“๐ŸŽ ;

๐ฅ๐š๐ฌ๐ญ๐๐ซ๐ข๐œ๐ž = ๐†๐Ž๐Ž๐†๐๐ซ๐ข๐œ๐ž๐Ÿ๐ŸŽ๐ŸŽ๐Ÿ”โŸฆโˆ’๐Ÿ ;

Page 48: Random Walks, Efficient Markets & Stock Prices

Simulating future prices

๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ ๐‘Ž๐‘ก ๐‘‘๐‘Ž๐‘ฆ 1 = ๐‘™๐‘Ž๐‘ ๐‘ก๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ โˆ— ๐‘’๐‘Ÿ๐‘ก1

๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ ๐‘Ž๐‘ก ๐‘‘๐‘Ž๐‘ฆ 2 = ๐‘™๐‘Ž๐‘ ๐‘ก๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ โˆ— ๐‘’(๐‘Ÿ๐‘ก1+๐‘Ÿ๐‘ก2)

Page 49: Random Walks, Efficient Markets & Stock Prices

Simulating future prices

๐‹๐ข๐ฌ๐ญ๐‹๐ข๐ง๐ž๐๐ฅ๐จ๐ญ[๐ฅ๐š๐ฌ๐ญ๐๐ซ๐ข๐œ๐ž โˆ— ๐„๐ฑ๐ฉ[๐€๐œ๐œ๐ฎ๐ฆ๐ฎ๐ฅ๐š๐ญ๐ž[๐ฌ๐ข๐ฆ๐‘๐ž๐ญ๐ฌ

๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ ๐‘Ž๐‘ก ๐‘‘๐‘Ž๐‘ฆ 1 = ๐‘™๐‘Ž๐‘ ๐‘ก๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ โˆ— ๐‘’๐‘Ÿ๐‘ก1

๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ ๐‘Ž๐‘ก ๐‘‘๐‘Ž๐‘ฆ 2 = ๐‘™๐‘Ž๐‘ ๐‘ก๐‘ƒ๐‘Ÿ๐‘–๐‘๐‘’ โˆ— ๐‘’(๐‘Ÿ๐‘ก1+๐‘Ÿ๐‘ก2)

Page 50: Random Walks, Efficient Markets & Stock Prices

Simulating future prices

๐ฆ๐ž๐š๐ง๐†๐Ž๐Ž๐†๐๐ซ๐ข๐œ๐ž = ๐Œ๐ž๐š๐ง[ ๐Œ๐ž๐š๐ง[ ๐๐ซ๐ž๐ฉ๐ž๐ง๐[

๐ฅ๐š๐ฌ๐ญ๐๐ซ๐ข๐œ๐ž โˆ— ๐„๐ฑ๐ฉ[๐€๐œ๐œ๐ฎ๐ฆ๐ฎ๐ฅ๐š๐ญ๐ž[๐‘๐š๐ง๐๐จ๐ฆ๐•๐š๐ซ๐ข๐š๐ญ๐ž[๐†๐Ž๐Ž๐†๐’๐ญ๐›๐ƒ๐ข๐ฌ๐ญ, ๐Ÿ๐Ÿ“๐ŸŽ, ๐Ÿ“๐ŸŽ

, ๐‚๐จ๐ง๐ฌ๐ญ๐š๐ง๐ญ๐€๐ซ๐ซ๐š๐ฒ[๐ฅ๐š๐ฌ๐ญ๐๐ซ๐ข๐œ๐ž, ๐Ÿ“๐ŸŽ ] ] ]

Page 51: Random Walks, Efficient Markets & Stock Prices

Simulating future prices

The price of GOOG will be the mean of

the means of each random walk

Page 52: Random Walks, Efficient Markets & Stock Prices

How close were we?

GOOG traded at $ 645.90 on

December 30, 2011

Page 53: Random Walks, Efficient Markets & Stock Prices

An idea of risk & return

www.wolframalpha.com

Page 54: Random Walks, Efficient Markets & Stock Prices

An idea of risk & return

Page 55: Random Walks, Efficient Markets & Stock Prices
Page 56: Random Walks, Efficient Markets & Stock Prices
Page 57: Random Walks, Efficient Markets & Stock Prices
Page 58: Random Walks, Efficient Markets & Stock Prices
Page 59: Random Walks, Efficient Markets & Stock Prices

An idea of risk & return

GOOG traded at $ 727.44 on

September 20, 2012

Page 60: Random Walks, Efficient Markets & Stock Prices

An idea of risk & return

GOOG traded at $ 727.44 on

September 20, 2012

In one year, thereโ€™s a 95% chance its

price is going to be between $ 454.11

and $ 1294.98

Page 61: Random Walks, Efficient Markets & Stock Prices

An idea of risk & return

Would you buy it today?

Page 62: Random Walks, Efficient Markets & Stock Prices

Why is it so hard to BEAT THE MARKET?

Page 63: Random Walks, Efficient Markets & Stock Prices

What should be the STRATEGY

of a SMALL INVESTOR?

Page 64: Random Walks, Efficient Markets & Stock Prices

How to forecast

the RISK and RETURN of an asset?

Page 65: Random Walks, Efficient Markets & Stock Prices

Luigi Cenatti Gianni

[email protected] br.linkedin.com/in/luigigianni

Page 66: Random Walks, Efficient Markets & Stock Prices

References

Random Walks and Finance:

http://sas.uwaterloo.ca/~dlmcleis/s906/chapt1-6.pdf

http://www.norstad.org/finance/ranwalk.pdf

Random Walks and Efficient Markets:

http://www.duke.edu/~rnau/411georw.htm

http://www.amazon.com/Random-Walk-Down-Wall-Street/dp/0393325350

Wolfram Mathematica:

http://reference.wolfram.com/mathematica/howto/PerformAMonteCarloSimulation.html

Page 67: Random Walks, Efficient Markets & Stock Prices

Online classes on Finance:

https://www.coursera.org/course/compfinance

https://www.coursera.org/course/introfinance

Others:

http://www.scientificamerican.com/article.cfm?id=can-math-beat-financial-markets

http://www.scientificamerican.com/article.cfm?id=after-the-crash

http://www.scientificamerican.com/article.cfm?id=trends-in-economics-a-calculus-of-risk

References

Page 68: Random Walks, Efficient Markets & Stock Prices

Quick readings on Wikipedia:

http://en.wikipedia.org/wiki/Monte_Carlo_methods_for_option_pricing

http://en.wikipedia.org/wiki/Black%E2%80%93Scholes

http://en.wikipedia.org/wiki/Geometric_Brownian_motion

http://en.wikipedia.org/wiki/Random_walk

http://en.wikipedia.org/wiki/Exchange-traded_fund

References

Page 69: Random Walks, Efficient Markets & Stock Prices

In Portuguese:

http://br.ishares.com/content/stream.jsp?url=/content/br/pt/repository/material/5-Min-

Guide_PT.pdf&mimeType=application/pdf

http://www.scielo.br/pdf/rac/v5n3/v5n3a11.pdf

http://www.lume.ufrgs.br/bitstream/handle/10183/29661/000769163.pdf?sequence=1

References

Page 70: Random Walks, Efficient Markets & Stock Prices

Images

http://www.thedigeratilife.com/images/january_effect_graph.png

http://forexachievers.com/wp-content/uploads/2010/09/beh.jpg

http://stockcharts.com/freecharts/historical/images/SPX1960s.png

http://204.143.68.15/file.php/400/quarter.jpg

http://www.wolframalpha.com/

http://stockcharts.com/school/data/media/chart_school/overview/random_walk_theory/

rw-5-fattails.png

http://blog.wolfram.com/data/uploads/2010/11/m8-logo.jpg

http://zoonek2.free.fr/UNIX/48_R/g606.png