Skip to main content
15 votes
Accepted

Calculating half life of mean reverting series with python

I found out what I was doing wrong - the OLS function was regressing with no intercept value - so I had to use the "add_constant" method to add an intercept term to the X series (z_lag) as follows: <...
s666's user avatar
  • 351
9 votes
Accepted

How to get set the theta function in the Hull-White model to replicate the current yield curve

Concerning your first question, this depends on what curve, currency, etc. you are interested in. The general method for constructing yield curves is called bootstrapping which allows you to derive ...
Daneel Olivaw's user avatar
8 votes
Accepted

Does your Parkinson volatility ratio work as Taleb explained?

I believe that Taleb made a mistake in his book. Several days ago I met the same question, and I came to read the original article of Parkinson(1980). After doing some simple math, I was aware that ...
大空驴 Big Short Donkey's user avatar
7 votes

Option pricing and mean reversion

From the SDE \begin{align*} \frac{dS_t}{S_t}= k(\theta-\ln S_t) dt + \sigma dW_t, \end{align*} where $\{W_t,\, t\ge 0\}$ is a standard Brownian motion, we obtain that \begin{align*} d(e^{kt}\ln S_t) = ...
Gordon's user avatar
  • 21.1k
6 votes

What causes poor returns in pair trading of very cointegrated securities?

A few possibilities - Trading costs kill your returns (often a problem for very highly correlated securities) Mean reversion of the cointegration spread is either very weak, or happens over periods ...
Chris Taylor's user avatar
  • 5,931
6 votes

Modeling Long-Term Mean Reversion in Asset Returns

You could use the two factor model of Schwartz-Smith. It's a very standard model in commodities, where you observe this kind of long term mean reversion (where "long-term" is here around a year). It'...
Juan Ignacio Gil's user avatar
6 votes
Accepted

Options Pricing and Mean Reversion

Joshi is correct. The no arbitrage argument implies that the stock price instantaneous return under the risk neutral measure is equal to the short rate, and the girsanov theorem implies that the ...
Antoine Conze's user avatar
6 votes
Accepted

Interpretation and intuition behind half-life of a mean reverting process

In processes such as OU, it takes infinite time to revert to the mean completely. An unperturbed process starting at some point away from the mean asymptotes towards the mean without ever touching it. ...
Richard Hardy's user avatar
5 votes

Modeling Long-Term Mean Reversion in Asset Returns

One economic model you could look at is the Habit model of Campbell and Cochrane (1999). The basic idea is that as the consumption of the representative investor approaches the (appropriately defined) ...
jd8's user avatar
  • 468
4 votes
Accepted

What is the probability that a OU process hits an upper barrier U before a lower barrier L?

Assuming $\theta>0$ (take $\tilde{X}=\mu-X$ if it is not the case) Let us denote $\text{erfi}(x)$ the imaginary error function Let us denote $\tau_L$,resp.$\tau_U$ the hitting time of $L$resp.$U$ ...
M. Jeunesse's user avatar
  • 2,422
4 votes
Accepted

What is the covariance of two correlated Ornstein-Uhlenbeck processes?

Using https://en.wikipedia.org/wiki/Ornstein%E2%80%93Uhlenbeck_process#Solution $$X^i_t = (X^i_0 + \int_0^t\sigma_i e^{a_i u} dB^i_u)e^{-a_it} $$ and $$ X^i_t-\mathbb{E}[X^i_t] = e^{-a_it} \int_0^...
M. Jeunesse's user avatar
  • 2,422
4 votes
Accepted

Does predictability in a VAR process imply mean reversion or momentum?

The point of confusion may be in thinking that a predictable price process is synonymous with a mean-reverting process while using the definitions in these papers, it's actually the opposite! In the ...
Matthew Gunn's user avatar
  • 6,954
4 votes
Accepted

Hull-White Monte Carlo simulation - mean reversion function

Given a initial discount bond $P^M(0, T)$ curve, the expression for $\theta(t)$ in the Hull White Short Rate model is a know result given by: $$ \theta(t) = \frac{1}{\kappa} \cdot f'(0, t) + f(0, t) + ...
rvignolo's user avatar
  • 741
4 votes

Why do I need fancy methods to calculate half-life of mean reversion?

I think your notion of half life is interesting but, technically, it's not the definition of what half life is. The AR(1) is the best way to see it but keep in mind that the principle is the same ...
mark leeds's user avatar
  • 1,112
4 votes
Accepted

Trading based on the log return series

Firstly, distributions don't have to be symmetrical to have a standard deviation. In addition, I think you mean that financial instruments (stocks, futures, ect.) have FAT tails not long tails. This ...
Max van Leeuwen's user avatar
3 votes

Reference on Futures basis trading strategy

There are some slight inaccuracies in using term basis. You probably meant strategies which profit from carry/futures roll. There are a lot of variations of carry/roll strategies on different markets. ...
radvan's user avatar
  • 183
3 votes
Accepted

Pairs Trading situation with spread changes

Of course. Even if you started dollar neutral, the spread can continue to move away from its mean resulting in losses. Pairs trading isn't an arbitrage situation, it simply asserts that given ...
Chris's user avatar
  • 1,643
3 votes
Accepted

What the most general but precise description one can make about mean-reversion and momentum strategies?

By mean reversion, people usually mean to say that some price process is second order stationnary -- even though they do not always know the technical term for it. It's only vague in the sense that ...
Stéphane's user avatar
  • 2,476
3 votes
Accepted

Question about calendar spread mean-reversion strategy

I sent Ernie an email with a link to this question and here is his response: Yes, I agree with you that the strategy there actually is a momentum strategy, not a mean reversion strategy. In other ...
Bill Wu's user avatar
  • 71
3 votes

How to derive a pricing PDE for an asset that follows a mean-reverting process?

In a Black-Scholes-Merton-style hedge portfolio, we'd get: $$dS_t=\kappa\left(\mu-\ln S_t\right)S_tdt+\sigma S_t dW_t $$ with a hedged portfolio $$\Pi_t\equiv V_t-\Delta_tS_t$$ and $$ d\Pi_t=\frac{\...
Kermittfrog's user avatar
  • 6,663
3 votes

How to derive a pricing PDE for an asset that follows a mean-reverting process?

Let $\{r_t, \, t\ge 0\}$ be the interest rate process. For maturity $T$ and $0\le t \le T$, note that \begin{align*} V(S_t, t) = e^{\int_0^t r_s ds}\,\mathbb{E}\left(e^{-\int_0^T r_s ds}V(S_T, T) \...
Gordon's user avatar
  • 21.1k
3 votes

Why is my mean-reversion half-life completely wrong?

I think the main problem is that, as @KurtG says, your example sine function exhibits strong momentum (albeit with reversals) and fitting an Ornstein-Uhlenbeck process to it results in strange ...
Jamie Ballingall's user avatar
3 votes

Why do I need fancy methods to calculate half-life of mean reversion?

I actually had the same question you did, ignored my own computational instincts at first, and went about implementing the Ornstein–Uhlenbeck process as academic literature has said is the optimal ...
J. Vegas's user avatar
3 votes

Interpretation and intuition behind half-life of a mean reverting process

It might be helpful to consider an equivalent but different definition of the half life. Suppose we have a standard (zero-mean) OU process defined by $dx_t = -\theta x_t dt + \sigma dW_t$ (which is ...
Jamie Ballingall's user avatar
2 votes

Mean Crossing for Ornstein-Uhlenbeck

I presume you talk about local time. I hope it can help you : https://www.cambridge.org/core/books/stochastic-analysis/statistics-of-local-time-and-excursions-for-the-ornsteinuhlenbeck-process/...
M. Jeunesse's user avatar
  • 2,422
2 votes

Modeling Long-Term Mean Reversion in Asset Returns

Although I agree with jd8 answer, practical implementation issues may arise. Here I suggest a parsimonious engineering solution relying on economic intuition of Habit model of Campbell and Cochrane (...
SAS's user avatar
  • 121
2 votes

R code for Ornstein-Uhlenbeck process

The Euler method is simple but it gives an approximate distribution. The method implemented below gives an exact distribution of $X_{t_i}$ and exact conditional distributions $(X_{t_j} \mid X_{t_i})$. ...
Stéphane Laurent's user avatar
2 votes

Modeling Long-Term Mean Reversion in Asset Returns

I just wrote two papers on a related topic. Let us not use the log method right now as it was originally intended as an approximation from the time we used punch cards. You can, but we will come ...
Dave Harris's user avatar
  • 4,299
2 votes

Simple mean reversion strategy portfolio construction

How about thinking about each trade in terms of gross exposure instead of long? I would pick a gross leverage ratio at the portfolio level and size this way. Concretely, change the formula to be |Ps| +...
mperlow's user avatar
  • 456
2 votes

Reference on Futures basis trading strategy

The Treasury Bond Basis: An in-Depth Analysis for Hedgers, Speculators, and Arbitrageurs by Galen Burghardt and Terry Belton is a good book on Treasury Futures.
AlRacoon's user avatar
  • 6,612

Only top scored, non community-wiki answers of a minimum length are eligible