1.(Page 363 #11) The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by Yn on the nth day of the year. Finn observes that the differences Xn = Yn+1-Yn appear to be independent random variables with a common distribution having mean \(\mu\)= 0 and variance \({ \delta }^{ 2 }\) = 1/4. If Y1 = 100, estimate the probability that Y365 is
- P(Y365$100).
- P(Y365$110).
- P(Y365$120).
Answer:
Method1 - soloved by Central Limit Theorem.
Daily price Yn of a common stock is independent variable. The sigma of daily price Xn (=Yn+1 - Yn) is a random variable with mean 0 and sd 0.5. I assume sigma follow a normal distribution, then I can use confidence interval \(Yn-Y1\epsilon (nE(X)-z*\delta \sqrt { n } ,\quad nE(X)+z*\delta \sqrt { n } )\) to find the density.
Given \(\mu\)= 0 and \({ \delta }^{ 2 }\)= 1/4, z is a critical value for normal distribution of the price change.
\(Yn=Y1+\sum _{ i=1 }^{ 365-1 }{ { x }_{ i } }\)
\(E(x)=\frac { \sum _{ i=1 }^{ 365-1 }{ { x }_{ i } } }{ 365-1 } =0\)
\(\sum _{ i=1 }^{ 365-1 }{ { x }_{ i } } \cong 0\)
\(let\quad z=\frac { \sum _{ i=0 }^{ 365 }{ { X }_{ i } } -nE(x) }{ \delta \sqrt { n-1 } } =\frac { Yn-Y1-n\mu }{ \delta \sqrt { 365-1 } } =\frac { Yn-Y1 }{ 0.5\sqrt { 364 } }\)
In (a) Yn>= 100, n=365-1
1-pnorm((100-100)/(0.5*sqrt(365-1)))
## [1] 0.5
In (b) Yn>= 110, n=365-1
1-pnorm((110-100)/(0.5*sqrt(365-1)))
## [1] 0.1472537
In (c) Yn>= 120, n=365-1
1-pnorm((120-100)/(0.5*sqrt(365-1)))
## [1] 0.01801584
Method2 - Simulation Random Walk.
I assume the market is efficient and the stock market is weak form efficiency, the change of a stock price is follow random walk. By the given values above, I set intial price Y1=100, then daily_sigma is Xn (=Yn+1 - Yn) which has mean is 0 and sd =1/2=0.5. The number of random walk is n-1. The formular should be as following:
\({ Y }_{ N }={ Y }_{ 1 }+\sum _{ i=1 }^{ N-1 }{ { X }_{ i } } \quad \quad ({ X }_{ i }\sim \quad iid\quad N(0,\frac { 1 }{ 4 } ))\)
See more details in https://en.wikipedia.org/wiki/Random_walk_hypothesis.
Y1<-100 #initial price
days <-365-1 #number of days
daily_mean <-0 #mean of change price
daily_sd <- 0.5#/sqrt(days) #sigma of change price
simulation_random_walk_lognormal_price <- function(Y1, days, daily_mean, daily_sd){
sigma <-rnorm(days, daily_mean, daily_sd) #n days volatility
Yn <- Y1 + cumsum(sigma) #n daily prices
#plot(Yn,type="l") #display to check the prices
return(Yn[days])
}
n=100000
price_list= c() #store 100000 prices at Tth day
for (i in 1:n) {
price_list[i] <-simulation_random_walk_lognormal_price(Y1, days, daily_mean, daily_sd)
}
#(a) prob__Y365_100more
sum( price_list >= 100)/n
## [1] 0.50081
#(b) prob__Y365_110more
prob_Y365_110more <- sum( price_list >= 110)/n
prob_Y365_110more
## [1] 0.14792
#(c) prob__Y365_120more
prob_Y365_120more <- sum( price_list >= 120)/n
prob_Y365_120more
## [1] 0.01843
2. Calculate the expected value and variance of the binomial distribution using the moment generating function.
Answer: Let p be a probability of success and 1-p is probability of failure in binomial distribution, thus
\(p{ (X }_{ j })\) \(=(\begin{matrix} n \\ j \end{matrix}){ p }^{ j }{ (1-p) }^{ n-j }\) \(for\quad 0\le j\le n,\quad X\quad in\quad \{ 0,1,2,3,...,n\}\)
Monment generating function \(g(t)\quad =\quad E({ e }^{ tX })\quad =\quad \sum _{ j=1 }^{ \infty }{ { e }^{ t{ x }_{ j } }p({ x }_{ j }) }\)
So we get \(g(t)\quad =\sum _{ j=0 }^{ n }{ { e }^{ tj }(\begin{matrix} n \\ j \end{matrix}){ p }^{ j }{ q }^{ n-j } } =\sum _{ j=0 }^{ n }{ (\begin{matrix} n \\ j \end{matrix}){ (p{ e }^{ t }) }^{ j }{ q }^{ n-j } } ={ { (p{ e }^{ t }+q) }^{ n } }\)
Expected value is \({ \mu }_{ 1 }\quad ={ g }^{ ' }(0)=n{ { (p{ e }^{ t }+q) }^{ n-1 } }p{ e }^{ t }=np\quad \quad (t=0)\)
Variance is \({ \mu }_{ 2 }\quad ={ g }^{ " }(0)=n(n-1){ { { p }^{ 2 }+np } }=np\) \({ { { \delta } }^{ 2 }=\mu }_{ 2 }-{ \mu }_{ 1 }^{ 2 }\quad =np(1-p)\) \[
\]
3. Calculate the expected value and variance of the exponential distribution using the moment generating function.
Answer: Exponential distribution \({ f }_{ X }(x)=\lambda { e }^{ -\lambda x }\quad if\quad x\epsilon (0,\infty );\quad otherwise\quad { f }_{ X }(x)=0.\)
Monment generating function \({ M }_{ X }(t)=E({ e }^{ t }X)=\int _{ -\infty }^{ \infty }{ { e }^{ tx }{ f }_{ X }(x)dx. }\)
So we get ${ M }{ X }(t)={ -}^{ }{ { e }^{ tx }{ e }^{ -x }dx=_{ 0 }^{ }{ { e }^{ (t-)x }dx= } } $
Expected value is \((X)={ M }_{ X }^{ ' }(0)=\frac { \lambda }{ { (\lambda -t) }^{ 2 } } =\frac { 1 }{ \lambda }\)
Variance is \(E({ X }^{ 2 })={ M }_{ X }^{ (2) }(0)=\frac { 2\lambda }{ { (\lambda -t) }^{ 3 } } =\frac { 2 }{ { \lambda }^{ 2 } }\) \({ \delta }^{ 2 }=E({ X }^{ 2 })-E(X)=\frac { 2 }{ { \lambda }^{ 2 } } -\frac { 1 }{ { \lambda }^{ 2 } } =\frac { 1 }{ { \lambda }^{ 2 } }\)