1 Setup

Robustness of mathematical models and technical analysis strategies

Abstract.

The aim of this paper is to compare the performances of the optimal strategy under parameters mis-specification and of a technical analysis trading strategy. The setting we consider is that of a stochastic asset price model where the trend follows an unobservable Ornstein-Uhlenbeck process. For both strategies, we provide the asymptotic expectation of the logarithmic return as a function of the model parameters. Finally, numerical examples find that an investment strategy using the cross moving averages rule is more robust than the optimal strategy under parameters mis-specification.

Ahmed Bel Hadj Ayed12, Grégoire Loeper 3, Frédéric Abergel 4

Introduction

There exist three principal approaches for investments in financial markets (see Blanchet-Scalliet et al. (2007)). The first one is based on fundamental economic principles (see Tideman (1972) for details). The second one is called the technical analysis approach and uses the historical prices and volumes (see Taylor & Allen (1992),Brown & Jennings (1989) and Edwards et al. (2007) for details). The third one is the use of mathematical models and was introduced in Merton (1969). He assumed that the risky asset follows a geometric Brownian motion and derived the optimal investment rules for an investor maximizing his expected utility function. Several generalisations of this problem are possible (see Karatzas & Zhao (2001), Brendle (2006), Lakner (1998), Sass & Haussmann (2004), or Rieder & Bauerle (2005) for example) but all these models are confronted to the calibration problem. In Bel Hadj Ayed et al. (2015a), the authors assess the feasibility of forecasting trends modeled by an unobserved mean-reverting diffusion. They show that, due to a weak signal-to-noise ratio, a bad calibration is very likely. Using the same risky asset model, Zhu & Zhou (2009) analyse the performance of a technical analysis strategy based on a geometric moving average rule. In Blanchet-Scalliet et al. (2007), the authors assume that the drift is an unobservable constant piecewise process jumping at an unknown time. They provide the performance of the optimal trading strategy under parameters mis-specification and compare this strategy to a technical analysis investment based on a simple moving average rule with Monte Carlo simulations.

In this paper, we consider a stochastic asset price model where the trend is an unobservable Ornstein Uhlenbeck process. The purpose of this work is to characterize and to compare the performances of the optimal strategy under parameters mis-specification and of a cross moving average strategy.

The paper is organized as follows: the first section presents the model, recalls some results from filtering theory and rewrites the Kalman filter estimator as a corrected exponential average.

In the second section, the optimal trading strategy under parameters mis-specification is investigated. For this portfolio, the stochastic differential equation of the logarithmic return is found. Using this result, we provide, in closed form, the asymptotic expectation of the logarithmic return as a function of the signal-to-noise-ratio and of the trend mean reversion speed. We close this section by giving conditions on the model and the strategy parameters that guarantee a positive asymptotic expected logarithmic return and the existence of an optimal duration.

In the third section, we consider a cross moving average strategy. For this portfolio, we also provide the stochastic differential equation of the logarithmic return. We close this section by giving, in closed form, the asymptotic expectation of the logarithmic return as a function of the model parameters.

In the fourth section, numerical examples are performed. First, the best durations of the Kalman filter and of the optimal strategy under parameters mis-specification are illustrated over several trend regimes. We then compare the performances of a cross moving average strategy and of a classical optimal strategy used in the industry (with a duration year) over several theoretical regimes. We also compare these performances under Heston’s stochastic volatility model using Monte Carlo simulations. These examples show that the technical analysis approach is more robust than the optimal strategy under parameters mi-specification. We close this study by confirming this conclusion with empirical tests based on real data.

1. Setup

This section begins by presenting the model, which corresponds to an unobserved mean-reverting diffusion. After that, we reformulate this model in a completely observable environment (see Liptser & Shiriaev (1977) for details). This setting introduces the conditional expectation of the trend, knowing the past observations. Then, we recall the asymptotic continuous time limit of the Kalman filter and we rewrite this estimator as a corrected exponential average.

1.1. The model

Consider a financial market living on a stochastic basis , where is the natural filtration associated to a two-dimensional (uncorrelated) Wiener process , and is the objective probability measure. The dynamics of the risky asset is given by

(1)
(2)

with . We also assume that . The parameter is called the trend mean reversion speed. Indeed, can be seen as the “force” that pulls the trend back to zero. Denote by be the natural filtration associated to the price process . An important point is that only -adapted processes are observable, which implies that agents in this market do not observe the trend .

1.2. The observable framework

As stated above, the agents can only observe the stock price process . Since, the trend is not -measurable, the agents do not observe it directly. Indeed, the model (1)-(2) corresponds to a system with partial information. The following proposition gives a representation of the model (1)-(2) in an observable framework (see Liptser & Shiriaev (1977) for details).

Proposition 1.

The dynamics of the risky asset is also given by

(3)

where is a Wiener process.

Remark 1.1.

In the filtering theory (see Liptser & Shiriaev (1977) for details), the process is called the innovation process. To understand this name, note that:

Then, represents the difference between the current observation and what we expect knowing the past observations.

1.3. Optimal trend estimator

The system (1)-(2) corresponds to a Linear Gaussian Space State model (see Brockwell & Davis (2002) for details). In this case, the Kalman filter gives the optimal estimator, which corresponds to the conditional expectation . Since , the model (1)-(2) is a controllable and observable time invariant system. In this case, it is well known that the estimation error variance converges to an unique constant value (see Kalman et al. (1962) for details). This corresponds to the steady-state Kalman filter. The following proposition (see Bel Hadj Ayed et al. (2015a) for a proof) gives a first continuous representation of the steady-state Kalman filter:

Proposition 2.

The steady-state Kalman filter has a continuous time limit depending on the asset returns:

(4)

where

(5)

The steady-state Kalman filter can also be re-written as a corrected exponential average:

Proposition 3.
(6)

where and is the exponential average given by:

(7)

with an average duration .

2. Optimal strategy under parameters mis-specification

In this section, we consider the optimal trading strategy under parameters mis-specification. For this portfolio, we first give the stochastic differential equation of the logarithmic return and we provide, in closed form, the asymptotic expectation of the logarithmic return.

2.1. Context

Consider the financial market defined in the first section with a risk free rate and without transaction costs. Let be a self financing portfolio given by:

where is the fraction of wealth invested in the risky asset (also named the control variable). The agent aims to maximize his expected logarithmic utility on an admissible domain for the allocation process. In this section, we assume that the agent is not able to observe the trend . Formally, represents all the -progressive and measurable processes and the problem is:

The solution of this problem is well known and easy to compute (see Lakner (1998) for example). Indeed, it has the following form:

In practice, the parameters are unknown and must be estimated. In Bel Hadj Ayed et al. (2015a), the authors assess the feasibility of forecasting trends modeled by an unobserved mean-reverting diffusion. They show that, due to a weak signal-to-noise ratio, a bad calibration is very likely. Using Proposition 3, the steady state Kalman filter is a corrected exponential moving average of past returns. Therefore, a mis-specification on the parameters is equivalent to a mis-specification on the factor and on the duration .

Suppose that an agent thinks that the optimal duration is and considers:

(8)
(9)

Using this estimator, the agent will invest following:

(10)
(11)

where . The following lemma gives the law of this filter :

Lemma 2.1.

The exponential moving average of Equation (8) is given by:

(12)

Moreover, this filter is a centered Gaussian process, whose variance is:

Proof.

Applying Itô’s lemma to the function and using Equation (1), it follows that:

The integral of this stochastic differential equation from to gives Equation (12). Therefore, is a Gaussian process. Its mean is null (because ). Since and are supposed to be independent, the variance of the process is equal to the sum of and . The first term is computed using:

Since is a centered Ornstein Uhlenbeck, for all , we have:

Finally, the second term is computed using:

with . ∎

2.2. Portfolio dynamic

The following proposition gives the stochastic differential equation of the mis-specified optimal portfolio:

Proposition 4.

Equation (10) leads to:

(13)
Proof.

Equation (10) is equivalent to (by Itô’s lemma):

Using Equation (6),

Itô’s lemma on Equation (6) gives:

Using this equation, the dynamic of the logarithmic return follows. ∎

Remark 2.2.

Proposition 4 shows that the returns of the optimal strategy can be broken down into two terms. The first one represents an option on the square of the realized returns (called Option profile). The second term is called the Trading Impact. These terms are introduced and discussed in Bruder & Gaussel (2011) for this strategy without considering a specific diffusion for the risky asset.

2.3. Expected logarithmic return

The following theorem gives the asymptotic expected logarithmic return of the mis-specified optimal strategy.

Theorem 2.3.

Consider the portfolio given by Equation (10). In this case:

(14)

where is given by Equation (5).

Proof.

Using Proposition 4, it follows that:

Moreover, is given by Lemma 2.1. Then, integrating the expression from to and tending to , the result follows. ∎

The following result is a corollary of the previous theorem. It represents the asymptotic expected logarithmic return as a function of the signal-to-noise-ratio and of the trend mean reversion speed .

Corollary 2.4.

Consider the portfolio given by Equation (10). In this case:

(15)

where SNR is the signal-to-noise-ratio:

(16)

Moreover:

  1. If , for a fixed parameter value , this asymptotic expected logarithmic return is an increasing function of SNR.

  2. For a fixed parameter value SNR, it is a decreasing function of .

Proof.

Since , the use of this expression in Equation (14) gives the result. ∎

Remark 2.5.

Assume that the agent makes a good calibration and uses and . In this case, we obtain the result of Bel Hadj Ayed et al. (2015b):

(17)

where SNR is defined in Equation (16).

The following proposition gives conditions on the trend parameters and on the duration that guarantee a positive asymptotic expected logarithmic return and the existence of an optimal duration.

Proposition 5.

Consider the portfolio given by Equation (10) and suppose that . In this case, the asymptotic expected logarithmic return is positive if and only if:

  1. .

  2. , where:

    (18)

Moreover, there exists an optimal duration if and only if and:

(19)
Proof.

Using Equation (15), the first part of the proposition follows. Since the asymptotic expected logarithmic return of the mis-specified strategy is positive after and tends to zero if tends to the infinity, there exists an optimal duration . This point is computed with setting to zero the derivative of Equation (15) with respect to the parameter . ∎

3. cross moving average strategy

In this section, we consider a cross moving average strategy based on geometric moving averages. For this portfolio, we first give the stochastic differential equation of the logarithmic return and we provide, in closed form, the asymptotic expectation of the logarithmic return.

3.1. Context

Consider the financial market defined in the first section with a risk free rate and without transaction costs. Let be the geometric moving average at time of the stock prices on a window :

(20)

Let be a self financing portfolio given by:

(21)
(22)

where is the fraction of wealth invested by the agent in the risky asset:

with and . This trading strategy is a combination of a fixed strategy and a pure cross moving average strategy.

3.2. Portfolio dynamic

The following proposition gives the stochastic differential equation of the cross moving average portfolio.

Proposition 6.

Equation (21) leads to:

Proof.

Applying Itô’s lemma to the process and using

Proposition 6 follows. ∎

3.3. Expected logarithmic return

The following theorem gives the asymptotic expected logarithmic return of the cross moving average portfolio.

Theorem 3.1.

Consider the portfolio given by Equation (21). In this case:

where is the cumulative distribution function of the standard normal variable and:

Proof.

Since the processes and are centered, Proposition 6 implies that:

where . Let and consider the following process:

(23)

where :

Then is a Gaussian process. Based on Lemma 2 in Zhu & Zhou (2009), :

(24)
(25)
(26)

The following lemma gives the mean, the asymptotic variance of the process and the covariance function between the processes and .

Lemma 3.2.

Consider the process defined in Equation (23). In this case, :

(27)
(28)
(29)

where is defined in Theorem 3.1 and

(30)
Proof of Lemma 3.2.

Since:

Equation (27) follows. Moreover:

Since

and the drift is an Ornstein Uhlenbeck process:

Then

Using

and tending t to Equation (28) follows. Since the processes and are supposed to be independent, there holds:

Moreover

and

then

where the function is defined in Equation (30). Equation (29) follows ∎

The use of Lemma 3.2 gives:

Moreover, a direct calculus shows that:

the result of Theorem 3.1 follows. ∎

3.4. Strategy with one moving average

Suppose that and . In this case, the fraction of wealth invested by the agent in the risky asset becomes:

where is the geometric moving average defined in Equation (20) and the self financing portfolio becomes:

(31)
(32)

This particular case corresponds to the allocation introduced in Zhu & Zhou (2009) when we assume that the two Brownian motions and are uncorrelated and that the trend is mean reverted around . Given this framework, we can provide the asymptotic expected logarithmic return of this trading strategy (which has already been found in Zhu & Zhou (2009)):

Theorem 3.3.

Consider the portfolio given by Equation (31). In this case:

where is the cumulative distribution function of the standard normal variable and:

and the functions and are introduced in Theorem 3.1.

Proof.

This result is a consequence of Theorem 3.1. Indeed, tending to and using , the result follows. ∎

4. Simulations

In this section, numerical simulations and empirical tests based on real data are performed. The aim of these tests is to compare the robustness of the optimal strategy under parameters mis-specification and of an investment using cross moving averages. First, the best durations of the Kalman filter and of the optimal strategy under parameters mis-specification are illustrated over several trend regimes. We then consider the asymptotic expected logarithmic returns of the cross moving average strategy (see Section 3) with and of the optimal strategy with a duration days. Using this configuration, we study the stability of the performances of these strategies over several theoretical regimes. We also confirm our results under Heston’s stochastic volatility model with Monte Carlo simulation. Finally, backtests of these two strategies on real data confirm our theoretical expectations.

4.1. Optimal durations

In this subsection, we consider the model (1)-(2).

Well-specified Kalman filter

In these simulations, we consider a signal-to-noise ratio inferior to 1. This assumption corresponds to a trend standard deviation inferior to the volatility of the risky asset. Using and , The figures 1 and 2 represent the optimal Kalman filter duration as a function of the trend mean reversion speed and of the signal-to-noise ratio. This duration is a decreasing function of these parameters. Indeed, if the variation of the trend process is low and if the measurement noise is high compared to the trend standard deviation, the window of filtering must be long. Moreover, we observe that for a trend mean reversion speed inferior to 1 (which corresponds to a slow trend process), the duration is superior to 0.5 years and can reach 10 years. If the trend mean reversion speed is superior to 1, this duration is inferior to 1 year.

Figure 1. Optimal duration (years) of the Kalman filter with
Figure 2. Optimal duration (years) of the Kalman filter with

Best filtering window for the optimal strategy under parameters mis-specification

Under parameters mis-specification, we can also define an optimal duration using the strategy introduced in Section 2 and Proposition 5. This duration is the one maximizing the asymptotic expected logarithmic return of the optimal strategy under parameters mis-specification. This optimal window exists if and only if . We assume that . Then, the condition becomes . The figures 3 and 4 represent this duration as a function of the trend mean reversion speed with respectively SNR and SNR. This duration has a similar behaviour than the optimal Kalman filter duration, except when the trend mean reversion speed tends to . Indeed, if , the condition is not satisfied and the optimal duration becomes infinite.

Figure 3. Optimal duration (years) of the mis-specified filter with and SNR
Figure 4. Optimal duration (years) of the mis-specified filter with and SNR

4.2. Robustness of the optimal strategy and of the cross moving average strategy

Stability of the performances over several theoretical regimes under constant spot volatility

In this subsection, we consider the model (1)-(2). Moreover, we assume that a year contains 252 days and that the risky asset volatility is equal to . We consider two trading strategies. The first one is the optimal strategy (introduced in section 2) with a duration days ( year) and a leverage . The second strategy is the cross moving average strategy (introduced in section 3) with and the following allocation:

where is the geometric moving average defined in Equation (20). Then, if the short geometric average is superior (respectively inferior) to the long geometric average, we buy (respectively sell) the risky asset. In order to compare the performance stability of these two strategies, we use the asymptotic expected logarithmic returns found in Theorems 2.3 and 3.1. The figures 5, 6, 7 and 8 represent the performances of these strategies after 100 years as a function of the trend volatility respectively with and 4. Even if the optimal strategy can provide a better performance (for example with and ), it can also provide higher losses than the cross average strategy (for example with and ). We can conclude with these tests that the theoretical performance of this cross average strategy is more robust than the theoretical performance of this optimal strategy.

Figure 5. The expected logarithmic returns of the optimal strategy (with days) and of the cross average strategy ( days and days) as functions of with , and years
Figure 6. The expected logarithmic returns of the optimal strategy (with days) and of the cross average strategy ( days and days) as functions of with , and years
Figure 7. The expected logarithmic returns of the optimal strategy (with days) and of the cross average strategy ( days and days) as functions of with , and years
Figure 8. The expected logarithmic returns of the optimal strategy (with days) and of the cross average strategy ( days and days) as functions of with , and years

Stability of the performances over several theoretical regimes under Heston’s stochastic volatility model

Model and optimal strategy The aim of this subsection is to check if the cross average strategy is more robust than the optimal trading strategy under Heston’s stochastic volatility model (see Heston (1993) or Mikhailov & Nögel (2003) for details). To this end, consider a financial market living on a stochastic basis , where is the natural filtration associated to a three-dimensional Wiener process , and is the objective probability measure. The dynamics of the risky asset is given by

(33)
(34)
(35)

with , , , and . We also assume that and that (in this case, the variance cannot reach zero and is always positive, see Cox et al. (1985) for details). Denote by be the natural filtration associated to the price process . In this case, the process is -adapted. Now, assume that the agent aims to maximize his expected logarithmic wealth (on an admissible domain , which represents all the -progressive and measurable processes). In this case, his optimal portfolio is given by (see Bjork et al. (2010)):

Let be a discrete time step, and denote by the subscript the value of a process at time . Using the scheme that produces the smallest discretization bias for the variance process (see Lord et al. (2010) for details), the discrete time model is:

(36)
(37)