Skip to main content

Theory and Modern Applications

An application of Ornstein-Uhlenbeck process to commodity pricing in Thailand

Abstract

In this paper, we examine an application of Ornstein-Uhlenbeck process to commodity pricing in Thailand. Prices of Tapioca Starch, Ribbed Smoke Sheet no. 3, and Thai Hom Mali Rice are investigated. We use three parameter estimation methods: least squares estimation, maximum likelihood estimation, and jackknife estimation in order to find the best estimation for the model. Jackknife technique is the most appropriate estimation for our commodity pricing model, which provides the least sum-squared error of commodity prices.

1 Introduction

In the economics, agricultural commodity prices have an important role due to the cost of production and services. Bayramoglu [1] studied the relationship between agricultural prices and agricultural employment in Turkey by using the VAR method. Results show that there is a relationship between agricultural prices and agricultural employment. Qiangand and Ying [2] investigated the relationship between China’s oil markets and other commodity markets. The results show that China’s fuel oil market is influenced by international oil market and has effect on China’s other commodity markets. Price of given commodity can represent the supply and demand for that commodity, for example, the demand of rice will be low when the price is high. Thus the mathematical model used to analyze the relationship should reflect this difference [3].

In recent years, the commodity markets are rapidly expanding and more interesting to many investors in the financial world. The variety of the future constructs and underlying commodities are alternative choices for investors. There are some important characteristics of commodity price; for example, spot and future prices are mean reverting [4]. Some behaviors of economic variables may be described by mean-reversion process. Since the process suggests that the price or returns usually moves back toward the mean or average in the long run.

The most popular stochastic process that describes the characteristic of the process to drift toward the mean is the Ornstein-Uhlenbeck process [5]. Here, we pay attention to study the Ornstein-Uhlenbeck process and its applications. Many researchers study this area. Ribeiro and Hodges [6] introduced a new model by adding two factors, spot price and convenience yield. Paschke and Prokopczuk [7] constructed the continuous-time autoregressive moving-average (CARMA) model in which the convenience yield follows an Ornstein-Uhlenbeck-type process of pricing the crude oil future market. In this paper, we investigate the Ornstein-Uhlenbeck process behaviors affecting commodity pricing and applying the Ornstein-Uhlenbeck model to pricing the Thai commodity market. There are three types of agricultural future contracts that we are investigating: Tapioca Starch (TS), Ribbed Smoke Sheet no. 3 (RSS3), and Thai Hom Mali Rice 100% grade B (BHMR).

In this research, the analysis of parameters of the Ornstein-Uhlenbeck process are focused upon. The parameter estimation methods we are applying are least squares estimation, maximum likelihood estimation, and maximum likelihood with jackknife estimation.

In this research paper, the content is organized as follows: in the next section, we describe the Ornstein-Uhlenbeck process. Then we apply the parameter estimation technique. After that, we discuss the simulation results of the Ornstein-Uhlenbeck process and parameter estimations. The last section includes conclusion and discussion of the future work.

2 The Ornstein-Uhlenbeck process

The Ornstein-Uhlenbeck process is the stochastic process that is stationary and continuous in probability [5, 8]. Moreover, it is a process that describes the characteristics of the process that drifts toward the mean, a mean-reverting process. The stochastic differential equation (SDE) for the Ornstein-Uhlenbeck process [5, 9] is given by

$$ dS_{t}=\lambda(\mu-S_{t} )\,dt+\sigma \,dW_{t}, $$
(1)

where λ is the rate of mean reversion, μ is the long-run mean, σ is the volatility of the process, which all are strictly positive, and \(W_{t}\) denotes the Wiener process.

The stochastic differential equation (1) can be discretized and approximated by

$$ S_{t+1}=e^{-\lambda\Delta t} S_{t}+ \bigl(1-e^{-\lambda\Delta t}\bigr)\mu+\sigma\sqrt {\frac{(1-e^{-2\lambda\triangle t})}{2\lambda}} \Delta W_{t}, $$
(2)

where Δt is acceptably small, and \(\Delta W_{t}\) are independent identically distributed Wiener process. We can use this formula to simulate the long-term expected value or commodity prices; see Smith [10].

3 Parameter estimations

To estimate the parameters of an observed Ornstein-Uhlenbeck process, we use three techniques: least squares estimation, maximum likelihood estimation, and jackknife technique, which may be described as follows.

3.1 Least squares estimation

Smith [10] suggested that (2) may be compared to the regression

$$S_{t+1}=aS_{t}+b+\epsilon, $$

where ϵ is an iid random term. These yields are related as follows:

$$a=e^{-{\lambda}\Delta t}, \qquad b= \mu\bigl(1-e^{-2{\lambda}\Delta t}\bigr), \qquad \operatorname{sd}( \epsilon_{t})=\sigma\sqrt{\frac{(1-e^{-2\lambda\Delta t})}{2\lambda}}, $$

where \(\operatorname{sd}(\epsilon)\) is the standard deviation of ϵ. By rearranging these equations we have

$$\lambda=-\frac{\ln a}{\Delta t}, \qquad \mu= \frac{a}{1-b}, $$

and

$$\sigma=\operatorname{sd}(\epsilon_{t})\sqrt{\frac{2\lambda}{(1-e^{-2\lambda\Delta t})}}. $$

3.2 Maximum likelihood estimation

Van den Berg [11] stated that the conditional probability density function of \(S_{t+1}\) is given by

$$P(N_{0,1}=x)= \frac{1}{\sqrt{2\pi\sigma^{2}}}e^{-\frac{1}{2}x^{2}}, $$

and the conditional probability density of an observation \(S_{i+1}\) given the previous observation \(S_{i}\), with δ being time step, is given by

$$f(S_{t+1}\mid S_{t};\mu,\lambda,\hat{\sigma} )= \frac{1}{\sqrt{2\pi\hat {\sigma}}}\exp \biggl[-\frac{ (S_{t}-S_{t-1}e^{-\lambda\delta}-\mu (1-e^{-\lambda\delta} )^{2}}{2\hat{\sigma}^{2}} \biggr], $$

where

$$\hat{\sigma}^{2}= \sigma^{2}\frac{1-e^{-2\lambda\delta}}{2\lambda}. $$

The log-likelihood function of an observation \((S_{0},S_{1},\dots,S_{n})\) is

$$ \begin{aligned} \mathcal{L}(\mu,\lambda,\hat{\sigma}) &= \sum_{t=1}^{n} \ln\bigl(f(S_{t}S_{t-1};\mu,\lambda,\sigma)\bigr) \\ &= -\frac{n}{2}\ln(2\pi)-n\ln(\hat{\sigma}) -\frac{1}{2\hat{\sigma}^{2}} \sum _{t=1}^{n} \bigl[S_{t}-S_{t-1}e^{-\lambda\delta}- \mu\bigl(1-e^{-\lambda \delta}\bigr) \bigr]^{2}. \end{aligned}$$

The first-order conditions for maximum likelihood estimation are required and set equal to zero:

$$\begin{gathered} \frac{\partial\mathcal{L}(\mu,\lambda,\hat{\sigma})}{ \partial\mu} \bigg|_{\mu} =0, \\\frac{\partial\mathcal{L}(\mu,\lambda,\hat{\sigma})}{\partial\lambda }\bigg|_{\lambda} =0, \\\frac{\partial\mathcal{L}(\mu,\lambda,\hat{\sigma})}{\partial\hat{\sigma }} \bigg|_{\hat{\sigma}} =0. \end{gathered}$$

By solving these equations Van den Berg [11] showed that

$$\begin{gathered} \mu=\frac{S_{y}S_{xx} - S_{x}S_{xy}}{{n}(S_{xx}-S_{xy}) - (S^{2}_{x}-S_{x}S_{y})}, \qquad \lambda=-\frac{1}{\delta}\ln\frac{S_{xy}- \mu S_{x}- \mu S_{y}+ {n}\mu^{2}}{S_{xx}-2 \mu S_{x}+{n}\mu^{2}}, \\ \sigma^{2} = \hat{\sigma}^{2} \frac{2 \lambda}{1- \alpha^{2}},\end{gathered}$$

where

$$\hat{\sigma}^{2} = \frac{1}{n} \bigl[S_{yy} - 2 \alpha S_{xy} + \alpha^{2} S_{xx} - 2 \mu(1-\alpha) (S_{y} - \alpha S_{x}) + {n} \mu^{2} (1 - \alpha)^{2}\bigr] $$

and

$$S_{x} = \sum_{i=1}^{n}S_{i-1}, \qquad S_{y} = \sum_{i=1}^{n}S_{i}, \qquad S_{xx} = \sum_{i=1}^{n}S^{2}_{i-1}, \qquad S_{xy} = \sum_{i=1}^{n}S_{i-1}S_{i}, \qquad S_{yy} = \sum_{i=1}^{n}S^{2}_{i}. $$

3.3 Jackknife technique

Jackknife estimation was proposed to reduce the bias by Phillips and Yu [12]. Given the total number T of the whole sample of observations, the observations may be divided into m subsamples. The estimation can be simulated by

$$\begin{gathered} \lambda_{\mathrm{jack}}=\frac{m}{m-1} \lambda_{T}- \frac{\sum_{t=1}^{m} \lambda_{t}}{m^{2}-m}, \\\hat{\mu}=\frac{m}{m-1} \mu_{T}-\frac{\sum_{t=1}^{m} \mu_{t}}{m^{2}-m}, \end{gathered}$$

and

$$\hat{\sigma}=\frac{m}{m-1} \sigma_{T}-\frac{\sum_{t=1}^{m} \sigma_{t}}{m^{2}-m}. $$

4 Simulation result and discussion

This section presents the simulation results of the preceding methodology by using the entire samples that are collected from the real market data from the Agricultural Futures Exchange of Thailand (AFET) consisting of daily end prices (\(\Delta t = 1/252\)) from years 2005-2007, 2004-2007, and 2009-2012 for Tapioca Starch (TS), Ribbed Smoke Sheet no. 3 (RSS3), and grade B Thai Hom Mali Rice 100% (BHMR), respectively. See Figure 1.

Figure 1
figure 1

Actual data: (a) Actual data of BHMR. (b) Actual data of RSS3. (c) Actual data of TS.

We use the statistics tools to obtain λ, μ, and σ given in Table 1.

Table 1 Value of parameters used in simulation

Then we simulate the future price with the Ornstein-Uhlenbeck process by using a Matlab code written by Smith [10]. The results are shown in the figures below.

Figures 2(a)-(c) show the simulation results for the daily price for BHMR, RSS3, and TS, respectively. Figure 2(a) and Figure 2(c) show the BHMR future prices with mean 29.39 and TS future prices with mean 8.4639, exhibiting mean reversion with \(\lambda=3.00\) and 4.05, respectively. Since RSS3 has the mean of 66.95 and \(\lambda=0.60\), Figure 2(b) shows high volatility, giving lower λ. So, the future prices of RSS3 follow a slow mean-reversion process. However, the graphs of simulation with Ornstein-Uhlenbeck process show that the mean reversion is faster than the empirical graphs above. Next, we need to estimate the parameters in Ornstein-Uhlenbeck process by three techniques. The outputs of the parameter estimations compared with known parameters are shown in the following tables.

Figure 2
figure 2

Results of simulation with Ornstein-Uhlenbeck process: (a) Results of simulation with Ornstein-Uhlenbeck process for BHMR. (b) Results of simulation with Ornstein-Uhlenbeck process for RSS3. (c) Results of simulation with Ornstein-Uhlenbeck process for TS.

From the results shown in Table 2, Table 3 and Table 4, the jackknife technique is accurate for λ̂ and μ̂ in BHMR. Estimations of σ̂ are very poor in BHMR and RSS3, but the maximum likelihood estimation of σ̂ in TS is close to the actual σ. To estimate λ̂ and μ̂ in RSS3, the least squares regression and maximum likelihood techniques are suggested, but they are not the best techniques since they give the estimates quite far from the actual values. For TS product, estimates of λ̂ are relatively poor. However, the parameter estimation techniques may depend on the behavior of the commodity prices.

Table 2 Parameter estimation for BHMR
Table 3 Parameter estimation for RSS3
Table 4 Parameter estimation for TS

4.1 Behavior with weak mean reversion

We have simulated the stochastic behavior of commodity price with mean reversion equal to 1 (\(\lambda=1\)) to observe the behavior of weak mean reversion. The result is shown below.

In Figure 3, the simulation results show that tendency of BHMR future price; in Figure 3(a), we see reversion to the mean (\(\mu=29.39\)). However, the future prices of RSS3, Figure 3(b), and TS, Figure 3(c), are oscillatory and may not revert to their respective means \(\mu=66.95\) and \(\mu=8.4639\). The weakness test shows that mean-reversion parameters in RSS3 and TS have weaknesses when we use \(\lambda=1\).

Figure 3
figure 3

Results of simulation with Ornstein-Uhlenbeck process with \(\pmb{\lambda=1}\) : (a) Results of simulation with Ornstein-Uhlenbeck process of BHMR with \(\lambda=1\). (b) Results of simulation with Ornstein-Uhlenbeck process of RSS3 with \(\lambda=1\). (c) Results of simulation with Ornstein-Uhlenbeck process of TS with \(\lambda=1\).

4.2 Simulation results with the parameter estimations of λ

4.2.1 BHMR

In Figure 4, the predictions of BHMR show that future prices become more mean-reverting as the value of λ increases. Least squares regression and maximum likelihood estimation give the same results in mean reversion parameter, so they both give the same simulation results as that of Ornstein-Uhlenbeck process, seen in Figure 4(a) and Figure 4(b).

Figure 4
figure 4

Results of simulation with Ornstein-Uhlenbeck process of BHMR: (a) Results of simulation with Ornstein-Uhlenbeck process of BHMR with least squares regression \(\lambda=3.6724\). (b) Results of simulation with Ornstein-Uhlenbeck process of BHMR with maximum likelihood estimation \(\lambda=3.6724\). (c) Results of simulation with Ornstein-Uhlenbeck process of BHMR with jackknife technique \(\lambda=3.0107\).

4.2.2 RSS3

The RSS3 future price oscillates. Figure 5 shows that prices are slightly mean reverting with low λ.

Figure 5
figure 5

Results of simulation with Ornstein-Uhlenbeck process of RSS3: (a) Results of simulation with Ornstein-Uhlenbeck process of RSS3 with least squares regression \(\lambda= 0.7434\). (b) Results of simulation with Ornstein-Uhlenbeck process of RSS3 with maximum likelihood estimation \(\lambda= 0.7434\). (c) Results of simulation with Ornstein-Uhlenbeck process of RSS3 with jackknife technique \(\lambda= 0.5772\).

4.2.3 TS

From the simulation results in Figure 6(c) we observe that the TS future prices tend to revert to the mean (\(\mu= 8.4639\)) when we use the jackknife technique to estimate mean reversion (λ).

Figure 6
figure 6

Results of simulation with Ornstein-Uhlenbeck process of TS: (a) Results of simulation with Ornstein-Uhlenbeck process of TS with least squares regression \(\lambda= 3.5025\). (b) Results of simulation with Ornstein-Uhlenbeck process of TS with maximum likelihood estimation \(\lambda= 3.5025\). (c) Results of simulation with Ornstein-Uhlenbeck process of TS with jackknife technique \(\lambda= 5.1518\).

For parameter estimation, least squares regression and maximum likelihood estimation give the same mean reversion value up to 4 decimal places (λ). The tendency of mean reversion process depends on the value of λ. When the value of λ is high, the prices show higher tendency to revert the drift toward the mean.

In this work, we used the sum squared error to test our model when we used the three techniques to estimate λ. In Table 5, we can see that the jackknife technique is appropriate to estimate λ for BHMR and RSS3 pricing, whereas TS pricing has a good fit when either least squares regression or maximum likelihood is used to find the parameter estimation of λ.

Table 5 Sum squared error

5 Conclusion

We have presented the use of Ornstein-Uhlenbeck process in pricing Thai commodity and the parameter estimations with least squares estimation, maximum likelihood estimation, and jackknife technique. The pricing models simulated by Matlab shows the trend of the commodity prices toward the mean. So, we can predict the commodity price in the future market by using the method of the Ornstein-Uhlenbeck process. In the parameter estimation, the jackknife technique can be used to reduce the bias of λ estimation. We discover that, in TS product, parameter estimations are close to the real values, but parameter estimation in other products are not very good. For future studies, to improve the methodology, we will consider the influence of economic factors, such as inflation rate, and develop the Ornstein-Uhlenbeck process that incorporates these factors.

References

  1. Bayramoglu, AT: The impact of agricultural commodity price increases on agricultural employment in Turkey. Proc., Soc. Behav. Sci. 143, 1058-1063 (2014)

    Article  Google Scholar 

  2. Qiang, J, Ying, F: How do China’s oil market affect other commodity markets both domestically and internationally. Finance Res. Lett. 19, 247-254 (2016)

    Article  Google Scholar 

  3. Tome, WG, Peterson, HH: Risk management in agricultural market: a review. J. Futures Mark. 21(10), 953-985 (2001)

    Article  Google Scholar 

  4. Routledge, BR, Seppi, DJ, Spatt, CS: Equilibrium forward curves for commodities. J. Finance 55(3), 1297-1338 (2000)

    Article  Google Scholar 

  5. Uhlenbeck, GE, Ornstein, LS: On the theory of the Brownian motion. Phys. Rev. 36, 823-841 (1930)

    Article  MATH  Google Scholar 

  6. Ribeiro, DR, Hodges, SD: A two-factor model for commodity prices and futures valuation. EFMA 2004 Basel Meetings Paper (2004)

  7. Paschke, R, Prokopczuk, M: Commodity derivatives valuation with autoregression and moving average in the price dynamics. ICMA Centre Discussion Papers in Finance DP2009-10 (2009)

  8. Wand, MC, Uhlenbeck, GE: On the theory of the Brownian motion II. Rev. Mod. Phys. 17, 323-342 (1945)

    Article  MathSciNet  MATH  Google Scholar 

  9. Doob, JL: The Brownian movement and stochastic equations. Ann. Math. 43, 351-369 (1942)

    Article  MathSciNet  MATH  Google Scholar 

  10. Smith, W: On the simulation and estimation of mean-reverting Ornstein-Uhlenbeck process: especially as applied to commodities markets and modelling (2010)

  11. Calibrating the Ornstein-Uhlenbeck (Vasicek) model. http://www.sitmo.com/?page_id=93

  12. Phillips, PCB, Yu, J: Jackknifing bond option prices. Rev. Financ. Stud. 18(2), 707-742 (2005)

    Article  Google Scholar 

Download references

Acknowledgements

Centre of Excellence in Mathematics, Bangkok, Thailand, and Matlab code supports from William Smith are acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nattakorn Phewchean.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

All authors read and approved the final manuscript.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chaiyapo, N., Phewchean, N. An application of Ornstein-Uhlenbeck process to commodity pricing in Thailand. Adv Differ Equ 2017, 179 (2017). https://doi.org/10.1186/s13662-017-1234-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13662-017-1234-y

Keywords