1: \documentclass[11pt]{article}
2: \usepackage{psfig}
3: \usepackage{citesort}
4:
5: \addtolength{\textheight}{1.4in}
6: \addtolength{\textwidth}{1.5in}
7: \addtolength{\topmargin}{-0.7in}
8: \addtolength{\evensidemargin}{-0.75in}
9: \addtolength{\oddsidemargin}{-0.75in}
10:
11: \newtheorem{theorem}{Theorem}
12: \newtheorem{lemma}[theorem]{Lemma}
13: \newtheorem{corollary}[theorem]{Corollary}
14: \newtheorem{definition}[theorem]{Definition}
15: \newtheorem{myrule}{Rule}
16:
17: \newenvironment{proof}{\noindent\par{\bf Proof: }}{\nopagebreak\rule{1
18: ex}{0.8 em}\medskip}
19:
20: \newcommand{\Prm}{\Pr\nolimits_m}
21: \newcommand{\overlineX}[0]{Y}
22: \newcommand{\overlineA}[0]{D}
23: \newcommand{\limm}[0]{\lim_{m \goesto \infty}}
24: \newcommand{\newloglike}[2]{\newcommand{#1}{\mathop{\rm #2}\nolimits}}
25: \newloglike{\sgn}{sign}
26:
27: %\newcommand{\trans}[0]{\tt t}
28: \newcommand{\trans}{\top}
29: \newcommand{\buzz}[1]{\emph{#1}}
30: \newcommand{\sss}{\{-1,0,+1\}}
31: \newcommand{\Z}{\mbox{\textbf{Z}}}
32: \newcommand{\MM}{{\cal M}}
33: \newcommand{\FF}{{\cal F}}
34: \newcommand{\CC}{{\cal C}}
35: \newcommand{\SSS}{{\cal S}}
36:
37: \newcommand{\alert}[1]{\typeout{ALERT: #1}\textbf{[[[ #1 ]]]}}
38:
39: \newcommand{\newclass}[2]{\newcommand{#1}{\mbox{\rm #2}}}
40: \newclass{\pp}{PP}
41: \newclass{\np}{NP}
42: \newclass{\p}{P}
43: \newclass{\bcpp}{BCPP}
44: \newclass{\cpp}{CPP}
45: \newclass{\zpp}{ZPP}
46: \newclass{\bpp}{BPP}
47: \newclass{\crclass}{CR}
48: \newcommand{\pnplog}{\mbox{$\p{}^{\mbox{\scriptsize NP}[O(\log n)]}$}}
49:
50: \newcommand{\goesto}{\rightarrow}
51:
52: \newcommand{\suppress}[1]{}
53:
54: \begin{document}
55:
56: \title{Towards Understanding the Predictability of Stock Markets from
57: the Perspective of Computational Complexity\thanks{A preliminary
58: version will appear in {\em Proceedings of the 12th Annual ACM-SIAM
59: Symposium on Discrete Algorithms}, 2001.}}
60:
61: \author{
62: James Aspnes\thanks{
63: Department of Computer Science, Yale University,
64: New Haven, CT 06520-8285, USA.
65: Email: {\tt aspnes@cs.yale.edu}.
66: Supported in part by NSF Grant CCR-9820888.}
67: \and
68: David F. Fischer\thanks{Class of 1999, Yale College, New Haven, CT
69: 06520-8285, USA. Email: {\tt fischer@aya.yale.edu}.}
70: \and
71: Michael J. Fischer\thanks{Department of Computer Science, Yale University,
72: New Haven, CT 06520-8285, USA. Email: {\tt fischer-michael@cs.yale.edu}.}
73: \and
74: Ming-Yang Kao\thanks{Department of Computer Science, Yale University,
75: New Haven, CT 06520-8285, USA. Email: {\tt kao-ming-yang@cs.yale.edu}.
76: Supported in part by NSF Grants CCR-9531028 and CCR-9988376.
77: Current address: Department of Electrical Engineering and Computer Science,
78: Tufts University, Medford, MA 02155, USA. Email: {\tt kao@eecs.tufts.edu}.}
79: \and
80: Alok Kumar\thanks{
81: School of Management,
82: Yale University,
83: New Haven, CT 06520, USA.
84: Email: {\tt alok.kumar@yale.edu}.}
85: }
86:
87: \maketitle
88:
89: \begin{abstract}
90: This paper initiates a study into the century-old issue of market
91: predictability from the perspective of computational complexity. We
92: develop a simple agent-based model for a stock market where the agents
93: are traders equipped with simple trading strategies, and their trades
94: together determine the stock prices. Computer simulations show that a
95: basic case of this model is already capable of generating price graphs
96: which are visually similar to the recent price movements of high tech
97: stocks. In the general model, we prove that if there are a large
98: number of traders but they employ a relatively small number of
99: strategies, then there is a polynomial-time algorithm for predicting
100: future price movements with high accuracy. On the other hand, if the
101: number of strategies is large, market prediction becomes complete in
102: two new computational complexity classes {\cpp} and {\bcpp}, where
103: $\pnplog\subseteq\bcpp\subseteq\cpp=\pp$. These computational
104: completeness results open up a novel possibility that the price graph
105: of an actual stock could be sufficiently deterministic for various
106: prediction goals but appear random to all polynomial-time prediction
107: algorithms.
108: \end{abstract}
109:
110: % \begin{keyword}
111: % agent-based modeling, artificial markets, asset pricing, computational
112: % complexity, market predictability, trader behavior, trading strategies
113: % \end{keyword}
114:
115: \section{Introduction}
116: The issue of market predictability has been debated for more than a
117: century (see \cite{Cootner64} for earlier papers and
118: \cite{malkiel90,Fama91,Campbell97,Lo99} for more recent viewpoints).
119: In 1900, the pioneering work ``{Theory of Speculation}'' of Louis
120: Bachelier used Brownian motion to analyze the stochastic properties of
121: security prices \cite{Cootner64}. Since then, Brownian motion and its
122: variants have become textbook tools for modeling financial assets.
123: Relatively recently, the radically different methodology of Mandelbrot
124: used fractals to approximate price graphs deterministically
125: \cite{mandelbrot97}. In this paper, we initiate a study into this
126: long-running issue from the perspective of computational complexity.
127:
128: We develop a simple agent-based model for a stock market
129: {\cite{Day90,Lux98}}. The agents are traders equipped with
130: simple trading strategies, and their trades together determine the
131: stock prices. We first consider a basic case of this model where there
132: are only two strategies, namely, momentum and contrarian strategies.
133: The choice of this base model and thus our general model is justified
134: at two levels: (1) Experimental and empirical studies in the finance
135: literature
136: \cite{Andreassen90,Clarke98,DeBondt91,DeBondt93,Kumar99,Clarke98,Black86,DeLong90b}
137: show that a large number of traders primarily follow these two
138: strategies. (2) Our own simulation results show that despite its
139: simplicity, the base model is capable of generating price graphs which
140: are visually similar to the recent price movements of high tech stocks
141: (Figures \ref{figEx1} and \ref{figEx2}).
142:
143: With these justifications, we then consider the issue of market
144: predictability in the general model. We prove that if there are a
145: large number of traders but they employ a relatively small number of
146: strategies, then there is a polynomial-time algorithm to predict
147: future price movements with high accuracy (Theorem
148: \ref{theorem-prediction-easy-fixed}). On the other hand, if there are
149: also a large number of strategies, then the problem of predicting
150: future prices becomes computationally very hard. To describe this
151: hardness, we define two new computational complexity classes called
152: {\cpp} and {\bcpp} (Definitions \ref{def-cpp} and
153: \ref{def-bcpp}). We show that some market prediction problems are
154: complete for these two classes (Theorems \ref{theorem-bcpp-complete}
155: and \ref{theorem-cpp-complete}) and that
156: $\pnplog\subseteq\bcpp\subseteq\cpp=\pp$.
157:
158: These computational completeness results open up the possibility that
159: the price graph of an actual stock could be sufficiently deterministic
160: for various prediction purposes but appear random to all
161: polynomial-time prediction algorithms. This is in contrast to the most
162: popular academic belief that the future price of a stock cannot be
163: predicted from its historical prices because the latter are
164: statistically random and contain no information. This new viewpoint
165: also differs from the fractal-based methodology in that the price
166: graph of a stock could be a fractal but the fractal might not be
167: computable in polynomial time. The findings in this paper can by no
168: means settle the debate on market predictability. Our goal is only
169: that this alternative approach could provide new insights to the
170: predictability issue in a systematic manner. In particular, it could
171: provide a general framework to investigate the many documented
172: technical trading rules \cite{GSW99} and to generate novel and
173: significant interdisciplinary research problems for computer science
174: and finance.
175:
176: The rest of the paper is organized as follows.
177: Section~\ref{sec_experimental} discusses the basic market model.
178: Section~\ref{section-market-model} formulates the general model.
179: Section~\ref{section-prediction} proves the complexity results for
180: market prediction in the general model. We conclude the paper with
181: some directions for future research in Section~\ref{sec_conclusion}.
182:
183: \section{A Basic Market Model}\label{sec_experimental}
184: In this section, we present a very simple market model, called the
185: {\it deterministic-switching MC} (DSMC) model. The letter M stands for
186: a {\it momentum} strategy, and the letter C for a {\it
187: contrarian} strategy. These two strategies and the model
188: itself are defined in Section~\ref{subsec_basic_def}. Some computer
189: simulations for this model are reported in Section~\ref{subsec_exp}.
190:
191: Intuitively, these strategies are heuristics (``rules of thumb'')
192: used by traders in the absence of reliable asset valuation models. As
193: discussed in \cite{DeLong90b}, a momentum trader may observe a
194: sequence of ``up'' trades (price increments) and execute a buy
195: trade in the anticipation that she will not be one of the last buyers,
196: knowing very well that the asset is overpriced. Similarly, she may see
197: some ``down'' trades (price decrements) and then make a sell trade
198: in the hope that there will be more sellers after her. In contrast,
199: after detecting a number of ``up'' (respectively, down) trades, a
200: contrarian trader may submit a sell (respectively, buy) trade,
201: anticipating a price reversal.
202:
203: Both experimental and empirical studies have shown that traders look
204: at past price dynamics to form their expectations of future prices,
205: and a large number of them primarily follow momentum or contrarian
206: strategies \cite{Andreassen90,Clarke98,DeBondt91,DeBondt93}. In
207: addition, the traders may switch between these two diametrically
208: opposite strategies. Momentum and contrarian strategies are dominant
209: in the behavior of professional market timers as well
210: \cite{Kumar99}. The use of momentum and contrarian strategies
211: sometimes signifies gambling tendencies among traders
212: \cite{Clarke98}. In fact, a market model with momentum and contrarian
213: traders can also be interpreted as a market with noise traders and
214: rational traders, where the noise traders essentially follow a
215: momentum strategy while the rational traders attempt to exploit the
216: noise traders by following a contrarian strategy
217: \cite{Black86,DeLong90b}.
218:
219: \subsection{Defining the DSMC Model}\label{subsec_basic_def}
220: In the DSMC model, there is only one stock traded in the market. The
221: model is completely specified by three integer parameters $m, L, k >
222: 0$, and a real parameter $\alpha > 0$ as follows.
223:
224: There are $m$ traders in the market, and each trader's strategy set
225: consists of momentum $(\MM)$ and contrarian $(\CC)$ strategies. At
226: the beginning of day 1 of the investment period, each trader randomly
227: chooses her initial strategy from $\{\MM,\CC\}$ and an integer $\ell_i
228: \in [2,L]$ with equal probability, where $L$ is the {\it maximum
229: strategy switching period}. This is the only source of randomness in
230: the DSMC model; from this point onwards, there is no random choice.
231:
232: \begin{myrule}{\bf(Deterministic Strategy Switching Rule)} \rm
233: For days $1,\ldots,k+1$, there is no trading. Each trader starts
234: trading from day $k+2$ using her initial strategy. Trader $i$ uses the
235: same strategy for $\ell_i$ days and switches it at the beginning of
236: every $\ell_i$ days.
237: \end{myrule}
238:
239:
240: The next rule defines the two strategies with respect to a given
241: memory size $k$, which is the same for all traders.
242:
243: \newcommand{\TR}[0]{{\rm Tr}}
244:
245: \begin{myrule}{\bf(Trading Rule)}\rm
246: \label{rule_trading}
247: At the beginning of day $t$, observe the stock prices $P_f$ of days $f
248: \in [t-(k+1),t-1]$. For $g \in [t-k,t-1]$, count the number $k_u$ of
249: days $g$ when $P_{g}>P_{g-1}$; and the number $k_d$ of days when
250: $P_{g} < P_{g-1}$. The {\it $k$-day trend} is defied as $\TR(k,t) =
251: k_u - k_d$. Then, if $\TR(k,t) \geq 0$ $($respectively, $<0)$, the
252: momentum strategy $\MM$ buys (respectively, sells) one share of the
253: stock at the market price determined by Rule~\ref{rule_price}
254: below. In contrast, the contrarian strategy $\CC$ sells (respectively,
255: buys) one share of the stock.
256: \end{myrule}
257:
258: For instance, suppose that $k = 2$, and investor $i$ picks her initial
259: strategy $\MM$ and $\ell_i = 2$ at the beginning of day 1. She then
260: observes the prices of days 1, 2, 3, which are, say, $\$80, \$82,
261: \$90$. At the beginning of day 4, she issues a market order to buy
262: one share of the stock. The orders issued by the traders on day 4
263: together determine the price of day 4 as specified by Rule
264: \ref{rule_price}. Suppose that the price of day 4 is $\$91$,
265: then investor $i$ issues another market buy order at the beginning of
266: day 5. Since her $\ell_i$ is 2, at the beginning of day 6, she
267: switches her strategy from $\MM$ to $\CC$.
268:
269: \begin{myrule}{\bf(Price Adjustment Rule)}\rm
270: \label{rule_price}
271: The prices for days $1,\ldots,k+1$ are given. On day $t \geq k+2$,
272: let $m_b$ and $m_s$ be the total numbers of buys and sells,
273: respectively. Then, the price $P_t$ on day $t$ is determined by the
274: following equation:
275: \[P_t - P_{t-1} = \alpha{\cdot}(m_b - m_s),\]
276: where $\alpha$ is the unit of price change.
277: \end{myrule}
278:
279: \newlength{\heightone}
280: \setlength{\heightone}{0in}
281: \addtolength{\heightone}{0.5\textwidth}
282: \begin{figure}
283: \centerline{\psfig{figure=market_fig_1.eps,width=\textwidth,height=\heightone}}
284: \caption{A one-year price sequence generated using the DSMC model.
285: Parameters: number of traders $m = 20$, memory size $k=2$, maximum
286: strategy switching period $L=8$, unit of price change $\alpha = 0.25$,
287: number of trading days $= 250$. The price graph appears strikingly
288: similar to the recent price movements of high tech stocks.}
289: \label{figEx1}
290: \end{figure}
291:
292: \begin{figure}
293: \centerline{\psfig{figure=market_fig_11.eps,width=\textwidth,height=\heightone}}
294: \caption{A one-year price sequence generated using the DSMC model.
295: The parameters are the same as those for
296: Figure~\protect{\ref{figEx1}}.}
297: \label{figEx2}
298: \end{figure}
299:
300: \subsection{Computer Simulation on the DSMC Model}\label{subsec_exp}
301: \label{subsec_simulate}
302: We have conducted some computer simulations of the DSMC model to test
303: whether it can generate realistic price graphs. Because we had to
304: examine the graphs visually, our time constraints limited the number
305: of these simulations to only about six hundred. For a large fraction
306: of them, we set $m = 20$, $L = 8$, and the initial $k$ prices in the
307: range of $\$70$ to $\$90$. We then focused on testing the effect of
308: memory size $k$ \cite{Mullainathan98}. Two main findings are as
309: follows:
310: \begin{itemize}
311: \item
312: For $k=1$, the price graphs were not visually real.
313: \item
314: For $k=2$, about one out of four graphs were strikingly similar to
315: those of recent high tech stocks, which was a major positive surprise
316: to us. Two representatives of such graphs are shown in
317: Figures~\ref{figEx1} and \ref{figEx2}.
318: \end{itemize}
319:
320: These two statements are based on our subjective impressions and
321: limited simulations. To further understand the DSMC model, it would be
322: useful to automate statistical analysis on the price graphs generated
323: by this model and compare them with real stock prices.
324:
325: \section{A General Market Model}\label{section-market-model}
326: In this section, we define a market model, called the {\it AS} model,
327: where the word AS stands for arbitrary strategies. It can be verified
328: in a straightforward manner that the DSMC model is a special case of
329: the AS model.
330:
331: In the AS model, there is only one stock traded in the market. The
332: model is completely specified as follows with five parameters: (1) the
333: number $m$ of traders, (2) a unit $\alpha > 0$ of price change, (3) a
334: set $\Pi=\{\SSS^1,\ldots,\SSS^h\}$ of strategies, (4) a price
335: adjustment rule (Equation~\ref{eq-proportional-increment} or
336: \ref{eq-fixed-increment} below), and (5) a joint distribution of the
337: population variables $X_1,\ldots,X_h$.
338:
339: \begin{myrule}{\bf(Market Initialization)} \rm
340: There are $m$ traders in the market. At the beginning of day 1 of the
341: investment period, each trader randomly chooses her initial strategy
342: from $\Pi$. Let $X_i$ be the number of traders who choose $\SSS^i$.
343: Then, each $X_i$ is a random variable, which is the only source of
344: randomness in the model. (Unlike the DSMC model, because the allowable
345: generality of $\Pi$, the AS model does not need strategy switching.)
346: \end{myrule}
347:
348: Different joint distributions of the variables $X_i$ lead to different
349: specific models and prediction problems. In
350: Section~\ref{section-prediction-easy}, we consider joint distributions
351: that tend to Gaussian in the limit as the number $m$ of traders
352: becomes large. In Section~\ref{section-prediction-hard}, we consider
353: the case where the variables $X_i$ are independent, and each is $0$ or
354: $1$ with equal probability.
355:
356: \begin{myrule}{\bf(Trading Strategies)}\rm\label{section-traders}
357: There is no trading on day $0$. At the beginning of day $t \geq 1$, a
358: trader observes the historical prices $P_0,\ldots,P_{t-1}$ and reacts
359: by issuing a market order to buy one share of the stock, hold (i.e.,
360: do nothing), or sell one share according her strategy. Formally, a
361: {\it strategy} is a collection of functions
362: $\SSS=\{\SSS_1,\SSS_2,\ldots,\SSS_t,\ldots\}$, where each $\SSS_t$
363: maps $P_0, \ldots, P_{t-1}$ to $+1$ (buy), $0$ (hold), or $-1$ (sell).
364: \end{myrule}
365:
366: The price $P_t$ of day $t$ is determined at the end of the day by the
367: day's $m$ market orders using Rule~\ref{rule_price_as}. Since the
368: traders choose their strategies randomly, the sequence
369: $P_0,P_1,\ldots,P_t,\ldots$ is a stochastic process. We write $\FF_t$
370: for the probability space induced by all possible sequences $\langle
371: P_0,\ldots,P_t\rangle$ \cite{KS98}. Then, we think of each function
372: $\SSS_t$ as a random variable on $\FF_{t-1}$.
373:
374: We distinguish between strategies that react to price movements and
375: those that ignore them.
376: \begin{itemize}
377: \item
378: $\SSS$ is an {\it active} strategy if the functions $\SSS_t$ may or
379: may not be constant functions. An {\it active} trader is one with an
380: active strategy.
381: \item
382: $\SSS$ is a {\it passive} strategy if the functions $\SSS_t$ all are
383: constant functions. A {\it passive} trader is one with a passive
384: strategy.
385: \end{itemize}
386:
387: \begin{myrule}\rm {\bf (Price Adjustment)}\label{rule_price_as}
388: The price $P_0$ is given. At the end of day $t \geq 1$, the price
389: $P_t$ is determined by the day's market orders to buy or sell from the
390: traders. We consider two simple rules:
391:
392: With the \buzz{proportional increment} (PI) rule,
393: \begin{equation}
394: \label{eq-proportional-increment}
395: P_t = P_{t-1} + \alpha{\cdot}\sum_{i=1}^{h} X_i{\cdot}\SSS^i_t,
396: \end{equation}
397: where $\alpha$ is the unit of price change. Thus we can observe
398: directly the net difference between the number of buyers and sellers
399: on day $t$.
400:
401: With the \buzz{fixed increment} (FI) rule,
402: \begin{equation}
403: \label{eq-fixed-increment}
404: P_t = P_{t-1} + \alpha{\cdot}\sgn\left(\sum_{i=1}^{h}
405: X_i{\cdot}\SSS^i_t\right).
406: \end{equation}
407: In this case, the market moves up or down depending on whether the
408: majority of traders are buying or selling, but the amount by which it
409: moves is fixed at $\alpha$.
410: \end{myrule}
411:
412: For notational brevity, an {\it AS+FI model} refers to an AS model with the
413: fixed increment rule, and an {\it AS+PI model} refers to an AS model with
414: the proportional increment rule.
415:
416: In reality, the price tends to move up if there are more buy orders
417: than sell orders; similarly, the price tends to move down if there are
418: more sell orders than buy orders. The FI rule is meant to model the
419: sign but not the magnitude of the slope of this correlation, while the
420: PI rule attempts to model both. Clearly, there can be many other
421: increment rules, which this paper leaves for future research.
422:
423: \section{Predicting the Market}
424: \label{section-prediction}
425:
426: Informally, the \buzz{market prediction problem} at the beginning of
427: day $t$ is defined as follows:
428: \begin{itemize}
429: \item
430: The data consists of (1) the five parameters of an AS-model, i.e.,
431: $m$, $\alpha$, $\Pi$, $X_i$, and a price adjustment rule, and (2) a
432: price history $P_0,\ldots,P_{t-1}$.
433: \item
434: The goal is to predict the price $P_t$ by estimating the conditional
435: probabilities $\Pr[P_t>P_{t-1} \mid P_0,\ldots,P_{t-1}]$,
436: $\Pr[P_t<P_{t-1} \mid P_0,\ldots,P_{t-1}]$, and
437: $\Pr[P_t=P_{t-1} \mid P_0,\ldots,P_{t-1}]$.
438: \end{itemize}
439: Note that $\Pr[P_t>P_{t-1} \mid P_0,\ldots,P_{t-1}]$ is symmetric to
440: $\Pr[P_t<P_{t-1} \mid P_0,\ldots,P_{t-1}]$ and
441: $\Pr[P_t=P_{t-1} \mid P_0,\ldots,P_{t-1}] = 1 -
442: \Pr[P_t>P_{t-1} \mid P_0,\ldots,P_{t-1}]-\Pr[P_t<P_{t-1} \mid P_0,\ldots,P_{t-1}]$.
443: Thus, from this point onwards, our discussion focuses on estimating
444: $\Pr[P_t>P_{t-1} \mid P_0,\ldots,P_{t-1}]$.
445:
446: From an algorithmic perspective, we sometimes assume that the price
447: adjustment rule and the joint distribution of the variables $X_i$ are
448: fixed, and that the input to the algorithm is $m$, $\alpha$, a
449: description of $\Pi$, and the price history. This allows different
450: algorithms for different model families as well as side-steps the
451: issue of how to represent the possibly very complicated joint
452: distribution of the variables $X_i$ as part of the input. As for the
453: description of $\Pi$, we only need $\SSS^i_1,\ldots,\SSS^i_t$ for each $\SSS^i \in \Pi$
454: instead of
455: the whole $\Pi$, and the description of these functions can simplified
456: by restricting their domains to consist of the price sequences
457: consistent with the given price history.
458:
459: \subsection{Markets as Systems of Linear Constraints}
460: \label{section-market-to-lp}
461:
462: In the AS+FI model with parameters $m$ and $\alpha$, a price sequence
463: $P_0,\ldots,P_t$ and $\Pi$ can yield a set of linear inequalities in
464: the population variables $X_i$ as follows. If the price changes on
465: day $t$, we have
466: \begin{equation}\label{eq-linear-change}
467: \sgn(P_t - P_{t-1}) \sum_{i=1}^h \SSS^i_t X_i > 0.
468: \end{equation}
469:
470: If the price does not change, we have instead the equation
471: \begin{equation}\label{eq-linear-nochange}
472: \sum_{i=1}^h \SSS^i_t X_i = 0.
473: \end{equation}
474:
475: Furthermore, any assignment of the variables $X_i$ that satisfies
476: either inequality is feasible with respect to the corresponding price
477: movement on day $t$. In both cases, $\SSS^i_t$ is computable from the
478: price sequence $P_0,\ldots,P_{t-1}$. The same statements hold for
479: days $1,\ldots,t-1$. Therefore, given $m$ and $\alpha$, we can
480: extract from $\Pi$ and $P_0,\ldots,P_t$ a set of linear constraints on
481: the variables $X_i$. The converse holds similarly. We formalize these
482: two observations in Lemmas~\ref{lemma-FI-market-to-inequalities} and
483: \ref{lemma-inequalities-to-FI-market} below.
484:
485: \begin{lemma}
486: \label{lemma-FI-market-to-inequalities}
487: In the AS+FI model with parameters $m$ and $\alpha$, given $\Pi$ and a
488: price sequence $P_0,\ldots,P_{\beta}$, there are matrices $A$ and
489: $B$ with coefficients in $\sss$, $h$ columns each, and $\beta$ rows
490: in total. The rows of $A$ (respectively, $B$) correspond to the days
491: when $P_j \neq P_{j-1}$ (respectively, $P_j=P_{j-1}$).
492: Furthermore. the column vectors $x = (X_1,\ldots,X_h)^{\trans}$ consistent with $\Pi$
493: and $P_0,\ldots,P_{\beta}$ are exactly those that satisfy $Ax > 0$
494: and $Bx = 0$. The matrices $A$ and $B$ can be computed in time
495: $O(h{\beta}T)$, where $T$ is an upper bound on the time to compute a
496: single $\SSS^i_j$ from $P_0,\ldots,P_{\beta}$ over all $j \in
497: [1,\beta]$ and $\SSS^i$.
498: \end{lemma}
499: \begin{proof}
500: Follows immediately from Equations~\ref{eq-linear-change}
501: and
502: \ref{eq-linear-nochange}.
503: \end{proof}
504:
505: \begin{lemma}\label{lemma-inequalities-to-FI-market}
506: In the AS+FI model with parameters $m$ and $\alpha$, given a system of
507: linear inequalities $Ax > 0, Bx = 0$, where $A$ and $B$ have
508: coefficients in $\sss$ with $h$ columns each, and $\beta$ rows in
509: total, there exist $(1)$ a set $\Pi$ of $h$ strategies corresponding
510: to the $h$ columns of $A$ and $B$, and $(2)$ a $(\beta+1)$-day price
511: sequence $P_0,\ldots,P_\beta$ with the latter $\beta$ days
512: corresponding to the $\beta$ rows of $A$ and $B$. Furthermore, the
513: values of the population variables $X_1,\ldots,X_n$ are feasible
514: with respect to the price movement on day $j$ if and only if column vector $x =
515: (X_1,\ldots,X_n)^{\trans}$ satisfies the $j$-th constraint in $A$ and $B$.
516: Also, $P_0,\ldots,P_\beta$ and a description of $\Pi$ can be computed
517: in $O(h\beta)$ time.
518: \end{lemma}
519: \begin{proof}
520: Follows immediately from Equations~\ref{eq-linear-change}
521: and
522: \ref{eq-linear-nochange}.
523: \end{proof}
524:
525: In the AS+PI model we obtain only equations, of the form:
526: \begin{equation}
527: \label{eq-linear-proportional}
528: \sum_{i=1}^h \SSS^i_t X_i = \frac{1}{\alpha} (P_t - P_{t-1}).
529: \end{equation}
530: In this case there is a direct correspondence between market
531: data and systems of linear equations. We formalize this
532: correspondence in Lemmas~\ref{lemma-PI-market-to-equations} and
533: \ref{lemma-equations-to-PI-market} below.
534:
535: \begin{lemma}
536: \label{lemma-PI-market-to-equations}
537: In the AS+PI model with parameters $m$ and $\alpha$, given $\Pi$ and a
538: price sequence $P_0,\ldots,P_{\beta}$, there is a matrix $B$
539: with coefficients in $\sss$, $h$ columns, and $\beta$ rows, and a
540: column vector $b$ of length $h$, such that
541: the column vectors $x = (X_1,\ldots,X_h)^{\trans}$ consistent with $\Pi$
542: and $P_0,\ldots,P_{\beta}$ are exactly those that satisfy $Bx = b$.
543: The coefficients of $B$ and $b$ can be computed in time
544: $O(h{\beta}T)$, where $T$ is an upper bound on the time to compute a
545: single $\SSS^i_j$ from $P_0,\ldots,P_{\beta}$ over all $j \in
546: [1,\beta]$ and $\SSS^i$.
547: \end{lemma}
548: \begin{proof}
549: Follows immediately from Equation \ref{eq-linear-proportional}.
550: \end{proof}
551:
552: \begin{lemma}\label{lemma-equations-to-PI-market}
553: In the AS+PI model with parameters $m$ and $\alpha$, given a system of
554: linear equations $Bx = b$, where $B$ is a $\beta \times h$ matrix with
555: coefficients in $\sss$,
556: there exist $(1)$ a set $\Pi$ of $h$ strategies corresponding
557: to the $h$ columns of $B$, and $(2)$ a $(\beta+1)$-day price
558: sequence $P_0,\ldots,P_\beta$ with the last $\beta$ days
559: corresponding to the $\beta$ rows of $B$. Furthermore, the
560: values of the population variables $X_1,\ldots,X_n$ are feasible
561: with respect to the price movement on day $j$ if and only if column vector $x =
562: (X_1,\ldots,X_n)^{\trans}$ satisfies the $j$-th constraint in $B$.
563: Also, $P_0,\ldots,P_\beta$ and a description of $\Pi$ can be computed
564: in $O(h\beta)$ time.
565: \end{lemma}
566: \begin{proof}
567: Follows immediately from Equation \ref{eq-linear-proportional}.
568: \end{proof}
569:
570: \subsection{An Easy Case for Market Prediction: Many Traders but Few Strategies}
571: \label{section-prediction-easy}
572: In Section~\ref{section-prediction-easy-FI}, we show that if an AS+FI market
573: has far more traders than strategies, then it takes polynomial
574: time to estimate the probability that the next day's price will rise.
575: In Section \ref{section-prediction-easy-PI}, we discuss why the same
576: analysis technique does not work for an AS+PI market.
577:
578: \subsubsection{Predicting an AS+FI Market}
579: \label{section-prediction-easy-FI}
580: For the sake of emphasizing the dependence on $m$, let $\Prm[E]$ be
581: the probability that event $E$ occurs when there are $m$ traders in
582: the market.
583:
584: \newcounter{easy}
585:
586: This section makes the following assumptions:
587: \begin{list}{\theeasy}
588: {\usecounter{easy}\setcounter{easy}{0}\renewcommand{\theeasy}{E\arabic{easy}}
589: \setlength{\rightmargin}{0in}
590: \settowidth{\leftmargin}{E4} \addtolength{\leftmargin}{\labelsep}}
591: \item\label{e1}
592: The input to the market prediction problem is simply a price history
593: $P_0,\ldots,P_{t-1}$. The output is $\limm\Prm[P_t > P_{t-1} \mid
594: P_0,\ldots,P_{t-1}]$.
595: \item\label{e2}
596: The market follows the AS+FI model.
597: \item\label{e3}
598: $\Pi$ is fixed. The values $\SSS^i_j$ over all $i \in [1,h]$ are
599: computable from the input in total time polynomial in $j$.
600: \item\label{e4}
601: Each of the $m$ traders independently chooses a random strategy
602: $\SSS^i$ from $\Pi$ with fixed probability $p_i > 0$, where
603: $p_1+\cdots+p_h = 1$.
604: \end{list}
605: The parameter $\alpha$ is irrelevant.
606:
607: Notice that the column vector $X=(X_1,\ldots,X_h)^{\trans}$ is the sum
608: of $m$ independent identically-distributed vector-valued random
609: variables with a center at $p=m{\cdot}(p_1,\ldots,p_h)^{\trans}$. We
610: recenter and rescale $X$ to $\overlineX =
611: (X-m{\cdot}(p1,\ldots,p_h)^{\trans})/\sqrt{m}$. Then, by the Central
612: Limit Theorem (see, e.g., \cite[Theorem 29.5]{Billingsley}), as $m
613: \goesto +\infty$, $\overlineX$ converges weakly to a normal
614: distribution centered at
615: the $h$-dimensional vector
616: $(0,\ldots,0)^{\trans}$. In
617: Theorem~\ref{theorem-prediction-easy-fixed} below, we rely on this
618: fact to estimate the probability that the market rises for price
619: histories that occur with nonzero probability.
620:
621: \begin{theorem}
622: \label{theorem-prediction-easy-fixed}
623: Assume that $\limm\Prm[P_0,\ldots,P_{t-1}]>0$. Then there is a
624: fully polynomial-time approximation scheme for estimating
625: $\limm\Prm[P_t > P_{t-1} \mid P_0,\ldots,P_{t-1}]$ from
626: $P_0,\ldots,P_{t-1}$. The time complexity of the scheme is polynomial
627: in $(1)$ the length $t$ of the price history,
628: $(2)$ the inverse of the relative error bound
629: $\epsilon$, and $(3)$ the inverse of the failure probability $\eta$.
630: \end{theorem}
631: {\it Remark.} We omit the explicit dependency of the running time in
632: $h$ and $p_1,\ldots,p_h$ in order to concentrate on the main point
633: that market prediction is easy with this section's four assumptions. The
634: parameters $h$ and $p_1,\ldots,p_h$ are constant under the
635: assumptions.
636: \begin{proof}
637: We use Lemma~\ref{lemma-FI-market-to-inequalities} to convert the price
638: history $P_0,\ldots,P_{t-1}$ and the strategy set $\Pi$ into a system
639: of linear constraints $AX > 0$ and $BX=0$, with the next day's price
640: change $P_t-P_{t-1}$ determined by $\sgn(c{\cdot}X')$ for some $c$.
641: Since the values $\SSS^i_j$ are computable in time polynomial in $j$,
642: this conversion takes time polynomial in $t$.
643:
644: Then, $\Prm[P_0,\ldots,P_{t-1}]=\Prm[AX>0 \wedge BX=0]$. Since
645: $\limm\Prm[AX > 0 \wedge BX=0] > 0$, the constraints in $B$ must be
646: vacuous; in other words, for each $P_i=0$ with $i\in[0,t-1]$, the
647: corresponding constraint in $B$ is
648: $0{\cdot}X_1+\cdots+0{\cdot}X_h=0$.
649: Therefore,
650: $\Prm[P_0,\ldots,P_{t-1}]=\Prm[AX>0]$. Furthermore, since both
651: $A$ and $c$ are constant with respect to $m$,
652: \begin{equation}
653: \label{eqn_ratio_1}
654: \limm\Prm[P_t > P_{t-1} \mid P_0,\ldots,P_{t-1}]
655: =
656: \frac{\limm\Prm[AX > 0 \wedge c{\cdot}X > 0]}{\limm\Prm[AX > 0]}.
657: \end{equation}
658: So to compute the desired $\limm\Prm[P_t > P_{t-1} \mid
659: P_0,\ldots,P_{t-1}]$, we compute $\limm\Prm[AX > 0 \wedge c{\cdot}X
660: > 0]$ and $\limm\Prm[AX > 0]$ as follows.
661:
662: To avoid the degeneracy caused by $\sum_{i=1}^{h} X_i = m$, we work
663: with $X'=(X_1,\ldots,X_{h-1})^{\trans}$ instead of $X$ by replacing
664: $X_h$ with $m-\sum_{i=1}^{h-1} X_i$ and making related changes. Let
665: $p'=(p_1,\ldots,p_{h-1})^{\trans}$, which is the center of $X'$. As
666: is true for $\overlineX$, as $m \goesto +\infty$, the vector
667: $\overlineX'=(X'-m{\cdot}p')/\sqrt{m}$ converges weakly to a normal
668: distribution centered at the $(h-1)$-dimensional point
669: $(0,\ldots,0)^{\trans}$ .
670: Under the assumption that each $p_i$ is nonzero,
671: the distribution of $Y'$ is full-dimensional
672: (within its restricted $(h-1)$-dimensional space),
673: as in the limit the variance of each coordinate $Y'_i$ is nonzero
674: conditioned on the values of the other coordinates,
675: which implies that the smallest subspace containing the distribution
676: must contain all $h-1$ axes.
677: We can
678: calculate the covariance matrix of $Y'$ directly from the $p_i$, as it
679: is equal to the covariance matrix for a single trader:
680: on the diagonal,
681: $C_{ii} = p_i - p_i^2$;
682: and for off-diagonal elements,
683: $C_{ij} = -p_i p_j$.
684: Given $C$, $Y'$ has density $\rho(x) = a e^{x^\trans C x}$
685: for some constant $a$, and we can evaluate this density in $O(h^2)$ time
686: given $x$, which is $O(1)$ time under our assumption that $\Pi$ is
687: fixed.
688:
689: Let
690: $A_i$ be the $i$-th constraint of $A$, i.e.,
691: $A_{i,1}X_1+\cdots+A_{i,h}X_h > 0$. Let $A'_i$ denote the constraint
692: $(A_{i,1}-A_{i,h},\ldots,A_{i,{h-1}}-A_{i,h})$. Let
693: $c'=(c_1-c_h,\ldots,c_{h-1}-c_h)$.
694:
695: We next convert the constraints of $A$ on $X$ into constraints on
696: $\overlineX'$. First of all, notice that $A_i X =
697: \sqrt{m}{\cdot}(A'_i \overlineX') + m{\cdot}A_i p$. So $A_i X > 0$ if
698: and only if $A'_i \overlineX' > -\sqrt{m}{\cdot}A_i p$. The term
699: $-\sqrt{m}{\cdot}A_i p$ may not be constant. In such a case, as $m
700: \goesto \infty$, the hyper plane bounding the half space $A'_i
701: \overlineX' > -\sqrt{m}{\cdot}A_i p$ keeps moving away from the
702: origin, which presents some technical complication. To remove this
703: problem, we analyze the term in three cases. If $A_i p < 0$, then
704: since $m{\cdot}p$ is the center of $X$, as $m \goesto \infty$,
705: $\Prm[A_i X<0]$ converges to $1$. In other words, $A_i$ is infeasible
706: with probability $1$ in the limit. Then, since
707: $\limm\Prm[P_0,\ldots,P_{t-1}]>0$, such $A_i$ cannot exist in $A$.
708: Similarly, if $A_i p > 0$, then $\limm\Prm[A_i X > 0]=1$ and $A_i$ is
709: vacuous. The interesting constraints are those for which $A_i p = 0$;
710: in this case, by algebra, $A_i X > 0$ if and only if $A'_i \overlineX'
711: > 0$. Thus, let $\overlineA$ be the matrix formed by these
712: constraints; $D$ can be computed in $O(ht)$ time. Then, since $D$ is
713: constant with respect to $m$, $\limm\Prm[AX >
714: 0]=\limm\Prm[\overlineA\overlineX'>0]$. Similarly, $\Prm[AX > 0
715: \wedge c{\cdot}X > 0]$ converges to (1) $0$, (2)
716: $\Prm[\overlineA\overlineX' > 0]$, or (3) $\Prm[\overlineA\overlineX'
717: > 0 \wedge c'{\cdot}\overlineX' > 0]$ for case (1) $c{\cdot}p < 0$,
718: case (2) $c{\cdot}p > 0$, or case (3) $c{\cdot}p = 0$, respectively.
719:
720: Therefore, by Equation~\ref{eqn_ratio_1}, $\limm\Prm[P_t > P_{t-1} \mid
721: P_0,\ldots,P_{t-1}]$ equals $0$ for case (1) and equals $1$ for case
722: (2). Case (3) requires further computation.
723: \begin{equation}
724: \label{eqn_ratio}
725: \limm\Prm[P_t > P_{t-1} \mid P_0,\ldots,P_{t-1}]
726: =
727: \frac{\limm\Prm[\overlineA\overlineX' > 0 \wedge
728: c'{\cdot}\overlineX' > 0]}{\limm\Prm[\overlineA\overlineX' > 0]}.
729: \end{equation}
730: The numerator and denominator of the ratio in Equation~\ref{eqn_ratio}
731: are both integrals of the distribution of $\overlineX'$ in the limit
732: over the bodies of possibly infinite convex polytopes.
733: To deal with the
734: possible infiniteness of the convex bodies $\overlineA\overlineX' > 0
735: \wedge c'{\cdot}\overlineX' > 0$ and $\overlineA\overlineX' > 0$,
736: notice that the density drops exponentially. So we can truncate the
737: regions of integration to some finite radius around the
738: $(h-1)$-dimensional origin $(0,\ldots,0)^{\trans}$ with only
739: exponentially small loss of precision.
740: Finally, since
741: the distribution of $\overlineX'$ in the limit is normal,
742: by applying the
743: Applegate-Kannan integration algorithm for log-concave distributions
744: \cite{ApplegateK91} to the numerator and denominator separately, we
745: can approximate $\limm\Prm[P_t > P_{t-1} \mid P_0,\ldots,P_{t-1}]$ within
746: the desired time complexity.
747: \end{proof}
748:
749: \subsubsection{Remarks on Predicting an AS+PI Market}
750: \label{section-prediction-easy-PI}
751: The probability estimation technique based on taking $m$ to $\infty$
752: does not appear to be applicable to the AS+PI model for the following
753: reasons.
754:
755: First of all, by Lemma~\ref{lemma-PI-market-to-equations}, the input
756: price history induces a system of linear equations $BX=b$. If any
757: equation in $BX=b$ is not equivalent to $X_1+\cdots+X_h=m$ or
758: $0{\cdot}X_1+\cdots+0{\cdot}X_h=0$, then
759: $\limm\Prm[P_0,\ldots,P_{t-1}]=0$.
760:
761: A natural attempt to overcome this seemingly technical difficulty
762: would be to (1) solve $BX=b$ to choose a maximal set $U$ of
763: independent variables $X_i$ and (2) evaluate
764: $\Prm[P_0,\ldots,P_{t-1}]$ in the probability space induced by this
765: set. Still, a single constraint such as
766: $B_{i,1}{\cdot}X_1+\cdots+B_{i,h}{\cdot}X_{h}=\alpha{\cdot}m_0$ with
767: $B_{i,j} \geq 0$ for all $j \in [1,h]$ and $B_{i,j'} > 0$ for some
768: $X_{j'} \in U$ forces $\limm\Prm[P_0,\ldots,P_{t-1}]=0$ in the new
769: probability space. This is due to the fact that $m_0$ is constant
770: with respect to $m$.
771:
772: A further attempt would be to evaluate $\limm\Prm[P_t > P_{t-1} \mid
773: P_0,\ldots,P_{t-1}]$ by directly working with the probability space
774: induced by $P_0,\ldots,P_{t-1}$. This also does not work because we
775: show below that the market prediction problem can be reduced to the
776: case where taking a limit in $m$ has no effect on the distribution of
777: the strategy counts. Suppose that we are given a market which
778: follows the assumptions \ref{e1}, \ref{e3}, and \ref{e4} of
779: Section \ref{section-prediction-easy-FI} except that this market uses the PI
780: rule and has $m_0$ traders. We construct a new market with any $m
781: \geq m_0$ traders with the following modifications:
782: \begin{enumerate}
783: \item
784: The price history $P_0,\ldots,P_{t-1}$ is extended with an extra day
785: into $P'_0,\ldots,P'_{t-1},P'_t$, where $P'_j=P_j$ for $0 \leq j \leq
786: t-1$. Each strategy $\SSS_i$ is extended into a new strategy
787: $\SSS'_i$ where (1) on day $j\in[1,t-1]$,
788: $\SSS'_i(P_0,\ldots,P_{j-1})=\SSS_i(P_0,\ldots,P_{j-1})$, (2) on day
789: $t$, $\SSS'_i$ always buys, and (3) on day $t+1$,
790: $\SSS'_i(P'_0,\ldots,P'_t)=\SSS_i(P_0,\ldots,P_{t-1})$. Thus,
791: $P'_t=P'_{t-1}+\alpha{\cdot}m_0$.
792: \item
793: Add a passive strategy $\SSS'_{h+1}$ that always holds.
794: \item
795: Let $p'_i = \frac{1}{2}p_i$ for $1 \le i \le h$ and
796: $p'_{h+1}=\frac{1}{2}$.
797: \end{enumerate}
798: Note that since $P'_t-P'_{t-1}=\alpha{\cdot}m_0$, $m-m_0$ traders
799: choose the passive strategy $\SSS_{h+1}$. Also, the new market and the
800: new price history can accommodate any $m \geq m_0$ traders. Note that
801: because of the constraint $P'_{t}-P'_{t-1}=\alpha{\cdot}m_0$, the
802: probability distribution of $(X_1,\cdots,X_h)^{\trans}$ conditioned on
803: $P'_0,\ldots,P'_t$ in the new market for each $m \geq m_0$ is
804: identical to the probability distribution of
805: $(X_1,\cdots,X_h)^{\trans}$ conditioned on $P_0,\ldots,P_{t-1}$ in the
806: original market with $m=m_0$. Furthermore, $\Prm[P'_{t+1} >
807: P'_t \mid P'_0,\ldots,P'_t] = {\rm
808: Pr}_{m_0}[P_t>P_{t-1} \mid P_0,\ldots,P_{t-1}]$. So we have obtained the
809: desired reduction.
810:
811: Consequently, we are left with a situation where the number of active
812: strategies may be comparable to the number of traders. Such a market
813: turns out to be very hard to predict, as shown next in
814: Section~\ref{section-prediction-hard}.
815:
816: \subsection{A Hard Case for Market Prediction: Many Strategies}
817: \label{section-prediction-hard}
818: Section~\ref{section-prediction-easy} shows that predicting an AS+FI market
819: is easy (i.e., takes polynomial time) when the number $m$ of traders
820: vastly exceeds the number $h$ of strategies. In this section, we
821: consider the case where every trader may have a distinct strategy, and
822: show that predicting an AS+FI or AS+PI market becomes very hard indeed.
823:
824: We now define two decision-problem versions of market prediction. Both
825: versions make the following assumption:
826: \begin{itemize}
827: \item
828: Each $X_i$ is independently either $0$ or $1$ with equal probability.
829: \end{itemize}
830:
831: The \buzz{bounded} market prediction problem is:
832: \begin{itemize}
833: \item Input: a set of $n$ passive strategies and a price history
834: spanning $n$ days such that the probability that the market rises on
835: day $n+1$ conditioned on the price history is either (1) greater than
836: $2/3$ or (2) less than $1/3$.
837: \item Question: Which case is it, case (1) or case (2)?
838: \end{itemize}
839:
840: The \buzz{unbounded} market prediction problem is:
841: \begin{itemize}
842: \item
843: Input: a set of $n$ passive strategies and a price history spanning
844: $n$ days.
845: \item
846: Question: Is the probability that the market rises on day $n+1$
847: conditioned on the price history greater than 1/2 (without the usual
848: $\epsilon$ term)?
849: \end{itemize}
850:
851: The unbounded market prediction problem has less financial payoff than
852: the bounded one due to different probability thresholds. For each of
853: these two problems, there are in effect two versions, depending on
854: which price increment rule is used; however, both versions turn out to
855: be equally hard. These two problems can be analyzed by similar
856: techniques, and our discussion below focuses on the bounded market
857: prediction problem with a hardness theorem for the unbounded market
858: prediction problem in Section~\ref{sec_unbounded}.
859:
860: We show in Section \ref{section-circuit-to-market} how to construct
861: passive strategies and price histories such that solving bounded
862: market prediction is equivalent to estimating the probability that a
863: Boolean circuit outputs $1$ on a random input conditioned on a second
864: circuit outputting $1$. In Section \ref{section-bcpp}, we show that
865: this problem is hard for $\pnplog$ and complete for a class that lies
866: between $\pnplog$ and $\pp$. Thus bounded market prediction is not
867: merely \np-hard, but cannot be solved in the polynomial-time hierarchy
868: at all unless the hierarchy collapses to a finite level.
869:
870: \subsubsection{Reductions from Circuits to Markets}
871: \label{section-circuit-to-market}
872:
873: Lemma~\ref{lemma-circuit-to-inequalities} converts a
874: circuit into a system of linear inequalities, while
875: Lemma~\ref{lemma-slack-variables} converts a system of
876: linear inequalities into a system of linear equations.
877: These systems can then be converted into AS+FI and AS+PI market models
878: using Lemmas~\ref{lemma-inequalities-to-FI-market} and
879: \ref{lemma-equations-to-PI-market}, respectively.
880:
881:
882: Note that the restriction in Lemma~\ref{lemma-circuit-to-inequalities}
883: to circuits consisting of $2$-input NOR gates is not an obstacle to
884: representing arbitrary combinatorial circuits (with constant blow-up),
885: as $2$-input NOR gates are universal.
886:
887: \begin{lemma}
888: \label{lemma-circuit-to-inequalities}
889: For any $n$-input Boolean circuit $C$
890: consisting of $m$ 2-input NOR gates,
891: there exists a system $Ax > 0$ of $3m+2$ linear constraints in $n+m+2$ unknowns
892: and a length $n+m+2$
893: column vector $c$
894: with the following properties:
895: \begin{enumerate}
896: \item Both $A$ and $c$ have coefficients in $\sss$ that can be
897: computed in time $O((n+m)^2)$.
898: \item
899: Any $0$-$1$ vector $(x_1,\ldots,x_n)$
900: has a unique $0$-$1$ extension
901: $x = (x_1,\ldots,x_n, x_{n+1}, \ldots x_{n+m+2})$
902: satisfying $Ax > 0$.
903: \item
904: If $Ax > 0$, then $cx > 0$ if and only if
905: $C(x_1, x_2,\ldots,x_n) = 1$.
906: \end{enumerate}
907: \end{lemma}
908: \begin{proof}
909: Let $x_{n+k}$ represent the output of the $k$-th NOR gate, where $1
910: \le k \le m$. Without loss of generality we assume that gate $m$ is
911: the output gate.
912:
913: The variables $x_{n+m+1}$ and $x_{n+m+2}$ are dummies to allow for a
914: zero right-hand-side in $Ax > 0$; our first two constraints
915: are $x_{n+m+1} > 0$ and $x_{n+m+2} > 0$.
916:
917: Suppose gate $k$ has inputs $x_i$ and $x_j$.
918: The NOR operation is
919: implemented by the following three linear inequalities:
920: \begin{displaymath}
921: \begin{array}{ccccccc}
922: x_i& & & + &x_{n+k} & <& 2; \\
923: & &x_j& + &x_{n+k} & < &2; \\
924: x_i &+&x_j&+&x_{n+k}& >& 0.
925: \end{array}
926: \end{displaymath}
927: The first two constraints
928: ensure that the output is never $1$ if an input is $1$,
929: while the last requires that the output is $1$ if both inputs are $0$;
930: the constraints are thus satisfied if and only if
931: $x_{n+k} = \neg(x_i \vee x_j)$.
932: Using the dummy variables, the first two constraints are written as
933: \begin{displaymath}
934: \begin{array}{ccccccccccc}
935: -x_i& & & - &x_{n+k} &+& x_{n+m+1} &+& x_{n+m+2} & >& 0; \\
936: & &-x_j& - &x_{n+k} &+& x_{n+m+1} &+& x_{n+m+2} & >& 0. \\
937: \end{array}
938: \end{displaymath}
939:
940: Let $Ax > 0$ be the system obtained by combining all of these inequalities.
941: Then for each $(x_1,\ldots,x_n)$, $Ax > 0$ determines $x_{n+k}$ for all
942: $k \ge 1$.
943: The vector $c$ is chosen so that $cx = x_{n+m}$.
944: \end{proof}
945:
946: One might suspect that the fixed increment rule's ability to
947: hide the exact values of the left-hand side of each constraint is
948: critical to disguise the inner workings of the circuit.
949: However, by adding slack variables we can translate the inequalities
950: into equations, allowing the use of a proportional increment rule without
951: revealing extra information.
952:
953: \newcommand{\lemmaSlackEquations}{mn - m + 1}
954: \newcommand{\lemmaSlackVariables}{2mn - 3m + n + 1}
955: \begin{lemma}
956: \label{lemma-slack-variables}
957: Let $Ax > 0$ be a system of $m$
958: linear inequalities in $n$ variables where $A$ has
959: coefficients in $\sss$.
960: Then there is a system $By = 1$ of $\lemmaSlackEquations$ linear equations
961: in $\lemmaSlackVariables$ variables
962: with the following properties:
963: \begin{enumerate}
964: \item $B$ has coefficients in $\sss$ that can be computed in
965: time $O((mn)^2)$.
966: \item There is a bijection $f : x \mapsto y$ between the $0$-$1$
967: solutions $x$ to
968: $Ax > 0$ and
969: the $0$-$1$ solutions
970: $y$ to $By = 1$,
971: such that
972: $x_j = y_j$ for $1 \le j \le n$ whenever $y = f(x)$.
973: \end{enumerate}
974: \end{lemma}
975: \begin{proof}
976: For each $1 \le i \le m$, let $A_i$ be the constraint
977: $\sum_j A_{ij} x_j > 0$.
978: To turn these inequalities into equations, we
979: add slack variables to soak up
980: any excess over $1$, with some
981: additional care taken to ensure that there is a unique assignment to
982: the slack variables for each setting of the variables $x_j$.
983:
984: We will use the following $0$-$1$ variables, which we think of as
985: alternate names for $y_1$ through $y_{\lemmaSlackVariables}$:
986:
987: \begin{center}
988: \begin{tabular}{|c|l|c|c|}
989: \hline
990: Variables & Purpose & Indices & Count \\
991: \hline
992: $x_j$ & original variables & $1 \le j \le n$ & n \\
993: $u$ & constant $1$ & none & 1 \\
994: $s_{ij}$ & slack variables for $A_i$ & $1 \le i \le m, 1 \le j \le
995: n-1$ & $m(n-1)$ \\
996: $t_{ij}$ & slack variables for $s_{ij} \ge s_{i,j+1}$
997: & $1 \le i \le m, 1 \le j \le n-2$ & $m(n-2)$ \\
998: \hline
999: \end{tabular}
1000: \end{center}
1001:
1002: \begin{center}
1003: \begin{tabular}{|c|c|l|c|c|}
1004: \hline
1005: Name & Equation & Purpose & Indices & Count \\
1006: \hline
1007: $U$ & $u = 1$ & set $u$ & none & 1 \\
1008: $B_i$ & $\sum_j A_{ij} x_j - \sum_j s_{ij} = 1$
1009: & represent $A_i$ & $1 \le i \le m$ & $m$ \\
1010: $S_{ij}$ & $s_{ij} - s_{i,j+1} - t_{ij} + u = 1$
1011: & require $s_{ij} \ge s_{i,j+1}$ & $1 \le i \le m$, $1 \le j \le n-2$
1012: & $m(n-2)$
1013: \\
1014: \hline
1015: \end{tabular}
1016: \end{center}
1017:
1018: Observe that for each $i$, $\sum_j s_{ij}$ can take on any integer
1019: value $\sigma_i$ between $0$ and $n-1$, and that for any fixed value of
1020: $\sigma_i$, the $S_{ij}$ constraints uniquely determine the values of
1021: $s_{ij}$ and $t_{ij}$ for all $j$. So each
1022: constraint $B_i$ permits
1023: $\chi_{i} = \sum_j A_{ij} x_j$
1024: to take on precisely the same values $1$ to $n$
1025: that $A_i$ does,
1026: and each
1027: $\chi_i$ uniquely determines $\sigma_i$ and thus the assignment of all
1028: $s_{ij}$ and $t_{ij}$.
1029: \end{proof}
1030:
1031: \subsubsection{Conditional Probability Complexity Classes}
1032: \label{section-bcpp}
1033: Suppose that we take a polynomial-time probabilistic Turing machine, fix its
1034: inputs, and use the usual Cook's Theorem construction to turn it into
1035: a circuit whose inputs are the random bits used during its
1036: computation. Then, we can feed the resulting circuit to
1037: Lemmas~\ref{lemma-circuit-to-inequalities} and
1038: \ref{lemma-inequalities-to-FI-market}
1039: to obtain an AS+FI market model in which there is exactly one assignment of
1040: population variables for each set of random bits, and the price rises
1041: on the last day if and only if the output of the Turing machine is
1042: $1$.
1043: By applying Lemma~\ref{lemma-slack-variables} to the intermediate system
1044: of linear inequalities, we can similarly convert a circuit to an AS+PI
1045: model.
1046: It follows that bounded market prediction is \bpp-hard for either
1047: model.
1048: But with some cleverness,
1049: we can exploit the conditioning on past history to show that bounded
1050: market prediction is in fact much harder than this. We do so in
1051: Section~\ref{section-bcpp-complete}, after a brief detour through
1052: computational complexity in this section.
1053:
1054: We proceed to define some new counting classes based on
1055: conditional probabilities. One of these, \bcpp{}, has the useful
1056: feature that bounded market prediction is \bcpp-complete. We will use
1057: this fact to relate the complexity of bounded market prediction to
1058: more traditional complexity classes.
1059:
1060: The usual counting classes of complexity theory ($\pp{}$, $\bpp{}$, R, $\zpp{}$,
1061: $C_{=}$, etc.) are defined in terms of counting the relative numbers of
1062: accepting and rejecting states of a nondeterministic Turing machine.
1063: We will define a new family of counting classes
1064: by adding a third decision state that does not count for the purposes
1065: of determining acceptance or rejection.
1066:
1067: A {\it noncommittal} Turing machine is a nondeterministic Turing
1068: machine with three decision states: {\it accept}, {\it reject}, and {\it abstain}.
1069: We
1070: represent a noncommittal Turing machine as a deterministic Turing
1071: machine which takes a polynomial number of random bits in addition to
1072: its input; each assignment of the random bits gives a distinct
1073: computation path. A computation path is
1074: accepting/rejecting/abstaining if it ends in an accept/reject/abstain
1075: state, respectively. We often write $1$, $0$, or $\perp$ as shorthand for the
1076: output of an accepting, rejecting, or abstaining path.
1077:
1078: Conditional versions of the usual counting classes are obtained by
1079: carrying over their definitions from standard nondeterministic Turing
1080: machines to noncommittal Turing machines, with some care in handling
1081: the case of no accepting or rejecting paths. We can still think of
1082: these modified classes as corresponding to probabilistic machines, but
1083: now the probabilities we are interested in are conditioned on not
1084: abstaining.
1085:
1086: \begin{definition}\label{def-cpp}\rm
1087: The {\it conditional probabilistic polynomial-time} class (\cpp{})
1088: consists of those languages $L$ for which there exists a
1089: polynomial-time noncommittal Turing machine $M$ such that $x \in L$ if
1090: and only if the number of accepting paths when $M$ is run with input
1091: $x$ exceeds the number of rejecting paths.
1092: \end{definition}
1093:
1094: \begin{definition}\label{def-bcpp}\rm
1095: The {\it bounded conditional probabilistic polynomial-time} class
1096: (\bcpp{}) consists of those languages $L$ for which there exists a
1097: constant $\epsilon > 0$ and a polynomial-time noncommittal Turing
1098: machine $M$ such that (1) $x \in L$ implies that a fraction of at
1099: least $\frac{1}{2}+\epsilon$ of the total number of accepting and
1100: rejecting paths are accepting and (2) $x \notin L$ implies that a
1101: fraction of at least $\frac{1}{2}+\epsilon$ of the total number of
1102: accepting and rejecting paths are rejecting.
1103: \end{definition}
1104:
1105: \begin{definition}\label{def-cr}\rm
1106: The \buzz{conditional randomized polynomial-time} class (\crclass{})
1107: consists of those languages $L$ for which there exists
1108: a constant $\epsilon > 0$ and a
1109: polynomial-time noncommittal
1110: Turing machine $M$ such that (1) $x \in L$
1111: implies that a fraction of at least $\epsilon$
1112: of the total number of accepting and rejecting paths are accepting,
1113: and (2) $x \notin L$
1114: implies that
1115: there are no accepting paths.
1116: \end{definition}
1117:
1118: As we show in Theorems~\ref{theorem-cpp-subset-pp}
1119: and~\ref{theorem-cr-equals-np},
1120: \cpp{} and \crclass{} turn out to be the same as the unconditional
1121: classes \pp{} and \np{}, respectively.
1122:
1123: \begin{theorem}
1124: \label{theorem-cpp-subset-pp}
1125: $\cpp{}=\pp{}$.
1126: \end{theorem}
1127: \begin{proof}
1128: First of all, $\pp{} \subseteq \cpp{}$ because a $\pp{}$ machine is a \cpp{}
1129: machine that happens not to have any abstaining paths.
1130: For the inverse direction, represent each abstaining path of a \cpp{}
1131: machine by a pair consisting of one accepting and one rejecting path,
1132: and each
1133: accepting or rejecting path by two accepting or rejecting paths.
1134: Then the resulting $\pp{}$ machine accepts if and only if the
1135: \cpp{} machine does.
1136: \end{proof}
1137:
1138: \begin{theorem}
1139: \label{theorem-cr-equals-np}
1140: $\crclass = \np$.
1141: \end{theorem}
1142: \begin{proof}
1143: To show $\np \subseteq \crclass$, replace each
1144: rejecting path of an
1145: $\np$ machine with an abstaining path in a $\crclass$ machine.
1146: For the inverse direction,
1147: replace each abstaining path of the $\crclass$ machine
1148: with a rejecting path in the $\np$ machine.
1149: \end{proof}
1150:
1151: \bcpp{} appears to be a more interesting class. Since it is clearly a
1152: subset of \cpp{}, we have:
1153:
1154: \begin{corollary}
1155: \label{corollary-bcpp-subset-pp}
1156: $\bcpp{} \subseteq \pp{}$.
1157: \end{corollary}
1158: \begin{proof}
1159: Immediate from Theorem~\ref{theorem-cpp-subset-pp} and the definition
1160: of \bcpp{} and \cpp{}.
1161: \end{proof}
1162:
1163: On the other hand, $\bcpp$ appears to be much stronger than the
1164: analogous non-conditional class $\bpp$. For example, it is straightforward
1165: to show that $\np \subseteq \bpp$.
1166: Use the representation of an \np-machine as a deterministic
1167: machine $M$ that takes some polynomial number of ``hint'' bits in addition
1168: to its input, and replace these $N$ hint bits with $N$ random bits $r$. In
1169: addition, supply another $2N$ random bits $r'$, which will be used to
1170: amplify the conditional probability of accepting paths. Now let
1171: $M'(x, r, r')$ accept if $M(x, r)$ accepts; reject if $M(x,r)$
1172: rejects and $r'= \vec{0}$; and abstain if $M(x,r)$ rejects and
1173: $r'\neq\vec{0}$. Then if $M$ has any accepting path on input $x$,
1174: $M'$ has at
1175: least $2^{2N}$ accepting paths and at most $2^N-1$ rejecting paths,
1176: for an exponentially large probability of accepting--- since we have
1177: amplified the small number of accepting paths so that they overwhelm
1178: the few rejectors.
1179: Alternatively, if $M(x,r)$ never accepts, neither does $M'$.
1180:
1181: By repeating this sort of amplification of ``good'' paths, we can in fact
1182: simulate $O(\log n)$ queries of an \np-oracle, as stated in the following theorem.
1183:
1184: \begin{theorem}
1185: \label{theorem-pnplog-subset-bcpp}
1186: $\pnplog \subseteq \bcpp$.
1187: \end{theorem}
1188: \begin{proof}
1189: Let $M(x,h_1,h_2,\ldots,h_k)$ be a deterministic
1190: implementation a $\pnplog$ machine,
1191: where $k = O(\log n)$ and each $h_i$ supplies a witness for the
1192: $i$-th oracle query.
1193: We will show that the language $L(M)$ accepted by $M$ is in $\bcpp$.
1194:
1195: To simplify the presentation, we assume that each oracle query is a
1196: Boolean formula with a fixed number $m$ of variables, where $m$ is
1197: polynomial in $n = |x|$, and that $h_i$ is an assignment for those
1198: variables. We assume that $M$ consists of a sequence of functions
1199: $M_1,M_2,\ldots,M_k$ for generating oracle queries, a set of $k$
1200: verifiers $V_1,\ldots,V_k$ for verifying the witnesses $h_i$, and a
1201: combining function $M_*$ that produces the output from the input and
1202: the outputs of the $V_i$. Each function $M_i$ takes as input the
1203: input $|x|$ and the outputs of $V_1$ through $V_{i-1}$. $V_i$ sees the
1204: output of $M_i$ and the input $h_i$. $M_*$ sees the input $|x|$
1205: and the outputs of $V_1$ through $V_k$. The output of the combined
1206: machine $M$ is the output of any computation path where $h_i$ is
1207: chosen so that $V_i(M_i, h_i) = 1$ whenever such an $h_i$ exists. In
1208: other words, we demand that $h_i$ be a satisfying assignment when
1209: possible, and ignore those paths where satisfiable queries are issued
1210: but satisfying assignments are not supplied.
1211:
1212: We will represent $M$ with a noncommittal
1213: machine $M'(x,r_1,\ldots,r_k,r')$, where
1214: each $r_i$ is a random bit-vector replacing the corresponding $h_i$,
1215: and $r'$ is an extra supply of random bits used to amplify the good
1216: computation paths to overwhelm the bad ones. This amplification
1217: process is a little complicated, because it is not enough to amplify
1218: paths that find good witnesses to particular queries; it may be that
1219: a bad witness for an earlier query causes some $M_i$ to issue a different
1220: query from the correct one. So we must amplify a path that finds a
1221: witness to query $i$
1222: enough to overwhelm not only the exponentially many invalid
1223: witnesses to query $i$, but also
1224: the exponentially many valid witnesses that might be returned to
1225: instances
1226: queries $i+1$ through $k$ based on an incorrect answer to query $i$.
1227:
1228: Let $v = (v_1,v_2,\ldots,v_k)$ be the vector of outputs of $V_i$. For
1229: each $v$, we define an \buzz{amplification exponent} $A(v)$ as follows:
1230: \begin{displaymath}
1231: A(v) = \sum_{i=1}^{k} v_i 2^{k-i}(mk+1).
1232: \end{displaymath}
1233: We will write $A_i$ for the coefficient $2^{(k-i)}(mk+1)$;
1234: these coefficients $A_i$ are chosen to make Equation~\ref{eq-Ai-recurrence} work below.
1235:
1236: Now let $M'(x,r_1,\ldots,r_k,r') = M(x,r_1,\ldots,r_k)$ whenever
1237: $r'_i = 0$ for all $i > A(v)$, where $v$ is the output of
1238: $V_1$ through $V_k$ in the computation of $M$. If $r'_i \neq 0$ for
1239: some $i > A(v)$, $M'(x,r_1,\ldots,r_k,r') = \perp$.
1240: The effect of the $r'$ bits is to set the weight of
1241: each non-abstaining path to $2^{A(v)}$.
1242:
1243: Clearly $M'$ can be computed in polynomial time as long as $|r'|$ is
1244: polynomial.
1245: The number of $r'$ bits needed is the maximum value of $A(v)$,
1246: which is $(mk+1) (2^{k+1} - 1) = O(n^c k 2^h)$.
1247: For this to be polynomial, we need $k = O(\log n)$.
1248:
1249: A good path $p$ is precisely one for which each
1250: $v_i$ is the correct output of the \np-oracle. A bad path $p'$ is one in
1251: which one or more of the $v'_i$ values is incorrect.
1252: We will match bad paths with good paths, and show that the weight of
1253: each good path is much larger than the total weight of all bad paths
1254: mapped to it.
1255:
1256: Identify each path with the sequence $r_1,\ldots,r_k$ that generates
1257: it. Let $b = b_1,\ldots,b_k$ generate some bad path. Let $i$ be the
1258: first point at which $b_i$ is an invalid witness to a satisfiable
1259: query. Then there is a good path $a = a_1,\ldots,a_k$ such that
1260: $a_j = b_j$ for $j < i$. Furthermore, if $v^a$ and $v^b$ are the
1261: vectors of verifier outputs for $a$ and $b$, then not only is
1262: $v^a_j = v^b_j$ for $j < i$, but also $v^a_i = 1$ while $v^b_i = 0$ since
1263: the only false verifier outputs are false negatives.
1264:
1265: The maximum value for $A(v^b)$ is obtained if $v^b_j = 1$ for $j > i$;
1266: so we have
1267: \begin{displaymath}
1268: A(v_a) - A(v_b)
1269: \ge
1270: \left(\sum_{j=1}^{i-1} A_j v^a_j + A_i\right)
1271: -
1272: \left(\sum_{j=1}^{i-1} A_j v^b_j + \sum_{j=i+1}^{k} A_j\right)
1273: =
1274: A_i - \sum_{j=i+1}^{k} A_j.
1275: \end{displaymath}
1276:
1277: Now
1278: \begin{equation}
1279: \label{eq-Ai-recurrence}
1280: A_i
1281: =
1282: 2^{k-i}(mk+1)
1283: = (mk+1) + \sum_{j=i+1}^{k} 2^{k-j}(mk+1)
1284: = (mk+1) + \sum_{j=i+1}^{k} A_j,
1285: \end{equation}
1286: so $A_i - \sum_{j=i+1}^k A_j = mk+1$.
1287: But the ratio between the weight of $b$ and its corresponding good
1288: path $a$ is then at most $2^{A(v^b)-A(v^a)} = 2^{-mk-1}$.
1289: Since there are only $2^{mk}$ paths altogether,
1290: there are fewer than
1291: $2^{mk}$ bad paths; thus,
1292: the ratio between the total weight of all bad paths mapped to $a$ and
1293: the weight of $a$ is less than $2^{mk} 2^{-mk-1} = \frac{1}{2}$.
1294: Summing over all good paths shows that the total weight of all bad
1295: paths is less than half the total weight of all good paths, so at
1296: least $\frac{2}{3}$ of all non-abstaining paths are good.
1297: It follows that, conditioned on not abstaining,
1298: $M'$ accepts with probability greater than
1299: $\frac{2}{3}$ if $M$ accepts, and accepts with probability less than
1300: $\frac{1}{3}$ if $M$ rejects. Hence $L(M) \in \bcpp$.
1301: \end{proof}
1302:
1303: An interesting open question is where exactly \bcpp{} lies between
1304: \pnplog{} and \pp{}. It is conceivable that by cleverly
1305: exploiting the power of conditioning to amplify low-probability events
1306: one could show $\bcpp = \pp$.
1307: However,
1308: we will content ourselves with the much easier result of
1309: showing that the usual amplification
1310: technique for \bpp{} also applies to \bcpp{}.
1311:
1312: \begin{theorem}
1313: \label{theorem-bcpp-amplification}
1314: If $L \in \bcpp$, then there exists a noncommittal Turing machine $M$
1315: such that the probability that $M$ accepts conditioned on not
1316: abstaining is at least $1-f(n)$ if $x \in L$ and at most $f(n)$ if $x
1317: \notin L$, where $n = |x|$ and $f(n)$ is any function of the form
1318: $2^{-O(n^c)}$ for some constant $c > 0$.
1319: \end{theorem}
1320: \begin{proof}
1321: Let membership in $L$ be computed by $M'$.
1322: Assume $x \in L$ (the case $x \notin L$ is symmetric).
1323: Consider $k$ independent executions of $M'$ with input $x$;
1324: call the random variables representing their outputs $Y_1, Y_2,\ldots,Y_k$.
1325: Because the executions are independent,
1326: for any $0$-$1$ vector of values $y_i$
1327: $\Pr[\forall i Y_i = y_i \mid \forall i Y_i \neq \perp]
1328: = \prod_i \Pr[Y_i = y_i \mid Y_i \neq \perp]$.
1329: So conditioning on no abstentions,
1330: $\sum_i Y_i$ has a binomial
1331: distribution with $p = \frac{1}{2}+\epsilon$, and
1332: Chernoff bounds imply
1333: $\Pr[\sum_i Y_i < \frac{k}{2} \mid \forall i Y_i \neq \perp]$
1334: is exponentially small in $k\epsilon$.
1335: Since $\epsilon$ is constant and we can make $k$ polynomially large
1336: in $n$, the result follows.
1337: \end{proof}
1338:
1339: \subsubsection{Bounded Market Prediction Is \bcpp{}-complete}
1340: \label{section-bcpp-complete}
1341:
1342: In Section~\ref{section-bcpp}, we have defined the complexity class \bcpp{}
1343: and have shown that it contains the powerful class $\pnplog$. In this
1344: section, we show that bounded market prediction is complete for
1345: $\bcpp$. In a sense, this result says that market prediction is a
1346: universal prediction problem: if we can predict a market, we can
1347: predict any event conditioned on past history as long as we can sample
1348: from an underlying discrete probability space whose size is at most
1349: exponential.
1350:
1351: It also says that bounded market prediction is very hard. That is, using
1352: Theorems~\ref{theorem-bcpp-amplification} and
1353: \ref{theorem-pnplog-subset-bcpp}, even if
1354: the next day's price is determined with all but an exponentially small
1355: probability, it cannot be solved in the polynomial-time hierarchy
1356: unless the hierarchy collapses to a finite level.
1357:
1358: \begin{theorem}
1359: \label{theorem-bcpp-complete}
1360: The bounded market prediction problem is complete for \bcpp, in either
1361: the AS+FI or the AS+PI model.
1362: \end{theorem}
1363: \begin{proof}
1364: First we show that bounded market prediction is a member of
1365: \bcpp{}. Given a market, construct a noncommittal Turing machine $M$
1366: whose input is the price history and strategies, and whose random
1367: inputs supply the settings for the population variables $X_i$.
1368: Let $M$ abstain if the price history is inconsistent with the input
1369: and population variables;
1370: depending on the model,
1371: this is either a matter of checking the linear inequalities produced
1372: by Lemma~\ref{lemma-FI-market-to-inequalities}
1373: or the equations produced
1374: by Lemma~\ref{lemma-PI-market-to-equations}.
1375: Otherwise, $M$ accepts
1376: if the market rises and rejects if the market falls on the next day.
1377: The probability that $M$ accepts thus equals the probability that
1378: the market rises: either more than $2/3$ or less than $1/3$.
1379: Since the problem is to distinguish between these two cases,
1380: $M$ solves the problem within the definition of a $\bcpp$-machine.
1381:
1382: In the other direction,
1383: we reduce from any \bcpp-language $L$.
1384: Suppose $L$ is accepted by some \bcpp-machine $M$.
1385: We will translate
1386: $M$ and its input $x$ into a bounded market prediction
1387: problem. First use Theorem~\ref{theorem-bcpp-amplification} to
1388: amplify the conditional probability that $M$ accepts to either more
1389: than $2/3$ or less than $1/3$ as bounded market prediction demands.
1390: Then convert $M$ into two polynomial-size circuits, one computing
1391: \begin{displaymath}
1392: C_{\not\perp}(r) = \left\{
1393: \begin{array}{ll}
1394: 0 & \mbox{if $M(x,r) = \perp$}; \\
1395: 1 & \mbox{if $M(x,r) \neq \perp$},
1396: \end{array}
1397: \right.
1398: \end{displaymath}
1399: and the other computing
1400: \begin{displaymath}
1401: C_1(r) = \left\{
1402: \begin{array}{ll}
1403: 0 & \mbox{if $M(x,r) \neq 1$}; \\
1404: 1 & \mbox{if $M(x,r) = 1$}.
1405: \end{array}
1406: \right.
1407: \end{displaymath}
1408:
1409: Without loss of generality we may assume that $C_{\not\perp}$ and $C_1$
1410: are built from NOR gates. Applying Lemma
1411: \ref{lemma-circuit-to-inequalities} to each yields
1412: two sets of constraints $A_{\not\perp}y > 0$ and $A_1 y > 0$
1413: and column vectors $c_{\not\perp}$ and $c_1$
1414: such that $c_{\not\perp}y > 0$ if and only if $C_{\not\perp}y = 1$
1415: and $c_1 x > 0$ if and only if $C_1(x) = 1$, where $y$ satisfies the
1416: previous linear constraints and $x$ is the initial prefix of $y$
1417: consisting of variables not introduced by the construction of Lemma
1418: \ref{lemma-circuit-to-inequalities}.
1419: We also have from Lemma~\ref{lemma-circuit-to-inequalities}
1420: that there is a one-to-one correspondence between assignments of $x$
1421: and assignments of $y$ satisfying the $A$ constraints, so
1422: probabilities are not affected by this transformation.
1423:
1424: Now use Lemma~\ref{lemma-inequalities-to-FI-market} to construct a market
1425: model in which $A_{\not\perp}y > 0$, $A_1 y > 0$, and $c_{\not\perp} y
1426: > 0$ are enforced by the strategies and price history, and
1427: $\sgn(c_1 y)$ determines the price change on the next day of trading.
1428: Thus the consistent settings of the variables $X_i$ are precisely those
1429: corresponding to settings of $r$ for which $C_{\not\perp}(r) = 1$, or,
1430: in other words, those yielding computation paths that do not abstain.
1431: The market rises when $C_1(r) = 1$, or when $M$ accepts. So if we can
1432: predict whether the market rises or falls with conditional probability
1433: at least $2/3$, we can predict the likely output of $M$. It follows
1434: that bounded market prediction for the AS+FI model is \bcpp-hard.
1435:
1436: To show the similar result for the AS+PI model, use
1437: Lemma~\ref{lemma-slack-variables} to convert the constraints
1438: $A_{\not\perp}y > 0$, $A_1 y > 0$ into a system of linear equations
1439: $Bz = 1$, and then proceed as before, using
1440: Lemma~\ref{lemma-equations-to-PI-market} to convert this system to a
1441: price history and letting $c_1 z$ determine the price change (and thus
1442: the sign of the price change) on the next day of trading.
1443: \end{proof}
1444:
1445: \subsubsection{Unbounded Market Prediction is \cpp{}-complete}
1446: \label{sec_unbounded}
1447: The unbounded market prediction problem seems harder because the
1448: probability threshold in question is $\frac{1}{2}$ with no $\epsilon$
1449: bound in contrast to the thresholds $\frac{2}{3}$ and $\frac{1}{3}$
1450: for the bounded market prediction problem. The following theorem
1451: reflects this intuition. However, since we do not know whether
1452: \bcpp{} is distinct from \pp{}, we do not know whether unbounded
1453: prediction is strictly harder.
1454:
1455: \begin{theorem}\label{theorem-cpp-complete}
1456: The unbounded market prediction problem is complete for $\cpp = \pp$,
1457: in either the AS+FI or the AS+PI model.
1458: \end{theorem}
1459: \begin{proof}
1460: Similar to the proof of Theorem~\ref{theorem-bcpp-complete}.
1461: \end{proof}
1462:
1463: \section{Future Research Directions}\label{sec_conclusion}
1464:
1465: There are many problems left open in this paper. Below we briefly
1466: discuss some general directions for further research.
1467:
1468: We have reported a number of simulation and theoretical results for
1469: the AS model. As for empirical analysis, it would be of interest to
1470: fit actual market data to the model. We can then use the estimated
1471: parameters to (1) test whether the model has any predicative power and
1472: (2) test the effectiveness of new or known trading algorithms. This
1473: direction may require carefully choosing ``{realistic}''
1474: strategies for $\Pi$. Besides the momentum and contrarian strategies,
1475: there are some popular ones which are worth considering, such as those
1476: based on support levels. Investment newsletters could be a useful
1477: source of such strategies.
1478:
1479: The AS model is an idealized one. We have chosen such simplicity as a
1480: matter of research methodology. It is relatively easy to design
1481: highly complicated models which can generate very complex market
1482: behavior. A more challenging and interesting task is to design the
1483: simplest possible model which can generate the desired market
1484: characteristics. For instance, a significant research direction would
1485: be to find the simplest model in which market prediction is
1486: computationally hard. On the other hand, it would be of great
1487: interest to find the most general models in which market prediction
1488: takes only polynomial time. For this goal, we can consider injecting
1489: more realism into the model by introducing resource-bounded learning
1490: (the generality of $\Pi$ is equivalent to unbounded learning),
1491: variable memory size, transaction costs, buying
1492: power, limit orders, short sell, options, etc.
1493:
1494: \section*{Acknowledgments}
1495: This work originated with David Fischer's senior project in 1999,
1496: advised by Ming-Yang Kao. David would like to thank his father and
1497: role model, Professor Michael Fischer, for teaching, mentoring, and
1498: inspiring him throughout college.
1499:
1500: \bibliographystyle{abbrv}
1501: %\bibliography{all} % for Ming
1502: \bibliography{prediction} % for Ming
1503:
1504:
1505:
1506: \end{document}
1507: