A Stock Market Simulation for Open Outcry. Performance Model.
This is an quick overview of the current iteration of the stock market I’ve modeled for Open Outcry. Actually it’s more of a chance to document and summarise the reams of notes I’ve made into some short description of what the code actually does.
The market trades for a total of 10 years over 120 periods (months). It has three assets, each with a starting value, an annual expected return (how much the stock with be worth at the end of the 10 years), and an annual volatility (how much the price of the stock can vary over the 10 years).
The assets are statistically related to each other through a correlation coefficient (-1 to 1). A correlation of +1 implies that the two stocks will move in the same direction 100% of the time. A correlation of -1 implies the two stocks will move in the opposite direction 100% of the time. A correlation of zero implies that the relationship between the stocks is completely random.
In order to emulate a more realistic market certain climates that affect the value of the stock. periods of boom, stability or decline are tied in with news stories and can be triggered manually or built into a probability matrix as a generative process.
For example if the market has been in a boom period for a specific amount of time there could be a 20% chance of it staying in this regime, a 40% chance of it moving into decline and a 40 percent chance of it become stable, chosen at random. All of these parameters need to be defined and tested to create a specific type of market.
Each of these regimes have different parameters that affect the simulation of the market. For example in a boom period the expected annual returns will be larger than in other regimes, and in a stable market the correlation of assets might be more random due to there being little need for all assets moving together in one direction.
The video here shows the market moving in steps of one month. the market begins in a stable state where regimes are chosen based on probabilities. It then shows the results of a market being pushed into a boom period, then a bust period, then back to normal. For no particular reason I’ve added some recordings of a stream from different locations. Once the model is complete I might use the simulation as a compositional driver, just for fun.