This week's exercise is about the relation between prices on the stock market and the flow of investments. This exercise is about finding and verifying a good theory by analyzing a given data set. In order to make the inflow and outflow dynamics more interesting, we make the number of births of new agents follow a sine curve, leading to according curves in the total population as well.
You can see that cycles of similar length show up in the stock prices.
Your task is to find out how inflows and outflows drive the stock prices observed on the stock market. All the data you need for this exercise can be downloaded from the simulation server (follow the link and click the download button).
In classic models with instantaneous market clearing, prices are calculated by assuming that inflows and outflows are equal at each point in time:
whereas
Note that it is often useful to calculate log returns. The advantage of using log returns is that you can simply add them up to get cummulative returns, whereas percentage returns need to be multiplied.
Economists often use natural log returns by default and rarely ever convert back.
For the task at hand, you should ignore all data before day 2000. Also, you can disregard the individual firm types and focus on the index, which represents a weighted average of the two types. Volume represents the number of shares traded. Dividend yield is (dividend per share) / (share price).
How do inflows and outflows impact prices? Can you come up with a testable hypothesis that describes this relation? It is clear that higher inflows will lead to higher prices, and higher outflows to lower prices, but how are they related exactly? In other words: given the price
To find and verify a good result, you will need to apply empirical methods using your software of choice. To do so in excel, you will need to install the Analysis Toolpak add-in.
Your rule should be simple, but also be statistically significant (t-stats above 10 are excellent, social scientists are usually already happy with a value of 2). It can help to reduce the noise by using a rolling average over multiple days instead of the data of individual days.
Document your findings in the lab journal, including an equation describing the relation between flows and prices, as well as the results of you statistic tests. No need to run the simulation yourself this time or to do any programming.
The deadline for submitting the lab journal to github is 2018-11-01 at 24:00.