1 In this exercise we use a data set of daily Dow Jones prices. These can be downloaded from the website https://www.wsj.com/market-data/quotes/index/DJIA/historical-prices. Choose a 5-year time span and save the daily closing values in a cvs file. Then load the time series in Python with the function np.loadtxt()
and save the array in a variable x
. Plot the time series with the function plt.plot()
.
2 Calculate the increments \[v_t=x_t-x_{t-1}.\] Plot the value of the increments |v| against x. Is the use of logarithmic prices log(x)
justified?
3 Calculate the autocorrelation np.correlate(v,v,'self')
. What is the best prediction of the future price x(t+1) if all prices up to time t are known?
4 Calculate \[ \sum_{n=1}^{N} ( v_n-v_{n-1} )^2 \sim N^{\beta} \;\; \mbox{und} \;\; \sum_{n=1}^{N} | v_n-v_{n-1} | \sim N^{\gamma}.\] Fit the exponents beta and gamma. What do these results mean?