Evolution of a Power Tail Model of Price Changes

How do market prices evolve?  One view is that they evolve as incremental changes which accumulate.  In this view, if the incremental changes were independent and identically distributed, the distribution of price increments should have as a limiting distribution, a stable distribution, which would include the normal distribution if the incremental process had finite variance.  Most of the methods of modern finance carry this implicit assumption that an independent incremental process is in play, and that by the central limit theorem price changes or log price changes should evolve into a normally distributed process.  If the underlying incremental process has infinite variance, then stable distributions other than the normal should be considered.  The immediate problem with incremental model is the finding that normally distributed processes produce extreme events only very rarely, whereas they are commonly seen in financial markets.  Alternatively if stable distributions are considered, the extreme tails tend to be too heavy.  The density of financial returns tends also to have more kurtosis than either a stable or normal distribution would allow.

Other problems with the concept are that price differences do not appear to be completely independent, nor does the distribution of price returns appear to be stationary over time.  The absolute value of price changes tends to show a significant structure of serial dependence.  Another problem with this view is that it presupposes some kind of random machine kicking out price changes without much attention to why prices might change.  In what follows we will endeavor to construct a model based on how investors and traders might behave in the setting of a marketplace which is constructed around a continuous double auction, where the participants do not directly interact with one another to determine a price.

In a real market, prices occur as traders or investors buy and sell a good or an equity.  Each transaction presupposes a buyer and a seller making an exchange of money for a security, the price is recorded and we can follow a path of prices over time.  In a bazaar, the players might haggle over a price and eventually come to an agreement, but in an electronic market using a continuous double auction algorithm, they will not have any contact with one another and the price agreed to is in part determined by the market structure and how traders interact with that structure.  The schematic below show the elements of such a market.  Buyers and sellers may enter market orders by which their orders are matched at the prevailing price, in the example this is 1.00.  When buy and sell market orders stream into the market, they are matched and executed at the current price.  If there are not matching orders, then their prices will be matched with quoted prices in the opposite order book.  Thus a market buy order will go to the sell order book and get the closest price available.  In high frequency U.S. markets, the difference between the bid and ask prices is generally a penny or less.

If one looks at quoted prices in an active market, one sees a constant flow of prices near to the last price.  In the diagram below these are labeled high frequency.  The flow of these quoted prices is very dynamic, they may also be withdrawn rapidly.  Further down in the order books prices are entered at a slower rate.  If the price moves, an order that is say 5 cents higher than the last price may be picked off in a minute or two if the price is moving up; theoretically, it might never be executed if the price is falling.  Far down in the order books there are prices which are far from the current prices.  These orders are quietly waiting for either a dramatic price change or a cascade where the price moves quickly over minutes to days.  In terms of actual sequential change from one price to the next, a change as large as 5 cents would be very rare, because the high frequency quote flows are very dynamic.  A large change should only happen if this flow is suddenly interrupted by some news event.

(*bgnd=RGBColor[0.933333,0.913725,0.764706];*)
q=PDF[ParetoDistribution[k,α],x]/.x->Abs[1-x];
(*Integrate[q,{x,-∞,∞},Assumptions->{α>0,k>0}]*)
g0=Plot[q/2/.{k-> 1/200,α->2},{x,0.9,1.1},PlotRange->All,MaxRecursion->15,Frame->True,FrameLabel->{"Price Difference",None},FrameTicks->{Automatic,None,None,None},Filling->0,Axes->{True,False}];
txt=Graphics[{Text[Style["Sell Limit Orders",Medium], {1.03,200}],Text[Style["Buy Limit Orders",Medium], {1-0.03,200}]}];
txt1=Graphics[{Blue,Text[Style["High Frequency",Medium], {1.04,175}],Text[Style["High Frequency",Medium], {1-0.04,175}]}];
txt2=Graphics[{Red,Text[Style["Low Frequency",Medium], {1.06,55}],Text[Style["Low Frequency",Medium], {1-0.06,55}]}];
txt3=Graphics[{Text[Style["Buy or Sell",Medium], {1,270}],Text[Style["Market Orders",Medium], {1,250}]}];
a1=Graphics[{Lighter[Blue],Arrow[{{1-0.02,170},{1-0.01,140}}]}];
a2=Graphics[{Lighter[Blue],Arrow[{{1.02,170},{1.01,140}}]}];
a3=Graphics[{Lighter[Red],Arrow[{{1-0.06,50},{1-0.05,20}}]}];
a4=Graphics[{Lighter[Red],Arrow[{{1.06,50},{1.05,20}}]}];
a5=Graphics[{Lighter[Green],Arrow[{{1,245},{1,190}}]}];
Show[g0,txt,txt1,txt2,txt3,a1,a2,a3,a4,a5(*,Background->bgnd*)]

In the case of a news event that causes the flow to slow dramatically or to cause an unbalanced flow where the rate of market orders is not nearly matched by the limit orders, then price can move very quickly, and even be dominated by orders far down in the order book.  The schematic shows a graph which is a representation of the shape of the density of the quote orders at a price relative to the market price of 1.00 at any instant in time.  The question is what shape should that density have.  Clearly it should have two tails, which may or may not be symmetric, but for the following discussion, we will assume that they are in practice symmetric and that any asymmetry in price changes put out by this market is caused by asymmetry in order flow.  The rationale for the symmetry assumption is that there is no reason to expect that either the buyer class or the seller class has better information about the future, and that both classes of participants are equally interested over time in increasing their wealth.  Note that the dynamic may be changed if a class enters the market like a central bank, which can buy or sell a security with no interest in the eventual outcome in price, its only goal being to stabilize or change the price.  A central bank is not limited by money, until it prints so much that its currency loses value.

The above outline suggests that the structure of the price density distribution will ultimately affect the distribution of differences in prices.  The next question is what should that density look like if both buyers and sellers are looking to optimize their profits, without real knowledge of the future.  Let’s first hypothesize that a buyer or seller who places an order that is not close to the current price will have to wait for his price to be executed.  And that we would further expect that the further the price is from the market price, the longer he would have to wait.  So how does a participant placing an order decide on a price?  Let’s make an assumption that he expects to be rewarded as some function of the time he will have to wait for the order to be executed.  We further assume that if the current price is standardized at a value of 1, he will consider a price (e^(r t)), where r is some logarithmic rate of return and t is the time he expects to wait before the order is executed.

The next component to think about is what might be the structure of t, the time an investor has to wait for his order to be executed.  A simple assumption would be that waiting time might be a memory less random process, like an exponential distribution.  For the rest of the discussion, we will just look at the positive tail of the distribution, but realize that the negative tail could be likewise modeled with a price of (e^(-r t)).  So looking at the positive tail, consider a seller who puts in an order to sell a security.  If he is rational, he considers both the time he has to wait for the execution and the rate of return he wants to achieve.  Let’s suppose his waiting time is exponentially distributed.  Our random variable, W is the waiting time, and the CDF function gives the probability that w < W.

Exponential Distribution

CDF[ExponentialDistribution[λ], w]

({{\[Piecewise], ({{1-(E^(-w λ)), w≥0}, {0, True}})}})

PDF[ExponentialDistribution[λ],w]

CharacteristicFunction[ExponentialDistribution[λ],t]

Mean[ExponentialDistribution[λ]]
StandardDeviation[ExponentialDistribution[λ]]

Plot[PDF[ExponentialDistribution[1],w],{w,0,10},PlotRange->All,Frame->True,PlotLabel->"Exponential Density, λ = 1"]

Transformed Distribution

We derive transformed distribution random variable (e^(r w)), where w is the waiting time parameter and r is the expected logarithmic return.  We let Mathematica do the hard work here, using the function TransformedDistribution.  Since we are considering the right tail, we are assuming r > 0.

td=TransformedDistribution[Exp[r w],w \[Distributed] ExponentialDistribution[r α],Assumptions->{r> 0,α>0}]

We can see that the density function, PDF, and distribution function, CDF are the same as those of a Pareto distribution, where we have combined the λ parameter with the logarithmic rate of return, r, so that λ = r α, where α is the Pareto tail exponent parameter.  Our transformed random variable we will call X and consider probabilities based upon x, which is a price based upon a prevailing market price of 1.0.

PDF[td,x]

PDF[td,1]

Limit[PDF[td,x],x->1]

This is the density of a Pareto distribution with parameters, 1, α.  If we subtract 1 from x, we have the distribution of price changes, based on the initial price of 1, or if we took the logarithm of x we would have the logarithmic return for the transaction, based on an initial price of 1.

PDF[ParetoDistribution[1,α],x]

Likewise the CDF of the transformed distribution is the same as a Pareto distribution.

CDF[td, x]

CDF[ParetoDistribution[1, α], x]

Review of Assumptions

The model has a number of assumptions which can be tested to some degree with actual market price data.  The model will be useful to the degree that the assumptions can be shown to be true.

1.  The waiting time for execution of an order is assumed to be exponentially distributed.

2.  Time is assumed to be physical time, but the market may move along a transaction time where price changes are more dependent upon the number transactions between the prices rather than physical time.  That is transaction rates vary considerably during the course of a day.

3.  Symmetry is assumed based on the concept that neither the buyer nor seller in a given transaction has a better knowledge of the future, and that each class of investor is equally motivated by profit.

4.  The model is constructed upon a rational expectation of return at a particular snapshot at an instant of time.  There is no reason why the parameters, λ and r should be expected to remain stationary thus α = (λ/r), is not likely to be stationary.

5.  It is assumed that the parameters are continuous over various waiting time intervals.  It is probably not reasonable to expect that very short term traders have the same assumptions about return as a function of time as long term investors.  Thus it may be reasonable to assume a hybrid distribution with different parameters for very small price changes than for longer price changes.

6.  Expectation of return is presumed to be an exponential function of waiting time.  Other models could be considered with different results.  For instance, a quadratic model could arise from just considering the first three terms of an expansion of the exponential model.

Series[Exp[r w], {w, 0, 2}]

Thus with a different assumption, we can easily create a different distribution of x, the order price relative to the original prevailing market price of 1.0.

td1=TransformedDistribution[1+r w+(((r^2) (w^2))/2),w \[Distributed] ExponentialDistribution[r α],Assumptions->{r> 0,α>0}];PDF[td1,x]

CDF[td1, x]

7.  The model assumes that the matching of orders is fair and unbiased.  This might not be true in all markets.  It would certainly be easy to construct a computer market which was unfair or biased.

Implications of a Pareto Tail Model

If the next price is formed based both upon the distribution of orders in the order books at any instant in time and the flow rates of various types of orders, then the best estimate of the next price should be based on the previous price.  The distribution of price increments, does not particularly depend upon the previous history of increments, but rather on the structure of limit prices and the present order flows.  So if the rate of market transactions increases or becomes asymmetric due to some news event.  A limit order may be executed much sooner than was expected when it was placed and there will have been a large price change in a relatively short period of time.  The players placing the limit orders may adjust for this perhaps by placing orders with greater distance from the current price with the hope of reaping greater profit for waiting, as from their perspective what has increased is r, the rate of return.  They change their behavior based on feedback.  We can thus explain an increase in volatility begetting more volatility.  Alternatively there could be response to news that caused more order activity in the higher frequency limit order placement, near the last market price, as might happen if traders took the view that a price had reached a point that it became a bargain.  With this type of activity a price that had been rapidly changing might suddenly stabilize.  The general concept to take away from this model is that it should not tend to lead to a simple summation of independent identically distributed increments.  Consequently the central limit theorem really shouldn’t be in play, but there might be a scaling of the tail behavior that is based on the structure of the marketplace and traders experience with it.

A Double Pareto Model

To test these ideas it is convenient to develop a two tailed Pareto distribution.  The one offered here is based on the generalized Pareto distribution used in extreme value theory.  μ is the location parameter, σ is the scale parameter.  ξ is used as the shape parameter, and is equivalent to (1/α), where α is the Pareto tail exponent.

PDF[DoubleParetoDistribution[μ, σ, ξ], x]

CDF[DoubleParetoDistribution[μ, σ, ξ], x]

CharacteristicFunction[DoubleParetoDistribution[
       μ, σ, ξ], t]

Integrate[PDF[DoubleParetoDistribution[μ, σ, 
          ξ], x], {x, -Infinity, Infinity}, 
    Assumptions -> {Im[μ] == 0, σ > 0, ξ > 0}]

Mean[DoubleParetoDistribution[μ, σ, ξ]]

Median[DoubleParetoDistribution[μ, σ, ξ]]

Variance[DoubleParetoDistribution[μ, σ, ξ]]

StandardDeviation[DoubleParetoDistribution[μ, 
       σ, ξ]]

The tails of this distribution become progressively heavier as ξ increases.  Variance becomes infinite as ξ > (1/2), and the expectation becomes infinite when ξ ≥ 1.  In the other direction as ξ -> 0 the tail becomes progressively lighter approaching the tail of an exponential distribution at the limit ξ -> 0.  This distribution thus always has tail behavior which is heavier than the exponential distribution.

Plot[(PDF[DoubleParetoDistribution[0, 1, 1/2^#1], 
               x] & ) /@ Range[-1, 2], {x, -5, 5}, 
    PlotRange -> All, Frame -> True, 
    PlotLabel -> "Double Pareto Density"]

The distribution shows power tail behavior on the log log plot, with the tails becoming linear as x increases.

LogLogPlot[
    (1 - CDF[DoubleParetoDistribution[0, 1, 
                     1/2^#1], x] & ) /@ Range[-1, 2], 
    {x, 1, 1000}, PlotRange -> All, Frame -> True, 
    PlotLabel -> 
       "Double Pareto Right Tail\nLog Log Plot"]

An example using JPM.

sym = "JPM"; 
data = FinancialData[sym, {2000, 1, 1}]; 
lr = Differences[Log[data[[All, 2]]]];

DateListLogPlot[data, Joined -> True, 
    PlotLabel -> StringJoin[sym, 
          " Price\nLog Plot"]]

dp = EstimatedDistribution[lr, 
       DoubleParetoDistribution[μ, σ, ξ]]

h0 = Histogram[lr, Automatic, "PDF"];
g0 = Plot[PDF[dp, x], {x, Min[lr], Max[lr]}, PlotRange -> All, PlotStyle -> {Darker[Red]}];
Show[h0, g0, Frame -> True, PlotLabel -> StringJoin[sym, " Log Returns\nHistogram and Double Pareto Fit"]]

ed = EmpiricalDistribution[lr];
maxtail = Max[Abs[lr]];
LogLogPlot[{CDF[ed, -x], 1 - CDF[ed, x], 1 - CDF[dp, x]}, {x, 0.001, maxtail}, PerformanceGoal -> "Speed", Frame -> True, PlotLabel -> "Double Pareto Tail Fit"]

The downloadable notebook does not contain the code for the DoubleParetoDistribution, if you would like that write to mathestate@gmail.com.

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../s15/PowerTailModel.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]], "../s03/Random.html"], {0,0}]];
Show[ t1,  t3,(* t4,*) ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <> ToString[DateList[][[1]]] <> " mathestate    " <> DateString[DateList[], "DateShort"], "Text"]]

© Copyright 2012 mathestate    Thu 14 Jun 2012