Multilingual content from IBKR

Close Navigation
Learn more about IBKR accounts
Dynamic Futures Portfolio in a Regime-Switching Market

Dynamic Futures Portfolio in a Regime-Switching Market

Posted September 16, 2021 at 11:10 am
Tim Leung
Computational Finance & Risk Management, University of Washington

Regime-Switching Market 

Asset prices are often seen as being dependent on market conditions. Market regimes may change suddenly and persist for a period of time. The unpredictability of the timing of regime changes also means that associated risks are almost impossible to hedge. 

In order to capture these crucial properties of market dynamics, one major approach is to represent stochastic market regimes by a finite-state Markov chain. In most cases, the Markov chain is an exogenous random process and is not directly tradable. The effects of the Markov chain are reflected in the asset price dynamics. In particular, the asset’s expected return and volatility may vary across regimes. 

Regime-switching time series models have been used for decades. In addition to representing asset price dynamics through changing market conditions, regime-switching models have been applied to many problems in economics and finance, including derivatives pricing and portfolio selection. 

Futures Trading Problem 

In our new paper, we present a stochastic control approach to generate dynamic futures trading strategies. We consider a general regime-switching framework in which the stochastic market regime is represented by a continuous-time finite-state Markov chain. The underlying asset’s spot price is modeled by a Markov modulated diffusion process. 

Under the regime-switching market framework, we first derive the no-arbitrage price dynamics for the futures contracts and provide a numerical method to compute the prices. 

Next, we determine the optimal futures trading strategy by solving a stochastic control problem. Our portfolio optimization approach allows for trading different numbers of futures. By analyzing and solving the associated Hamilton-Jacobi-Bellman (HJB) equations, we derive the investor’s optimal futures position over time as a function of time, spot price, and market regime. 

Regime-Switching Mean-Reverting Model 

Our general framework captures many different regime-switching models. For example, we introduce the Regime-Switching Exponential Ornstein-Uhlenbeck (RS-XOU) model that is mean-reverting as well as regime-switching. The log price of the underlying asset follows the stochastic differential equation: 

where the coefficients are functions of ξ, a continuous-time irreducible finite-state Markov chain with state-space E = {1, 2, . . . , M}

In a two-regime example, we simulate a scenario where the market starts in regime 2, then switches to regime 1 (at time t1) before returning to regime 2 (at time t2). Sample paths of the futures prices and optimal positions are shown below. 

Sample paths of the spot price, T1-futures price, and T2-futures price over the trading horizon under the RS-XOU model. The market starts in regime 2, then switches to regime 1 at time t1, before switching back to regime 2 at time t2. Source: T. Leung and Y. Zhou (2019) available at

Sample paths of the optimal positions in the T1-futures and T2-futures respectively under the RS-XOU model. The futures positions tend to decrease over time and approach zero near the end of the trading horizon. Jumps in both positions occur at the regime-switching times t1 and t2. Source: T. Leung and Y. Zhou (2019) available at


T. Leung and Y. Zhou (2020), A Stochastic Control Approach to Futures Trading with Regime Switching [link], in the Proceedings of the American Control Conference 

T. Leung and Y. Zhou (2019), Optimal Dynamic Futures Portfolio in a Regime-Switching Market Framework [pdf], International Journal of Financial Engineering, Vol. 6, №4, p.1950034 

Google Scholar // Linkedin Page // Homepage 

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from Computational Finance & Risk Management, University of Washington and is being posted with its permission. The views expressed in this material are solely those of the author and/or Computational Finance & Risk Management, University of Washington and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

Disclosure: Margin Trading

Trading on margin is only for experienced investors with high risk tolerance. You may lose more than your initial investment. For additional information regarding margin loan rates, see

Disclosure: Futures Trading

Futures are not suitable for all investors. The amount you may lose may be greater than your initial investment. Before trading futures, please read the CFTC Risk Disclosure. A copy and additional information are available at

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.