Market and Liquidity Risks Using Transaction-by-Transaction Information

: The usual measures of market risk are based on the axiom of positive homogeneity while neglecting an important element of market information—liquidity. To analyze the effects of this omission, in the present study, we deﬁne the behavior of prices and volume via stochastic processes subordinated to the time elapsing between two consecutive transactions in the market. Using simulated data and market data from companies of different sizes and capitalization levels, we compare the results of measuring risk using prices compared to using both prices and volumes. The results indicate that traditional measures of market risk behave inversely to the degree of liquidity of the asset, thereby underestimating the risk of liquid assets and overestimating the risk of less liquid assets.

In this context, our objective is to develop a methodology for estimating the market risk of assets including liquidity risk, as several authors, such as those of [20], found that assets more sensitive to liquidity offer higher average returns. Therefore, a market-risk estimation model that accounts for liquidity risk must incorporate the defining elements of liquidity risk ( [17,21]), including the immediacy or execution time of a transaction, the rigidity or cost of liquidating a small position, the depth or ability to trade at any volume, and the resilience or speed with which prices return to their equilibrium values.
For this purpose, the authors of [22] defined risk in terms of the change in value between two dates that are known but does not consider the period necessary to liquidate a position. Moreover, the axioms of [22] have been questioned (for example, see the work of [23], on the axiom of subadditivity). Thus, we focus on the axiom of positive homogeneity since, as the authors of [22] indicate, the time to liquidate a position depends on the volume of the position. However, is this relationship linear?
This issue was raised by the authors of [24], who introduced liquidity risk into the risk estimation model and questioned the validity of the axioms of subadditivity and positive homogeneity. These axioms required of the coherent risk measures assume that: on the one hand, the risk of a set of assets is always less than or equal to the sum of the individual risks (subadditivity), and on the other hand, the risk of a portfolio composed of a number of M units of a single asset is always equal to M times the individual risk of the asset (positive homogeneity). However, the authors of [25] had previously established the relationship between the two properties. A relaxation of convex risk measures was proposed as a possible solution for the nonlinear relationship between portfolio value and portfolio size ( [25][26][27]). Another solution ( [24,28]) is to define a càdlàg and ládcàg structure for a market depending on whether the position is short or long, thereby measuring the risk based on ask and bid prices respectively. However, this proposal assumes that the operations are immediate and that the volumes accompanying the buy and sell orders are sufficient to provide liquidity to the market (in addition to orders with hidden volume; see [29]). Consequently, any open positions are closed uniformly in time (with constant time intervals).
Additionally, the authors of [30] determined that the volume traded is correlated with all volatility measures, and the authors of [31] (p. 86) noted that the time horizon to measure the market risk depends on the asset liquidity and the time needed to close the position according to the volume traded regularly. Thus, market risk measures are subjective since they set the time horizon as an arbitrary input, whereas in our proposal, the time horizon is considered an output. Additionally, the authors of [32] observed limitations to adjusting liquidity risk with spread (bid-ask difference). Our methodology is based on transactions (trade execution prices and volume) that provide information that can later be used to adjust the bid-ask price spreads and bid-ask volume, making this method applicable both for markets with market-to-market behavior and for markets managed by order books by adjusting to the real intraday behavior of the operations and not only to the opening and closing prices. Moreover, by including volume as another variable, we consider the type of trading-i.e., informed agents making large trades, while small trades are not affected by bid-ask spreads. A review of these theories can be found in [33].
Liquidity risk has not ceased to be a hot research topic. So, Lam and Hue [34] investigated whether stock liquidity risk changes during the global financial crisis of 2008-2009 in international equity markets and find that stocks with higher precrisis return exposure to global market liquidity shocks experience larger price reductions during the crisis period. Kyounghun and Kim [35] investigated the effect of liquidity on exchangetraded fund tracking errors, returns, and volatility in the US and found that illiquid funds have large tracking errors; this effect is more pronounced when underlying assets are less liquid. Berger and Uffmann [36] use difference between bid and ask asset prices to measure stock liquidity and find that liquidity-adjusted value at risk is not Gaussian, so they forecast liquidity risk using the Cornish-Fisher approximation.
In this context, we test our proposal using two sample data sets. First, we simulate transactions with different frequencies and parameters for the stochastic processes of price and volume. Then, we compare the estimates of liquidity risk and usual market risk measures for high, medium, and low capitalization companies on Standard and Poor's 500 (Apple, Delta Airlines, and Unum Group, respectively). The sample market data include two frequencies: realized transaction dates and cumulative daily transactions.
The rest of the study is structured as follows: Section 2 proposes the methodology, Section 3 provides the experimental and market data results, and Section 4 presents the concluding remarks.

Literature Review
First, we review empirical studies on the subject since our proposal requires knowledge of the intraday behavior (transaction by transaction) of the variables considered, including price, volume, and time intervals between trades.
A drawback when analyzing real operational or high-frequency data is the irregularity of the time intervals in data observations, which, in a univariate case, requires temporal interpolations using common statistical tools (see [37]). However, in a multivariate case, there is an additional problem of asynchrony when observing the data, which generates effects such as those outlined by the authors of [38], who noted that the correlation between two assets decreased as the observation frequency was reduced. The authors of [39] determined that the time between trades is correlated with the introduction of new information in the market, making it more interesting to analyze the data for transaction times than the data for a constant time interval (e.g., every 5 min, at close, etc.). Therefore, models that feature constant intervals between trades, such as the model developed by the authors of [40], are outside the scope of this study since the interval is a stochastic variable that helps to define the risk of an asset.
In this way, the authors of [41] proposed the first econometric model for irregular time intervals between market transactions, known as autoregressive conditional duration (ACD), which allows one both to capture the conditional behavior and to use different distributions for the shocks (exponential, gamma, Weibull, . . . ). The authors of [42] proposed log-ACD models to ensure that the duration is strictly positive. The authors of [43] proposed stochastic volatility of duration (SVD) models. The use of these models was also extended to realized volatility modeling (e.g., [44]), a nonlinear model with two factors for the mean and variance of the duration. Subsequently, the authors of [45] determined that the waiting times between trades are random and positive by definition and observed a possible correlation between the time interval of transactions and asset returns. The authors of [46] found that the predictive ability of ACD models with different distributions is greater than that of SVD models.
Since irregular time intervals show thick tails in the distribution of asset returns, clustering, and long-term dependence (which, together with their irregularity makes the usual statistical tests for autocorrelation and heteroscedasticity unreliable in the presence of outliers), the authors of [47] studied these properties on a set of assets to determine whether a fractal model can fit the duration of transactions better than the usual ACD models with different probability distributions. Their results indicated that a model with a stable distribution best fits the interval between transactions. Most recently, the authors of [48] highlighted the complexity of contrasting and selecting an appropriate ACD model using statistical contrasts. The authors of [49] used an econometric model (ARMA and SETAR) to model intraday volume and divided the behavior of volume in two: on the one hand, the usual daily behavior, and on the other hand, abnormal behavior. The authors concluded that it is necessary to model price and volume jointly, but this factor was already highlighted by the authors of [50], who defined the positive relationship between changes in price and volume. The authors of [51] provided the first work that jointly modeled duration, trade order size, and returns, obtaining a reduced econometric form that incorporates the causal and feedback effects between these variables and, at the same time, captures the arrival of new information by distinguishing between high and low frequency moments in transactions. A conditional autoregressive model was used for duration and volume and GARCH (generalized autoregressive conditional heteroskedasticity) was used for asset returns. The authors of [52] proposed using duration models to estimate the intraday value at risk. Further, using similar modeling, the authors of [53] found that market liquidity and volume are important for explaining volatility dynamics but not vice versa, although the time series analyzed corresponded to a regular five-minute interval and not to the interval realized between trades. Lastly, the authors of [54] noted that liquidity risk is not a result of the size of the market but of the diversity of the economic agents with different objectives operating within that market, and that traditional measures of risk (such as value at risk) suffer from contagion problems and amplify the results at critical moments.
The authors of [55] postulated the existence of a relationship between order flow and adverse selection, which could imply that market makers unknowingly provide liquidity at a loss. Therefore, the authors proposed a methodology to estimate the volumesynchronized probability of informed trading (VPIN) that offers significant predictive power for toxicity-induced volatility and skewness, as the authors noted that the time series of observations at realized trading times are closer to a normal distribution and less heteroskedastic than those uniformly constructed with constant time intervals.

Model
One notable problem in the studies reviewed above is that the underlying stochastic processes of the modeled variables were not defined, making it impossible to test their ability to obtain risk-neutral valuations. Therefore, the variables are always of subjective probability.
To avoid this subjectivity, we employ marked point processes, which are used for modeling the intervals between events since these processes are the components that carry information on the temporal locations of the stochastic variables. Poisson processes constitute the beginning of these processes, so the number of events that take place between two moments in time can be considered to follow a Poisson process. Therefore, the interval between events follows an exponential distribution, while the sum of a number of exponential and independent random variables follows an Erlang distribution.
The above refers to Lévy processes, within which there are processes that fit the transaction-by-transaction modeling of financial markets. This subclass is known as subordinated Brownian motion processes ( [56,57]). These processes are characterized by the use of a standard Brownian process, such as the process commonly used to model asset returns, plus another independent gamma process that models the time at which an event takes place. Thus, if such an event (trade) takes place, then the (subordinate) Brownian process intervenes in modeling of the asset price. This combination, among others, leads the underlying probability to assume a Laplace distribution. For example, [58,59] applied this combination to the Black-Scholes-Merton model for pricing options, and the authors of [60] showed that these processes are similar to those of Heston and Cox-Ingersoll-Ross. In our theoretical model, time is the only real, continuous, and absolute unit of measurement, which we define as t. Then, we define the return of an asset (r) with price P as a stochastic process where S i = ln(P i ): where dW is a Wiener process such that Here, N is cumulative standard normal distribution. Usually, in finance, t i − t i−1 = dt (i.e., a constant) and it is assumed that t i − t i−1 → 0. However, if this interval is not constant, it reveals an important characteristic of the market liquidity for each asset.
An advantage of this model is that it can be adjusted for stochastic volatility as dσ i = σ S · √ dt i . This is equivalent to expressing the model as a variation of the Wiener process: . Thus, volatility depends on the duration or interval between trades, as noted by the authors of [39,60].
In this context, the authors of [61] found that the distribution of the waiting time between transactions for BUND futures traded on LIFFE follow a Mittag-Leffler function with parameters close to 0.96. However, when this parameter is close to 1, this function is equivalent to an exponential distribution. Thus, the underlying behavior is a truncated Lévy process where the waiting time (τ) follows a negative exponential distribution, which , where λ is the average time between consecutive transactions. However, since the volume (log-volume) must be modeled together with the asset return to estimate liquidity risk, the joint behavior represents a bivariate Laplace distribution.
Thus, following [61,62], ) and the matrix form is where the cumulated distribution is:

Methodology
Following [63,64], and considering the model proposed above, we are confronted with two problems: • We need to estimate the stopping time, i.e., how much time is necessary (t * ) to liquidate the position (V 0 ) on the analyzed asset. Thus, if AV t * is the cumulative volume traded between the current instant and the stopping time, we need to resolve: For the previously estimated time horizon, we must estimate the risk or potential loss for a given confidence level (α). Thus, to ensure that the estimate complies with the properties of a consistent measure, we use the conditional value at risk (CVaR): where µ and σ are, respectively, the drift and volatility of the stochastic process for asset returns, and X 0 is the current value of the portfolio.
Since there is no closed form to jointly perform the two estimates above, it is necessary to use numerical methods for the resolution of both. In this case, we could use either a Monte Carlo simulation, to generate prices and volumes, or a historical simulation, using past prices and volumes. While the former method assumes the joint probability distribution of the variations in both variables, in the latter, the behavior is implicit in the observed data.
Before simulating the values, we have to determine the time horizon. While in traditional risk estimation methods (VaR and CVaR), the time horizon is an input, in our method, the time horizon is the first output since it determines, for the chosen confidence level, the maximum number of consecutive transactions that must be liquidated to close the position. Therefore, based on the estimation date, the assumption is that the investor decides to liquidate his or her portfolio as soon as possible. For this reason, the transactions are made continuously over time (summation), and there is no selection based on the best or worst price. Then, the objective can be expressed as where Port f is the portfolio to be closed (long or short); V mean is the mean volume per trade; α −1 is the value of the inverse of the probability distribution at the confidence level for which the risk is estimated; µ V and σ V are the drift and diffusion of the volume's stochastic process, respectively; and HT provides the maximum time horizon need to settle the portfolio at α confidence level. We then obtain Changing the variable of √ HT = x results in the following second-degree equation: The positive solution for this second-degree equation is Thus, if µ τ is the mean of the interval between trades, then the maximum number of transactions to settle the portfolio is N = HT µ τ , which we round up to the nearest integer. The subsequent simulation involves the following steps: 1.
If λ = 1 µ τ is the expected rate of occurrences for a transaction, we simulate the calendar of trades while considering weekends and holidays (days θ) as follows: where t 0 is the estimation date (with the format dd : mm : yy and hh : mm : ss; u is a random uniform number; h o and h c are the times (with the format hh : mm : ss) that the market opens and closes, respectively; t i is the simulated date for i = 1, . . . , N, which is broken down into date (d i ) and time (h i ); and z i is the next day after d i that does not belong to the set of days θ.

2.
For each simulated date t i , we generate a transaction: whereρ V,S is the correlation between asset returns and relative volume changes, and S,i and V,i are independent standard normal random numbers. Thus, X i = P i · V i is the value of each simulated transaction at time t i , while the current value of the portfolio is X 0 = P 0 · Port f . 3.
Then, we repeat the two previous steps M times (the simulation number).
Finally, from the simulated trades, we can estimate the following: • VaR α = (P α − P 0 ) · Port f is the usual value at risk at the α confidence level, where P α is the price that corresponds to the α-percentile of the set of M simulated prices at the K time horizon, which is estimated under the assumption that all trades are closed for the same volume (the average initial volume or V mean ) such that K is the rounded-up integer number resulting from Port f V mean . VaR is independent from the volume variable (positive homogeneity). • CVaR α = (CP α − P 0 ) · Port f is the usual conditional value at risk at α confidence level, where CP α is the average of the simulated prices in K lower than P α . This estimate also does not consider the volume. • LaR α = X α − X 0 is the liquidity at risk at α confidence level, where X α is the transaction value that corresponds to the α-percentile of the set of M simulated trades at the HT time horizon and subject to V 0 = ∑ J j=1 V j , where J is the number of transactions required to close the position, and τ = t 0 + ∑ J j=1 t j is the stopping time needed to settle the portfolio. LaR α is a measure of the market plus liquidity risks and considers volume.
• CLaR α = CX α − X 0 the conditional liquidity at risk at α confidence level, where CL α is the average of the simulated trades in HT lower than X α , andτ is the average stopping time of these extreme values.
The above procedure is flexible, as it can not only be implemented through Monte Carlo simulations but also applied through historical simulations using a database of realized market trades, in which case, the behavior of the variables is implicit in the data without having to assume any probability distribution.

Data
To assess our proposed method, we apply it to two samples: one simulated (or experimental) and the other composed of real market data.
The experimental study is composed of Monte Carlo samples with 10,000 data each (shown in Table 1). The frequency between trades is expressed in seconds, while the rest of the parameters are annualized. Additionally, we assume that P 0 = 10, and Port f = 2000; thus, X 0 = 20, 000 is the current value of the portfolio. Here, the estimated date (t 0 ) is 1 March 2021, at 9:00:00; the market opening time (h o ) is 9:00:00; and the market closing time (h c ) is 17:00:00 (we have arbitrarily chosen this initial date to obtain results in terms of dates, the results would not change if we took another one, and expressed in terms of trading hours as it is usually the standard in organized stock markets).

Sample
Mean Volume  Table 2 shows parameters for estimating risk using market data obtained from Bloomberg. The frequency of exponential distribution for the time interval between two consecutive transactions is the percentile-weighted mean of the observed frequencies.

Analysis of frequency of trades
The drifts, volatilities, and correlation are estimated by the maximum log-likelihood of the bivariate Laplace distribution, as defined above.   Table 3 shows the results of the analysis.  Note: The the first four columns are the risk measures, i.e., value at risk (VaR), conditional value at risk (CVaR), LaR (liquidity at risk) and conditional liquidity at risk (CLaR) at 95% and 99% confidence level. Date is the average date on which the position is completely closed (with format dd : mm : yyhh : mm : ss). HT is the maximum number of transactions to close our position. J is the average number of simulated trades required to settle the portfolio and τ is the average time elapsed from inception (decision to close the position) until the portfolio is settled or difference in seconds between Date and the inception date.

Experimental analysis
The first relevant observation is that traditional risk measures (VaR and CVaR) that do not consider the volume and frequency of transactions overestimate risk compared to those that do consider those factors (LaR and CLaR).
The average volume per trade of each asset is also a key factor in determining the time and number of transactions required to settle a portfolio, so this factor should be considered both when estimating transaction costs and in the event of supply-demand contracting.
Furthermore, the higher the correlation (both positive and negative) is between the asset return and changes in traded volume, the higher the risk becomes, i.e., the risk is minimized as both variables become more independent (zero correlation). This indicates the possible existence of an implicit factor for asset pricing related to volume (see, among others, [17][18][19]).
Finally, regarding the parameters of the stochastic processes defined for the asset return and volume changes, the return volatility and volume drift show the greatest effect on risk, i.e., the higher the volatility is and the more negative the drift becomes, the higher the estimated risk will be. Table 4 shows the results from the Monte Carlo simulation used to test the robustness of the proposed methodology against different simulation methods, while Table 5 presents the results from the historical simulation. For the actual frequency between trades (Panel A and B), Table 4 shows that the closing position time, the maximum number of transactions potentially needed to close the position, and the average number of transactions needed to close the position increase as the liquidity of assets decreases. In addition, the usual measures of market risk (VaR and CVaR) present potential losses inversely proportional to the liquidity of the asset, i.e., they underestimate the risk of liquid assets and overestimate the risk of less liquid assets. These results hold for both confidence levels.

Market Data Analysis
The results of the daily-frequency trading hypothesis (Table 4 Panels C and D) show that the market risk measures (VaR and CVaR) are always higher than, or similar to, the liquidity measures (LaR and CLaR). Thus, unlike for the intraday frequency, these results do not depend on the liquidity of the asset. Finally, the market risk estimates for a one-day time horizon (Table 4 Panel E) underestimate the risk for estimates at the same frequency with respect to those that consider the volume traded. This empirical evidence indicates that setting the time horizon for measuring market risk independently of the liquidity of the asset (time to liquidate the position) implicitly implies an estimation error, which, in any case, is an overestimate, but which in the case of illiquid assets (with an average position closing time of more than one day) could lead to significant underestimates of risk.  Table 5 shows that, when the risk is estimated using historical simulation, the results provided in Table 4 for the Monte Carlo simulation are repeated, which highlights the greater robustness of the proposed method for measuring liquidity risk compared to other simulation methods. Moreover, for intraday frequency, the estimates of potential losses using historical simulation are lower than those from using Monte Carlo simulation, while for daily frequency, the estimates using historical simulation are higher. This result demonstrates the greater flexibility of the Monte Carlo simulation method in analyzing high-frequency data.

Conclusions
As discussed above, there is considerable financial literature on liquidity risk and its implications in asset pricing. However, traditional measures of market risk do not incorporate the liquidity factor in their estimates since such measures are based on the axiom of positive homogeneity. For example, the authors of [54] found empirical evidence for problems in traditional measures of market risk (value at risk and conditional value at risk) when facing changes in market liquidity.
On the other hand, econometric and financial studies have developed time-series models to explain the time intervals between events and transactions, known as conditional duration models (the pioneering work was [41]). However, these studies do not handle the underlying stochastic models needed to derive the risk-neutral values of financial instruments. As a consequence, this study presents a joint stochastic model for asset returns and volume variations that is also subordinate to the stochastic process for modeling the time intervals between trades.
As the subordinate process does not have a closed form, a numerical methodology (simulation) was proposed to obtain the stopping time and potential loss when liquidating the portfolio (liquidity at risk). This methodology was applied to a simulated series and to market data at different frequencies (the intraday real operations and daily closing) of assets with different sizes and levels of capitalization (Apple, Delta Airlines, and Unum Group).
The present results support the findings in [54] since the estimates of traditional measures of market risk show an inverse relationship with the degree of the liquidity of assets. We also found that the average volume per trade, the time interval between transactions, and the parameters of the stochastic process of volume (drift and volatility) have a high impact on the risk estimates. In addition, unlike traditional risk measures, the results of our proposed method provide the transaction costs of closing a position, as the results of our method determine the maximum and average number of transactions needed to settle a portfolio.
Our results are relevant for investors and portfolio managers with a certain degree of asset concentration (position size), as well as for high-frequency investors since the usual measures of market risk, which do not include the volume factor, also underestimate the risk for one-day time horizons. Our results and the proposed methodology are interesting for other economic agents that manage assets with different levels of liquidity and can help them to make decisions on these assets including the liquidity factor.
Future research lines should focus on the application of this methodology on modeling multivariate liquidity. They could also include other stochastic variables such as volatility. Finally, it would be interesting to contrast whether the time for settlement an asset could be an explanatory variable in multifactor asset pricing models.