acOptTxns | R Documentation |
In theri proposed modeling framework Almgren-Chriss consider the following
trade-off that ultimately determines the transaction cost: on one hand a
trader may modulate the trading rate in order to decrease the volatility risk
exposure to secutities prices fluctuations, on the other the rate of exection
has the effect of increasing the transaction cost through the price impact these
trades generate.
This so called trader dilemma can be conxtualized from two equivalent
points of view, maximize the expected trading revenues or minimize the expected
transaction costs, for any given trader's risk tolerance as captured by
the risk-aversion coefficient \gamma
.
The authors' fundamental idea of optimal liquidation is to find
which trading trajectory minimizes the trade-off.
acOptTxns(Securities, mu = 0, sigma, gamma, epsilon = NULL, eta, lambda)
Securities |
A |
mu |
A numeric value, the drift of the traded security price. Default is zero |
sigma |
A numeric value, the volatility of the traded security price |
gamma |
A numeric value, the permanent impact parameter |
epsilon |
A numeric value, a temporary impact parameter. Default is the bid-ask spread midpoint plus fees |
eta |
A numeric value, a temporary impact parameter |
lambda |
A numeric value, expressing the risk tolerance |
In the Securities
input object values have the following meaning:
'Symbol' is the traded security name, 'Init.Price' is the price of the security
at the time the trading program begins, 'Units' is the total number of units
to liquidate (e.g. shares, number of contracts), 'Complete.by' is the given total
time for liquidation in numeric terms (e.g. 1 day), 'Trade.Periods' is number
of trading periods in between the program (expressed in terms of 'Complete.by').
A list containing the following elements:
Optimal.Trajs
: A data.frame
with optimal trajectories of the units to hold (Opt.Hold
),
trade (Opt.Trade
) and of the transactions impacts (Perm.Impact
Term.Impact
)
incurred in the liquidating the security.
Optimal.Comb
: The optimal stragegy associated expectation shortfall (E(x)
), expressed in the security currency, and variance of the shortfall (V(x)
), expressed in the security currency squared
Strategy.Tot
: Overall measures associated with the optimal strategy
Among the authors assumptions is there the security price dynamic is driven by
a discrete arithmetic random-walk with independent increments, furthermore
- following their extended discussion - a drift is permitted. As known it allows
to incorporate directional views on the traded security price, however it may
result in changed signs of the optimal trajectories computed (e.g. there may be
buy trades in a selling program). Also, in light of the short-term trading horizons
considered, the authors do not consider other procecesses nor carry or time-value
of money.
Another assumption is with respect to the equally spaced interval between the
trading discrete times, \tau = T/N
where T
is the time the execution
program has to be completed and N
represents the number of intervals the
among the trading times.
With respect to the impact functions, although not strictly necessary, we follow
the authors' seminal work and assume linear forms. It is a simplification that
as we shall specify shortly allows to provide explicit solutions to the optimization
problem posed.
Permanent and temporary impact are functions of the average trading rate,
v_{k} = n_{k}/\eta
.
Permanent market impact. Sometimes described as "information leakeage" is an ebrilibrium-changing in the security price during the trading times, i.e an influence on its dynamic, that we write as:
S_{k} = S_{k-1} + \sigma*\sqrt{\tau}*\psi_{k} + \mu*\tau - \tau*g(v_{k})
where \psi
is a standard normal random variable, \mu
is the security
price drift and \sigma
is the security price volatility. The function
g(v_{k})
is the linear permanent impact function
g(v_{k}) = \gamma * v_{k}
the parameter impact \gamma
permanent impact parameter can be seen as a
fixed cost independent of the trajectory (and is expressed in (currency/trade-unit)/trade-unit).
Temporary market impact. The execution of a sufficiently large n_{k}
units between times t_(k - 1)
and t_k
may influence the price of
the traded asset. The impact is always against the trader in that buying (selling)
a too large number of units may increase (decrease) its price. Due to this impact
the effective price per traded unit on the k
-th transaction is:
\hat{S}_{k} = S_{k-1} - h(v_{k})
with h(v_{k})
, the linear temporary impact function, defined as:
h(v_{k}) = \epsilon * sgn(n_{k}) + \eta * v_{k}
the parameter \epsilon
is expressed in currency/trade-unit, authors report
that a reasonable estimate for is the fixed costs of trading, such as half the
bid-ask spread plus fees; the temporary impact parameter \eta
is expressed
in (currency/trade-unit)/(trade-unit/time) and is reportedly more difficult to
estimate.
Associated with any given trading trajectory there is a capture trajectory,
and a total cost of trading.
The former is the full trading revenue upon completion of all trades:
\sum{n_{k} * \hat{S}_{k}}
Whereas the latter is the difference between the portfolio value at the beginning of trading (book value) and the capture trajectory:
X*S_{0} - \sum{n_{k} * \hat{S}_{k}}
this is Perold's (ex-post) implementation shortfall.
A rational trader seeks to minimize the expectation of shortfall, for a given level of variance of shortfall. For each level of risk aversion there is a uniquely determined optimal trading strategy. The optimization problem Almgren-Chriss posed aims to find such a strategy, which has lower variance for the same or lower level of expected transaction costs, or, equivalently, no strategy which has a lower level of expected transaction costs for the same or lower level of variance. Mathematically the problem is posed as:
min[E(x) + \lambda * V(x)]
where the expected shortfall E(x)
is the expectation of impact costs
in k = 1,...,N
:
E(x) = 0.5*\gamma*X^2 - \mu*\sum{\tau*x_{j}} + \epsilon*\sum{|n_{k}|} + (\eta - 0.5*\gamma*\tau)*\sum{n_{k}^2}
k = 1,...,N
.
and the variance of the shortfall V(x)
is
V(x) = \sigma^2 * \sum{\tau*x_{j}^2}
The Lagrange multiplier \lambda
is interpreted as a measure of risk
aversion, that is how much the variance is penalized with respect to the to expected cost.
The solution of this problem depends on the specified forms of the impact functions.
Fot the linear case assumed explicit solutions of the optimal holding trajectory
and as a consequence of the associated optimal trade trajectory exist. They
are respectively
x_{j} = \frac{{sinh[\kappa(T - t_{j})]}{sinh(\kappa * T)}} * X
+ (1 - frac{sinh[\kappa*(T - t_{j})] + sinh(\kappa*t_{j})}{sinh(\kappa*T)}) * \bar{x}
n_{j} = \frac{2*sinh(0.5*\kappa*\tau)}{sinh(\kappa * T)} * cosh(\kappa(T - (j - 0.5)*\tau) * X
+ 2 * sinh[1/2*\kappa*\tau]/sinh(\kappa*T) * (cosh[\kappa * t_{j - 1/2}] - cosh[\kappa * (T - t_{j - 1/2})]) * \bar{x}
where \bar{x} = \mu/2*\lambda*\sigma^2
is the optimal level of security
holding for a time-independent porfolio and allows to incorporate a drift correction
into the optimal trajectories dynamics, when the hypothesized drift term is not null.
The parameter \kappa
, sometimes called the urgency parameter, expresses
the curvature of the optimal trajectory, approximated for small equally spaced
trade periods, that is:
\kappa ~ \sqrt{\lambda*\sigma^2/\eta} + O(\tau)
as \tau -> 0
.
Also \kappa
provides an interesting interpretation in terms of the time
needed to complete the order. Rewriting:
\theta = \frac{1}{\kappa}
the so called half-life of a trade is evident that the larger the value
of \kappa
and the smaller the time \theta
needed deplete the execution,
that is the rapidly the trade schedule will be completely executed. In other
terms it can be seen as a measure of the liquidity of the traded security.
As long as \lambda \geq 0
there exists a unique minimizer x^{*}(k)
.
Resolving the optimization problems with respect to different such values of
\lambda
leads to the efficient frontier, that is the locus of the
optimal trading strategies where each strategy has the minimum transaction cost
for a given level of volatility or the minimun volatility for a given amount
of transaction costs (i.e. cost-volatility optimal combinations).
The frontier is a smooth convex function, differentiable at its minimal point
which is what the authors call the naive strategy, corresponding to trading
at a constant rate.
It is important to stress how under the above context the optimal execution trajectories can be statically determined. This is not always exactly true, as there could be serial correlation effects and paramters shifts due to regime changes (news, events, etc.). However the author shows how even in that case optimal trajectory are piecewise static and notwithstanding that gains from introducing these components into the dynamics is argued to be negligible for large portfolios with respect to the impact costs.
Vito Lestingi
Value Under Liquidation (Almgren and Chriss, 1999), working paper. https://www.math.nyu.edu/faculty/chriss/optliq_r.pdf Optimal Execution of Portfolio Transactions (Almgren and Chriss, 2000), Journal of Risk. http://corp.bankofamerica.com/publicpdf/equities/Optimal_Execution.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.