Modeling Volatility in the Stocks

Introduction

The study of volatility, the oscillation of the price above and below a constant path, is an important  study in the area of stocks and the price of commodities. As investors, knowing the inherent volatility that might be the stock of interest can give the investor some insight into the future price movement and behavior of the stock. If the stock has a lot of inherent volatility the investor who has a long term stake in the stock will not make irrational decisions based on the stock price movement. Traders, who profit from gyrations in the market, would like to trade in stocks that have high volatility. Traders will not enter a stock for the day if they know that the stock is not capable of much price movement  or volatility. While the study of volatile has many factors that are difficult and even impossible to transform into a value, the main four causes of volatility has been included in this study for simplification. This model is an insight into the simplified version of modeling the behavior of stocks.

Design Rationale

The design was based upon two limiting factors: complexity and validity. The first complexity deals with the fact that all the factors that occur in the market that affects investors and traders cannot be translated into netlogo. The agents in netlogo have simple rules and the interaction of multiple agents brings forth patterns and phenomenon's. The same is try in this model. The turtles of the world have simple rules to determine if they buy or sell. These rules are inherent in them from creation and form from the behavior of other turtles as the model progress. The two basic rules are the price level and price movement. Price level is the price at which a turtle is willing to buy or sell a stock, while the price movement represent the previous turtles decisions and the current turtles interpretation of those decisions. The second factor is validity. The model is as accurate to the behavior of investors and traders as it can be. It is true that investors only buy into a day and that they have a higher tolerance of price gyrations while traders are very "jumpy" and tend to buy in and sell out quickly. This is represented in the model as the turtles decisions. 

How the Model Works

There are four different scenarios preprogrammed into the model for simplifying the interface to the user. Starting from lowest to highest the scenarios represents: stock undervalued, stock overvalued, stock fairly valued, and stock slightly under valued. When the model is running depending on the scenario the investing turtles will either buy or sell if the price of the stock falls into their range or if the price movements is significant for that turtle. The traders if there will do the same but they will only buy into the market and leave right away instead of holding the stock like investors. As the price nears the fair value mark, there is some interaction that causes a slight gyration in both ways before the price is stabilized. Furthermore, there might be additional gyrations and small outbreaks followed by reversals back to the fair market value. 

Behavior of Model

The four factors that affect volatility in this model are price, shares offered, percentage of traders, and the amount of buyers and sellers. The first price is an important aspect in volatility. The present explanation of its interaction with volatility is that the higher the price the more price movements must occur before the price moves considerable percentages. This slows dampens the volatility that is inherent. For example, if the model is set on scenario 1, the stock being undervalued, price set  to 90, and the number of turtles increased to about 650. The volatility of the stock is very small relative to the price. The price almost perfectly lines up with the uniformed increase line, and on the way up the price hardly deviated from the approximate line, which is a visual clue on the dynamic volatility. The volatility  is very small during the first leg of the ascent but gets more shaky near the end. Relatively to other measures of volatility this is a very small shake. Now, decrease the price to 4 and the number of turtles to about 200. Note, decreased the amount of turtles is only done so that the volatile is more easily seen and interpreted. In this model, there is much volatility. The huge spikes up followed by slow decrease down being repeated over and over again in a cyclical fashion shows that the volatility of lesser price stocks is enormous. These gyrations are often 10 % from the fair market value of the stock. 

The next measure shares offered is important as well. This represent the depth of the stock. By depth, it means how much money does it takes to make the stock move. The amount of shares offered is this quantity. The higher means more money has to be pumped in before the stock moves while lower is the opposite. Set the price to 40, shared offered to 8500, and number of turtles to 450, and run the model. Again, the volatility is very small there isn't much fluctuation in any direction. The uniform and approx line are almost matching indication almost a perfect ascent. Now drop the shares offered to 1000 and for now keep the turtle number the same. In this example, the fair market value was reached quickly and then following were numerous gyrations at the  fair market value price. Drop the turtle number to about 65 and keep running the simulation over and over. Here, there is a lot of volatility in the stock not as much as with the price but fair amount. Notice how it crosses over and dashes back down across the approx line. This is the inherent volatility that occurs with stocks that don't require much money to move it. 

The percentage of traders is a little strange because the behaviors are not as apparent as logic dictates. Set traders to a 100 and run the simulation with a 230 turtles and shares offered at 5500, the default. The price moves back and forth over the approx line many times and the climbs are much sharper than before. Decreasing the amount of traders and rerunning the simulation doesn't really improve on the volatility as much as expected. It is only when the amount of traders is very small or zero does that the volatility is much less and dampened

The last is the amount of buyers and sellers in the market. The measure used is how much the price deviates from the fair market value and the volatility of its up trend to the closing price. Set the amount of traders to zero, set turtle number to 250, and percent buy to a 100. In this simulation all the turtles should be buying and note that the turtles decisions are based on other turtles. Notice how the turtles bought up the stock quickly to the fair market value and then the stock price just seems to plateau there. The investors know that the market is up but they are not as jumpy as the traders so no volatility on the way up. Now add some traders, about 50%. The fair market value is about 18 ~ 19, but notice how with traders the price would often go up to about 25 percent or more. This is the traders reaction to the strong draft making g it stronger before they exit at the tend and bring the price closer to the fair market value. Now, set the traders back to zero and set the percent buy to 50 and the scenario to 3, where the stock is fairly valued. Now there is a half-half ratio of investors who want to buoy and those who want to sell. The graph shows the price moving back and forth quickly but tending to be more down than up. 

There are more interesting findings at different scenarios, but the main ones have been discussed. Please feel free to play around with the settings and find situations above that are not ideal and switching something around to make it ideal. Lending to the fact that causes of volatility can be canceled.

---------------------------------------------------------------------------------------------------------------------

This page was automatically generated by NetLogo 1.2beta4 (Rev C). Questions, problems? Contact feedback@ccl.northwestern.edu.

In order for this to work, this file, your model file (stock.nlogo), and the file nLogoLite.jar must all be in the same directory. (You can copy nLogoLite.jar from the directory where you installed NetLogo.)

On some systems, you can test the applet locally on your computer before uploading it to a web server. It doesn't work on all systems, though, so if it doesn't work from your hard drive, please try uploading it to a web server.

You don't need to include everything in this file in your page. If you want, you can just take the HTML code beginning with <applet> and ending with </applet>, and paste it into any HTML file you want. It's even OK to put multiple <applet> tags on a single page.

If nLogoLite.jar and your model are in different directories, you must modify the archive= and value= lines in the HTML code to point to their actual locations. (For example, if you have multiple applets in different directories on the same web server, you may want to put a single copy of nLogoLite.jar in one central place and change the archive= lines of all the HTML files to point to that one central copy. This will save disk space for you and download time for your user.)

created with NetLogo

view/download model file: stock.nlogo

WHAT IS IT?
-----------

In today's stock market, one of the most important aspects in evaluating any stock is its inherent volatility. This volatility causes the stock to rise beyond its fair value or fall below many times before stabilizing. The current trading theory on volatility is that it is caused by day traders and market moving news. When average investors hear about the gyrations of a stock, many immediately think that traders were the cause. But, this is only a half truth. In this model, the different causes of volatility will be measured using a volatility measure. The model assumes that the traders and investors understand the fair value of the stock which is not the case in real life. It provides a good approximation and many different surprises. As, the model is worked under different test cases; it can be shown that traders are not the only factor in volatility of a stock. The testing scenario is that a stock, XYZ corporation, came out with momentum driving news. Disregarding any broader market sentiment, the traders and investors only see this stock as valuable and will buy or trade into it or sell out of it. Traders and investors have different mindsets. Being as true to the general behavior of both parties, traders will buy into the day and sell before the day is up while investors will buy into the stock and hold or sell out of the stock. The interaction of both parties together and by itself brings up interesting price action. The trader or investors acting by itself will probably cause an orderly market but this is not the cause in real life and in this model. The agents behavior is determined by itself and also the behaviors of the other agents.


HOW IT WORKS
------------


The rules of the traders are more prone to the fluctuations of the market that traders or investors create. The trader initially buys into the market and once his profit is realize exits the market. The traders entering conditions are changed constantly depending on the stock movements. Investors on the other hand are more timid. Investors will either buy or sell into a stock. When buying they will look for more concretes such as the price becoming enticing or at a very low percentage enter base on the stock price movements. Selling is the same. If the investor cannot enter within the investors terms he will exit the market completely and not enter the market for t he day.

Traders:

Buy - buy into a stock if the price falls into the range, buy into the stock if the previous 2 or 3 ticks ( price movements ) were positive.

Sell - sell the stock if the price of the stock has rose above its entry point and a predetermined profit is realized.

Indecisive - depending on the price movements of the stock the trader will lower his buy point or lower his profits



Investors:

Buy - buy into a stock if the price falls into the range or randomly if the previous 3 ticks were positive

Sell - sell the stock if the investor already owns the stock and the price falls within the price range

Indecisive - quits out of the market if the investor cant enter the market properly within 5 rounds




HOW TO USE IT
-------------

There are many sliders to choose from some are very important to the study of volatility and some are not. But, if you want to study the ascent volatility, be sure to set the percent gap much lower than the default percent and vice versa for descent. Please feel free to experiment with the different sliders and document interesting behaviors. Please note that the volatility graph works best when the number of turtles is approximately 250.

Turtle Number - controls the number of turtles in the simulation

Percent Trader - controls the percent of the turtles that are traders

Shares Offer - controls the amount of stock that must be bought before a stock goes up or down in price. This is a very important variable when determining volatility because it causes extreme price movements if the value is low enough.

Speed - controls the speed of the simulation a higher value will slow down the graphs for easier readings and study

Price - determines the price of the stock. Volatility is different at different price levels.

Percent Buy - the percentage of investors who are buying and selling

Scenario - four different ones (1) stock undervalued, (2) stock overvalued, (3) stock fairly valued, and (4) stock slightly undervalued.

THINGS TO NOTICE -------------

The major part of this simulation rests on the measure of volatility. The graph on the bottom right of the interface is a standard way to measure volatility to the best of net logo's capacity. There is a straight line that demonstrates a relaxed and non volatile ascent or descent to the fair market value of the stock. Please refer to this when determining if and when volatility starts to occur in the stock. The large price graph on the top of the interface is also a good place to look deeper into the price movements. The histogram determining the amount of traders, investors, and fence sitters is also significant. When there is a lopsided decline in sellers verses buyers or vice versa some interesting effects on the price occurs. that is sometimes difficult to explain.



Non volatile verse varying degrees of volatility.



THINGS TO TRY
-------------
This section could give some ideas of things for the user to notice while running the model.

In the search for the many causes of volatility there are many combinations that can bring about different and unexpected results.

Price

The first interesting aspect is the actually price itself. In the market, stocks with low prices tend to move a little differently than price with higher prices. Even though, it might seem that volatility is price is independent it is not. Try running the model with the stock price at 4 verses the stock price above 70's. There is a considerably more volatility in the stock that is lower priced and the price at the end of the trading day sometimes does not adequately reflect the fair market value of the stock. This anomaly exist in the market and is known to most traders. In this model, the volatility is extraordinary high. Sometimes the stock can fly many times above its fair market value.

Traders and Investors

The second interesting aspect is the different volatilities that arises from different ratios of investors to traders. The expected outcome is that all traders will cause massive volatility in the stock and that investors will have a nice uniformed rise but this is not always the case. If there a good majority of the investors are buying, they can cause upwards volatility in the stock and if the majority are selling then there could be downwards volatility. Try setting the percent buy at 80 > and at all investors and run it. There is volatility caused by the fact that investors are buying and looking at each other for direction and the lack of sellers. If we run the same thing with all traders a good majority of the time the volatility is less than that with investors which is counter intuitive to market theory. If a combination of investors and traders are used than the volatility is less than that off only investors most of the time. The key point here is that this happen most of the time lending to the unpredictability of the market even when many variables are controlled.

Shares Offered

The more shares offered for sale the less the volatility of the stock. If the stock is thinly traded than the stock will gyrate heavily because each individual turtle has control of the market. While at high shares being offered, the volatility is next to zero. This lends to the fact that brokerage firms will like to trader heavily in stocks with lots of volume ( Merrill Lynch declaration of cutting 7000 NYSE and NASDAQ stocks from its trading portfolio in ~Dec 2002 ).

Buy/Sell Ratio

Sometimes the random arrangement of buyers and sellers will produce an arrangement where lots of sellers or buyers are lined up in a row. This is observed through the type of turtles histogram as a sharp decrease in the one of the bars. The volatility this causes is random but significant in the stock and causes almost immediate reversals in the direction.

Number of Turtles

Not exactly pertaining to volatility but when the stock has reach fair market value and no significant price movements is occurring, the price starts to exhibit cyclic behaviors. That is falling and rising similar to the business cycle that is suppose to control stock movements.


EXTENDING THE MODEL
-------------------
A great idea to try out is to throw some random bits of news in the market during the simulation to see how it will affect the turtles behavior. The assumption is that it will digest the information, create some volatility, and resolve itself back to normal; but this might not be the case.


CREDITS AND REFERENCES
----------------------