Skip to content

Commit

Permalink
Prof. Guhr corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
juanhenao21 committed Sep 15, 2020
1 parent 24ed46e commit 49d4229
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 64 deletions.
Binary file modified paper/financial_response_spread_year_paper/main.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
\abstract{
Recent research on the response of stock prices to trading activity revealed
long lasting effects, even across stocks of different companies.
These results imply non-markovian effects in price formation and when trading
many stocks at the same time, in particular trading costs and price
correlations.
long lasting effects, even across stocks of different companies. These results
imply non-markovian effects in price formation when trading many stocks at the
same time, in particular trading costs and price correlations.
How the price response is measured depends on data set and research focus.
However, it is important to clarify, how the details of the price response
definition modify the results. Here, we evaluate different price response
implementations for the Trades and Quotes (TAQ) data set from the NASDAQ stock
market and find that the results are qualitatevily the same for two different
definitions of time scale, but the response can vary by up to a factor of two.
Further, we confirm the dominating contribution of immediate price response
directly after a trade, as we find that delayed responses are suppresed.
Finally, we test the impact of the spread in the price response, detecting that
large spreads have stronger impact.
Further, we show the key importance of the order between trade signs and
returns, displaying the changes in the signal strenght. Moreover, we confirm
the dominating contribution of immediate price response directly after a trade,
as we find that delayed responses are suppresed. Finally, we test the impact of
the spread in the price response, detecting that large spreads have stronger
impact.
\PACS{
{89.65.Gh}{Econophysics} \and
{89.75.-k}{Complex systems} \and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ \section{Introduction}\label{sec:introduction}

Financial markets use order books to list the number of shares bid or asked at
each price. An order book is an electronic list of buy and sell orders for a
specific security or financial instrument organized by price level, agents can
place different types of instructions (orders).
specific security or financial instrument organized by price levels, where
agents can place different types of instructions (orders).

In general, the dynamics of the prices follow a random walk. There are two
extreme models that can describe this behavior: the Efficient Market Hypothesis
Expand All @@ -20,7 +20,7 @@ \section{Introduction}\label{sec:introduction}
effects due to stategies or liquidity costs are not contained either.
There are diverse studies focused on the price response
\cite{prop_order_book,dissecting_cross,r_walks_liquidity,subtle_nature,Bouchaud_2004,large_prices_changes,pow_law_dist,theory_market_impact,spread_changes_affect,master_curve,EMH_lillo,quant_stock_price_response,ori_pow_law,Wang_2018_b,Wang_2018_a,Wang_2016_avg,Wang_2016_cross},
\cite{prop_order_book,dissecting_cross,r_walks_liquidity,subtle_nature,Bouchaud_2004,large_prices_changes,pow_law_dist,theory_market_impact,spread_changes_affect,master_curve,EMH_lillo,quant_stock_price_response,ori_pow_law,Wang_2018_b,Wang_2018_a,Wang_2016_avg,Wang_2016_cross}.
In our opinion, a critical investigation of definitions and methods and how
they affect the results is called for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ \subsection{Key concepts}\label{subsec:key_concepts}
\cite{prop_order_book,subtle_nature,account_spread,limit_ord_spread,stat_theory}.
The price gap between them is called the spread
$s\left(t\right) = a\left(t\right)-b\left(t\right)$
\cite{subtle_nature,market_digest,Bouchaud_2004,account_spread,em_stylized_facts,large_prices_changes,stat_theory}.
\cite{subtle_nature,market_digest,Bouchaud_2004,account_spread,large_prices_changes,em_stylized_facts,stat_theory}.
Spreads are significantly positively related to price and significantly
negatively related to trading volume. Companies with more liquidity tend to
have lower spreads
Expand Down Expand Up @@ -61,7 +61,7 @@ \subsection{Key concepts}\label{subsec:key_concepts}
r^{\left(l\right)}\left(t,\tau\right) = \ln S\left(t + \tau\right)
- \ln S\left(t\right) = \ln \frac{S\left(t + \tau\right)}{S\left(t\right)}
\end{equation}
Equation \ref{eq:return_general} and Eq. \ref{eq:log_return_general} agree if
Equations (\ref{eq:return_general}) and (\ref{eq:log_return_general}) agree if
$\tau$ is small enough \cite{subtle_nature,empirical_facts}.

At longer timescales, midpoint prices and transaction prices rarely differ by
Expand Down Expand Up @@ -102,8 +102,8 @@ \subsection{Key concepts}\label{subsec:key_concepts}
large autocorrelation. A very plausible explanation of this phenomenon relies
on the execution strategies of some major brokers on given markets. These
brokers have large transactions to execute on the account of some clients. In
order to avoid market making move because of an inconsiderable large order,
they tend to split large orders into small ones \cite{empirical_facts}.
order to avoid market making movements because of an inconsiderable large
order, they tend to split large orders into small ones \cite{empirical_facts}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Time definition}\label{subsec:time_definition}
Expand Down Expand Up @@ -169,7 +169,7 @@ \subsubsection*{Trade time scale}\label{subsubsec:trade_time}
\begin{array}{cc}
\text{sgn}\left(S\left(t,n\right)-S\left(t,n-1\right)\right),
& \text{if }\\ S\left(t,n\right) \ne S\left(t,n-1\right)\\
\varepsilon^{t}\left(t,n-1\right),
\varepsilon^{\left(t\right)}\left(t,n-1\right),
& \text{otherwise}
\end{array}\right.
\end{equation}
Expand Down Expand Up @@ -227,8 +227,8 @@ \subsubsection*{Trade time scale}\label{subsubsec:trade_time}
trade time scale. A drawback in the computation could come from the fact that
the return of a given second is composed by the contribution of small returns
corresponding to each change in the midpoint price during a second. As we are
assuming only one value for the returns in each second, we are supposing all
the returns in one second interval to be positive or negative with the same
assuming only one value for the returns in each second, we consider all the
returns in one second interval to be positive or negative with the same
magnitude, which could not be the case. This could increase or decrease the
response signal at the end of the computation.

Expand All @@ -249,7 +249,7 @@ \subsubsection*{Trade time scale}\label{subsubsec:trade_time}
\end{figure}

Figure \ref{fig:return_contributions} illustrate this point. Suppose there are
three different midpoint prices in a one second interval and thus, three
three different midpoint prices in one second interval and thus, three
different returns for these three midpoint price values. Furthermore, suppose
that the volume of limit orders with the corresponding midpoint prices are the
same in the bid and in the ask (the returns have the same magnitude). In the
Expand Down Expand Up @@ -279,23 +279,23 @@ \subsubsection*{Physical time scale}\label{subsubsec:physical_time}
We use the trade sign definition in physical time scale proposed in Ref.
\cite{Wang_2016_cross} and used in Refs.
\cite{Wang_2017,Wang_2016_avg}, that depends on the classification in
Eq. \ref{eq:trade_signs_trade} and reads
Eq. (\ref{eq:trade_signs_trade}) and reads
\begin{equation}\label{eq:trade_signs_physical}
\varepsilon^{\left(p\right)}\left(t\right)=\left\{
\begin{array}{cc}
\text{sgn}\left(\sum_{n=1}^{N\left(t\right)}\varepsilon^{t}
\text{sgn}\left(\sum_{n=1}^{N\left(t\right)}\varepsilon^{\left(t\right)}
\left(t,n\right)\right),
& \text{If }N \left(t\right)>0\\
0, & \text{If }N\left(t\right)=0
\end{array}\right.
\end{equation}
Where $N \left(t \right)$ is the number of trades in a second interval.
where $N \left(t \right)$ is the number of trades in a second interval.
$\varepsilon^{\left(p\right)}\left( t \right) = +1$ implies that the majority
of trades in second $t$ were triggered by a market order to buy, and a value
$\varepsilon^{\left(p\right)}\left( t \right) = -1$ indicates a majority of
sell market orders. In this definition, they are two ways to obtain
$\varepsilon^{\left(p\right)}\left( t \right) = 0$. One way is that in a
particular second there is not trades, and then no trade sign. The other way is
particular second there are no trades, and then no trade sign. The other way is
that the addition of the trade signs ($+1$ and $-1$) in a second be equal to
zero. In this case, there is a balance of buy and sell market orders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ \section{Price response function implementations}
\varepsilon_{j,d}^{\left(p\right)}\left(t\right)&=
\text{sgn}\left(E_{j,d}\left(t\right)\right)\label{eq:sign_sum_trades}
\end{align}
Where the subscript $d$ refers to the days used in the response computation.
where the subscript $d$ refers to the days used in the response computation.
We use Eq. (\ref{eq:sum_trades}) to make easier the comparison between the
results, as all the defined responses use the trade sign term.

Expand All @@ -46,16 +46,16 @@ \subsection{Response functions on trade time scale}
\label{subsec:response_function_trade}

We define the self- and cross-response functions in trade time scale, using the
trade signs in trade time scale and for the returns, we select the last
midpoint price of every second and compute them. We use this strategy with the
TAQ data set considering that the price response in trade time scale can not
be directly compared with the price response in physical time scale. In this
case we relate each trade sign in one second with the midpoint price of the
previous second. Then, to compute the returns, instead of using trades as the
time lag (it would make no sense as all the midpoint price are the same in one
second) we use seconds. Thus, we force the response in trade time scale to have
a physical time lag, and then, be able to compare with the physical time scale
response. This approximation is feasible considering the discussion in Sect.
trade signs in trade time scale. For the returns, we select the last midpoint
price of every second and compute them. We use this strategy with the TAQ data
set considering that the price response in trade time scale can not be directly
compared with the price response in physical time scale. In this case we relate
each trade sign in one second with the midpoint price of the previous second.
Then, to compute the returns, instead of using trades as the time lag (it would
make no sense as all the midpoint price are the same in one second) we use
seconds. Thus, we force the response in trade time scale to have a physical
time lag, and then, be able to compare with the physical time scale response.
This approximation is feasible considering the discussion in Sect.
\ref{sec:response_functions_def}. The price response function in trade time
scaled is defined as
\begin{equation}\label{eq:response_functions_trade_scale_general}
Expand Down Expand Up @@ -286,12 +286,16 @@ \subsection{Activity response functions on physical time scale}
As predicted by the weights, the event response is weaker than the physical
response, and the activity response is the strongest response.

In the three curves in the figure can be seen the increase-decrease behavior of
the response functions.
We propose a methodology to directly compare price response functions in trade
time scale and physical time scale. Additionally, we suggest a new definition
to measure the impact of the number of trades in physical time scale. In the
three curves in the figure can be seen the increase-decrease behavior of the
response functions.

Our results are consistent with the current literature, where the results
differ about a factor of two depending on the time scale. We note that the
activity response function implementation is only a test and was never defined
in previous works. That is why the factor of two difference can not be seen in
Fig. \ref{fig:relation_responses} for
in previous works. That is why the difference of a factor of two can not be
seen in Fig. \ref{fig:relation_responses} for
$R_{ij}^{\left(p,a\right)} \left( \tau \right)$.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ \subsection{Trade time scale shift response functions}
obtained in Fig. \ref{fig:response_function_trade_scale}, it looks like the
response function values with large time shift are stronger. However, this is
an effect of the averaging of the functions. As the returns and trade signs are
shifted, they are less values to average, and then the signals are stronger.
shifted, there are less values to average, and then the signals are stronger.
Anyway, the figure shows the importance of the position order between the trade
signs and returns to compute the response function.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ \section{Time lag analysis}\label{sec:short_long}
the time lag $\tau = 10^{3}$, the peak is usually between $\tau = 10^{1}$ and
$\tau = 10^{2}$. In these cases the long response are always negative after the
$\tau'$ value and is comparable in magnitude with the random signal.

On the other hand, the response functions that requires a bigger time lag to
show the increase-decrease behavior, have non negative long responses, but
still they are comparable in magnitude with the random signal.
still they are comparable in magnitude with the random signal.

According to our results, price response functions show a large impact on the
first instants of the time lag. We proposed a new methodology to measure this
effect and evaluate their consequences. The short response dominates the
signal, and the long response vanishes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ \section{Spread impact in price response functions}\label{sec:spread_impact}
trade signs. As long as the stock is liquid, the number of trade signs grow.
Thus, at the moment of the averaging, the large amount of trades, reduces the
response function signal. Therefore, the response function decrease as long as
the liquidity grows. And as stated in the introduction the spread is negatively
the liquidity grows, and as stated in the introduction the spread is negatively
related to trading volume, hence, firms with more liquidity tend to have lower
spreads.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ \section{Conclusion}\label{sec:conclusion}
The classification and sampling of the data had impact on the results, making
them smoother or stronger, but always keeping their shape and behavior.

The response functions were analyzed according to the time scales. To compare
price response functions from different scales, we used the same midpoint
prices in physical time scale with the corresponding trade signs in trade time
scale or physical time scale. This assumption allowed us to get an idea of how
The response functions were analyzed according to the time scales. We proposed
a new approach to compare price response functions from different scales. We
used the same midpoint prices in physical time scale with the corresponding
trade signs in trade time scale or physical time scale. This assumption allowed
us to compare both price response functions and get an idea of how
representative was the behavior obtained in both cases. For trade time scale,
the signal is weaker due to the large averaging values from all the trades in a
year. In the physical time scale, the response functions had less noise and
their signal were stronger. The activity in every second highly impact the
responses. As the response functions can not grow indefinitely with the time
lag, they increase to a peak, to then decrease. It can be seen that the market
needs time to react and revert the growing. In both time scale cases depending
on the stocks, two characteristics behavior were shown. In one, the time lag
was large enough to show the complete increase-decrease behavior. In the other
case, the time lag was not enough, so some stocks only showed the growing
behavior.
their signal were stronger. We proposed an activity response to measure how the
number of trades in every second highly impact the responses. As the response
functions can not grow indefinitely with the time lag, they increase to a peak,
to then decrease. It can be seen that the market needs time to react and revert
the growing. In both time scale cases depending on the stocks, two
characteristics behavior were shown. In one, the time lag was large enough to
show the complete increase-decrease behavior. In the other case, the time lag
was not enough, so some stocks only showed the growing behavior.

We modify the response function to add a time shift parameter. With this
parameter we wanted to analyze the importance in the order of the relation
Expand All @@ -39,14 +40,16 @@ \section{Conclusion}\label{sec:conclusion}
time shift should be a value between $t_{s} = \left(0,2\right]$ time steps.

We analyzed the impact of the time lag in the response functions. We divided
the time lag in a short and long time lag. The response function that depended
on the short time lag, showed a stronger response. The long response function
depending on the stock could take negative and non-negative values. However, in
general the influence were not intense.
the time lag in a short and long time lag. With this division we adapted the
price response function in physical time scale. The response function that
depended on the short time lag, showed a stronger response. The long response
function vanish, and depending on the stock could take negative and
non-negative values comparable to a random signal.

Finally, we checked the spread impact in self-response functions. We divided
524 stocks from the NASDAQ stock market in three groups depending on the year
average spread of every stock. The response functions signal were stronger for
the group of stocks with the larger spreads and weaker for the group of stocks
with the smaller spreads. A general average price response behavior was spotted
for the three groups, suggesting a market effect on the stocks.
Finally, we checked the spread impact in price self-response functions. We
divided 524 stocks from the NASDAQ stock market in three groups depending on
the year average spread of every stock. The response functions signal were
stronger for the group of stocks with the larger spreads and weaker for the
group of stocks with the smaller spreads. A general average price response
behavior was spotted for the three groups, suggesting a market effect on the
stocks.

0 comments on commit 49d4229

Please sign in to comment.