Stop-loss and Leverage in optimal Statistical Arbitrage with an application to Energy market
Roberto Baviera, Tommaso Santagostino Baldi

TL;DR
This paper develops an optimal statistical arbitrage strategy incorporating stop-loss and leverage, using mean-reverting processes and applied to energy futures, with analytical formulas for strategy performance.
Contribution
It introduces a novel method to analytically derive optimal leverage and entry/exit levels in high-frequency trading with stop-loss, based on mean-reverting models.
Findings
Optimal strategies depend on probabilities and expected passage times.
Analytical expressions for expected first-exit times are derived for Ornstein-Uhlenbeck processes.
Long-run returns are expressed as functions of stop-loss levels.
Abstract
In this paper we develop a statistical arbitrage trading strategy with two key elements in hi-frequency trading: stop-loss and leverage. We consider, as in Bertram (2009), a mean-reverting process for the security price with proportional transaction costs; we show how to introduce stop-loss and leverage in an optimal trading strategy. We focus on repeated strategies using a self-financing portfolio. For every given stop-loss level we derive analytically the optimal investment strategy consisting of optimal leverage and market entry/exit levels. First we show that the optimal strategy a' la Bertram depends on the probabilities to reach entry/exit levels, on expected First-Passage-Times and on expected First-Exit-Times from an interval. Then, when the underlying log-price follows an Ornstein-Uhlenbeck process, we deduce analytical expressions for expected First-Exit-Times and we…
| Parameter | Estimated Values | CI |
|---|---|---|
| 18.51 | (10.89, 37.55) | |
| -0.94 | (-1.84, -0.01) | |
| 8.93 | (8.69, 9.16) |
| CI | CI | CI | |||||
|---|---|---|---|---|---|---|---|
| opt |
| Symbol | Description |
|---|---|
| risky security log-price at time , modeled as an OU | |
| Brownian motion | |
| transaction cost parameter, | |
| return per unit time up to time (return) | |
| long-run return | |
| investor’s wealth at time | |
| OU parameters: mean reversion speed, stationary mean, diffusion parameter | |
| the characteristic time of the OU dynamics, , | |
| steady-state standard deviation for the OU dynamics, | |
| estimated OU parameters via maximum likelihood | |
| fraction of wealth allocated to the risky security, it models leverage | |
| optimal leverage | |
| upper (lower) trading band | |
| stop-loss | |
| stop-loss, upper & lower trading bands in units | |
| transition probability from to | |
| “fair” transition probability from to | |
| risk free rate | |
| trade length | |
| first three moments of the trade length | |
| trade length, defined in eq. (5), in the positive (negative) scenario | |
| First-Exit-Time from the channel for a process starting in | |
| First-Passage-Time in for a process starting in | |
| increase of wealth in the positive scenario, | |
| cylindric parabolic function, | |
| cylindric parabolic function with two parameters, |
| Description | |
|---|---|
| CI | Confidence Interval |
| FET | First-Exit-Time |
| FPT | First-Passage-Time |
| IS | In-Sample |
| OS | Out-of-Sample |
| OU | Ornstein-Uhlenbeck process |
| p.d.f. | probability density function |
| w.r.t. | with respect to |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Stop-loss and Leverage
in optimal Statistical Arbitrage with
an application to Energy market
Roberto Baviera† & Tommaso Santagostino Baldi‡
Abstract
In this paper we develop a statistical arbitrage trading strategy with two key elements in hi-frequency trading: stop-loss and leverage. We consider, as in Bertram (2009), a mean-reverting process for the security price with proportional transaction costs; we show how to introduce stop-loss and leverage in an optimal trading strategy.
We focus on repeated strategies using a self-financing portfolio. For every given stop-loss level we derive analytically the optimal investment strategy consisting of optimal leverage and market entry/exit levels.
First we show that the optimal strategy á la Bertram depends on the probabilities to reach entry/exit levels, on expected First-Passage-Times and on expected First-Exit-Times from an interval. Then, when the underlying log-price follows an Ornstein-Uhlenbeck process, we deduce analytical expressions for expected First-Exit-Times and we derive the long-run return of the strategy as an elementary function of the stop-loss.
Following industry practice of pairs trading we consider an example of pair in the energy futures’ market, reporting in detail the analysis for a spread on Heating-Oil and Gas-Oil futures in one year sample of half-an-hour market prices.
[TABLE]
Keywords: Mean-reversion trading, stop-loss, First-Exit-Time.
**Address for correspondence:
**Roberto Baviera
Department of Mathematics
Politecnico di Milano
32 p.zza Leonardo da Vinci
I-20133 Milano, Italy
Tel. +39-02-2399 4630
Fax. +39-02-2399 4621
**Stop-loss and Leverage in optimal Statistical Arbitrage
with an application to Energy market**
1 Introduction
Statistical arbitrage trading exploits some statistical regularities in the dynamics of security prices, generally implementing repeated strategies; in this way it is able to obtain, with a high probability, a return larger than the risk-free return. These strategies are widespread among hedge funds.
A quantity of interest for an investor is strategy return per unit time up to time (hereinafter return)
[TABLE]
where is investor’s wealth invested in the strategy at time .
We consider in particular the case in which the investor has the possibility to repeat the strategy an indefinite number of times: a common assumption within statistical arbitrage techniques. In the case of a repeated game with infinite horizon, an objective function that makes sense maximizing is the long-run return that is an almost sure quantity (see e.g. Kelly 1956).
This problem has been first tackled by Taksar et al. (1988) who considered a portfolio with two assets with proportional costs, with the risky security that follows a Geometric Brownian Motion. This study and the literature that has followed (see e.g. Guasoni and Muhle-Karbe 2013, for a review) have clarified that two are the relevant questions for the investor: i) when he needs to rebalance his portfolio and ii) what fraction of wealth should be invested in the risky security.
In real situations, this chosen dynamics for the risky security appears to be oversimplified, and mean reversion is a relevant stylized fact that cannot be neglected especially in pairs trading (see e.g. Elliott et al. 2005, Gatev et al. 2006, Vidyamurthy 2004). Recently Bertram (2009) has considered the case where the log-price of risky asset follows an Ornstein-Uhlenbeck process (hereinafter OU) with transaction costs proportional to security prices. He considers an ansatz for the selection of the optimal long-run strategy identifying two trading bands where the investor has to buy and to sell, respectively, one unit of the security. The optimally chosen strategy within this ansatz can generate, as shown by Cummins and Bucca (2012), significant returns in commodity pairs trading in energy market; they show that these results can be achieved even considering daily end-of-the-day prices.
Unfortunately, when considering real statistical arbitrage strategies, even this approach is too simple. A statistical arbitrage strategy always requires a stop-loss, that is a level where the investor closes out a losing position (negative scenario) in order to limit maximum loss. The presence of a stop-loss is fundamental when applying these strategies in practice: indeed one can never be sure that, for a given security, the statistical description observed in the past, persists in the future.
Moreover hedge funds have the possibility to leverage their position, e.g. borrowing either from his primary broker or from other lenders. In this paper we model this problem providing closed form solutions.
The main contributions of this paper to the existing literature on statistical arbitrage are twofold.
A first contribution is to solve analytically, for any given stop-loss level, the problem with one risky asset á la Bertram with the possibility to borrow at a fixed rate : we identify the optimal bands and the optimal leverage. This approach clarifies also that the long-run return depends only on the probabilities to reach the trading bands and on the expected time interval between two trades in the strategy, time interval that is a simple function of a First-Passage-Time (hereinafter also FPT) and a First-Exit-Time (FET).
Second, we deduce for an OU an analytical expression for expected FET from an interval via elementary functions. This allows a fast computation of the optimal strategy for any given stop-loss level, since analytical expressions of the probabilities to reach interval endpoints and expected FPTs are already known in the literature (see e.g. Borodin and Salminen 1996, Nobile et al. 1985).
The paper is organized as follows. In Section 2 we describe the key elements in the proposed strategy and we deduce the long-run return as a function of stop-loss, trading bands and leverage with a continuous price process for the risky security; we also show how this quantity is linked to a Kullback-Leibler divergence (Kullback and Leibler 1956) associated to the optimal allocation problem. In Section 3 we deduce, for an OU, an analytical expression for the expected First-Exit-Time from an interval and specify the analytical expression for the long-run return in this case. In Section 4 we apply the trading strategy to a pair in the energy market on half-an-hour time-series, presenting some numerical results. We calibrate OU parameters via an In-Sample maximum likelihood discussing in detail the statistical significance of the estimated quantities, we compute optimal trading bands for different levels of leverage and then we measure, in an Out-of-Sample period, the observed return. Section 5 concludes.
2 Statistical Arbitrage in presence of Stop-Loss and Leverage
We consider an investor that can include a risk-free asset paying an interest rate and a risky security. As in Bertram (2009), log-price dynamics for the risky security follows an OU, i.e. where
[TABLE]
with a 1-dimensional Brownian motion while and are constant parameters: is the instantaneous standard deviation, the rate of reversion and the mean-reverting value. As in Bertram (2009) transaction costs are proportional to the price of the risky security with a positive constant modeling the total transaction cost associated with a trade. This model set up describes in a simple way a situation well studied in pair trading, leading to strategies that are often named “reversal statistical arbitrage”.
A first difference with Bertram (2009) is that we consider a risk-free asset in the portfolio and the possibility for an optimal allocation, instead of allowing an investment in the risky asset only. A trading strategy is a sequence of individual trades performed on the continuous time stochastic process (1). In particular we focus on an investor that can diversify his investment between these two assets in a self-financing strategy; as in Bertram, we consider a repeated strategy and maximize strategy’s long-run return
[TABLE]
We show that this approach allows to introduce leverage in an elementary way.
Definition 1** (Leverage)**
Leverage is defined as the ratio at time between the amount invested in the risky asset and investor’s total wealth .
In particular we consider leverage at times when trades take place. The other difference w.r.t. Bertram’s strategy is that we introduce a stop-loss.
Definition 2** (Stop-loss)**
Stop-loss is defined as the level for the log-price of the risky security such that, when it is reached, the trading strategy is interrupted in any case incurring in a loss. Before entering in a trade, the investor fixes a stop-loss level.
This approach mimics the behaviour often observed in practice in statistical arbitrage strategies: the investor establishes ex ante a stop-loss level before starting the trading strategy. Given dynamics (1) with time independent parameters, a reasonable choice for the stop-loss level is to consider a constant value during the whole strategy.
Once is fixed, the investor has to choose the optimal strategy given that constraint. This technique reminds the one introduced in Leung and Li (2015), where the stop-loss is introduced as a constraint for the strategy; they show how to determine the optimal bands for the expected earning of one single trade when security price is an OU. Unfortunately it is not straightforward to generalize their technique to a non linear objective function.
Remark 1
Without losing any generality, we can consider a null interest rate and a null drift term . The choice is not restrictive, indeed the case can be recovered by modifying the drift term in the dynamics of the risky security and adding to wealth growth rate (see e.g. Cartea et al. 2015). Furthermore we can choose : the case with a drift not equal to zero can be recovered by a simple translation of the process .
The problem is then equivalent to the selection of the optimal trading strategy for an investor that has the possibility to choose the amount to invest in a risk-free asset identically equal to and in a risky security whose log-price is
[TABLE]
Let us first consider a trading strategy where the investor can have a long position in the risky asset. The stop-loss is activated when the log-price reaches a level (lower than zero in this case) selling the risky asset. This is the typical situation that is considered in practice by hedge funds in reversal statistical arbitrage strategies: the long position is closed out when the risky security has a given percentage drop to the mean level.
Once the stop-loss is fixed, the ansatz for selecting the trading strategy is identified by an entry band and an exit band , as in Bertram (2009). In the entry band the investor buys the security and sells it in the exit band . The entry band is lower than zero, the mean-reverting value for in (2), because the investor bets on the mean reversion of the log-price and has to be larger than the stop-loss .
Once has been chosen, the trading strategy is defined by the following steps that generalize the ones in Bertram (2009) to the case with a stop-loss:
the position is opened when the process reaches , buying the security; 2. 2.
if the process arrives at without having reached the stop-loss before, the position is closed in with a profit (positive scenario). Then the investor has to wait for the process to return to to re-open the position; 3. 3.
if the process arrives at before reaching , the investor is forced to close out the position in with a loss (negative scenario). Then, also in this case, he will wait for the process to return to to re-open the position. Trade length is the time interval between two subsequent trades.
Figure 1 shows the relationship between the trading bands and the stop-loss. Each trade starts with the log-price equal to and ends the first time exits the channel .
Since many of the quantities related to the trading strategy (e.g. the return) depend on the time between two subsequent trades in the strategy, let us carefully define them.
Definition 3** (First-Exit-Time and First-Passage-Time)**
The First-Exit-Time from the channel starting in , with , is a random variables defined as
[TABLE]
while () represents the FET in the positive (negative) scenario
[TABLE]
Also First-Passage-Times play a relevant role in trade length, since one has to include also the time waited to enter again in a new trade. They can be defined as
[TABLE]
In the two scenarios described above, for a continuous process , trade lengths are
[TABLE]
where () represents the trade length in the positive (negative) scenario.
As already mentioned in the introduction, the investment strategy is not realized only once but it is reproduced iteratively using a self-financing portfolio. At time , corresponding to the trade, the investor diversifies his entire available wealth in the two assets with the fraction of wealth invested in in the risky asset. In this trading strategy, if price dynamics is continuous, the wealth between the trade and the next one are related via
[TABLE]
where is a random variable that can assume two values
[TABLE]
where we have considered the total transaction cost associated to each trade. The fraction is positive because we are considering an investor who enters in a long position; when the investor is leveraging his investment borrowing some more capital. The quantity models leverage at time .
Because security dynamics parameters and entry/exit bands are time independent, in the case investor decision does not depend on his total wealth, every time the process reaches the investor repeats the strategy allocating always the same to the risky security.
Summing up, the following conditions should be satisfied, in order to have a well posed financial problem for the trading strategy of interest:
[TABLE]
The first condition is equivalent to avoid trading inside the transaction costs; it is equivalent to state that . The second condition imposes that the stop-loss is always lower than the entry level : it implies that . The other condition states that we are considering a long position in the risky security.
We can now state two of the main results of this study, that hold for a generic continuous price dynamics.
Proposition 1
If price dynamics is continuous, for a given stop-loss level , the long-run return as a function of the leverage and the trading bands and is:
[TABLE]
*Proof. * See Appendix A
Let us observe that the denominator of (9) is the expected trade length. In particular, as shown in the next section, when is OU (2) the quantities , and are analytical functions of and .
Proposition 2
If the first two moments of the trade length are finite, the variance of the return, , is when goes to infinity.
Proof. See Appendix A
The above proposition states that, for the described strategy, the return is an almost sure quantity in an infinite horizon. Stated differently the Sharpe Ratio of the strategy, defined as the expected excess return (w.r.t. the risk-free rate ) over return’s standard deviation, goes to infinity in the long run.
Before analysing the optimal return let us introduce the probability for the “fair game”, that takes into account also the transaction costs paid.
Definition 4** (Fair probability)**
We define the following two quantities:
[TABLE]
If condition i) in (8) holds then and is a probability set. It is possible to interpret as the fair probability set associated to the random variable , i.e.
[TABLE]
We can divide the optimization problem in two steps: first, we find the optimal leverage with and fixed, then we search the optimal trading bands.
Lemma 1
If price dynamics is continuous, the optimal leverage satisfies:
[TABLE]
*Proof. * Straightforward after having imposed to the long-run return (9) the first order condition . The optimal leverage satisfies condition iii) in (8) when ; otherwise
The above lemma states that it is worth investing a non-null amount in the strategy () only if, for the chosen bands and , the “game” is unfair and it is mean reverting, i.e. the probability of the positive scenario is larger than the fair probability . We could impose the trading strategy to a generic continuous price dynamics; however it makes sense only when dynamics is mean-reverting.
Corollary 1
The long-run return (9) with the optimal leverage is
[TABLE]
i.e. it is the Kullback-Leibler divergence between probability and , normalized by the expected time between two subsequent trades, when and it is zero otherwise.
*Proof. * Straightforward from direct substitution of the optimal leverage (11)
We can observe that the numerator of (12) is very simple and we demonstrate in the next section that also the denominator can be expressed in an elementary way for an OU. The long-run return (12), given the stop-loss , depends only from the trading bands and . It can be maximized in order to find the optimal values for the trading bands, as we show in a detailed example in section 4.
Remark 2
When a short position in the risky asset is allowed, the long-run return of the strategy can be further increased. Given the symmetry of OU dynamics (2) the investor can consider also the reverted strategy doubling the long-run return: he opens a short position in and closes it buying back the risky security in (profit) or in (loss).
3 First-Exit-Time moment of the Ornstein-Uhlenbeck process
In previous section we have shown that the optimal long-run return depends on the probabilities to reach trading bands and on some expected FPTs and FETs, for any continuous price process. When follows OU dynamics (2), the expression for expected FPT and probability to reach endpoints can be found in the literature; in this section we show how to compute expected FET in terms of elementary functions.
Remark 3
It is possible to rescale time and log-prices in (2), measuring time in units, and in units, obtaining an equivalent dynamics (in the new units of measure) with . Stated differently, trading bands are multiples of the standard deviation for the Gaussian stationary distribution for the process (2); times (e.g. trade lengths) are multiples of OU characteristic time scale .
We indicate with lowercase letters trading bands in units, i.e.
[TABLE]
We can also indicate with the stop-loss in units
[TABLE]
with a negative real number. In mathematical terms this choice corresponds to stop the strategy when the drawdown reaches a given quantile of the Gaussian stationary distribution. A typical choice for is that corresponds to the quantile.
In order to compute the expected FET, we consider FET’s Laplace transform in Borodin and Salminen (1996) and the expression for the parabolic cylinder function in Nobile et al. (1985)
[TABLE]
with the gamma function and the functions defined via the following iterative relation
[TABLE]
In particular, it can be useful to decompose functions in even and odd functions, as shown in the following lemma for the first two.
Lemma 2
For the first two functions defined in (14), we have
[TABLE]
where are even functions while are odd functions, whose definitions can be found in the Glossary of Functions.
Proof. See Appendix A
The quantity of interest is in (3), the FET starting from and exiting from the interval with ; in particular we are interested in the FET () when exiting from ().
The probability to exit from above (Borodin and Salminen 1996, p.548 eq.3.0.4b) is
[TABLE]
where the last equality is obtained rewriting the probability as a function of the -previously mentioned- odd function .
The main result of this section is stated in the following proposition, where it is provided an explicit expression for the first moment of for the OU (2).
Proposition 3
The first moment of in (4) for the OU dynamics (2) is
[TABLE]
where and are respectively even and odd functions, whose definitions can be found in the Glossary of Functions and the characteristic time of the OU.
Proof. See Appendix A
The first moment of the First-Passage-Time (with ) is obtained in the following corollary.
Corollary 2
The first moment of the FPT with is
[TABLE]
Proof. This result can be proven as shown in Nobile et al. (1985) or as a limit for of previous proposition
Similarly, when exiting in , one has the probability
[TABLE]
the expected FET is
[TABLE]
and the expected value of FPT with is
[TABLE]
Remark 4
Using the same technique of proposition 3, also the following moments of FET can be computed. In particulary it can be shown that also the variance of and are finite, as required by proposition 2.
Previous results for FETs allow writing the expected trade length in the denominator of (9) and (12) as a simple expression when follows OU dynamics (2), as shown in the following corollary.
Corollary 3
The expected trade length for the OU dynamics (2) is
[TABLE]
Proof. Straightforward from direct substitution
In the OU case we can write explicitly long-run return (9), due to the simple expressions for probabilities and expected trade length. It becomes
[TABLE]
In previous section we have discussed for a generic continuous price process the condition for having non trivial trading strategy, i.e. a non-null amount invested in the risky asset. Let us now comment on the main consequences when follows OU dynamics (2). As shown in Lemma 1, for a given trading strategy (and then for a given set of bands and ), it is required that
[TABLE]
In the case of pair trading, the volatility takes low values (typically lower than ). In this case we can consider the first order expansion of with
[TABLE]
where , in the OU case, is given by (16). In the OU case, it is straightforward to show that is always positive . Stated differently, every time log-prices follow an OU (with a positive mean reversion ) the “game” is unfair and mean-reverting (), providing that transaction costs are not too high. For any chosen stop-loss level a quantity of practical interest is , the maximum transaction cost that allows a non trivial trading strategy, i.e. the maximum of w.r.t. and . This quantity is a universal function of the stop-loss level (i.e. it does not depend on any model parameter) and in figure 2 we show its plot for in the range of values relevant for practical purposes.
Remark 5
It can be interesting to obtain from (21) Bertram’s long-run return as a limit case for a stop-loss . In this case the expected trade length becomes and one gets
[TABLE]
which is an increasing function of , because there are no losses in any scenario. Choosing one gets the well known result (see e.g. Bertram 2009, eq.15)
[TABLE]
4 An application to the energy market
In this section we show a simple application of the trading strategy with stop-loss and leverage on empirical data in the energy market. We consider one of the pairs analyzed in Cummins and Bucca (2012) that presents a limited seasonality: the spread between the second future contract of Heating Oil and the sixth future contract of Gas Oil (generally identified as HOc2-LGOc6).
As described in Cummins and Bucca (2012) the Heating Oil future (HO) is traded in USD per gallon on the New York Mercantile Exchange (NYMEX) with a contract unit of 42,000 gallons, while the Gas Oil future (LGO) is traded in USD per metric ton with a contract unit of 100 metric tons on the Intercontinental Exchange (ICE); we consider a half-an-hour dataset for one year between the 23.04.2015 and the 22.04.2016. Data provider is Thomson-Reuters. Both markets are round the clock markets, with a 60 minute break between 17:00 and 18:00 New York Time (NYT) of each business day for HO (on Sunday market opens at 18:00 NYT) and with a two-hour break between 18:00 and 20:00 NYT of each business day for LGO (on Sunday market opens at 20:00 NYT). We use the classic approach of dividing our dataset into a 9-month In-Sample (IS) period and a 3-month Out-of-Sample (OS) period. In the IS period we calibrate OU parameters considering only the time interval between 9:00-16:00 NYT when both markets are more liquid; outside this time slot the volume is significantly smaller. We also determine the optimal trading bands for the strategy. Strategy’s performance is verified OS using round-the-clock prices (excluding the time interval between 17:00-20:00 NYT, where one of the two markets is closed). Similarly to Cummins and Bucca (2012) we consider the ratio , where represents the mid price of the HO future contract, while represents the mid price of the LGO future contract.
Our dataset is composed by 2,908 and 2,752 observations, respectively, in the IS and in the OS periods. We consider two filtering techniques in order to clean the time-series from outliers.
Following the same technique described in Benth et al. (2008), we search for extreme outliers of . Given the lower and upper quartiles, and , respectively, and the interquartile range , an observation is considered an outlier if it is smaller than , or larger than . Following this rule, no outlier is detected.
Then we filter out antipersistent outliers that can influence the strategy: an observation is classified in this way if the difference between two subsequent ratios is, in absolute value, larger than the interquartile range, i.e. , and next observation recovers at least the of . Following this technique we remove outlier both in IS (on the 3rd of July 2015 at 12:30 NYT) and in OS time series (on the 15th of Feb. 2016 at 20:00 NYT).
Parameters are estimated on the IS dataset via maximum likelihood; confidence intervals are obtained via a bootstrap technique with samples (see e.g. Appendix B for details). Numerical results are reported in table 1.
In a similar way to Bertram (2009), we obtain the optimal trading bands maximizing numerically return (21) for the optimal leverage; we allow also for short positions. The optimization is immediate due to the simplicity of the expression. In figure 3 we show the optimal trading bands and as a function of the transaction cost when the stop-loss is , parameters are the ones in Table 1.
Transaction cost parameter at time can be estimated from the bid-ask observed in price time-series as
[TABLE]
where and represent, respectively, the ask and bid price of the future with i=1,2. In figure 4 we show the empirical distribution of values; its mean value is .
Optimal leverage is equal to , with the Confidence Interval , a value too large for practical purposes. In table 2 we show results for optimal bands ( and ) and returns with their confidence intervals for different levels of leverage: , and the optimal leverage. We also report the corresponding OS returns. We observe that trading strategy results are significant in the long run even introducing a stop loss as shown in this study and when leverage is suboptimal.
5 Conclusions
In this paper we develop a statistical arbitrage trading strategy in presence of stop-loss and leverage for a mean reverting security.
We have first introduced stop-loss and leverage within the modeling framework presented by Bertram (2009). For any given leverage level , we write analytically the optimal investment strategy and the associated long-run return; in order to reach this task we derive, for an OU, the expected First-Exit-Time from a channel in a closed form. In this case we can deduce a simple analytical expression for the long-run (21).
We have also shown an application to a pair in futures’ energy market, considering 12 months half-an-hour time series. Optimal bands and leverage can be easily computed also imposing a stop-loss. Optimal leverage is too large for practical purposes, but Out-the-Sample results show that the proposed trading strategy provides significant long-run returns even considering a suboptimal leverage.
Acknowledgements
We thank all participants to the Conference on the Mathematics of Energy Markets at WPI in Vienna 2016 and to the Workshop on Energy Finance in Padova 2016 and in particular J. Palczewski for useful comments. The usual disclaimers apply.
Notation and Glossary of Functions
Notation
Abbreviations
Glossary of Functions
The basic functions are (Abramowitz and Stegun 1964)
[TABLE]
Similarly to Nobile et al. (1985), we introduce the even functions and the odd functions that decompose the functions defined via the recursive equation (14)
[TABLE]
We have also written their Maclaurin series.
Appendix A
In this Appendix we prove paper’s main results.
*Proof * Proposition 1
Let us define () as the number of times the process, started in , reaches () before () in the time interval . Let us consider investor’s wealth in the self-financing strategy at time equal to portfolio value immediately after the last trade before if price dynamics is continuous
[TABLE]
Then, for a particular realization of the process, we have
[TABLE]
with
[TABLE]
We can also rewrite the time as the sum of the trade length, obtaining:
[TABLE]
The long-run return is defined as the limit for of previous expression; for the law of large numbers the proposition is proven after observing that
[TABLE]
*Proof * Proposition 2
We compute the expected value and the variance of , given by equation (22). Let us observe that , where is an ordinary renewal process and the frequency of OU processes that reach before in a time interval ; the interarrival time (trade length in our case) is described by the p.d.f. (see e.g. Cox and Miller 1965, p.353)
[TABLE]
where ( ) is the p.d.f. of the interarrival time in the positive (negative) scenario. Given , the frequency follows a binomial distribution.
For an ordinary renewal process with finite first three moments of the interarrival time, the following relations hold (see e.g. Cox and Miller 1965, p.345)
[TABLE]
where are the first three moments of the interarrival time, i.e. .
We can rewrite (22) as
[TABLE]
and using conditional expectation we get
[TABLE]
where and is the long-run return.
Using the Law of total variance (see e.g. Weiss 2006) we obtain
[TABLE]
If only the first two moments of the interarrival time are finite, we obtain only the leading term in above expansion, proving the proposition.
For practical purposes it can be useful to relate the first two moments of with the corresponding quantities in the positive and negative scenario. After straightforward computations one gets
[TABLE]
*Proof * Lemma 2
Straightforward for . For one should
[TABLE]
which gives the required result after observing that the last three integrals can be computed explicitly
[TABLE]
As a matter of fact, having defined
[TABLE]
the quantity can be written as
[TABLE]
where we have integrated by parts and recognized tabled integral (4.7.6) in (Ng and Geller 1969, p.14)
*Proof * Proposition 3
This proposition can be proven starting from the Laplace transform for the FET (Borodin and Salminen 1996, p. 548 eq.3.0.5b)
[TABLE]
with and the parabolic cylinder function with two parameters (see e.g. Borodin and Salminen 1996, p.647)
[TABLE]
The Laplace Transform becomes
[TABLE]
and using equation (13)
[TABLE]
The expected value of is related to the first derivative in zero (with opposite sign) of the Laplace transform
[TABLE]
with
[TABLE]
Using the decomposition of in odd and even functions, after a straightforward computation one obtains the expected FET, proving the proposition
Appendix B
We briefly recall the statistical techniques we use for the estimation of parameters and their statistical accuracy.
Maximum likelihood estimation (MLE)
Let us consider the OU process (1) with not equal to zero as, in general, time series have a stationary mean different from zero.
In order to estimate the three parameters we consider a maximum likelihood estimation (see e.g. Yu and Phillips 2001).
The conditional density of at time given is:
[TABLE]
where and
[TABLE]
We maximize the likelihood or equivalently the log-likelihood:
[TABLE]
Maximum likelihood estimators are given by .
Bootstrap
In order to check parameters significance it is possible to use a bootstrap technique (see e.g. Efron and Tibshirani 1986). It corresponds to follow the steps:
estimate via MLE the values of of the time-series with values; 2. 2.
simulate the OU process with parameters times (samples) with values each sample; 3. 3.
estimate a new set of parameters via MLE on each sample with ; 4. 4.
given the empirical distributions for the three parameters determine the confidence intervals for each parameter.
In the paper we consider samples.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Abramowitz and Stegun (1964) Abramowitz, M. and Stegun, I., 1964. Handbook of Mathematical Functions With Formulas, Graphs, and Mathematical Tables , National Bureau of Standards.
- 2Benth et al. (2008) Benth, F.E., Benth, J.S., and Koekebakker, S., 2008. Stochastic modelling of electricity and related markets , World Scientific Publishing Co. Pte. Ltd.
- 3Bertram (2009) Bertram, W., 2009. Optimal trading strategies for Ito diffusion processes, Physica A: Statistical Mechanics and its Applications , 388, 2865 – 2873.
- 4Borodin and Salminen (1996) Borodin, A. and Salminen, P., 1996. Handbook of Brownian Motion: Facts and Formulae , Birkhauser.
- 5Cartea et al. (2015) Cartea, Á., Jaimungal, S., and Penalva, J., 2015. Algorithmic and high-frequency trading , Cambridge University Press.
- 6Cox and Miller (1965) Cox, D.R. and Miller, H.D., 1965. The theory of stochastic processes , Chapman and Hall.
- 7Cummins and Bucca (2012) Cummins, M. and Bucca, A., 2012. Quantitative spread trading on crude oil and refined products markets, Quantitative Finance , 12, 1857 – 1875.
- 8Efron and Tibshirani (1986) Efron, B. and Tibshirani, R., 1986. Bootstrap methods for standard errors, confidence intervals, and other measures of statistical accuracy, Statistical science , 1, 54–75.
