Application Center - Maplesoft

App Preview:

Unit Roots and Volatility

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application













Unit Roots and Volatility 


The following was implemented in Maple by Marcus Davidsson (2009)










We will start by discussing some basic properties of unit roots 





Over time our unit root will look like this: 











Typesetting:-mprintslash([`assign`(S[1], r[1])], [r[1]])
Typesetting:-mprintslash([`assign`(S[2], `+`(r[1], r[2]))], [`+`(r[1], r[2])])
Typesetting:-mprintslash([`assign`(S[3], `+`(r[1], r[2], r[3]))], [`+`(r[1], r[2], r[3])])
Typesetting:-mprintslash([`assign`(S[4], `+`(r[1], r[2], r[3], r[4]))], [`+`(r[1], r[2], r[3], r[4])])
Typesetting:-mprintslash([`assign`(S[5], `+`(r[1], r[2], r[3], r[4], r[5]))], [`+`(r[1], r[2], r[3], r[4], r[5])]) (1)



This means that our total return is simply given by the stock price at time t.


and the variance will look like this 












Typesetting:-mprintslash([`assign`(var[1], `*`(`^`(sigma, 2)))], [`*`(`^`(sigma, 2))])
Typesetting:-mprintslash([`assign`(var[2], `+`(`*`(2, `*`(`^`(sigma, 2)))))], [`+`(`*`(2, `*`(`^`(sigma, 2))))])
Typesetting:-mprintslash([`assign`(var[3], `+`(`*`(3, `*`(`^`(sigma, 2)))))], [`+`(`*`(3, `*`(`^`(sigma, 2))))])
Typesetting:-mprintslash([`assign`(var[4], `+`(`*`(4, `*`(`^`(sigma, 2)))))], [`+`(`*`(4, `*`(`^`(sigma, 2))))])
Typesetting:-mprintslash([`assign`(var[5], `+`(`*`(5, `*`(`^`(sigma, 2)))))], [`+`(`*`(5, `*`(`^`(sigma, 2))))]) (2)



We can see that the variance is dependent on time 





Since the variance  is proportional to time (infinite over time) it means that if we would

increase (decrease) time the variance would also increase (decrease). This means that: 


var = `*`(`^`(sigma, 2), `*`(T)) (3)



Which means that the standard deviation can be calculated as: 









If we have a look at the Pascal triangle as seen below we can see that the variance indeed is increasing over time. 











The reason for that is because the probability that the price of an stock will be further away for the initial

starting price is increasing over time. Note also that if we have a unit root with drift then the stock price

is also a function of time ie if we increasing the holding period then the stock price will also increase. 











Typesetting:-mprintslash([`assign`(S[1], `+`(a, r[1]))], [`+`(a, r[1])])
Typesetting:-mprintslash([`assign`(S[2], `+`(`*`(2, `*`(a)), r[1], r[2]))], [`+`(`*`(2, `*`(a)), r[1], r[2])])
Typesetting:-mprintslash([`assign`(S[3], `+`(`*`(3, `*`(a)), r[1], r[2], r[3]))], [`+`(`*`(3, `*`(a)), r[1], r[2], r[3])])
Typesetting:-mprintslash([`assign`(S[4], `+`(`*`(4, `*`(a)), r[1], r[2], r[3], r[4]))], [`+`(`*`(4, `*`(a)), r[1], r[2], r[3], r[4])])
Typesetting:-mprintslash([`assign`(S[5], `+`(`*`(5, `*`(a)), r[1], r[2], r[3], r[4], r[5]))], [`+`(`*`(5, `*`(a)), r[1], r[2], r[3], r[4], r[5])]) (4)






We can start by visualizing the case for a return distribution with zero mean .  



I have below plotted the total return (ie stock price) for different holding periods ie 1..2, 1..3, 1..4 etc. 


I have also plotted the 99.7% confidence interval (ie there is an 0.997 probability that the total

return will be be in this interval) which for a one period is simply given by:  mean+/- 3*standard deviations 


but in our multi period case case is given by: mean+/- 3*standard deviations*sqrt(time)  


We could also have plotted for example a 95% confidence interval (ie there is an 0.95 probability that the total

return will be in this interval) which then would be given by:  mean+/- 2*standard deviations*sqrt(time)  






Plot_2d Plot_2d






Another interesting thing to notice is that the expected return will not stabilize around our zero mean until the holding period is long 


ie law of large numbers or scaling property of randomness (Taleb). 





We can now visualize the case for a return distribution with a positive mean.  




Plot_2d Plot_2d







Again we can see that the expected return will not stabilize around our mean of 5 until the holding period is long 


ie law of large numbers or scaling property of randomness (Taleb). 





For a pure unit root it would look something like this: 











Note that our confidence interval assumes that volatility does not increases linearly over time but rather with the square root of time. 


So after 5 time periods the most likely difference between the price at time 5 and the starting point will not be 5 but rather  


This has to do with the fact that some fluctuations are expected cancel each other out over time.  




A word of caution though, most assets prices have fat tails which means that the normal distribution might not be appropriate. 


Another assumption to look out for is the assumption that the unit root return distribution has a constant volatility and mean 


which might not be true for empirical data ie stochastic volatility or serial correlated volatility (GARCH).  





We can further visualize the increasing holding period volatility assumption as follows: 











This means that the probability distribution over time for different price levels will be given by: 









We can finally illustrate the dynamics with an unit root simulation 





                                                                          Start Simulation                       Reset Simulation                      





                                        Embedded component