M'hamed Gaigi

Stéphane Goutte

Idris Kharroubi

Thomas Lim

Optimal risk management problem of natural resources: Application to oil drilling

Keywords: Optimal Strategy, Environment, Oil Extraction, Oil Storage, Ecological, Drilling. JEL classification: C61, Q30, Q43

The aim of this paper is to determine the optimal balance between extraction and storage of a natural resource (in particular crude oil) over time under a large array of environmental, operational and financial constraints for an infinite maturity time. We consider a manager that owns an oil field from which he can extract oil and decides to sell or store it. This operational strategy has to be carried out in continuous time and has to satisfy physical, operational, environmental and financial constraints such as storage capacity, crude oil spot price volatility, amount available for possible extraction or maximum amount that could be invested at time t for the extraction choice. The costs of storage and extraction are also taken into account to better fit the real market scenario. We solve the optimization problem of the manager's profit under this large array of constraints and provide an optimal strategy. We then examine different numerical scenarios to check the robustness and the corresponding optimal strategies given by our model, which is obtained by a numerical approach, with respect to different possible events related to the market, environmental policies or ecological constraints.

Introduction

Population growth, increases in resource consumption (e.g., biomass, fossil fuels, metals and minerals), global biodiversity loss and emissions from waste endanger the planet at a faster pace than it can regenerate [START_REF] Behrens | The material basis of the global economy: Worldwide patterns of natural resource extraction and their implications for sustainable resource use policies[END_REF]; [START_REF] Krausmann | Growth in global materials use, GDP and population during the 20th century[END_REF]; [START_REF] Butchart | Global biodiversity: indicators of recent declines[END_REF]). How the access to resources will be organized with economic growth is an equally important question nowadays. Understanding the consequences of economic growth on the environment and ecosystem vulnerability remains a central topic of active scientific research.

At the current levels, the consumption of fossil energy appears to be strongly unsustainable. Carbon stranded assets place the necessity to embrace a transition away from a fossil-fuel driven society at the centre of the analysis of the problem. Changes in values and attitudes are expected as the fossil fuel companies' shareholders fully integrate environmental issues within their development framework. This transition appears to be even more necessary for high-income countries where wilderness appears to be highly valuable compared to the detrimental industrial activities.

Global warming imposes the need to restrict the use of resources owing to carrying capacities, rather than because of fossil fuel depletion. Confronted with the exponential discoveries of new fossil fuel reserves, carbon stranded assets impose a new mode of regulation of resources that is compatible with the objective of the reduction in carbon dioxide emissions.

Practically, an oil producer should determine the optimal extraction by computing the expected value of delaying the extraction of a barrel. Following the analysis of Arrow et al. (1949), the problem was recognized and discussed as an abstract optimal stopping problem by Snell (1952), and the first application of the optimal stopping problem to finance appeared in the work of [START_REF] Bensoussan | On the Theory of Option Pricing[END_REF]. Nevertheless, numerous analytical approximations and numerical methods have been recommended in the literature. For most option pricing problems, three numerical methods are available: finite difference, lattices, and the Monte Carlo process. Using lower and upper bound estimates, the algorithm of Glasserman (1997) addresses the high-dimensional American options, but the computational effort still grows exponentially with the number of possible exercise dates (see [START_REF] Jaillet | Valuation of Commodity-based Swing Options[END_REF][START_REF] Meinshausen | Monte Carlo Methods for the Valuation of Multiple-Exercise Options[END_REF][START_REF] Meinshausen | Monte Carlo Methods for the Valuation of Multiple-Exercise Options[END_REF][START_REF] Carmona | Optimal Multiple Stopping and Valuation of Swing Options[END_REF][START_REF] Carmona | Optimal Multiple Stopping and Valuation of Swing Options[END_REF]. To satisfy the processing limitations and the optimization issue of an exploitation of oil or gas fields, [START_REF] Huseby | Multi-reservoir production optimization[END_REF] claimed that the production has to be choked. This framework can find the optimal production strategy with respect to various types of objective functions. Consequently, at any specified point in time, the production is scaled down by a suitable choke factor and should not exceed the processing capacity. Huseby and Haavardsson (2010) extended this approach to the cases where the production is uncertain. Aleksandrov et al. (2012) proposed a Monte Carlo real option approach as a solution to the optimization problem of a price-taker oil producer. Their method permits the examination of the effect of interest rates, size of reserves, risk aversion, expectations for the price of oil, and oil reserves. The results showed that while uncertainty in the size of the reserves justifies the conclusion that full extraction is optimal, for mature producers, this uncertainty has been shrinking with time, and finally, it is possible that this result was obtained because the borrowing conditions of countries and companies are worsened by pro-cyclical extraction policies.

The aim of this paper is to address the optimal choice between the extraction and storage of crude oil over time. We examine the optimal choice between extraction and storage of crude oil over time. An oil producer should decide on the proportion of extracted oil to be sold and the proportion stored. This optimal operational strategy should be conducted on a daily basis while taking into consideration physical, operational, environmental and financial constraints such as the storage capacity, crude oil spot price, total quantity available for possible extraction or maximum amount that could be invested at time t for the extraction choice. In this paper, we propose to extend massively to a much more general case the model initiated in [START_REF] Abid | Optimal strategy between extraction and storage of crude oil[END_REF] in the case where there are both costs of storage and extraction, cost penalty to sell stored oil and to deal with robustness tests regarding economic, environmental and operational scenarios. We will solve this optimization problem and find the optimal strategy. Our results will show that in the case of increasing prices, the storage cost has no impact on profit and the extraction cost has a very limited impact on future income. The storage capacity, the penalty for storage before selling and the volatility of the market strongly affect the expected profit of a resource producer. We will see in robustness tests regarding economic, environmental and operational scenarios that the storage capacity, the extraction cost and a change in the volatility of the spot oil market strongly affect the expected optimal profit of a resource producer. It is so a way to efficient policy to preserve the ecosystem and environment and to reduce CO2 emissions and reach the expectation of some international agreements.

Management strategies for oil exploitation

Let (Ω, F, F, P ) be a complete filtered probability space and T be a infinite terminal time horizon. We suppose that F is complete and right continuous. Let B be a one-dimensional F-Brownian motion. We assume that the oil price process on the market is given by

P t = P 0 + t 0 µP u du + t 0 σP u dB u , t ≥ 0 , (1.1)
where µ and σ are two given constants with σ > 0. We consider in this paper the point of view of a manager who owns an oil extraction station. He can extract the oil from his station to sell or to store it. We then denote by -q s t the amount of extracted oil stored per unit of time at time t, -q v t the amount of extracted oil per unit of time immediately sold on the market at time t, -q v,s t the amount of stored oil sold per unit of time at time t.

Thus, the total stored amount of extracted oil Q s is given by

Q s t = t 0 (q s u -q v,s u )du , t ≥ 0 .
Finally, we denote the total quantity of oil available in the station for possible extraction Q D ∈ R + and Q S ∈ R + represents the maximal storage capacity.

Remark 1.1. In our model, the total quantity available for possible extraction is Q D and the quantity extracted q e t at time t is equal to the quantity sold q v t at time t more the quantity stored q s t at time t. To match more realistic market and operational cases, this quantity is not assumed to be fixed:

q e t = q v t + q s t ≤ K 0 ∈ R .
We refer the reader to [START_REF] Goutte | Optimal management of an oil exploitation[END_REF] for the simple case of a constant extracted quantity (i.e., q e t = K 0 for any t ≥ 0). The manager's strategy consists in the triplet of F-adapted processes (q s , q v , q v,s ) (in [START_REF] Goutte | Optimal management of an oil exploitation[END_REF] this triplet of F-adapted processes is reduced to the couple (q s , q v,s ) since q e t = K 0 for any t ≥ 0). Based on the above description, the strategy has to satisfy the following constraints.

(C1) The processes q s and q v,s take only nonnegative values

q s t ≥ 0 , q v,s t ≥ 0 , t ≥ 0 .
(C2) The manager cannot store more than the infrastructure capacity

Q S Q s t ≤ Q S , t ≥ 0 . (C3)
The total stored quantity is a physical value and hence must be nonnegative

Q s t ≥ 0 , t ≥ 0 .
(C4) The manager cannot sell on the market at time t a quantity per unit of time stored previously greater than an operational bound q S q v,s t ≤ q S , t ≥ 0 .

Remark 1.2. The bound q S in condition (C4) means that even if we have a large number of barrels available in our stock, we cannot sell more than the fixed quantity q S per unit of time from the stock. This condition has a real economic interpretation in that it is not physically possible to sell more than a quantity q S on the market. Moreover, this constraint can be seen as a liquidity constraint. a revoir c'est plus une contrainte technique comme le robinet ne peut pas supporter plus Assumption 1.1. We assume that the immediately extracted oil q e and the stored oil are not sold at the same price. Indeed, the oil that comes from storage has a supplementary cost owing to transport, storage, and other requirements, which generate less profit for the sale. This assumption implies that the selling prices at time t are described as -P t for the oil extracted at time t and sold immediately (i.e., q v t ),

-(1 -ε)P t with ε ∈ [0, 1] for the oil sold at time t that was extracted and stored previously (i.e., q v,s t ). Remark 1.3. There are two possible sources of oil sales; the first is the oil extracted at time t and sold directly q v t , and the second is the oil that has been extracted previously and stocked and is sold now q v,s t . The previous assumption means that the sale prices are not equal for these two quantities.

The total amount of oil extracted E t between the initial time and t > 0 is equal to

E t = t 0 q e u du . (1.2)
We now define two different cost functions: the cost of extraction c e and the cost of storage c stock . Both are increasing function since the cost of storage increases with the increasing of the volume of stored barrels, concerning the cost of extraction, that is implied by operational constraints since if we go deeper to extract oil then the cost is more expensive. Assumption 1.2. We assume that the cost of the extraction of one barrel is not constant. As the total amount of oil already extracted increases, the cost of new extraction rises as well. Indeed, we have to drill increasingly deeper in order to extract fresh oil, which gives rise to a greater cost of extraction and therefore of production. The cost of the extraction of one barrel p e t is modelled with a deterministic decreasing function of the total amount of oil available for possible extraction at time t: Q D -E t . Hence,

p e t = c e (Q D -E t ) .
We recall that the total quantity stored and therefore available at time t is given by

Q s t such that Q s t = t 0 (q s u -q v,s u )du . (1.3)
Assumption 1.3. We assume that the cost of storage is not constant and depends on the volume of oil already stored at time t. Indeed, as the amount of the stored oil increases, oil storage becomes more expensive owing to technical, security, and political regulations for oil storage. The cost of storage of a single barrel p s t is modelled with a deterministic increasing function of the total quantity of oil already stored at time t, Q s t p s t = c stock (Q s t ) .

Remark 1.4. In Assumption 1.3, we state the standard economic modelling of a cost of storage by implying an increasing function p s t with respect to the quantity stored at time t, Q s t . This cost of storage function is related to operational, infrastructure, management and security costs caused by the storage of oil. In Assumption 1.1, we add a non standard penalty of selling not "fresh" extracted oil. We could assume in fact that for some natural ressource, the fact to store the ressource storing causes a loss of quality (fish or food ressources as example). That's why we add the penalty cost ε to the selling price of previously stored ressource.

Optimization problem

For infinite maturity T , the expected utility theory has a long and prominent history in the development of decision-making under uncertainty. It is assumed that investor preferences can be represented by utility functions U , which embed individual risk aversion. The main classes of utility functions 1 are quadratic functions, which are defined only by the first two moments, the constant relative risk aversion utility functions (i.e., the power functions) and the constant absolute risk aversion utility functions (CARA), which correspond to negative exponential utility functions, namely,

∀x ∈ R, U (x) = 1 -exp(-γx), γ > 0 .
The absolute risk aversion (ARA) introduced by Arrow-Pratt is equal to -U (x) /U (x) = γ. It is positive, implying the concavity of the utility function. This means that an agent with a negative exponential utility function is risk averse. It can be noted that coefficient γ is constant regardless of the wealth. In the following, the manager is assumed to maximize the expected utility over an infinite horizon.

We recall that in our model, the total quantity available for possible extraction is Q D and the quantity extracted at time t q e t is equal to the quantity sold at time t and the quantity stored at time t. q e t = q v t + q s t ≤ K 0 ∈ R .

Control variable and admissible set

Let q be our control variable given by the progressing measurable process q = (q v t , q s t , q v,s t ) t≥0 with values in R 3 + . Let A denote the set of all possible controls q such that

A = q v t ≥ 0 , q s t ≥ 0 , 0 ≤ q v,s t ≤ q S , q v t + q s t ≤ K 0 , 0 ≤ Q s t t ≥ 0 . (2.4)
We remark that the admissible set A takes into account all previous constraints on our control variable q = (q v t , q s t , q v,s t ) t≥0 .

Value function

Let q = (q v t , q s t , q v,s t ) t≥0 be the control variables, and we denote by X x,q the state process corresponding to (P, E, S), where P refers to the price, E is the amount of oil extracted and S is the amount stored at time t, with x = (p, e, s), P 0 = p, E 0 = e and S 0 = s. We know that the dynamics of X x,q are given by

dX x,q t =   P t (µdt + σdB t ) (q v t + q s t )dt (q s t -q v,s t )dt   =   µP t q v t + q s t q s t -q v,s t   dt +   σP t 0 0   dB t . (2.5)
For any state x = (p, e, s) ∈ D, with

D := R * + × [0, Q D ] × R + , the strategies (q v , q s , q v,s ) are admissible if E ∞ 0 e -ρs U q v s P s + q v,s s (1 -ε)P s -(q v s + q s s )c e (Q D -E s ) -c stock (S s ) ds < ∞ ,
and we denote by A(x) the set of admissible strategies when the initial state is x.

For any x ∈ D and q ∈ A(x), we define the gain function J(x, q) by

J(x, q) = E ∞ 0 e -ρu U q v u P u + q v,s u (1 -ε)P u -(q v u + q s u )c e (Q D -E u ) -c stock (S u ) du . (2.6)
Remark 2.5. In our objective function J defined in (2.6) we can interpret and decompose each terms such as: q v u P u is the gain of selling the quantity q v at price P on the market at time u > 0; q v,s u (1 -ε)P u is the gain of selling the quantity q v,s previously stored at price (1 -ε)P on the market at time u > 0 (indeed in this case we apply the penalty given by Assumption 1.1;

(q v u + q s u )c e (Q D -E u )
is the loss dues to the cost of extraction of the global quantity q v u + q s u and c stock (S u ) the cost of storage of the stock S.

We can rewrite (2.6) as

J(x, q) = E ∞ 0 e -ρu f (X x u , q u )du , where f (X x u , q u ) := U (q v u P u + q v,s u (1 -ε)P u -(q v u + q s u )c e (Q D -E u ) -c stock (S u )) .
The objective is to maximize the gain function J over the admissible control processes, and we introduce the associated value function

v(x) = sup q∈A(x) E ∞ 0 e -ρu f (X x u , q u )du .

PDE characterization

The HJB equation linked with the value function v is given by

ρv -sup q∈D(x) U (q v p + q v,s (1 -ε)p -(q v + q s )c e (Q D -e) -c s (s)) + L q v = 0 ,
where L q is the operator associated with the diffusion (2.5) for the constant control q and is defined by

L q v = µp∂ p v + σ 2 p 2 2 ∂ 2 p v + (q v + q s )∂ e v + (q s -q v,s )∂ s v ,
and the set D(x) is defined on D by (i) Suppose that

D(x) :=        {(q v , q s , q v,s ) , q v ≥ 0 , q s ≥ 0 , 0 ≤ q v,s ≤ q S , q v + q s ≤ K 0 } ∀ x ∈ R * + × [0, Q D ) × R * + {(q v , q s , q v,s ) , q v = 0 , q s = 0 , 0 ≤ q v,s ≤ q S } ∀ x ∈ R * + × {Q D } × R * + {(q v , q s , q v,s ) , q v = 0 , q s = 0 , 0 ≤ q v,s ≤ q S q v + q s ≤ K 0 , q v,s ≤ q s }, ∀ x ∈ R * + × (0, Q D ] × {0}.
ρw(x) -sup q∈D(x) [L q w(x) + f (x, q)] ≥ 0 , x ∈ D , (2.7
)

and lim T →∞ e -ρT E[w(X x,q T )] ≥ 0 , ∀ x ∈ D , ∀ q ∈ A(x) . (2.8)
Then, we obtain w ≥ v on D.

(ii) Suppose further that for any x ∈ D, there exists a measurable function q(x) valued in

D(x) such that ρw(x) -sup q∈D(x) [L q w(x) + f (x, q)] = ρw(x) -L q(x) w(x) -f (x, q(x)) = 0 .
The SDE

dX t =   µP t qs (X t ) + qv (X t ) qv (X t ) -qv,s (X t )   dt +   σP t 0 0   dB t (2.9)
admits a unique solution, denoted by Xx t , given an initial condition

X 0 = x, satisfying lim T →∞ e -ρT E[w( Xx T )] ≤ 0 , (2.10)
and the process {q( Xx t ), t ≥ 0} lives in A(x). We then obtain

w(x) = v(x) , ∀ x ∈ D ,
where q is an optimal Markovian control.

Remark 2.6. If we assume that ρ > 2µ + σ 2 , then the conditions (2.8) and (2.10) hold owing to the quadratic growth of w.

Proof. (i) Let w ∈ C 2 (D) and q ∈ A(x). By Itô's formula applied to e -ρt w(X x,q t ), we obtain for any stopping time τ n e -ρT ∧τn w(X x,q T ∧τn ) = w(x) +

T ∧τn 0 e -ρu [L qu w(X x,q u ) -ρw(X x,q u )]du

+ T ∧τn 0 e -ρu ∂ p w(X x,q u )σP u dB u .
We consider the sequence of stopping times (τ n ) n≥1 defined by

τ n := inf{t ≥ 0 : t 0 |∂ p w(X x,q u )P u | 2 ≥ n} .
Using this sequence of stopping times to take the expectation, we obtain

E[e -ρT ∧τn w(X x,q T ∧τn )] = w(x) + E T ∧τn 0 e -ρu [L qu w(X x,q u ) -ρw(X x,q u )]du .
Since w satisfies (2.7), we have

E[e -ρT ∧τn w(X x,q T ∧τn )] ≤ w(x) -E T ∧τn 0 e -ρu f (X x,q u , q u )du .
Using the quadratic growth condition on w and the integrability condition on X x,q , we may apply the dominated convergence theorem and send n to infinity

E[e -ρT w(X x,q T )] ≤ w(x) -E T 0 e -ρu f (X x,q u , q u )du . (2.11)
By sending T to infinity and using the dominated convergence theorem, we obtain for any strategy q ∈ A(x)

w(x) ≥ E ∞ 0 e -ρu f (X x,q u , q u )du , which implies w(x) ≥ v(x) for any x ∈ D.
(ii) By repeating the above arguments and observing that the control q achieves equality (2.11), we have

E e -ρT w( Xx T ) = w(x) -E T 0 e -ρu f ( Xx u , q( Xx u ))du .
By sending T to infinity, from (2.10), we obtain

w(x) ≤ E ∞ 0 e -ρu f ( Xx u , q( Xx u ))du ,
where the left-hand-side term is by definition J(x, q); thus, w(x) = J(x, q).

Optimal Strategy

If we know the value function v, we can find the optimal strategy. To find the optimal strategy, we must find the argmax of L q w(x) + f (x, q) over D(x), which can be rewritten arg max

q∈D(x) U (q v p + q v,s (1 -ε)p -(q v + q s )c e (Q D -e) -c s (s)) +µp∂ p v + σ 2 p 2 2 ∂ 2 p v + (q v + q s )∂ E v + (q s -q v,s )∂ s v , which is equivalent to finding arg max q∈D(x) U (q v p + q v,s (1 -ε)p -(q v + q s )c e (Q D -e) -c s (s)) + (q v + q s )∂ E v + (q s -q v,s )∂ s v .
We remark that U is concave and that the inside term of U is linear in q s , q v , q s,v . Thus, the composed function ϕ(q s , q v , q s,v ) defined by

ϕ(q s , q v , q s,v ) = U (q v p + q v,s (1 -ε)p -(q v + q s )c e (Q D -e) -c s (s)) +(q v + q s )∂ E v + (q s -q v,s )∂ s v
is concave. This property allows us to find the optimal strategy because it is a problem of concave maximization on a convex set. Several methods for finding the maximum value are available, such as Kuhn-Tucker conditions, subgradient projection, and Lagrange multipliers.

Algorithm to find the optimal control strategy

We introduce the following sets, which are useful for the decomposition of the domain

Step 1: Since U is invertible, we can solve

    
∂ϕ ∂q v (q s , q v , q v,s ) = 0, ∂ϕ ∂q s (q s , q v , q v,s ) = 0, ∂ϕ ∂q v,s (q s , q v , q v,s ) = 0 on any sets D(x), (P i ) 1≤i≤5 , (L i ) 1≤i≤9 and (A i ) 1≤i≤6 . We denote by (q (k) ) k≥1 the different solutions of this equation.

Step 2: We compare all values ϕ(q (k) ) with k ≥ 1, the optimal solution is given by the sup, and the optimal strategy is given by q * ∈ {q 1 , . . .} such that ϕ(q * ) ≥ ϕ(q (k) ) for any k ≥ 1.

3 Numerical applications

Data

The data are taken from the daily WTI oil prices in the time period from 01/01/2015 to 31/12/2016. Figure [START_REF] Abid | Optimal strategy between extraction and storage of crude oil[END_REF] shows the historical evolution of the crude oil price, revealing that the price of crude oil has fluctuated considerably over our sample period, especially during the periods of global crises (2008) and economic development (2014)(2015). Figure 1 also shows that while oil prices were relatively stable between 2011 and the first half of 2014, crude oil prices fell sharply by nearly 50% in 2014 and reached a record low of $45.88 per barrel in May 2007. This decline was mainly caused by the combination of three factors:

-The weakening of demand for oil because of the economic downturn in response to geopolitical turmoil and the military conflict in the oil production areas (Iraq and Libya).

-World oil production has increased sharply since 2014, mainly due to the production of shale oil in the United States.

-OPEC (Organization of Petroleum Exporting Countries) 2 has chosen not to intervene in oil prices while maintaining its production targets unchanged.

Figure [START_REF] Alexandrov | Accuracy assessments of cloud droplet size retrievals from polarized reflectance measurements by the research scanning polarimeter[END_REF] shows an exceptional volatility of the crude oil price return during the financial world crisis (2008-2009) and during the last two years, which has led to an increase in the uncertainty in the world economy as well as in the financial markets. In fact, the fluctuation of the WTI crude oil price is the result of the report published by the US agency AP (Associated Press), which indicates that the American tanks used to store oil have been practically full for several weeks. That is, the United States was able to sell all of the crude oil that it produced or imported. Moreover, over the past seven weeks, the United States has produced and imported an average of one million barrels more oil per day than it consumes. Stored mainly at Cushing in Oklahoma, the amount of available crude oil has reached a level not seen in 80 years ( US Department of Energy). Thus, the U.S. government even fears the "tank tops", the limit where another drop of oil cannot be stored. As a result, oil prices in the markets fell sharply and continued to decline during the subsequent months. Therefore, these points confirm the interest of an optimization strategy that balances the storage and sale of crude oil. 2 1. OPEC (Organization of Petroleum Exporting Countries) is a cartel of producing countries that seek to regulate oil prices by setting a production quota for each of its members. OPEC includes some of the major oil-producing countries (Saudi Arabia, Iraq, Iran, Kuwait, Venezuela, Algeria, Angola, Libya, Nigeria, United Arab Emirates, Qatar and Ecuador). The United States and Russia, however, are not included. In 2013, OPEC controlled 43% of the world's oil production (source: INSEE). The regulation of oil production by OPEC helps to influence the price of crude oil. A concerted reduction in oil production by OPEC countries generally results in a rise in oil prices. The world oil supply can increase significantly through the discovery of new oil fields and the large-scale production of shale oil.

Returns are calculated from the price data by taking the natural logarithm of the ratio of two successive prices. The statistical properties reveal that the average oil return is -0.0002 over our sample period. The skewness and kurtosis coefficients are, respectively, -0.0706 and 7.306, indicating that the oil return distribution is skewed towards the left and revealing the leptokurtic behaviour of the return distributions with fat tails. Additionally, the oil return distribution deviates significantly from normality, as shown by the Jarque-Bera test results.

Optimization results

We notice that the HJB equation related to our optimization involves a surpemmum over the set D(x) depending on the position of the controlled system. Unfortunately, this prevents us from getting an explicit solution and applying the verification Theorem 2.1. We therefore provide a numerical approximation of the solution to the HJB equation. To this end, we used a finite difference scheme which leads to the resolution of a Controlled Markov Chain problem. This class of problems has been deeply studied by Kushner and Dupuis [START_REF] Kushner | Numerical Methods for Stochstic Control Problems in Continuous Time[END_REF] who state that the solution of a given HJB equation, can be approximated by a the solution of a controlled Markov chain problem. The convergence of the solution of our numerical scheme towards the solution of the HJB equation, when the space step goes to zero, can be shown using the standard local consistency argument provided in [START_REF] Kushner | Numerical Methods for Stochstic Control Problems in Continuous Time[END_REF] (i.e. the first and the second moments of the approximating Markov chain converge to those of the continuous process X). The main advantage of this probabilistic approach is that it does not require the use of any of the analytical properties of the true solution. We may refer to [START_REF] Budhiraja | Convergent Numerical Scheme for Singular Stochastic Control with State Constraints in a Portfolio Selection Problem[END_REF][START_REF] Hindy | Numerical Analysis of a Free-Boundary Singular Control Problem in Financial Economics[END_REF][START_REF] Yin | Numerical solutions of optimal risk control and dividend optimization policies under a generalized singular control formulation[END_REF] for numerical schemes involving a Controlled Markov Chain control problem. Let us finally mention that the verification Theorem 2.1 still keeps an interest since it ensures (under additional assumption) the uniqueness of the solution to the HJB equation, which is needed for the convergence of the approximation.

In this general case, we adopt the following parameters and functions:

-The cost of storage c s is assumed to be given by c s (x) = exp (ξ s x) ∀x ≥ 0, where ξ s = log(10)/Q D is a constant for normalizing the units. This cost function means that the cost of storage increases exponentially with the increasing quantity that must be stored. This well reflects the actual conditions with higher cost for security, pollution rules and infrastructure when the amount of stored oil is higher.

-Unlike the simple case, the cost of extraction is no longer constant. We now also include an exponential increase of the cost of extraction because this cost will increase when we will extract more oil owing to the depth of the reserve. Thus, we take c e (x) = exp(ξ e x) ∀x ≥ 0.

-The total amount available for extraction is 10 000 000 barrels.

-We cannot extract more than K 0 = 10000 barrels per day.

-We cannot sell more than q S = 100000 barrels that were stored previously. This means that for all t > 0, q v,s t ≤ q S = 100, 000.

-The market parameters are ρ = 0.05, µ = 0.01 and σ = 0.02.

-The risk-aversion parameter will be equal to γ = 0.0005.

We consider two different cases for the market: a standard market with all constraints and a simple market without the cost (extraction and storage). The results show the optimized returns for state variables at time t > 0, (P, S, E), where P denotes the current price per barrel of oil, S denotes the total amount of barrels stored and E denotes the total amount of oil already extracted (i.e., E t = t 0 q e u du). Figure 3 shows the corresponding optimized value function of our investment problem for a fixed price P = 55$. Figure 4 shows the corresponding adopted optimal control variables. q * := (q v, * , q s, * , q v,s, * ). -The value function is maximized at V > 18 when the storage is full and when there is no extraction initially. Indeed, it corresponds to the case in which we have a full available stock and a full reserve available for extraction.

-The storage increases the value function for all possible already extracted amounts.

Here, storage plays the role of security against the volatility of the market price.

-For a fixed stored quantity, when the total amount of already extracted oil increases, the value function decreases. This result is expected because the available reserve is less important, and therefore, the potential income decreases.

Figure 4 shows the obtained optimal control variables q * := (q v, * , q s, * , q v,s, * ).

Figure 4: Optimal control variables q * := (q v, * , q s, * , q v,s, * ).

If we analyse Figure 4, which shows the optimal control variables q * := (q v, * , q s, * , q v,s, * ) obtained, we can see the following:

For the quantity extracted at time t When the stock is full or close to full, we prefer to sell a higher fraction of the extracted oil. Indeed, since the stock is full we cannot stock newly extracted oil more. So there are only two possible solutions: sell more stock (oil previously stored) to have new available stock at the next step; or reduce the quantity we extract.

Therefore, when the stock is quite empty, we prefer to store a much higher fraction of the extracted oil. Indeed, this is economically reasonable because when the stock is quite empty more than 10% of the possible quantity, the best strategy is to place the oil barrel in the stock to secure our gain and make it impervious to a possible change of price.

Conversely, when the stock is full, it is useless to put more oil in the stock, and the best strategy is to sell a higher fraction of the extracted oil.

The case of an empty stock is interesting. In this case, the best strategy is to always sell all of the oil and never store anything. Indeed, when the stock is empty, the producer observes that he/she has not stored anything and then sells all the extracted quantity immediately. This is for an operational cost reason. Indeed, the manager has to cover the running cost. In particular, if there is no stock, the producer would not be able to hedge the running costs by selling some reserve. Therefore, the instantaneous production has to be sold to cover these costs.

For a middle scenario in which the stock is half full and the reserve available for extraction is also half full, the best strategy is to sell one part of the extracted oil and store the other part. We observe in a large vision that there are always compensatory effects linked to the fact that financial, operational and cost factors are stated and implemented in our optimization problems. We always extract the maximum possible amount of oil. This means that for all t > 0, q e t = q v t + q s t = K 0 = 10000.

For the quantity stored and sold at time t, q v,s t

The results are homogeneous with respect to the total amount already extracted. This means that the control variable q v,s t does not depend on the size of the reserve but only on the amount available in the stock. For a larger amount in the stock, we choose to sell a greater amount of oil.

Robustness tests regarding economic, environmental and operational scenarios

We would now like to measure and test the robustness and the optimal value function obtained for different scenarios. These scenarios will reflect economic, financial, environmental or operational changes and constraints.

-Production and Planet environmental ecosystem preservation constraints, such as a decrease of the quantity available for possible extraction or of the total possible quantity that can be stored.

-Cost and Penalty constraints, such as an increase of the cost of storage or of the cost of extraction. We will also analyse an increase of the selling penalty for stored oil.

-Financial crisis events, such as a cut in the fossil fuels price or an increase of the crude volatility price or drift parameter.

-Risk aversion analysis with respect to the producer.

To address these scenarios, we will consider five possible state variables at time t > 0, (P, S, E) i , i ∈ {1, 2, . . . , 5} ,where we recall that P denotes the current price of a barrel of oil, S denotes the total number of barrels stored and E denotes the total amount of oil already extracted (i.e., E t = t 0 q e u du). These states are as follows:

Average life case: The first state variable will be the mean or middle life of our resource exploitation case, where for a price P , we obtain (P, S, E)

1 = (P, Q S 2 , Q D 2 )
. This means that we are in a state where half of both the storage capacity and the amount of oil available for possible extraction are already achieved.

Beginning life case: The second state variable will be the beginning life of our resource exploitation case, where for a price P , we obtain (P, S, E) 2 = (P, 0, 0). This means that no oil has already been extracted or stored. The entire possible available resource and storage capacities are available.

Full capacity stored case: The third state variable will be the case in which the maximum storage capacity Q S is achieved but we have nothing extracted (i.e., we begin the life of our resource exploitation with a full stock). For a given price P , we obtain (P, S, E) 3 = (P, Q S , 0).

Available resource exhausted without stock:

The fourth state variable will be the case in which the total quantity of oil available in the station for possible extraction Q D is achieved. The available resource is exhausted, and we do not have stock (i.e., the stock is empty). For a given price P , we obtain (P, S, E) 4 = (P, 0, Q D ).

Available resource exhausted with full stock: The fifth state variable will be again the case in which the total quantity of oil available in the station for possible extraction Q D is achieved but we have a full available stock. For a given price P , we obtain (P, S, E) 4 = (P, Q S , Q D ).

Remark 3.7. We consider the four cases of state control variable regarding the available quantities already stored and extracted. These cases corresponds to interesting economic and operational cases. The fourth case is the worst case scenario because no more resources are available for extraction and the stock is empty. In this case, the possible future income is zero. This worst case will give always the same optimized value functions equal to one because the only possible choice of control variables (q s , q v , q s,v ) is (0, 0, 0). This implies that the corresponding value function gives ϕ(q s , q v , q s,v ) = ϕ(0, 0, 0

) = U (0) = 1 -exp(-γ × 0) = 0.
Table 1: Optimized value function results for the standard market case using estimated data.

Average life Beginning life Full capacity Available resource case case stored case exhausted with full stock (E, S) We clearly see in Table 1 that the third case is the best case scenario: the full capacity stored case. Indeed, for this state variable, we are in the situation where the maximal storage capacity Q S is achieved but we have nothing extracted. For the following results, the market parameters for the standard case are ρ = 0.05, µ = 0.01, σ = 0.02 and γ = 0.0001.

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) ε = 0.1; γ = 0.

Financial crisis events

We begin with the studies of financial crisis events. Figure 5 gives the results for the average life case with respect to the observed price state. We see that as the price increases, the future possible income increases which is economically reasonable. In Table 2, we address the scenario case of an increasing volatility of the crude oil price σ. This increase will reflect economic or financial events such as financial crises, political instability in the Middle East (OPEC countries) or war, which can affect crude oil production and therefore the price of oil in the world economy. We observe that in all possible states of our resource, an increase of the volatility implies a decrease of the value function and therefore a financial loss. In the average life case, a 50% increase in the volatility leads to a loss of 0.65%, and a 100% increase of the volatility leads to a loss of 1.6%. The results shown in Table 2 demonstrate that an increase of the instability in crude oil price implies a real loss in our optimal natural resource investment problem.

In Table 3, we address the scenario of a variation of the crude drift price µ. We see that an decrease of the drift reduces our potential future income. For the average life case, the loss is 2.41%. On the other hand, an increase of the drift induces an increase of the value function which is in concordance with the financial intuition. For instance, for the average life case, an increase of 100% of the drift implies a gain of 7.62%. In Table 4, we address the scenario of a variation in the risk aversion parameter γ of the producer. We see that an increase in the aversion of risk implies an increase in the future income. We obtain a change in the future income from 9.1282 to 13.1014, corresponding to an increase of 53.35%. This result can be explained by the huge estimated volatility of the market σ = 2%. Indeed, a more prudent producer will be less impacted by this price volatility and will therefore obtain an increase in the future possible income. In Table 5, we address the scenario of a decrease of the available amount for possible extraction. This scenario reflects the possibility of an environmental agreement or constraints that limit the extraction volume of the resource. At the current levels, the consumption of fossil energy appears strongly unsustainable. Carbon stranded assets place the necessity to embrace a transition away from a fossil-fuel driven society at the centre of contemporary discussion and analysis. Changes in the values and attitudes are to be expected as the fossil fuel companies' shareholders fully integrate environmental issues within their developmental framework. This is why we address this scenario and the next scenario in which there is a decrease of the total possible amount of oil that can be stored.

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) σ = 0
( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) µ = 0

Risk aversion

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) γ = 0

Production and Planet environmental ecosystem preservation constraints

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) K 0 =
The results listed in Table 5 are in agreement with our expectations because a decrease of the maximum possible extracted volume capacity reduces the value function and the expected income. The value of the expected income changes from 9.1282 to 7.9320 (loss of 7.15%) with a reduction by ten for the average life case. However, if we examine the beginning life case, which represents the future income of new resource production, the observed changes is from 1.2595 to 0.1286, corresponding to a loss of 89.78%. This means that if we have a greater reduction in the volume of extraction, a new resource plan becomes essentially useless because the future possible income vanishes. We now examine the results with respect to a decrease of the total possible amount of oil that we can store. This scenario reflects the infrastructure investment possibility and all investment that a resource company can make in this sector. Here, as well, we observe that a loss in the quantity that can be sold from stock per day implies a loss in the future possible income. We obtain a loss of 73.82% for the average life case if we decide to impose a reduction of ten times for this parameter. In Table 7, we provide the results for the scenario of an increase in the selling penalty for stored oil. This scenario can reflect environmental penalties for extracting the oil and not selling it immediately. Indeed, the choice of storage implies that the volume of extracted oil is greater than the volume demanded by the market. Of course, we observe that an increase of this penalty decreases the possible future income. For example, a loss of 6.85% is obtained for the average life case if the selling penalty is zero.

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) q S =

Cost and Penalty constraints

( Q S 2 , Q D 2 ) (0, 0) (Q S , 0) (Q S , Q D ) ε = 0.1 8
We now address the two scenarios of a modification of the costs of storage and extraction. (-0.0787) (-0.0425) (0) Note: Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table 1 provided in parenthesis. We recall that ξ e = log(15)/Q D .

Examination of the data presented in Table 8 shows that the effect of the cost of storage is quite small. Indeed, in the worst case (i.e., a higher value for the cost of storage), the loss is only 0.05%. This means that an environmental policy aimed at reducing pollution and preserving the environment based on increasing the cost of storage is useless. Therefore, this is not an effective approach for saving the planet.

On the other hand, examination of the results for the cost of extraction presented in Table 9 shows that an increase of the cost of extraction does have an impact on the future incomes and thus can be used to manage the environment system. We obtain, a higher value for the cost of extraction, a reduction in income of 2.26% in this case.

Conclusion

We examine the optimal choice between extraction and storage of crude oil over time. An oil producer should decide on the proportion of extracted oil to be sold and the proportion stored. This optimal operational strategy should be conducted on a daily basis while taking into consideration physical, operational, environmental and financial constraints such as the storage capacity, crude oil spot price, total quantity available for possible extraction or maximum amount that could be invested at time t for the extraction choice. In this paper, we solve this optimization problem and find the optimal strategy. Our results show that in the case of increasing prices, the storage cost has no impact on profit and the extraction cost has a very limited impact on future income. The storage capacity, the penalty for storage before selling and the volatility of the market strongly affect the expected profit of a resource producer. This means that an efficient policy to reduce global warming and preserve the ecosystem and environment must be related to storage capacity, infrastructure or penalties for using this production method. Indeed, we have seen in our robustness tests regarding economic, environmental and operational scenarios that the storage capacity, the extraction cost and a change in the volatility of the spot oil market strongly affect the expected optimal profit of a resource producer. It is so a way to efficient policy to preserve the ecosystem and environment and to reduce CO2 emissions and reach the expectation of some international agreements.

Theorem 2 . 1 .

 21 Let w ∈ C 2 (D) satisfy a quadratic growth condition, i.e., there exists a positive constant C such that |w(x)| ≤ C(1 + |p| 2 + |s| 2 ) .

Figure 1 :

 1 Figure 1: WTI oil price evolution.Figure 2: Returns' Price.

Figure 2 :

 2 Figure 1: WTI oil price evolution.Figure 2: Returns' Price.

Figure 3

 3 Figure 3 shows our optimization results for an observed price of 55$ par barrel.

Figure 3 :

 3 Figure 3: Optimal value function.

Figure 3

 3 Figure 3 suggests the following:

Figure 5 :

 5 Figure 5: Average life case optimized results with respect to state price P

Table 2 :

 2 Optimized value function results for the standard market case with respect to volatility price parameter σ.

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

	.02	8.5429	1.2595	9.1281	8.5232
	σ + 25%	8.5262	1.2521	9.1183	8.5074
		(-0.0167)	(-0.0075)	(-0.0098)	(-0.0158)
	σ + 50%	8.4871	1.2399	9.0478	8.4389
		(-0.0558)	(-0.0196)	(-0.0803)	(-0.0843)
	σ + 75%	8.4512	1.2285	8.9951	8.3858
		(-0.0917)	(-0.0310)	(-0.1330)	(-0.1374)
	σ + 100%	8.4062	1.2155	8.9269	8.3190
		(-0.1367)	(-0.0440)	(-0.2013)	(-0.2042)
	Note:

Table 3 :

 3 Optimized value function results for the standard market case with respect to drift price parameter µ.

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

	.01	8.5429	1.2595	9.1281	8.5232
	µ -25%	8.3365	1.2083	8.9647	8.3557
		(-0.2065)	(-0.0512)	(-0.1635)	(-0.1675)
	µ + 25%	8.7478	1.3087	9.3109	8.7047
		(0.2049)	(0.0492)	(0.1828)	(0.1815)
	µ + 50%	8.9190	1.3498	9.4267	8.8254
		(0.3761)	(0.0902)	(0.2986)	(0.3022)
	µ + 75%	9.0677	1.3851	9.5205	8.9242
		(0.5248)	(0.1255)	(0.3924)	(0.4009)
	µ + 100%	9.1947	1.4151	9.5960	9.0045
		(0.6517)	(0.1556)	(0.4679)	(0.4812)
	Note:

Table 4 :

 4 Optimized value function results for the standard market case with respect to aversion risk parameter γ.

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

	.0001	8.5429	1.2595	9.1281	8.5232
	γ = 0.0002	13.1014	2.4343	13.8366	13.1985
		(4.5585)	(1.1748)	(4.7085)	(4.6752)
	γ = 0.0005	17.8462	5.4881	18.2807	18.0434
		(9.3033)	(4.2285)	(9.1526)	(9.5202)
	Note:

Table 5 :

 5 Optimized value function results for the standard market case with respect to the maximum available extracted quantity per day K 0 .

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

	10000	8.5429	1.2595	9.1281	8.5232
	K0 2	8.2103	0.6411	8.8314	8.5232
		(-0.3327)	(-0.6184)	(-0.2967)	(0)
	K0 5	8.0026	0.2583	8.6469	8.5232
		(-0.5403)	(-1.0013)	(-0.5438)	(0)
	K0 10	7.9320	0.1286	8.5843	8.5232
		(-0.6109)	(-1.1309)	(-0,0058)	(0,0049)
	Note:

Table 6 :

 6 Optimized value function results for the standard market case with respect to the maximum available quantity that can be sold from stock per day q S .

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

	100000	8.5429	1.2595	9.1281	8.5232
	q S 2	5.8084	1.2542	5.8723	4.9985
		(-2.7345)	(-0.0053)	(-3.2558)	(-3.5248)
	q S 5	3.2317	1.2476	3.2762	2.1953
		(-5.3112)	(-0.0120)	(-5.8519)	(-6.3280)
	q S 10	2.2364	1.2436	2.2832	1.1246
		(-6.3065)	(-0.0159)	(-6.8449)	(-7.3987)
	Note:

Table 7 :

 7 Optimized value function results for the standard market case with respect to the selling penalty for stored oil ε.

	Average life Beginning life Full capacity	Available resource
	case	case	stored case	exhausted with full stock
	(E, S)

  Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis.

		.5429	1.2595	9.1281	8.5232
	ε = 0.05	8.8402	1.2595	9.4444	8.8624
		(0.2973)	(0)	(0.3163)	(0.3391)
	ε = 0.01	9.0713	1.2595	9.6900	9.1257
		(0.5284)	(0)	(0.5619)	(0.6024)
	ε = 0	9.1282	1.2595	9.7504	9.1904
		(0.5853)	(0)	(0.6223)	(0.6672)
	Note:

Table 8 :

 8 Optimized value function results for the standard market case with respect to the cost of storage c s . Results are given for a state price P = 55$, with the gain or loss with respect to the standard case given in the first row or in Table1provided in parenthesis. We recall that ξ s = log(10)/Q D .

		Average life Beginning life Full capacity	Available resource
		case	case	stored case	exhausted with full stock
	(E, S) c s (t) = exp (ξ s Q s t )	( Q S 2 , Q D 2 ) 8.5429	(0, 0) 1.2595	(Q S , 0) 9.1281	(Q S , Q D ) 8.5232
	c s (t) = exp (1.5 × ξ s Q s t )	8.5413	1.2595	9.1146	8.5089
		(-0.0016)	(0)	(-0.0135)	(-0.0143)
	c s (t) = exp (2 × ξ s Q s t )	8.5386	1.2595	9.0755	8.4674
		(-0.0043)	(0)	(-0.0526)	(-0.0558)
	Note:

Table 9 :

 9 Optimized value function results for the standard market case with respect to the cost of extraction c e .

		Average life Beginning life Full capacity	Available resource
		case	case	stored case	exhausted with full stock
	(E, S)	( Q S 2 , Q D 2 )	(0, 0)	(Q S , 0)	(Q S , Q D )
	c e (t) = exp(ξ e E t )	8.5429	1.2595	9.1281	8.5232
	c e (t) = 2 exp(×ξ e E t )	8.4948	1.2399	9.1175	8.5232
		(-0.0481)	(-0.0196)	(-0.0106)	(0)
	c e (t) = 5 exp(×ξ e E t )	8.3491	1.1808	9.0856	8.5232
		(-0.1939)

See Gollier,

2001, Gollier, Eeckhoudt and Schlessinger, 2005 and de Palma and Prigent, 2008.

D(x):

P = {(q v , 0, q v,s ) , 0 ≤ q v ≤ K 0 , 0 ≤ q v,s ≤ q S } P = {(0, q s , q v,s ) , 0 ≤ q s ≤ K 0 , 0 ≤ q v,s ≤ q S } P = {(q v , q s , 0) , q v ≥ 0 , q s ≥ 0 , q s + q v ≤ K 0 } P = {(q v , q s , K 0 ) , q v ≥ 0 , q s ≥ 0 , q s + q v ≤ K 0 } P = {(K 0 -q s , q s , q v,s ) ,

q s , q S ) 0 ≤ q s ≤ K 0 } A = (0, 0, 0) A = (0, K 0 , 0) A = (K 0 , 0, 0) A = (0, 0, q S ) A = (K 0 , 0, q S ) A = (0, K 0 , q S ) We can write the domain D(x) in the form

For any x ∈ D, we can use the following method to find the optimal strategy.