Mean-field moral hazard for optimal energy demand response management
Romuald Elie Emma Hubert Thibaut Mastrolia Dylan Possamaï


Efficient Bayesian inference for nonlinear state space models with univariate autoregressive state equation
    Alexander Kreuzer [Corresponding author: E-mail: a.kreuzer@tum.de]  Claudia Czado
    December 30, 2023
===========================================================================================================




We study the problem of demand response contracts in electricity markets by quantifying the impact of considering a continuum of consumers with mean–field interaction, whose consumption is impacted by a common noise. We formulate the problem as a Principal–Agent problem with moral hazard in which the Principal – she – is an electricity producer who observes continuously the consumption of a continuum of risk–averse consumers, and designs contracts in order to reduce her production costs. More precisely, the producer incentivises each consumer to reduce the average and the volatility of his consumption in different usages, without observing the efforts he makes. We prove that the producer can benefit from considering the continuum of consumers by indexing contracts on the consumption of one Agent and aggregate consumption statistics from the distribution of the entire population of consumers. In the case of linear energy valuation, we provide closed–form expression for this new type of optimal contracts that maximises the utility of the producer. In most cases, we show that this new type of contracts allows the Principal to choose the risks she wants to bear, and to reduce the problem at hand to an uncorrelated one.


Key words:  Electricity markets, demand response models, moral hazard, mean–field games with common noise, McKean–Vlasov controlled SDEs. 



AMS 2000 subject classifications: Primary: 91A13; Secondary: 60H30, 93E20.



JEL subject classifications: C61, C73, D82, D86, L94.






§ INTRODUCTION


Consumption management, in particular energy efficiency and demand response, is undeniably one of the most important challenge in the energy sector, all the more since it is one of the basis to guarantee the fulfilment of EU objectives in terms of green energy and emission reduction. Indeed, on the one hand, electric energy cannot easily be stored, which is why utilities have always tried to directly match supply and demand by limiting the production rate of their power plants, by commissioning or decommissioning generators, or by importing electricity from other utilities. However, what can be achieved on the supply side is limited: some production units can take a long time to reach full capacity, some units can be very expensive to operate, or demand can sometimes exceed the capacity of all the available power plants combined. Demand response seeks to adjust electricity demand rather than supply. On the other hand, the business–as–usual criticism of renewable energy is based on a presumed inadequacy with regard to demand. In fact, adequacy could be addressed: the variability of renewable energy production could be monitored through consumption management. The development of smart meters, for example, is a big step in this direction, but the quality of their usage will be crucial. In addition, optimised energy tariffs could allow a better sharing of risks between producers and consumers. This is where most of the potential improvement in energy consumption lies. 



Demand response is a change in the energy consumption of an electricity utility consumer to better match demand with supply. Utilities can report demand requests to their customers in a variety of ways, including contracts under which the consumer normally receives electricity at a lower price than the standard rate in exchange for significantly higher prices at certain peak periods chosen by the generator. The customer can then adjust his consumption by postponing tasks that are costly in terms of electricity, or by paying a high price. Many experiments have been developed to accurately assess the benefits of demand response programs on consumption, see the references cited by <cit.> for more details. In <cit.>, the authors focus in particular on the large scale demand response experiment of Low Carbon London Pricing Trial. Nevertheless, demand response mechanisms face challenges which have to be tackled before one can claim that they provide a level of flexibility comparable to thermal power plants. In particular, demand response programs exhibit a substantial variance in the response of the consumer to price signal. This leads to uncertainty on the total response of the solicited population. This large variance, called the responsiveness effect, is a significant gap in demand response programs. 



In this perspective, Aïd, Possamaï and Touzi formulate in <cit.> the mechanism of demand response programs during a fixed finite period as a continuous–time Principal–Agent problem with moral hazard. The Agent – He – is a risk–averse CARA consumer who has a baseline consumption of electricity, calibrated in view of his lifestyle (his preferences, the size and thermal insulation of his housing,...) and the electricity price. He can deviate from his original demand, by reducing both the average level of his consumption and its volatility if he has incentives to do it. The reduction of the consumption volatility can also be seen as an increase of consumer's responsiveness. His efforts are costly, and may depend on the nature of the corresponding usage of electricity (heating or air conditioning, lightning, television, washing machine, computers...). The Principal – She – is a risk–averse CARA producer who has to satisfy the random electricity demand of the consumer. She is subject to energy generation costs, and also to consumption volatility costs, which account for the limited flexibility of electricity production. As always in contracting theory, she wants to find an optimal way to encourage the Agent to reduce the mean and the volatility of his consumption, in order to minimise the costs she faces. However, in a moral hazard framework, she cannot offer a compensation directly related to Agent's effort, because she cannot observe the latter, and she only observes Agent's deviation consumption in continuous–time. Thanks to the recent works of <cit.>, the optimal contract in this framework consists in a sum of a deterministic payment that depends on the duration of the demand response, a linear payment on each infinitesimal deviation, and a linear payment on the realised squared volatility. The main results of this model are that optimal contracting allows the system to bear more risk as the resulting volatility may increase, and that the control of the consumption volatility can lead to a significant increase of responsiveness. 



In our paper, we extend the framework defined in <cit.> to a model with a continuum of Agents with mean–field interaction, whose consumption is impacted by a common noise. Until now, continuous–time Principal–Agent models with many agents were restricted to drift control, see <cit.>, <cit.>, or <cit.> for a finite number of interacting Agents, or <cit.>, and more recently <cit.> for a continuum of Agents without any correlation[There was a much larger number of attempts in static or discrete–time settings, but always with finitely many agents. We refer the reader to the most notable works in this direction, among which we can find <cit.> as well as <cit.> or <cit.>.]. The first motivation behind our extension is that it seems more realistic that the producer does not consider the agents one by one, but wants to optimise the consumption in mean for a large pool of similar and correlated consumers. Therefore, we consider that each consumer can deviate from his baseline consumption, and each consumption is subject to a common noise, which accounts for the common random environment where all the consumers evolve. In regard to energy, this common random environment can for instance be interpreted as consequences of meteorological variations. Hence, the problem of the producer is to manage a pool of similar consumers, whose consumption is subject to the same climate hazards. The second motivation is that considering a continuum of consumers with mean–field interaction can be profitable for the producer, as she has access to more information by observing all consumption profiles. Apart from the mean–field aspect and the correlation between Agents through the common noise, the problem formulation is voluntarily as close as possible to that of <cit.>, and is developed in Section <ref>.
 Nevertheless, due to the complexity induced by the presence of a continuum of consumers in interaction, we do not rely on the results of <cit.>, besides some straightforward algebra, and need to develop new techniques. More precisely, we simply adopt a similar framework, and use the calibrated parameters for our numerical part, while our technical results are inspired by the general framework developed by <cit.>, which we extend to a continuum of Agents with mean–field interactions.



We work under a classical mean–field framework, where all agents are identical: all consumers have the same characteristics, the same costs, the same risk–aversion parameter. This assumption is justified for a major electricity producer or provider, who has a sufficiently large number of similar consumers. It allows us to restrict the analysis to a representative Agent, who is a single consumer identical to others, and too small to have an impact on the global consumption. Moreover, this framework prevents us from indexing the compensation of a consumer on a particular consumption profile, except his own. This is indeed the case in the energy sector: the General Data Protection Regulation specifies that the Energy Distribution Organising Authorities (EDOA), the licensing authorities, have only the right to access aggregated (and therefore anonymous) data on electricity production and consumption in a given territory[Decree No. 2017-948 of 10 May 2017 on the procedures for making electricity and gas consumption data available to consumers and Decree No. 2017-976 of 10 May 2017 on the procedures for consumers to access electricity or natural gas consumption data and for suppliers to make such data available.]. Moreover, in France, a report[Pack de conformité pour les Compteurs communicants [Compliance package for communicating meters], Commission Nationale de l'Informatique et des Libertés [National Commission for Information Technology and Liberties].] stipulates that a provider or social landlord may use a person's consumption data to compile statistics, if the data are anonymous or aggregated and therefore do not allow the identification of a physical person.



The goal of this paper is thus to find a way for the Principal to benefit from dealing with a continuum of consumers. The idea we develop is to add a component to the relevant contract proposed by the Principal to an Agent in models with volatility control, as in <cit.>, which consists in two parts:

    
  * one is indexed on the process controlled by the Agent, to incentivise him to make an effort on the average of his process;
    
  * the second is indexed on the quadratic variation of the process controlled by the Agent, and incentivises him to make an effort on the volatility of his process. 

Indeed, in our framework and taking into account the development of smart–meters, the Principal has access to a large quantity of anonymous consumption profiles. Therefore, she can compute empirical statistics from these data points. In particular, she can approximate the conditional law, with respect to the common noise, of the deviation consumption of the pool of consumers she manages. Indeed, this law is the limit of the empirical distribution of N–Agent's deviation consumption, and is conditional because of the correlation of the consumption by the common noise. Hence, she can for instance design a new contract in order to penalise a consumer who makes less effort, on average, than the rest of the pool, or to reward him if he makes more effort. The corresponding penalisation/reward is paid at a future time fixed in the contract. This approach is motivated by the recent development of applications that make it now possible to compare one's own consumption with that of similar households, or even with the lowest consuming households[see for example the phone application EDF & Moi by the french electricity producer and provider Electricité de France, or the website of Synergy, an Australian producer and provider.]. Moreover, results of the study by <cit.> on energy efficiency have shown that comparing energy usage with similar households or providing financial incentives can lead to an average reduction in household energy usage of 7%. They found on the one hand that the communication of the average consumption incentivises people to reduce their own consumption, and on the other hand that financial compensations are an efficient way to reduce consumption. Towards this objective, we study a new class of contracts, adding to the relevant contract for drift and volatility control, a component indexing the contract on the law of the deviation consumption of other consumers. Section <ref> is devoted to the intuition leading to this new type of contracts and the formal proofs are  postponed in Appendix <ref>. This section also investigates the representative consumer's optimal response to the proposed contract as well as the resulting mean–field equilibrium between consumers. 



The resolution of the producer's problem is discussed in Section <ref>. Based on the results of Section <ref>, the Principal's problem is reduced to a McKean–Vlasov problem, because she impacts through the contract, and so somehow indirectly controls, the efforts of the Agents as well as the conditional law of the consumption deviation of the Agents. The intuition for the Principal's problem in this mean–field framework comes from the N–Agents case. Following the reasoning of Élie, Mastrolia and Possamaï in <cit.>, without common noise and for CARA utility function, the Principal becomes risk–neutral in the limit when N ⟶ + ∞, by classical propagation of chaos arguments. However, in our framework, with common noise, the consumption deviations of the Agents become asymptotically independent, conditionally to the common noise. Therefore, a risk–averse Principal does not become risk–neutral in our case, and remains impacted by the residual risk arising from the common noise. Nevertheless, in addition to the case of a risk–averse Principal, we will study the case where her risk–aversion tends to zero, i.e., the case of a risk–neutral Principal. The study of the first–best case, when there is no moral hazard and thus the Principal can directly choose the efforts of the consumers, is  postponed to Appendix <ref>. 



The main point of this work is to prove that the new contracts we developed are more profitable than the traditional ones. Section <ref> is devoted to this comparison, by implementing classical contracts in our framework. In order to have closed–form solutions, we focus on a particular case: the linear energy value discrepancy case. The energy value discrepancy is the difference between a consumer's preference toward his deviation consumption and the production costs of this deviation. If this difference is positive, this means that the energy is more valuable for the consumer than it is costly for the producer. Conversely, if the difference is negative, a decrease in consumption will have less negative effects on a consumer's welfare than positive effects on the producer's savings. If this difference is linear with respect to the deviation consumption, it is easy to show that the utility of the producer is increased by the use of our new contracts. Moreover, in most cases, these new contracts induce more efforts from the consumers to reduce the average level of their consumption and with less volatility. More precisely, by using the values of the parameters calibrated in <cit.>, we can see an increase:

    
  * in the utility of the Principal up to 50% (respectively 15%);
    
  * in the effort to reduce the average consumption up to 50% (resp. 30%);
    
  * in the variance responsiveness up to 4% (resp. 3%);

depending on the correlation with the common noise, for a risk–neutral Principal (resp. for a Principal with the risk–aversion calibrated in <cit.>). Moreover, the greater the variance explained by the common noise, the more significant the results are. Therefore, these new contracts could improve demand response during periods where consumption is strongly affected by weather conditions, for example in winter, when the risk of electricity blackouts is high, and thus demand response is more than needed.



Throughout this work, we consider a Principal who can not observe the common noise, or at least that there exist some regulatory rules preventing her from using the common noise directly in the contract. This hypothesis is relatively well established in the field of energy consumption. Although some electricity suppliers offer different prices depending on the day or time of consumption (peak–period, off–peak period...), called time–variant pricing[see for example the proposal of the Environmental Defense Fund in <https://www.edf.org/sites/default/files/time-variant_pricing_fact_sheet_-_april_2015.pdf>], these tariff offers correspond more to an indirect indexation on the weather through the spot price of electricity. We find that the indexation of the contract on others is another way to indirectly index the contract on weather. Indeed, it allows the Principal to divide the deviation consumption in two parts: the part actually controlled by the Agent, corresponding to the deviation corrected for climate hazards, and the common noise. Hence, she can offer a compensation indexed on the really controlled deviation to encourage the Agent for making effort. If she is risk–averse, she can add to this contract a part indexed on others, which is in fact an indexation on the common noise, to share the remaining risk, even if regulatory rules prevent her from using the common noise directly in the contract. Therefore, in the case where the Principal is allowed to index the contract on the common noise, studied in Section <ref>, we obtain the same form of contracts. We thus conclude that contracting on the conditional law or on the common noise is strictly equivalent.



In addition to the practical contributions of our model, we develop along the way new technical results. As explained in <cit.>, moral hazard problems in continuous–time in which the Agent controls the volatility of the output are notoriously harder to study. As such, and as far as we know, our model is the first one which combines a multi–agent setting (actually continuum of agents with mean–field interaction), with both drift and volatility controlled. Moreover and unlike in <cit.>, or <cit.>, we also consider a setting with common noise. Though natural to model electricity consumers, the common noise induces a wide range of additional mathematical difficulties, which have only been recently addressed, see <cit.>, albeit only for pure mean–field games, without an additional Stackelberg on top, as in our setting. In particular, and again unlike in <cit.> or <cit.>, the simplifying class of contracts we derive in Section <ref> cannot be proved almost by definition to be without loss of generality, and we need to use generalised notions of mean–field second–order BSDEs to obtain this fundamental result. Moreover, we emphasise that even though we work with a specific model, the modus operandi we develop in this paper can readily be extended to general moral hazard problems with a continuum of Agents with mean–field interaction and common noise. This is one of the reasons why we have made specific efforts to ensure that all our statements and definitions are completely mathematically rigorous, in particular the definition of the weak formulation for mean–field games with common noise and optimal control problems of McKean–Vlasov stochastic differential equations, as these two tools are the fundamental cornerstones of our approach. We believe that this will prove useful for other applications and generalisations of our techniques. 


In summary, this paper is organised as follows. Section <ref> describes the model. Section <ref> provides the class of optimal contracts, and solves the representative consumer's problem, as well as the mean–field equilibrium. Section <ref> is devoted to solve the Principal's problem under moral hazard with the new contracts. Section <ref> allows the comparison of utilities and efforts with the case where only classical contracts are offered to the consumers. Section <ref> provides the results when the contracts can be indexed directly on the common noise, and we investigate in Section <ref> the first–best problem, as a benchmark in which the Principal can directly monitor the efforts of the Agents. Section <ref> concludes. 




Notations.  Throughout this paper, T>0 denotes some maturity fixed in the contract. We set d a positive integer representing the number of different usages of electricity. Let ℕ^⋆ :=ℕ∖{0}. Throughout this paper, for every d–dimensional vector b with d ∈ℕ^⋆, we denote by b^1,…,b^p its coordinates, for any 1≤ i≤ d. Let 0_d and 1_d be the vectors of size d whose coordinates are all equal to respectively 0 and 1. For any (ℓ,c)∈ℕ^⋆×ℕ^⋆, we identify ℝ^ℓ× c with the space of ℓ× c matrices with real entries. Elements of the matrix M∈ℝ^ℓ× c will be denoted by (M^i,j)_1≤ i≤ℓ,  1≤ j≤ c, and the transpose of M will be denoted by M^⊤∈ℝ^c×ℓ. For any positive integer n and for (α,β) ∈^n×^n we also denote by α·β the usual inner product, with associated norm ·.



For any positive integer n, and any t ∈ [0,T], let _t^n :=  ( [0,t], ^n) denote the set of continuous functions from [0,t] to ^n, and _t := _t^1. On ( [0,t], ^n), define for s ∈ [0,t] the evaluation mappings π_s by π_s(x) = x_s and the truncated supremum norms ·_s by

    x _s = sup_u ∈ [0,s]x_u,   for  s ∈ [0,t].

Unless otherwise stated, _T^n is endowed with the norm ·_T. 



For a measurable space (Ω, ), let (Ω) denote the set of probability measures on (Ω, ). In particular, for t ∈ [0,T], we denote by (_t^n) the set of all probability measures on ([0,t],^n). For μ∈ (_T^n), let μ_t ∈ (_t^n) denote the image of μ under π_·∧ t. For p ≥ 0 and a separable metric space (E, ℓ), let ^p(E) denote the set of μ∈(E) with ∫_E ℓ^p (x, x^∘) μ (  x) < + ∞ for some (and thus
for any) x^∘∈ E. For p ≥ 1 and μ, ν∈^p(E), let ℓ_E,p denote the p–Wasserstein distance, given by

    ℓ_E,p (μ, ν) := inf{( ∫_E × Eℓ^p (x, y) γ ( x,  y) )^1/p : γ∈ (E × E)  has marginals μ, ν}.

The space ^p(E) is equipped with the metric ℓ_E,p, and (E) has the topology of weak convergence. Both are equipped with the corresponding Borel σ–fields, which coincides with the σ–field generated by the mappings μ∈^p(E) (resp. (E))  ⟶μ(F), F being any Borel subset of E.







§ PROBLEM FORMULATION

































































    




















 §.§ Informal description







We work under a classical mean–field framework, where all agents are identical: all consumers have the same characteristics, the same costs, the same risk–aversion parameter... We thus restrict our study to a representative Agent, who is a single consumer, identical to a pool of others, and too small to impact the global consumption. In order to properly define the mathematical set up of our problem, we need a process representing the deviation consumption of the representative Agent, driven by an idiosyncratic noise for each usage (d–dimensional) and a common noise (1–dimensional). The Agent controls this process by choosing a pair ν := (α, β), where α and β are respectively A– and B–valued, see (<ref>) below for the precise definition of A and B. We denote for simplicity U:= A × B. More specifically, α represents the effort of the consumer to reduce the nominal level of consumption and β is the effort to reduce the variability of his consumption for each usage of electricity. We emphasise that α and β are d–dimensional vectors, thus capturing the differentiation between different usages, e.g. refrigerator, heating or air conditioning, lightning, television, washing machine, computers... The set of admissible efforts, denoted by = 𝒜×ℬ, will be defined rigorously in the next subsection. We also define a vector σ∈(0,+∞)^d representing the variability of the Agent's consumption when he does not make any effort, and a constant σ^∘∈_+ representing the correlation with the common noise. Therefore, for a chosen control ν = (α, β) ∈, the Agent's control process can be written informally, for any t∈[0,T], as

    X_t    = x_0 - ∫_0^t α_s · 1_d  s + ∫_0^t  σ (β_s) · W_s + ∫_0^t σ^∘ W^∘_s, with σ (b) := ( σ^1√(b^1),…, σ^d√(b^d))^⊤,  for  b∈(0,1]^d.


The state variable X represents the consumer's deviation from the deterministic profile of his consumption. An effort ν induces a separable cost c(ν) := 1/2 c_α (α) + 1/2 c_β (β), where:

    c_α(a)    := ∑_k=1^d ( a^k )^2 ρ^k,   a ∈ A,  and   c_β(b) := ∑_k=1^d ( σ^k )^2 λ^kη^k( ( b^k )^- η^k -1 ),   b ∈ B,

for fixed (ρ,λ,η)∈ (0,+∞)^d× (0,+∞)^d× (1,+∞)^d. In particular, the cost of the effort in the drift term of X, denoted by c_α, is a classical quadratic cost function, meaning that no effort for the Agent induces no intrinsic cost, and such that he has no interest to provide negative efforts. The cost associated with the effort in the volatility of X prohibits the Agent from removing the volatility (b^k >0) and is equal to zero if the Agent makes no effort (case b^k=1). For technical reasons, we need to consider bounded efforts[Note that since X is a deviation from a baseline consumption, the upper bound for the drift control is coherent, since the agent cannot consume a negative amount of electricity.], we then set

    A := [0, ρ^1 A_max ] ×…× [0, ρ^d A_max ]   and   B:= [B_min, 1]^d,

for some constants A_max > 0 and B_min∈ (0,1).



 One may note that, apart from the term induced by the common noise W^∘, the previously defined mathematical set up is voluntarily the same as in <cit.>. Nevertheless, the introduction of the common noise forces us to rigorously write the definition of the weak formulation. In the following sections, we properly define a canonical space Ω for the representative Agent in Subsection <ref>, as well as a canonical space Ω for others in Subsection <ref>.




 §.§ Theoretical formulation





  §.§.§ Canonical space for the representative Agent


To be consistent with the weak formulation of control problems, we let 𝕌 be the collection of all finite and positive Borel measures on [0,T]× U, whose projection on [0,T] is the Lebesgue measure. In other words, every q ∈ can be disintegrated as q(ds,d v)=q_s(d v)ds, for an appropriate Borel measurable  kernel q_s. The weak formulation requires to consider a subset of , namely the set _0 of all q ∈ such that the kernel q_s is of the form δ_ϕ_s(d v) for some Borel function ϕ, where as usual, δ_ϕ_s is the Dirac mass at ϕ_s.



In order to combine the theoretical formulations of mean–field games and McKean–Vlasov problems, we are led to consider the following canonical space

    Ω :=  Ω^∘×Ω^1 ×Ω^2 ×,  where  Ω^∘ := _T,  Ω^1 := _T ×_T^d,  and  Ω^2 :=  (_T),

recalling from the notations that _T^d := ([0,T], ^d) and _T := ([0,T], ), with canonical process (W^∘, X, W, μ, Λ), where for any (t, w^∘, x, w, u, q) ∈ [0,T] ×Ω,

    W^∘_t(w^∘,x,w,u,q):=w^∘(t),   X_t(w^∘,x,w,u,q) :=x(t),  W_t(w^∘,x,w,u,q):=w(t),

    


    μ_t(w^∘,x,w,u,q):=u(t), and Λ_t(w^∘,x,w,u,q):=q.


Less formally, X represents the deviation consumption controlled by the representative consumer, affected by an idiosyncratic noise W and a common noise W^∘. The process μ allows to keep track of the law of X conditionally to the common noise and the space  corresponds to the controls. The canonical filtration :=(_t)_t∈[0,T] is defined as

    ℱ_t:=σ( (W^∘_s, X_s, W_s, μ_s, Δ_s(φ) ): (s,φ)∈[0,t]×_b ( [0,T]× U, ) ),  t∈ [0,T],

where _b([0,T]× U,) is the set of all bounded continuous functions from [0,T]× U to , and for any (s,φ)∈[0,T]×_b([0,T]× U,), Δ_s(φ):=∫_0^s∫_U φ(r,v ) Λ(dr,d v).





We will also need a smaller filtration containing only the information generated by the common noise and the conditional law of X. Namely, we define ^∘:=(^∘_t)_t∈[0,T] by ^∘_t:=σ((W^∘_s,μ_s):s∈[0,t]),  t∈[0,T].


The restriction to the filtration ^∘ stems from the presence of common noise in our model. As pointed out by <cit.>, it is commonplace for control problems in weak formulation, and actually already for weak solutions to SDEs, that the underlying driving noise is not rich enough to obtain a solution which is only adapted to it. In our context, this translates into the fact that in general the law of X may fail to be measurable only with respect to the information generated by the common noise W^∘, which justifies the enlargement in the definition of ^∘. This is linked to the so–called compatibility condition in the MFG theory with common noise, which intuitively means that a given player in the game does have access to the full information generated by the idiosyncratic and common noises W and W^∘, as well as the distribution of all other players' states, and his controls are allowed to be randomised externally to these observations, but such a randomisation must be conditionally independent of future information given current information.



Let ^2_b(ℝ×^d ×,) be the set of bounded twice continuously differentiable functions from ℝ×^d × to , whose first and second derivatives are also bounded, and for any (s,φ)∈[0,T]×^2_b(ℝ×^d ×,), we set

    M_s(φ):=    φ(X_s,W_s,W^∘_s) - ∫_0^s ∫_U( A(v) ·∇φ(X_r,W_r,W^∘_r) + 1/2 Tr[ D^2 φ(X_r,W_r,W^∘_r) B(v)  B^⊤ (v) ] )Λ(dr, d v),

where D^2 φ denotes the Hessian matrix of φ, A and B are respectively the drift vector and the diffusion matrix of the vector process (X, W, W^∘)^⊤

    A(v) := 
        [ - a ·1_d;      0_d;        0 ],
          
        B(v) :=
        [        0 σ^⊤( b )      σ^∘;      0_d      I_d      0_d;        0    0_d^⊤        1 ],  v:=(a,b)∈ U.


Therefore, the covariation matrix of the vector process (X, W, W^∘)^⊤ is defined for all v ∈ U by

    B(v) B^⊤ (v) =
        [ Σ(b) + (σ^∘)^2       σ^⊤( b )            σ^∘;        σ ( b )            I_d            0_d;            σ^∘          0_d^⊤              1 ],

where Σ(b) := σ^⊤(b) σ (b) for all b ∈ B. We fix some initial conditions, namely a probability measure ϱ on  representing the law at 0 of X. 

 
Let  be the set of probability measures on (Ω,_T). The subset ⊂ is composed of all  such that

    
  * M(φ) is a (,𝔽)–local martingale on [0,T] for all φ∈^2_b(×^d ×,);
    
  * ∘ (X_0)^-1 = ϱ, and there exists a measure ι on ℝ^d×ℝ such that ∘((W_0,W_0^∘))^-1 = ι;
    
  * [Λ∈_0]=1;
    
  * for –a.e. ω∈Ω and for every t ∈[0,T], we have μ_t(ω)=^ω_t ∘ (X_t∧·)^-1, 
    where (_t^ω)_ω∈Ω is a family of regular conditional probability distribution[We recall that these objects are such that for any ω∈Ω, _t^ω is a probability measure on (Ω,), such that for any A∈, the map ω⟼_t^ω[A] is ^∘_t–measurable, and such that for any –integrable random variable ξ on (Ω,), we have
    
    𝔼^[ξ|^∘_t](ω)=^_t^ω[ξ], for –a.e. ω∈Ω.
 
    Notice that since (Ω,) is a Polish space and _t^∘ is countably generated, the existence of these r.c.p.d. is guaranteed for instance by <cit.>. ] (r.c.p.d for short) for  given _t^∘. We will denote by ^_t^ω the expectation under the distribution _t^ω. For ease of notation, we will often omit the ω in the notation for the expectation;
    
  * (W^∘,μ) is –independent of W.



 Roughly speaking, the set  represents the set of admissible controls in the weak formulation. Nevertheless, the previous formulation does not give us access directly to the dynamic of the consumption deviation X. It is however a classical result that, enlarging the canonical space if necessary, one can construct Brownian motions allowing to write rigorously the dynamics (<ref>), see for instance <cit.>. It turns out here that since we enlarged the canonical space right from the start to account for the idiosyncratic and common noises, any further enlargement is not required,  see Lemma <ref> below, whose proof is  deferred to Appendix <ref>.

    For all ∈, Λ(ds,d v) = δ_ν^_s(d v)ds –a.s., for some –predictable control process ν^ := ( α^, β^) and 
    
    X_t    = X_0 - ∫_0^t α^_s · 1_d  s + ∫_0^t  σ (β^_s) · W_s + ∫_0^t σ^∘ W^∘_s,  t∈[0,T],  -a.s.


 Notice that, thanks to the previous lemma, the set = 𝒜×ℬ of admissible efforts, introduced at the beginning of Section <ref>, is now well defined.
























In order to apply the chain rule with common noise, as defined in <cit.>, we will need a copy of the process X, denoted by X, driven by the same common noise W^∘, and with the same conditional law μ. For this purpose, we need to define a copy of the initial canonical space.

    Let Ω be a canonical space of the form Ω :=  Ω^∘×Ω^1 ×Ω^2 ×. A copy of Ω is defined by Ω := Ω^∘×Ω^1 ×Ω^2 × where Ω^1 and  are respectively standard copies of the spaces Ω^1 and .

This canonical space Ω is supporting a canonical process (W^∘, X, W, μ, Λ), and the canonical filtration :=(_t)_t∈[0,T] is defined exactly as .








For a given probability ∈, we can associate in a unique way a probability  satisfying Definition <ref> on ( Ω, _T ), where, in particular,  and  have the same r.c.p.d.

Therefore, abusing notations slightly, ^_t will stand for the expectation on (Ω, _T) under the r.c.p.d. _t for ∈ given _t^∘. Then, by Lemma <ref>, for any , we have Λ(ds,d v) = δ_ν^_s(d v)ds –a.s., for some –predictable process ν^ := ( α^, β^) and

    X_t = X_0 - ∫_0^t α^_s · 1_d  s + ∫_0^t  σ (β^_s) ·W_s + ∫_0^t σ^∘ W^∘_s,   t∈[0,T],  -a.s.


    The process X defined above by (<ref>) is called a copy of X.




  §.§.§ Canonical space of other Agents


 To model the deviation consumption of other consumers (that is the ones different from the representative agent), affected by the same common noise W^∘, we need to define an alternative probability space Ω by Ω := Ω^∘×Ω^1 ×Ω^2 ×. This canonical space is supporting a canonical process (W^∘, X, W, μ, Λ), and the canonical filtration :=(_t)_t∈[0,T] is defined in the same way as .



We let  be the set of all probability measures on ( Ω, _T ), we can then define the subset ⊂ in the same way we define ⊂ in Definition <ref>. In particular, the notation ^_t will stand for the expectation under the r.c.p.d. _t of ∈ given ^∘_t, on the space (Ω, ). Still applying Lemma <ref>, for any ∈, we can write

    X_t    = X_0 - ∫_0^t α^_s · 1_d  s + ∫_0^t  σ (β^_s) ·W_s + ∫_0^t σ^∘ W^∘_s,  t∈[0,T],

where ν^ := ( α^, β^) is some –predictable control process, chosen by others, satisfying Λ(ds,d v) = δ_ν^_s(d v)ds –a.s.  Notice that this allows us to properly define the set = 𝒜×ℬ of admissible efforts of others.



Copies of the deviation consumption of others, denoted by X, are defined in the same way as copies X of X by Definition <ref>, on the space Ω: = Ω^∘×Ω^1 ×Ω^2 ×, itself a copy of Ω in the sense of Definition <ref>. This space is supporting a canonical process and the associated canonical filtration := ( _t )_t ∈ [0,T]. The notation ^_t stands for the expectation under the r.c.p.d. _t on the space ( Ω,). 



 In words, the canonical process (W^∘, X, W, μ, Λ) defined on the space Ω represents the choices of the representative Agent regarding his deviation consumption. Similarly, the canonical process (W^∘, X, W, μ, Λ) defined on Ω allows us to represent the choices of other consumers, which may be different from the representative consumer, but are affected by the same common noise W^∘. Then, notations involving · will refer to copies of the initial space Ω, while notations involving · will refer to copies of the canonical space of others Ω.
In order to compute his terminal payment ξ, the representative Agent is going to assume that the others have played some distribution μ (mainly the conditional law of X under some ∈ given ^∘ on (Ω, _T)), and he is going to compute ξ along his own deviation X and μ.













 §.§ Definition of a contract


In the work <cit.>, the Principal – an energy producer – offers a contract to an Agent – a consumer – indexed on his deviation consumption. In our investigation, the Principal faces a continuum of Agents with mean–field interaction and can therefore benefit from this additional information: she can offer contracts depending on both the deviation of a given consumer, and the aggregate statistics of the deviation of other consumers. 

In the framework we are interested in, the electricity producer is not allowed to reveal the consumption of a particular consumer to another consumer. Hence, she cannot directly design a remuneration for a consumer with respect to the deviation consumption of another dedicated one. This is why we consider aggregated statistics in this case. We insist on the fact that it is a legal requirement for electricity producers to respect the privacy of their consumers, even when they have access to their consumption profile through modern smart–meters. Moreover, in accordance with the mean–field framework, the Principal is facing a mass of identical and indistinguishable consumers, and thus can not choose a deviation consumption of another consumer to contract on it. Formally, the Principal proposes to the representative Agent a contract ξ which is a random variable measurable with respect to the natural filtration generated by both X, μ, denoted ^obs, recalling that:

    
  * X is the deviation consumption of the representative Agent,
    
  * μ is the law of the deviation consumption of other Agents, conditionally to the common noise. 


In other words, ξ must be a measurable functional of the paths of X and μ:

    ξ : (X, μ) ∈_T × (_T)  
        ⟼ξ (X, μ) ∈ℝ.



    Considering the conditional law μ naturally comes from the limit of the N–Agents case. Indeed, if the Principal monitors N consumers, she wants to index the contract for the i–th consumer on his own deviation X^i and on the empirical distribution of other consumers, μ^-i, defined as: 
    
    μ^-i := ( 1N-1∑_j=1, j≠ i^N δ_X_t^j)_t ≥ 0

    where the deviations X^j are not independent since all consumers are suffering from the common noise W^∘. Hence, in the mean–field framework, we may wonder about the convergence of the empirical measure μ^-i_t as N tends to ∞. In the absence of the common noise, the standard theory of propagation of chaos applies: asymptotically, particles become independent and the μ^-i_t converges to their common asymptotic distribution. By contrast, when there is a common noise, even in the limit N ⟶∞, the particles must still keep track of the common noise W^∘, so they cannot become independent. Nevertheless, it has been proved in <cit.> that particles become asymptotically independent conditionally on the common noise, and that the empirical distribution converges towards the common conditional distribution of each particle given the common noise (μ in our case).




Given this contract, and the conditional law of the deviation consumption of other consumers μ, the representative consumer solves the following optimisation problem

    V^A_0 ( ξ, μ) := sup_∈ J_0^A(ξ, μ, ),  where  J_0^A(ξ, μ, ) := 𝔼^ℙ[ U^A ( ξ(X, μ) - ∫_0^T ( c ( ν^_t ) - f ( X_t ) ) d t ) ],

where c:_+^d × (0,1]^d ⟶ℝ_+ is the cost function associated with the effort ν made by the Agent, and the function f:ℝ⟶ℝ denotes the preference of the Agent toward his deviation consumption. The function f is required to be concave, increasing, and centred at the origin. This means that the reduction of the Agent's consumption causes him discomfort, and conversely, if the consumption deviation is non-negative, the agent consumes more electricity, which gives him satisfaction. Closed–form solutions will be obtained for linear f. The function U^A is an exponential utility function, with risk aversion parameter of the representative consumer R_A>0, defined by U^A (x) = - ^-R_A x.  One may note that, apart from the contract dependency, the Agent's problem is identical to the one defined in <cit.>.



For V_0^A(ξ,μ) to make sense, we require minimal integrability on the contracts, by imposing that

    sup_∈^[ ^pR_A|ξ|]<+∞,  for some  p > 1.

In addition and for technical reasons, we restrict our attention to contracts ξ satisfying also the technical assumption (<ref>) given below, only necessary in order to solve the problem of a CARA risk averse Principal (and useless to solve the Agent problem). These two technical assumptions are always satisfied in the application to linear energy value discrepancy (see Section <ref>).
Moreover, as usual in contract theory, we assume that consumers have an endogenous reservation utility R_0<0, below which they refuse the contract offered by the producer. The underlying idea is that without compensation (that is for ξ=0), a consumer could already exert efforts and modify his consumption, and thus receive utility R_0. He thus would, of course, refuse any contract which does not provide him with at least what he could get by himself[We refer to Appendix <ref> for more details on how to compute the value of R_0.]. The corresponding class of contracts of the form (<ref>), satisfying (<ref>), (<ref>), and the participation constraint, is denoted by Ξ.



Finally, notice here that the contracts offered by the Principal have been assumed to not be indexed on the common noise W^∘. This can either mean that the Principal cannot observe it perfectly, or that there are regulatory reasons preventing the producer from using it directly in the contract. However, our formulation allows to incorporate the case where this becomes possible. Thus, in Section <ref>, we will study the case where the Principal is allowed to use the common noise directly in the contract. In this particular case, she can offer to the representative Agent a contract ξ, measurable with respect to the natural filtration generated by X, W^∘ and μ, denoted by ^obs,∘. In other words, ξ must be in this case a measurable functional of the paths of X, W^∘ and μ:

    ξ : ( X, W^∘, μ) ∈_T ×_T × (_T) ⟼ξ( X, W^∘, μ) ∈ℝ.







The corresponding class of contracts will be denoted by Ξ^∘.





 §.§ Definition of a mean–field equilibrium


We work under a classical mean–field framework, where all agents are identical. Hence, similarly to <cit.>, we define a mean–field equilibrium as follows.

    Let ξ∈Ξ be a contract. We denote by ^⋆ (ξ) the collection of all mean–field equilibria, i.e., pairs (^⋆, μ^⋆) ∈× (_T) such that

    
  * given μ^⋆∈ (_T), the probability ^⋆∈ is optimal for (<ref>), i.e.,
    
    V^A_0(ξ, μ^⋆) = 𝔼^ℙ^⋆[ U^A ( ξ (X, μ^⋆) - ∫_0^T ( c ( ν^^⋆_t ) - f ( X_t ) ) d t ) ];

    
  * for ^⋆–a.e. ω∈Ω and for every t ∈ [0,T], we need to have
    
    μ^⋆_t(ω)=^ω_t ∘ (X_t ∧· )^-1,

    where (_t^ω)_ω∈Ω is a family of regular conditional probability distribution for ^⋆ given _t^∘. 

We extend readily this definition to contracts in Ξ^∘, and denote by ^⋆,∘(ξ) the associated set of mean–field equilibria.



Less formally, a mean–field equilibrium is characterised by

    
  * a probability law ^⋆ of a process X^⋆, which is the optimal deviation consumption of each Agent;
    
  * the conditional law μ^⋆ of X^⋆ with respect to the common noise.

    The attentive reader may note that our definition of a mean–field equilibrium, mainly the fixed point constraint, involves the probability measure on the path space, i.e., μ^⋆∈(_T). Although this is not standard in the theory of mean–field games in a Markovian setting, this makes sense in our non–Markovian framework, and a similar condition can be found in the work of <cit.>.





















 §.§ The Producer


We now turn to the problem of the Principal.
In the one Agent framework defined in <cit.>, the Principal has an exponential utility function, with risk–aversion parameter R_P>0, defined by U^P (x) = - ^-R_P x and wants to minimise:

    
  * the compensation paid to the Agent: ξ.
    
  * the cost of production, corresponding to additional costs induced by the deviation consumption: g (X_t), where g is concave and increasing. It means that if the Agent's deviation consumption is positive, the consumption has increased, hence the Principal has an additive cost of production. Conversely, a negative deviation consumption means that the consumption is decreasing, hence the Principal benefits from a decrease of production costs. 
    
    
  * the quadratic variation of the deviation consumption: ⟨ X⟩_t. This penalisation term allows the Principal to take into account the variations of consumption over time. This additional cost is particularly relevant in electricity markets, since the Producer has to follow the load curve, and the higher the volatility of the consumption, the more costly it is.







The intuition for the Principal problem in the mean–field case comes from the N–Agents case. Formally, if we consider a N–players model, the Principal would minimise the (utility of the) sum of the previous costs. To ensure stability of these sums as N grows, and therefore obtain a mean–field limit of the N–Agents problem, we can follow the line of <cit.> by assuming that each individual deviation consumption is scaled by the total number of Agents N. In their framework, without common noise and also with exponential utility functions, the Principal becomes risk–neutral in the limit when N ⟶ + ∞, by classical propagation of chaos arguments. Another interpretation of the risk–neutrality of the Principal in this case is that the Principal is diversifying the risk by considering a large number of consumers: the random average penalised output in the N–players’ game converges to a deterministic quantity. In our framework, with common noise, as explained in Remark <ref>, the consumption deviations of the Agents become asymptotically independent, conditionally to the common noise. Therefore, a risk–averse Principal does not become risk–neutral in our case, and remains impacted by the residual risk arising from the common noise. Nevertheless, we will consider both cases of a risk–averse and a risk–neutral Principal.



As a consequence, similarly to <cit.> and <cit.>, given a contract ξ, the performance criterion of the Principal is defined by

    J^P_0 (ξ, )    := 𝔼^[ U^P ( - 𝔼^[ξ+∫_0^Tg(X_s)ds+θ/2∫_0^Td⟨ X⟩_s| ^∘_T] )  ],  for any ℙ∈𝒫,

where the function U^P: ⟶ is the Principal's utility function and θ is a positive constant representing the costs induced by the quadratic variation of the consumption, accounting for the limited flexibility of production.



Anticipating the results we obtain in Section <ref>, for a contract ξ∈Ξ, any mean–field equilibrium (^⋆,μ^⋆) ∈^⋆ (ξ) will give the same utility to the consumers, since they all have the same characteristics. Furthermore, in the absence of limited liability in our model (compensations ξ need not be non–negative), the participation constraints of the consumers is going to be saturated, meaning that any optimal contract will provide them exactly their reservation utility level. Therefore, in the case where an optimal contract would lead to several possible equilibria, the consumers will be indifferent to the specific one chosen, implying that we can reasonably assume, as in the standard moral hazard literature, that the Principal can maximise her utility by choosing the optimal equilibrium for her. This leads to the following second best contracting problem

    V_0^P :=  sup_ξ∈Ξ sup_(,μ) ∈^⋆ (ξ)  J_0^P (ξ, ),

with the usual convention sup_∅ = - ∞. Notice that for the contracts in the class we will end up considering, there is only one possible equilibrium, which makes the above issue not really central to our analysis.



In the moral hazard contracting problem considered here, the Principal has an interest in giving a contract for which there is at least a mean–field equilibrium, otherwise, by convention, her utility is equal to - ∞. Thus, contracts ξ∈Ξ such that ^⋆ (ξ) = ∅ will never be offered by the Principal, meaning that we can implicitly assume that there always will be an optimal response from the consumers to a contract proposed by the Principal. Moreover, since the contract has to satisfy the participation constraint, there exists (^⋆,μ^⋆)∈^⋆(ξ) such that V_0^A(ξ,μ^⋆)≥ R_0. The set Ξ of eligible contracts is now formally defined. We define similarly Ξ^∘ and V_0^P,∘.

The study of the first–best contracting problem, i.e., when the Principal can observe in continuous–time the efforts of the Agents and thus can index the contract on the latter, is  postponed to Section <ref>.



§ AGENT'S PROBLEM


We consider for now that the Principal only observes X and μ, which means that she is offering a ^obs–measurable contract as in (<ref>). For a given conditional distribution μ for the other players, we consider the dynamic version of the value function of the representative consumer, V_t^A, which satisfies V_0^A = V_0^A (ξ, μ),  and  V_T^A = U^A (ξ (X, μ)). From this definition, we notice that the following explicit relationship between the payoff and the terminal value function holds

    ξ(X, μ) = - 1R_Aln( - V_T^A).


In this section, we will start, for a given contract and given efforts chosen by other consumers, by introducing the appropriate Hamiltonian functional, which will allow to first compute formally the optimal response of the consumer. Intuitively, this Hamiltonian appears by applying the chain rule with common noise defined <cit.> to the dynamic value function of the consumer and considering the associated Master equation. Our next step is then to derive a class of so–called revealing contracts, thus extending to a general mean–field game framework the main arguments of <cit.>, which considered general moral hazard problems with one agent, and <cit.>, which considered mean–field game moral hazard problems where the agents controlled only the drift of the output process X. Informally, the class of revealing contract is obtained by still using the chain rule with common noise, but applying it to a transformed function of the consumer's dynamic value function, defined by (<ref>).  We insist on the fact that the analysis we make in the following subsection, to find the Agent's Hamiltonian as well as the relevant form of contracts, is informal. Indeed, we consider the Markovian framework, that is to say that we suppose that the Agent's dynamic value function at time t only depends on X_t and μ_t, where here, μ_t is the conditional law of X_t (and not of the paths of X up to time t) knowing the common noise. This framework allows us to apply the chain rule with common noise, defined in <cit.>. Nevertheless, the analysis we make, though informal at this point, relies strongly on recent progresses on the dynamic programming approach to the control of McKean–Vlasov SDEs and will rigorously be justified later in the paper, mainly in Appendix <ref>. Indeed, considering simple contracts inspired by the Markovian framework allows us to calculate the optimal efforts of the representative Agent and the associated mean–field equilibrium (see Theorem <ref>) whose proof is based on the theory of second–order BSDEs (2BSDEs for short). The main result of this paper, mainly that the restriction to this type of so–called revealing contracts is in fact without loss of generality, is postponed to the next section (see Theorem <ref>).




 §.§ Intuition from the Markovian framework


One of the cornerstones of the approach to continuous–time moral hazard problems pioneered by Sannikov <cit.>, and studied in full generality in <cit.>, is to obtain an appropriate probabilistic representation for incentive–compatible contracts. The goal of this section is to use informal dynamic programming type arguments to deduce such a representation in a context where a continuum of Agents with mean–field interactions is involved, each of them being able to control the volatility of the output process, and to then prove that mean–field equilibria are easily accessible for this class of contracts.



We fix throughout this section a probability ∈, chosen by other consumers on their own canonical space Ω. Using Definition <ref>, we denote by _t^ω the r.c.p.d. for  given _t^∘, and μ_t the associated conditional law of X_t ∧·. Almost by definition of ∈, more precisely by Lemma <ref>, there exists a control process representing the effort of other consumers, denoted ν:= ( α, β) ∈= ×, such that the dynamic of their deviation consumption X is:

    X_t = - α_t ·1_d  t + σ( β_t ) ·W_t + σ^∘ W^∘_t.

Fixing ∈ thus implies that (μ, ν) ∈(_T) × are fixed too.



Intuitively, in view of (<ref>), we expect that a contract ^obs–measurable is any terminal value of the following process, as a function of t, the path of X up to t, and μ_t, the conditional law of X_t ∧· with respect to the common noise:

    ξ_t    := - 1R_Aln( - V_t^A ) = u^A (t, X_t∧·, μ_t),

where u^A : [0,T] ×_T ×(_T) ⟶. Therefore, the continuation utility V_t^A of the consumer, given a contract ξ∈Ξ and efforts of other consumers subsumed by the distribution μ, may be written as

    V^A_t := v^A (t, X_t ∧·, μ_t),  where  v^A := - ^- R_A ·∘ u^A,

i.e., the process V^A at time t depends on t, on the path history of X, and on the conditional law μ of deviation consumption X of others. Indeed, the contract being only indexed on X and μ, the continuation utility should not depend on all the information contained in  and . 



To find the relevant form of contracts, the intuition is to focus on the Markovian framework, i.e. when the function v^A, and thus the function u^A, only depend on t, X_t, and μ_t, where here, μ_t is the conditional law of X_t (and not of the paths of X up to time t) with respect to the common noise. Note that in this particular case, both v^A and u^A are functions from [0,T] ××() with values in .



  §.§.§ Consumer's Hamiltonian


In the Markovian framework, i.e., when V_t^A only depends on X_t and μ_t where here, μ_t is the conditional law of X_t (and not of the paths of X up to time t) knowing the common noise, and if v^A is smooth enough in the sense of <cit.>, we can apply the chain rule with common noise (for function of both the state and the measure, see <cit.>) to v^A : [0,T] ××() ⟶:

    v^A (t, X_t, μ_t) =     V_0^A 
        + ∫_0^t ∂_s v^A (s, X_s, μ_s)  s 
        + ∫_0^t ∂_x v^A (s, X_s, μ_s)  X_s
        + ∫_0^t 𝔼^_s[ ∂_μ v^A  (s, X_s, μ_s) ( X_s ) X_s ] 
       + 12∫_0^t ∂_x x^2 v^A  (s, X_s, μ_s) ⟨ X ⟩_s 
        + ∫_0^t ^_s[ ∂_x∂_μ v^A (s, X_s, μ_s) ( X_s ) ⟨ X, X⟩_s ]
         
       + 12∫_0^t ^_s[ ∂_v ∂_μ v^A (s, X_s, μ_s) ( X_s ) ⟨X⟩_s ]
        + 12∫_0^t ^_s^_s[ ∂_μ^2 v^A (s, X_s, μ_s) ( X_s,  X_s ) ⟨X, X⟩_s ],

where X is a copy of X in the sense of Definition <ref>. One may note that this particular Itō's formula involves derivatives with respect to a measure: we refer to <cit.> for a rigorous definition of these types of derivatives, and we denote by  (resp. ^2)  the set of Borel measurable functionals from  (resp. ^2) into , to consider the latter.



Intuitively, as in classical control theory, the Hamiltonian of the representative Agent should be composed of all the drift terms appearing in the previous Itō's expansion. Therefore, by computing the quadratic variations and covariations between the deviation consumption of the representative consumer and the others, mainly:

    ⟨ X ⟩_t = ( Σ( β^_t ) + (σ^∘)^2 )  t,  ⟨X⟩_t = ( Σ( β_t ) + ( σ^∘)^2 )  t,  ⟨ X, X⟩_t = ⟨X, X⟩_t = ( σ^∘)^2  t,

and using in addition the dynamics of X and X, one obtain the following form for the hamiltonian, for (t, x, y) ∈ [0,T] ××, p := (z, z^μ, γ, γ^μ, γ^μ,1, γ^μ,2) ∈××××^2 ×, and computed along (μ, ν) ∈(_T) ×:

    H (t, x, y, p, μ_t, ν_t) := sup_v ∈ U h (t, x, y, p, μ_t, ν_t, v),

where, for v ∈ U,

    h (t, x, y, p, μ_t, ν_t, v) :=    
        - R_A ( c (v) + f (x)) y
        - z a ·1_d
        - 𝔼^_t[ z^μ( X_t) α_t ·1_d ]
        + 12γ( Σ (b) + (σ^∘)^2 )  
       + (σ^∘)^2 𝔼^_t[ γ^μ( X_t) ]
        + 12𝔼^_t[ γ^μ,1( X_t) ( Σ( β_t ) + ( σ^∘)^2 ) ] 
        + 12( σ^∘)^2 𝔼^_t𝔼^_t[ γ^μ,2( X_t, X_t) ].

Following the classical reasoning in control theory, the value function should satisfy the following Hamilton–Jacobi–Bellman (HJB) equation:

    - ∂_t v^A(t,x,μ_t) - H ( t, x, μ_t, v^A (t, x, ∇ v^A (t, x, μ_t), Δ^2 v^A (t, x, μ_t), μ_t, ν_t) = 0,

where

    ∇ v^A (t, x, μ_t)    := ( ∂_x v^A (t, x, μ_t), ∂_μ v^A  (t, x, μ_t) ), 
     and  Δ^2 v^A (t, x, μ_t)    := ( 
        ∂_x x^2 v^A  (t, x, μ_t),
        ∂_x∂_μ v^A (t, x, μ_t), 
        ∂_v ∂_μ v^A (t, x, μ_t),
        ∂_μ^2 v^A (t, x, μ_t) ).




  §.§.§ Toward a relevant form of contract


By still considering the Markovian framework, and assuming that we can apply to the function u^A defined by (<ref>) the chain rule with common noise under ^1,2,2–regularity, defined in <cit.>, we can obtain a formula similar to (<ref>) for u^A. 
By computing[ Once again, we refer to <cit.> for computations rules of derivatives, but to give an idea, we have: 

    ∂_μ u^A (t, x, μ_t) (x) = - 1R_A V_t^A∂_μ v^A (t, x, μ_t) (x),  and ∂_v ∂_μ u^A (t, x, μ_t) (x) = - 1R_A V_t^A∂_v ∂_μ v^A (t, x, μ_t) (x).

] the partial derivatives of u^A in terms of the partial derivatives of v^A, we obtain after some tedious but simple computations:

    ξ_t =     - 1R_Aln(-V_0^A )
        + ∫_0^t ∂_s u^A (s, X_s, μ_s)  s 
        + ∫_0^t Z_s  X_s
        + ∫_0^t 𝔼^_s[ Z^μ_s (X_s) X_s ] 
        + 12∫_0^t (  Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s 
       + 12∫_0^t  𝔼^_s[ Γ^μ,1_s (X_s) ⟨X⟩_s ] 
        + 12∫_0^t 𝔼^_s𝔼^_s[ ( Γ_s^μ,2(X_s,  X_s ) + R_A Z_s^μ( X_s ) Z^μ_s (  X_s ) ) ⟨X, X⟩_s ] 
       + ∫_0^t  𝔼^_s[ ( Γ^μ_s ( X_s) + R_A Z_s Z^μ_s ( X_s) ) ⟨ X, X⟩_s ],

where the process ( Z, Z^μ, Γ, Γ^μ, Γ^μ,1, Γ^μ,2) takes values in ××××^2 × and is defined for all t ∈ [0,T] by:

    ( Z_t, Z_t^μ, Γ_t, Γ_t^μ, Γ_t^μ,1, Γ_t^μ,2) := - 1R_A V_t^A( ∂_x v^A, ∂_μ v^A , ∂_x x^2 v^A,
        ∂_x∂_μ v^A, 
        ∂_v ∂_μ v^A,
        ∂_μ^2 v^A) (t, X_t, μ_t).

Using the HJB equation  satisfied by v^A, see (<ref>), we can state the HJB equation  satisfied by u^A:

    - ∂_t u^A(t,x,μ_t) - H( t, x, Z_t, Z_t^μ, Γ_t, Γ_t^μ, Γ_t^μ,1, Γ_t^μ,2, μ_t, ν_t) = 0,

where H is a slightly modified version of the initial Hamiltonian H, more convenient when dealing with CARA utility functions, and satisfying for (μ, ν) ∈(_T) ×, (t, x) ∈ [0,T] ×, and (z, z^μ, γ, γ^μ, γ^μ,1, γ^μ,2) ∈××××^2 ×,

    H (t, x, z, z^μ, γ, γ^μ, 1, γ^μ,2, γ^μ, μ_t, ν_t) = 12 H_d (z) + 12 H_v(γ) + H_c (x, γ) + H_∘ (z^μ, γ^μ, 1, γ^μ,2, γ^μ, μ_t,  ν_t),

where

    H_d (z) :=    - inf_a ∈ A{2 z a ·1_d + c_α(a) },  
        H_v(γ) := - inf_ b ∈ B{c_β (b) - γΣ(b) },  
        H_c (x, γ) := 12γ (σ^∘)^2 + f(x),




    and   H_∘ (z^μ, γ^μ, 1, γ^μ,2, γ^μ, μ_t, ν_t) :=    
        - 𝔼^_t[ z^μ( X_t) α_t ·1_d ]
        + (σ^∘)^2 𝔼^_t[ γ^μ( X_t) ]
        + 12𝔼^_t[ γ^μ,1( X_t) ( Σ(β_t ) + (σ^∘)^2 ) ] 
        + (σ^∘)^2 12𝔼^_t𝔼^_t[  γ^μ,2( X_t , X_t) ].

Therefore, the Hamiltonian of the representative consumer in this case consists of four parts. The first three, H_d, H_v and H_c, are the classical parts for drift and volatility control, which do not depend on the efforts and the distribution of other players' states. The last part, H_∘, does depend on the law and the efforts of others, and act as a constant part for the representative consumer, since he cannot control it. Note that the optimisers are given by
    
    a^k,⋆ (z) := ρ^k (z^-∧ A_max)   and   b^k,⋆ (γ) := 1 ∧( λ^k γ^-)^-1/η^k + 1∨ B_min,   for  k=1, …, d.

We thus claim that, in our framework, the Hamiltonian of the representative consumer should be somehow a path dependent version of  (<ref>), and that the relevant contracts should be of the form (<ref>), parametrised by a process ( Z, Z^μ, Γ, Γ^μ, Γ^μ,1, Γ^μ,2). Nevertheless, some modifications are necessary, mainly by considering a path dependent version, but also some simplifications are possible. In particular, by writing explicitly the quadratic variations of last three integrals of (<ref>), we can show that the terms indexed by Γ^μ, Γ^μ,1 and Γ^μ,2 can be simplified with some part of the Hamiltonian H, and are therefore unnecessary. We provide details in the next section.




 §.§ Solving the mean–field thanks to simple contracts


The intuition in the Markovian framework developed in the previous subsection allows us to intuit the form of revealing contracts in our framework, given below in Definition <ref>. In particular, the relevant form of contract is inspired by (<ref>), adapted for a non–Markovian framework, and noticing that some simplification are possible. Therefore, starting from a contract form indexed by a tuple of processes ( Z, Z^μ, Γ, Γ^μ, Γ^μ,1, Γ^μ,2), we finally obtain that the tuple of process ( Z, Z^μ, Γ) should be sufficient to parametrise the relevant contract. 
This type of contracts, indexed only by ( Z, Z^μ, Γ), then allows us to calculate the optimal efforts of the representative Agent and the associated mean–field equilibrium (see Theorem <ref>) whose proof is based on the theory of 2BSDEs. The main result of this paper, mainly that the restriction to this type of so–called revealing contracts is in fact without loss of generality, is postponed to the next section (see Theorem <ref>).



Throughout the following, we denote for simplicity, for any positive integer n, by ℒ^n the set of Borel measurable functionals from ([0,T],^n) into , and :=^1. Indeed, instead of considering that the indexation parameter Z^μ takes values in  as in the previous section, we should now consider, in our non–Markovian framework, that for all t ∈ [0,T], the function Z_t^μ can be applied to the paths of X until t.






  §.§.§ Simple contracts


Recall that in view of (<ref>), we expect that a contract ^obs–measurable is defined by (<ref>), as a function of t, the path of X up to t, and μ_t, the conditional law of X_t ∧·. 
Thanks to the reasoning developed in the previous section, and noticing moreover that, replacing the Hamiltonian H by its value (see (<ref>)) in the form of the contract (<ref>), some simplifications are possible between parts of the Hamiltonian and terms related to the quadratic variations. In particular, by setting for (x, z, z^μ, γ) ∈××× and (μ, α) ∈(_T) ×:

    (x, μ_t, z, z^μ, γ, α_t) :=     12 H_d (z) + 12 H_v(γ) + H_c (x, γ)
        -  𝔼^_t[z^μ(X_t ∧·) α_t ·1_d ],

we obtain that the contract should only be parametrised by a process ζ := (Z, Z^μ, Γ), taking values in ××, and should satisfy

    ξ_t =     ξ_0  - ∫_0^t  (X_s, μ_s, ζ_s,  α_s)   s 
        + ∫_0^t Z_s  X_s 
        + ∫_0^t 𝔼^_s[ Z_s^μ(X_s ∧·) X_s ]
        + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s
        
       + 12 R_A ∫_0^t  𝔼^_s𝔼^_s[ Z_s^μ(X_s ∧·) Z_s^μ(X_s ∧·) ⟨X, X⟩_s ]
        + R_A ∫_0^t Z_s 𝔼^_s[Z_s^μ(X_s ∧·) ⟨ X, X⟩_s ],

for some ξ_0 ∈.



Therefore,  defined by (<ref>) is the relevant Hamiltonian in our non–Markovian framework. One may note that  is a simplified version of the Hamiltonian H defined by the equation (<ref>). Indeed, some parts of the Hamiltonian which are not controlled by the consumer simplify with some parts of the contract. Therefore, the triple (Γ^μ,1, Γ^μ,2,Γ^μ) no longer appears in the contract. We thus obtain a simplified form for the contract, only indexed by a triple ζ := (Z, Z^μ, Γ)∈××. This triple ζ will be called the triple of payment rates. Moreover, one may note that the Hamiltonian as well as the contract for the representative Agent do not depend anymore on the other consumers' effort on the volatility, namely β, but still depends on the effort on the drift of other consumers, i.e. α.



Though the expression (<ref>) is appealing to be used as our generic contract form, it is not possible to use it directly in the context of a Principal–Agent problem with moral hazard. In fact, this form depends explicitly on the drift's effort of other consumers, namely α, through the Hamiltonian, and this effort is not supposed to be observable, nor contractible upon, for the Principal. Nevertheless, we can overcome this difficulty by replacing α by the optimal drift process of other consumers, which has to be formally computed as the maximiser in the Hamiltonian denoted by α^⋆ and defined by (<ref>) so that a^k,⋆ (z) := ρ^k (z^-∧ A_max),   k=1, …, d, where z is the payment rate for the other consumers' drift effort. Indeed, at equilibrium, each consumer should consume optimally. Moreover, in our mean–field framework, the consumers are identical and indistinguishable. Therefore, the Principal will offer the same contract for all agents, that is the payment rate for drift effort will be the same for all the consumers, since no discrimination is allowed. Hence, the optimal drift process of other consumers will be α^⋆(Z). We are thus led to consider a particular type of revealing contracts, precisely described in the definition below.


For any ××–valued ^ obs–predictable process ζ:=(Z,Z^μ,Γ), and any ξ_0∈, let us define the following process ξ^ξ_0, ζ for all t∈[0,T] by

    ξ_t^ξ_0,ζ :=     ξ_0  - ∫_0^t  (X_s, μ_s, ζ_s, α_s^⋆)   s 
        + ∫_0^t Z_s  X_s 
        + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s
        + ∫_0^t 𝔼^_s[ Z_s^μ(X_s∧·) X_s ]
        
       + 12 R_A ∫_0^t  𝔼^_s𝔼^_s[ Z_s^μ(X_s∧·) Z_s^μ(X_s∧·) ⟨X, X⟩_s ]
        + R_A ∫_0^t Z_s 𝔼^_s[Z_s^μ(X_s∧·) ⟨ X, X⟩_s ],

where the function  is defined by (<ref>). We let then  the set of ××–valued ^ obs–predictable process ζ such that 


    sup_∈^[sup_0≤ t≤ Te^pR_A|ξ_t^ξ_0,ζ|]<+∞,

where p is the same as in Condition (<ref>). We call random variables of the form (ξ_T^ξ_0,ζ), for (ξ_0,ζ)∈×, simple contracts, and denote the corresponding set by Ξ_S. Moreover, for any ××–valued –predictable process ζ:=(Z,Z^μ,Γ), we will denote by ζ= (Z, Z^μ, Γ) the ^3–valued –predictable process, with Z^μ_t = ^_t [Z_t^μ (X_t ∧·)], for t ∈ [0,T]. We will say that ζ∈ if ζ∈.



Notice that the integrability requirement in the definition of the set  is rather implicit. It is however clear that  is not empty as it contains trivially constant processes, since the drift and the volatility of X are always bounded. Besides, this is exactly the integrability we need to be able to solve the MFG for the agents given a contract in Ξ_S, as the proof of Theorem <ref> below will make clear.





  §.§.§ Interpretation of the form of contracts


 The form of contracts given in Definition <ref> is mainly composed of two parts: one is an indexation on the process controlled by the consumer, that is to say his deviation consumption, the other one is an indexation on other consumers through the law μ. In particular, similarly to <cit.>, the contract has a linear part in the level of consumption deviation X and the corresponding quadratic variation ⟨ X ⟩, with linearity coefficients Z and Γ. This part of the contract is the classic contract for drift and volatility control. The constant part is slightly different from the usual one in the moral hazard framework. In fact, we can divide it into three integrals:

    ∫_0^T  (X_s, μ_s, ζ_s, α_s^⋆)  s  = ∫_0^T (  12 H_d (Z_s) +  12  H_v (Γ_s) + f (X_s) )  s 
        - ∫_0^T 𝔼^_s[Z_s^μ (X_s ∧·) α_s^⋆·1_d ]  s
        + 12 ( σ^∘)^2 ∫_0^T Γ_s  s.

The first one represents the certainty equivalent of the utility gain of the consumer that can be achieved by an optimal response to the contract, and is thus subtracted from the Principal's payment, in agreement with usual Principal–Agent moral hazard type of contracts. Moreover, due to the risk–aversion of the consumer, the infinitesimal payment Z_t  X_t must be compensated by the additional payment 1/2 R_A Z_t^2 ⟨ X ⟩_t. Following the same reasoning, the second integral and the additional payment 

    12 R_A ( σ^∘)^2 ∫_0^t  ( ^_s[ Z_s^μ (X_s ∧·)  ] )^2  s,

in (<ref>) are compensations for the infinitesimal payment ^_s[ Z_s^μ (X_s ∧·) X_s ] indexed on others, and the last integral is a compensation for the covariation induced by the two infinitesimal payments. In summary, the Principal will choose the triple of controls ζ = (Z, Z^μ, Γ) where the payment rates (Z, Γ) index the contract on the deviation consumption of the considered consumer, in agreement with usual Principal–Agent moral hazard type of contracts for drift and volatility control, and the payment rate Z^μ indexes the contract on the behaviour of other consumers, represented by the conditional law μ.


    Until now, we supposed that the Principal could not observe the common noise, or at least was not allowed to directly index compensations on it. Whenever she can do so, we notice that the contract defined by (<ref>) can be written in the following way
    
    ξ_t =     ξ_0 - ∫_0^t ^∘ (X_s, Z_s, Γ_s)   s 
            + ∫_0^t Z_s  X_s 
            + σ^∘∫_0^t 𝔼^_s[ Z_s^μ(X_s∧·) ]  W^∘_s 
            + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s 
       + 12 R_A ∫_0^t 𝔼^_s𝔼^_s[  Z_s^μ(X_s∧·) Z_s^μ(X_s∧·) ⟨X, X⟩_s ]
            + R_A  ∫_0^t Z_s 𝔼^_s[Z_s^μ(X_s∧·) ⟨ X, X⟩_s ],

    where for (x, z, γ) ∈××,
    
    ^∘ (x, z, γ) = 12 H_d (z) + 12 H_v(γ) + H_c (x, γ),

    and thus does not depend on the others' effort α anymore. We can even go further in the simplifications by noticing that, given the common noise, X and X are independent. Hence, recalling the notation Z_s^μ = 𝔼^_s[ Z_s^μ(X_s∧·) ], we have
    
    ∫_0^t 𝔼^_s𝔼^_s[ Z_s^μ(X_s∧·) Z_s^μ(X_s∧·) ⟨X, X⟩_s ] 
               = ( σ^∘)^2 ∫_0^t 𝔼^_s[ Z_s^μ(X_s∧·) ] 𝔼^_s[ Z_s^μ(X_s∧·) ]  s 
            = ( σ^∘)^2 ∫_0^t ( Z_s^μ)^2  s,  
    ∫_0^t 𝔼^_s[ Z_s  Z_s^μ(X_s∧·) ⟨ X, X⟩_s ]
               = ( σ^∘)^2 ∫_0^t Z_s 𝔼^_s[ Z_s^μ(X_s∧·) ]  s
            = ( σ^∘)^2 ∫_0^t Z_s Z_s^μ s.

    Therefore, the actual compensation parameter of the contract in this case is the triple ζ := (Z, Z^μ, Γ) ∈ and the form of contracts becomes
    
    ξ_0 - ∫_0^t ^∘ (X_s, Z_s, Γ_s)   s 
            + ∫_0^t Z_s  X_s 
            + σ^∘∫_0^t Z_s^μ W^∘_s 
            + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s + 12 R_A  ( σ^∘ )^2 ∫_0^t  Z_s^μ(Z_s^μ+ 2 Z_s)   s.

    
The previous form of contract is nothing more than a rewriting of the one given by (<ref>). This shows that indexing on the conditional law is actually a hidden indexing on the common noise: the compensation term in the contract depending on others is rewritten as a term depending only on the common noise. Therefore, in the case where the producer is allowed to use W^∘, she can directly offer this type of contracts. Otherwise, if there are some regulatory reasons preventing her from using it directly in the contract, she can offer the contract in Definition <ref>. This being said, when the Principal uses contracts in ^∘, we need to add the common noise as a state variable in the value function of the representative consumer, and can then show similarly that the contract is indexed on the common noise through a parameter Z^∘, and the payment rate ζ^∘ chosen by the Principal is measurable with respect to the natural filtration generated by X, W^∘ and μ. Hence, if the Principal observes the common noise, we simply have to extend the space of controls chosen by the Principal. In fact, the form of optimal contracts will be the same, leading to the same effort of the consumers and the same utility for the Principal. We refer to Section <ref> for the detailed contract and the resolution of optimal contracting in this particular case.


The previous remark underlines the fact that if σ^∘ = 0, a simple contract in Definition <ref> is exactly a standard contract for drift and volatility control (see <cit.>). Therefore, in absence of common noise, it is straightforward to conclude that considering contracts indexed on the consumption of the population of consumers do not improve the results given in <cit.>. We refer to Section <ref> for more details on this result.




  §.§.§ Solving the mean–field game

By considering simple contracts, we are able to compute the optimal efforts of the representative Agent, which were given informally by (<ref>). Intuitively, maximising the Hamiltonian given by (<ref>) is sufficient to obtain optimal efforts, but the formal proof relies on the theory of 2BSDEs. We will note that the consumer's optimal efforts do not depend on the efforts of the others, which simplifies the task of obtaining the unique mean–field equilibrium given by Theorem <ref>. In other words, each consumer optimises his deviation consumption independently of everyone else. Therefore, there is a unique mean–field equilibrium, given by the following theorem.








    Given a contract ξ_T^ξ_0,ζ∈Ξ_ S indexed by the triple of parameters ζ := (Z, Z^μ, Γ)∈𝒱, in the sense of Definition <ref>, there exists a unique mean–field equilibrium in the sense of Definition <ref> denoted by (ℙ^⋆, μ^⋆) where 
     
      
  * the optimal drift effort of the consumer is given by the process α^⋆:=a^⋆(Z) where 
        
    a^k,⋆ (z) := ρ^k (z^-∧ A_max),  z∈,  k=1,…,d;

        
  * the optimal volatility effort of the consumer is given by the process β^⋆:=b^⋆(Γ) where
        
    b^k,⋆ (γ) :=  1 ∧( λ^k γ^-)^-1/η^k + 1∨ B_min, γ∈,  k=1,…,d;

        
  * ℙ^⋆ is the law of X driven by optimal controls
        
    X_t = - ρ( Z_t^-∧ A_max)  d t + σ^⋆ (Γ_t) ·dW_t + σ^∘dW^∘_t;

        
  * μ^⋆ is the conditional law of X given ^∘. 
    


The proof of the previous theorem, which is summarised below, relies on the theory of 2BSDEs, mostly postponed to Appendix <ref>: the crux of the argument here is to use the general result of Proposition <ref> and Theorem <ref>, and show that we can construct directly a solution to 2BSDE (<ref>) whenever ξ^ξ_0,ζ∈Ξ_S. Indeed, contrary to the intuition presented in the previous section, the chain rule with common noise cannot be applied in our non–Markovian framework.


We first assume that other consumers are playing according ^⋆, meaning in particular that their efforts are ν^⋆ = (α^⋆, β^⋆) and that μ=μ^⋆. In this case, one can notice that the simplification (<ref>) of the contract holds, since other consumers are playing α^⋆. Define then 

    Y_t:=-e^-R_Aξ_t^ξ_0,ζ,   Z^1_t:=-R_AY_tZ_t,    Z^2_t:=-R_AY_t ^^⋆_t[Z^μ_t(X_t∧·)], Γ_t:= -R_AY_tΓ_t,  t∈[0,T],


    K_t:=∫_0^t(-R_AY_s ^∘(X_s,ζ_s)-1/2Γ_s ( S_s + ( σ^∘)^2 ) - F(X_s, Y_s,  Z^1_s, S_s ) ) ds,  t∈[0,T],



where for any S≥ 0, Σ^-1(S) is the pre–image of the singleton {S} by the map Σ:B⟶_+, where we denote by Σ(B) the image of B by Σ, where the map F:×××Σ(B)⟶ is defined by

    F(x,y,z,S):=sup_(a,b)∈ A×Σ^-1(S){-a·1_dz+R_Ay(c(a,b)-f(x))},  (x,y,z,S)∈×××Σ(B),

and ^∘ by Equation (<ref>). A simple application of the usual Itō's formula then leads to

    Y_t =    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        - ^-R_A ξ_T 
        + ∫_t^T F(X_s,Y_s, Z^1_s,S_s)  s
        - ∫_t^T  Z^1_s  X_s 
        - σ^∘∫_t^T  Z_s^2 W^∘_s
        + ∫_t^T   K_s,   t ∈ [0,T].






By definition of ^∘ and F, we also directly check that K is always a non–decreasing process, which vanishes on the support of any probability measure corresponding to the efforts β^⋆ defined in the statement of the proposition. Indeed, 

    K_s = 
        12 R_A Y_s (  inf_b ∈ B{c_β (b) - Γ_s Σ(b) } 
        - inf_b ∈Σ^-1(S_s) c_β (b) 
        + Γ_s S_s  )  s.

To ensure that (Y,( Z^1, Z^2)^⊤, K) solves 2BSDE (<ref>), it therefore remains to check that all the integrability requirements in Definition <ref> are satisfied, since the fixed–point constraint is satisfied by definition. The one for Y is immediate by definition of the set . The required integrability on (( Z^1, Z^2)^⊤, K) then follows from <cit.>.


We have therefore obtained that the candidate provided in the statement of the proposition was indeed an equilibrium. Let us now prove uniqueness. Let ν= (α, β) be the arbitrary effort of other consumers, and the associated conditional distribution μ. In this case, a contract ξ^ξ_0,ζ∈Ξ_S no longer admits the decomposition (<ref>). Nevertheless, Ξ_S⊂Ξ and by Proposition <ref>, the optimal effort ν^⋆ is the maximiser of the map F, and does not depend on ν. Although there is no uniqueness in general of the probability ^⋆, and therefore of the effort β^⋆, the effort α^⋆ is unique and is the one defined in the statement of the theorem. To sum up, given a contract in Ξ_S and for arbitrary efforts ν of others, each consumer has a unique optimal drift effort α^⋆, independent of ν. We can therefore already conclude that the optimal effort α^⋆ is the same for all consumers. Using the dynamic of X with α^⋆, the contract ξ^ξ_0,ζ admits the decomposition (<ref>). Therefore, we can apply the reasoning above to construct a solution to the 2BSDE (<ref>), and we have now uniqueness of the probability ^⋆, and therefore on the volatility effort β^⋆, given by point (ii) of the theorem. To conclude, given an arbitrary law μ and a contract ξ^ξ_0,ζ∈Ξ_S, the optimal effort is ν^⋆ = (α^⋆, β^⋆), inducing the law ^⋆ and the conditional law μ^⋆. It is therefore the unique equilibrium.































































Throughout this work, we will denote by v^⋆(z,γ) := ( a^⋆(z), b^⋆(γ) ) the optimal response of a given agent. The cost associated to this effort will be denoted by c^⋆(z,γ). 




  §.§.§ Interpretation of the optimal efforts


For a tuple of payment rates ζ∈××,

 
    
  * the z component of the payment induces an effort of the consumer on all usages to reduce his consumption in average. The effort on the k–th usage is proportional to its cost, 1/ρ^k, non increasing with z, positive if z is negative and zero otherwise. Hence, the more z is negative, the more the Agent will reduce his consumption deviation in average;
    
  * the component γ induces an effort only on the usages whose cost 1/λ^k is lower than the payment. If γ is non negative, b^k,⋆ (γ) = 1 for all usages, hence the consumer makes no effort on the volatility of his consumption deviation. The more γ is negative, the more b will be close to zero, i.e. the more the Agent will reduce the volatility of his consumption deviation;
    
  * the z^μ component has no influence on the consumer's efforts: although his payment is indexed on the deviation consumption of others, the consumer will not take it into account to optimise his deviation consumption. This model can be criticised but seems rather logical in the sense that a consumer optimises his consumption independently of what his neighbours do, even if the price of electricity depends on the global demand. 


Hence, the efforts of the consumer are the same as those defined in <cit.>, although the contracts we consider have more components. The additional components do not affect the optimal effort of the consumer.


    These results are consistent with classical results on drift and volatility control (see <cit.> or <cit.>), contracts indexed by (z, γ) are sufficient to incentivise the Agent for making effort on drift and volatility. Therefore it is quite natural that another parameter in the contract will not directly affect the effort, but may increase the value function of the Principal.


To sum up this section, we provided a new form of contracts in Definition <ref>, called simple contracts, allowing us, by Theorem <ref>, to compute the optimal efforts of the consumers and the associated unique mean–field equilibrium. The aim of the following section is to prove that there is no loss of generality to consider only simple contracts, and to solve the Principal's problem thus restricted to these simple contracts.


































































































































































































































































































































































































































§ PRINCIPAL'S PROBLEM


We recall that the optimisation problem of the Principal has been defined as follows

    V_0^P := sup_ξ∈Ξsup_(, μ) ∈^⋆ (ξ)𝔼^[ U^P ( - 𝔼^[ξ+∫_0^Tg(X_s)ds+θ/2∫_0^Td⟨ X⟩_s| ^∘_T] )  ].

Following the general approach of <cit.>, we expect that there is no loss of generality for the Principal to restrict to contracts in Ξ_ S,  in the sense of Definition <ref>, instead of Ξ. This property had been obtained before in <cit.> for general moral hazard problems with a continuum of Agents with mean–field interaction, but who were constrained to simply control the drift of the diffusion X. We show here that this general result also extends to cases where volatility can be controlled as well, using 2BSDEs theory. For notational simplicity, we define for any (ξ_0,ζ)∈× the following process

    L_t^ξ_0,ζ := ξ_t^ξ_0,ζ + ∫_0^t g ( X_s ) d s + θ2∫_0^t ⟨ X ⟩_s,   for   t ∈ [0,T].



The following equality holds

    V_0^P    = sup_(ξ_0,ζ)∈ [U_A^-1 (R_0),+∞)×𝔼^^⋆[ U^P ( - 𝔼^^⋆[ L^ξ_0,ζ_T | ^∘_T ] )  ]=sup_ζ∈𝔼^^⋆[ U^P ( - 𝔼^^⋆[L^U_A^-1 (R_0),ζ_T | ^∘_T] )  ].




The proof of this main theorem is  postponed to Appendix <ref>. 



From now on, it is assumed that f and g have linear growths. Thus, the result of Proposition <ref> holds. To lighten the notations, the exponent U_A^-1 (R_0) will often be omitted, since, using Proposition <ref>, it is fixed once and for all by U_A^-1 (R_0) = ψ(0,X_0). Notice that from the Principal's point of view, when considering contracts in Ξ_S, and when the consumers are at the unique equilibrium, the deviation of other consumers X is nothing but a copy of X, in the sense of Definition <ref>, which we denoted by X. Besides, noticing then that the distributions  and  ^⋆ coincide, in particular that μ= μ^⋆, and imposing ξ_0:= U_A^-1 (R_0) from now on, one obtain:

    ξ_t^ζ =     ξ_0- ∫_0^t  (X_s, μ^⋆_s, ζ_s, α_s^⋆)   s 
        + ∫_0^t Z_s  X_s 
        + ∫_0^t ^^⋆_s[ Z_s^μ (X_s) X_s ]
        + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s
        
       + 12 R_A ( σ^∘)^2 ∫_0^t  ( ^^⋆_s[ Z_s^μ (X_s)  ] )^2  s
        + R_A ( σ^∘)^2 ∫_0^t Z_s ^^⋆_s[Z_s^μ (X_s) ]  s.

 Given the form of the Principal's control problem and of the contract, the intuition is that her value function should depend only on time and on the conditional law μ^Y of the state variable Y = (X,L)^⊤.








 §.§ The general case


 The attentive reader have noticed that the right–hand side of Theorem <ref> looks like the value function of a stochastic control problem of a McKean–Vlasov stochastic differential equation with common noise. However, one of the two state variable, mainly L, seems to be considered in the strong formulation (it is indexed by the control ζ), while the other state variable X is considered in weak formulation (the control ζ only impacts the distribution of X through ^⋆). As highlighted by <cit.>, it makes little sense to consider a control problem of this form directly. Therefore, from our point of view, there is no reason why we should adopt anything but the weak formulation to state the problem of the Principal, contrary to what is usually done in Principal–Agent problems (see, e.g., <cit.>), since this is the one which makes sense for the problem of the Agent[Notice that at the end of the day, this is not really an issue. Indeed, provided that the problem has enough regularity (typically some semi–continuity of the terminal and running reward with respect to state), one can expect the strong and weak formulations to coincide. This is proved in a setting with common noise by <cit.>.]. We will thus formulate it below.



Let  be the collection of all finite and positive Borel measures on [0,T]×^3, whose projection on [0,T] is the Lebesgue measure, and we call _0 the set of all q ∈ of the form δ_ϕ_s(dv )dt for some Borel function ϕ. The intuition is that the Principal's problem depends only on time and on the conditional law μ^Y of the state variable Y = (X,L)^⊤. Following the same methodology used for the Agent's problem, to properly define the weak formulation of the Principal's problem, we are led to consider the following canonical space

    Ω^P :=  Ω^∘×Ω^1,P×Ω^2,P×,  where Ω^P,1 :=  ([0,T],^2 ×^d),  and  Ω^P,2 := _T (^2),

with canonical process (W^∘, Y, W, μ^Y, Λ^P), where for any (t, w^∘, y, w, u, q) ∈ [0,T] ×Ω^P

    W^∘_t(w^∘,y,w,u,q):=w^∘(t),   Y_t(w^∘,y,w,u,q) :=y(t),  W_t(w^∘,y,w,u,q):=w(t),

    


    μ^Y_t(w^∘,y,w,u,q):=u(t), Λ^P_t(w^∘,y,w,u,q):=q.


Less formally, for all t∈[0,T], μ^Y_t ∈(^2) will be the conditional distribution of Y_t = (X_t,L_t), and we will denote by μ^X and μ^L the marginal distributions of μ^Y. When no confusion is possible, in order to lighten the notations, we will often omit the space for the integrals with respect to the conditional distribution, by denoting for example:

    ∫ϕ (x, ℓ) μ^Y ( x, ℓ) := ∫_^2ϕ (x, ℓ) μ^Y ( x, ℓ),   for any  ϕ : ^2 ⟶.


The canonical filtration ^P:=(^P_t)_t∈[0,T] is defined as

    ℱ^P_t:=σ( (W^∘_s, Y_s, W_s, μ^Y_s, Δ_s(φ) ): (s,φ)∈[0,t]×_b ( [0,T]×^3, ) ),  t∈ [0,T],

where _b([0,T]×^3,) is the set of all bounded continuous functions from [0,T]×^3 to , and for any (s,φ)∈[0,T]×_b([0,T]×^3,), Δ_s(φ):=∫_0^s∫_^3φ(r, v ) Λ^P(dr,dv). We also define ^P,∘:=(^P,∘_t)_t∈[0,T], a smaller filtration containing only the information generated by the common noise and the conditional law of Y, 
    ^P,∘_t:=σ((W^∘_s,μ^Y_s):s∈[0,t]),  t∈[0,T].
























Let ^2_b(ℝ^2 ×^d ×,) be the set of bounded twice continuously differentiable functions from ℝ^2 ×^d × to , whose first and second derivatives are also bounded, and for any (s,φ)∈[0,T]×^2_b(ℝ^2 ×^d ×,), we set

    M^P_s(φ):=    φ(Y_s,W_s,W^∘_s) - ∫_0^s ∫_U( A_P(v) ·∇φ(Y_r,W_r,W^∘_r) + 1/2 Tr[ D^2 φ(Y_r,W_r,W^∘_r) B_P(v)  B_P^⊤ (v) ] )Λ^P(dr, dv),

where D^2 φ denotes the Hessian matrix of φ, A_P and B_P are respectively the drift vector and the diffusion matrix of the vector process (Y, W, W^∘)^⊤

    A_P(v) := 
        [ - ρ( z^-∧ A_max);      b ( X_t, v);              0_d;                0 ],
          
        B_P(v) :=
        [             0             0      σ^⋆(γ)^⊤           σ^∘;             0             0    z σ^⋆(γ)^⊤ (z + z^μ )σ^∘;           0_d           0_d           I_d           0_d;             0             0         0_d^⊤             1 ],

where for v:=(z,z^μ, γ)∈^3

    b (x, v) :=     
    	c^⋆ (z, γ)
        + g(x) - f (x) 
        + 12 R_A z^2 Σ^⋆ ( γ )
        + 12 R_A (σ^∘)^2 ( z + z^μ)^2
        + θ2( Σ^⋆ ( γ ) + (σ^∘)^2 ).


We fix some initial condition, namely a probability measure ϱ^P on ^2 representing the law at 0 of Y. The marginals of ϱ^P are given by ϱ, the law of X_0, and ψ(0,·) ∘ϱ, the law of U_A^-1 (R_0) = ψ(0,X_0). 


Let ^P be the set of all probability measures on (Ω^P,^P_T). The subset ⊂^P is composed of all  such that 

    
  * M^P(φ) is a (,𝔽^)–local martingale on [0,T] for all φ∈^2_b(^2 ×^d ×,);
    
  * ∘ (Y_0)^-1 = ϱ^P, and ∘((W_0,W_0^∘))^-1 = ι;
    
  * [Λ^P ∈_0]=1;
    
  * for –a.e. ω∈Ω^P and for every t ∈[0,T], we have μ^Y_t(ω)=^ω_t ∘ (Y_t)^-1,
    where (_t^ω)_ω∈Ω is a family of r.c.p.d. for  given _t^P,∘. Similarly as before, we will denote by ^_t the conditional expectation under the r.c.p.d. _t^ω;
    
  * (W^∘,μ^Y) is –independent of W.




    One may notice that the previous definition, in particular the point (iv), does not involve a probability measure on the path space anymore, contrary to Definition <ref>, and as noticed in Remark <ref>. Indeed, the form of contracts we are considering makes the Principal's problem Markovian in that sense. 


Following the reasoning developed in Subsection <ref>, we can construct a copy of the canonical space Ω^P and a copy of Y in the sense of Definitions <ref> and <ref>. Thanks to the previous formulation, we can write the weak formulation of the Principal's problem as follows

    V_0^P    = sup_∈
    𝔼^[ U^P ( - 𝔼^_T[L^ζ^_T ] )  ],

where, given some ∈, the notation ^_t will refer to the conditional expectation under the r.c.p.d. _t of some ∈ given _t^P,∘ for all t ∈ [0,T], in the sense of Definition <ref> (iv).




























    First, recall that simple contracts were defined as random variables of the form ( ξ_T^ξ_0, ζ), for (ξ_0, ζ) ∈×. By Equation (<ref>), we notice that the drift vector and the diffusion matrix of the process (Y,W,W^∘)^⊤ are defined as function of v = (z,z^μ, γ). This is why we consider that the Principal controls, through a probability ∈, the triple of controls ζ^ = (Z, Z^μ, Γ) ∈, where for all t ∈ [0,T], Z_t^μ = ^_t [Z_t^μ (X_t) ], instead of ζ^∈.
    Moreover, the conditional laws of X and L do not impact their dynamics, therefore the Principal's problem does not seem to be a McKean–Vlasov control problem, but only a standard control problem. Nevertheless, the Principal's criterion reveals the conditional law of L, which transforms the problem into a McKean–Vlasov one.






In order to apply the chain rule with common noise to functions depending on time and conditional distribution, we define the regularity assumption needed.


    A function u : [0,T] × (^d) ⟶, (t, μ) ⟼ u(t, μ) is smooth enough in the sense of Chain Rule under ^1,2–regularity if
    
        
  * u is differentiable with respect to t, and the partial derivative ∂_t u : [0,T] × (^d) ⟶ is continuous;
        
  * for all t ∈ [0,T], the mapping μ∈ (^d) ⟼ u(t, μ) is simply ^2, in the sense defined in <cit.>, and satisfies the assumptions of <cit.>.
    


The previous definition allows us to consider the natural extension for time dependent functions of the chain rule under ^2–regularity defined in <cit.>. Therefore, for any function v : [0,T] × (^2) ⟶ smooth enough in the sense of Definition <ref>, the chain rule under ^1,2–regularity is written as

    v ( t, μ^Y_t ) =     ∂_t v ( t, μ^Y_t )  t 
        + 𝔼^_t[ ∂_μ v ( t, μ^Y_t ) (Y_t) · Y_t ] 
        + 12𝔼^_t𝔼^_t[ Tr[ ∂_μ^2 v ( t, μ^Y_t ) ( Y_t, Y_t ) ⟨ Y, Y⟩_t ] ] 
       + 12𝔼^_t[ Tr[ ∂_y∂_μ  v ( t, μ^Y_t ) (Y_t) ⟨ Y ⟩_t ] ],

where Y is a copy of Y in the sense of Definition <ref> and ^_t must be understood according to Definition <ref> (iv).


Notice that another way to obtain this chain rule is to simplify the chain rule in <cit.> by considering a function which does not depend on the state process. 



 We are thus led to consider the following HJB equation, written on the space of measures:


























































































































    0 =     ∂_t v ( t, μ^Y_t )
        + 12( σ^∘)^2 ( 
        ∬∂_μ^X^2  v ( t, μ^Y_t ) (y, y) μ^Y_t ( y) μ^Y_t (y)
        + ∫(θ∂_μ^L v ( t, μ^Y_t ) (y) + ∂_x∂_μ^X v ( t, μ^Y_t ) (y) ) μ^Y_t ( y) )
        
       + ∫∂_μ^L v ( t, μ^Y_t ) (y) (g-f)(x) μ^Y_t ( y) 
        + 12sup_v∈^3 h(μ^Y_t, ∂_μ v (t, μ^Y_t), ∂_y∂_μ v (t, μ^Y_t), ∂^2_μ v (t, μ^Y_t), v),




















with terminal condition v ( T, μ^Y_T) = U^P ( - 𝔼^μ^L_T [L_T] ) and where, for any v_μ∈^1 × 2, v_y,μ∈^2 × 2 and v_μ, μ∈(^2)^2 × 2,

















    h(μ, v_μ, v_y,μ, v_μ,μ, v) :=
        
           - 2 ρ( z^-∧ A_max) ∫ v^1_μ (y) μ ( y)
        + 2 c^⋆ (z,γ) ∫ v^2_μ (y) μ ( y) 
       + Σ^⋆ (γ) ∫(
        (θ+ R_A  z^2 ) v^2_μ (y)
        + v^1,1_y,μ(y)
        + z^2 v^2,2_y,μ(y)
        + 2 z v^1,2_y,μ(y)
        ) (y) μ ( y)
        
       + (σ^∘)^2 (z + z^μ)^2 ∫(
        R_A v^2_μ(y) + v^2,2_y,μ(y)
        + ∫ v^2,2_μ,μ(y, y) μ (y) ) μ ( y) 
       + 2 ( σ^∘)^2 ( z + z^μ) ∫(
        v^1,2_μ,μ (y, y ) μ (y)
        + v^1,2_y,μ(y) ) μ ( y),




    If there is a solution v to PDE (<ref>), smooth enough in the sense of Definition <ref>, with partial derivatives satisfying for each ∈
    
    ^[ (∫_0^T ( ∫∂_μ^X v(t, μ^Y_t)(x, ℓ) μ^Y_t ( x, ℓ) )^2dt)^1/2] + ^[ sup_0≤ t≤ T| ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ)μ^Y_t ( x, ℓ)|^p^'/p^'-1] < + ∞,

    where p^'>1 is the exponent appearing in Lemma <ref>,
    and a function v^⋆ : [0,T] × (^2) ⟶^3 satisfying
    
    
    h(μ^Y_t, ∂_μ v (t, μ^Y_t), ∂_y∂_μ v (t, μ^Y_t), ∂^2_μ v (t, μ^Y_t), v^⋆ (t, μ^Y_t))
            = sup_v∈^3 h(μ^Y_t, ∂_μ v (t, μ^Y_t), ∂_y∂_μ v (t, μ^Y_t), ∂^2_μ v (t, μ^Y_t), v),

    then
    
        
  * v(0,μ^Y_0) = V_0^P;
        
  * the process ζ^⋆ defined for all t ∈ [0,T] by ζ_t^⋆ := v^⋆(t, μ^Y_t) is an optimal triple of parameters for the contract. 
    


 The result is quite similar to those found in the literature on McKean–Vlasov problems, see, e.g., <cit.>, or <cit.> for the most recent results. We refer to Appendix <ref> for the proof of this Proposition. In the following two subsections, we will specify the utility function U^P in order to consider two different cases:

    
  ∙ the case of a risk–averse Principal, with a CARA utility function and a risk–aversion parameter R_P > 0, in Subsection <ref>;
    
  ∙ the case of a risk–neutral Principal, with U^P (x) = x, in Subsection <ref>.


All the functions defined in the first case will be indexed by P to make the dependency explicit on R_P, for example V^P for the value of the Principal's problem. For the sake of consistency, they will be indexed by 0 in the second case, meaning that, informally, it is sufficient to set R_P=0 in a function defined in the risk–averse case to obtain the function in risk–neutral case.





  §.§.§ Principal with CARA utility


Under a constant relative risk aversion specification of the utility function of the producer, that is U^P (x) := - ^- R_P x, for some risk–aversion R_P > 0, we are looking for a solution v^P of (<ref>)  with the form 

    v^P (t, μ^Y_t) = - ^ R_P ( 𝔼^_t [L_t] - u^P (t, μ_t^X) ),  with  u^P (T, μ_T^X) = 0.



To lighten to notations, we will denote, for all function u : [0,T] × () ⟶,

    u_μ^X ( t, μ )    := ∫∂_μ^X u ( t, μ) (x) μ ( x),  u_x, μ^X ( t, μ ) := ∫∂_x ∂_μ^X u ( t, μ) (x) μ ( x), 
     and u_μ^X, μ^X ( t, μ )    := ∬∂_μ^X^2 u^P ( t, μ) ( x, x) μ ( x) μ (x),   for    (t, μ) ∈ [0,T] × (),

and we define the risk–aversion ratio R as 1/R := 1/R_A + 1/R_P,
with the convention R = 0 if R_A or R_P is equal to zero. It remains to solve a simplified HJB equation  for the function u^P:

    0 =     - ∂_t u^P ( t, μ^X_t )
        + ∫ (g-f)(x) μ_t^X ( x)
        + θ2(σ^∘)^2
        - 12( σ^∘)^2 u^P_x,μ^X( t, μ^X_t )
        + 12( (σ^∘)^2 R - ρ) ( u^P_μ^X( t, μ^X_t ) )^2 
       - 12( σ^∘)^2 u^P_μ^X, μ^X( t, μ^X_t )
        + 12inf_z ∈{ 
        F_0 ( q ( z,u^P_x,μ^X( t, μ^X_t ) ) )
        + ρ( (z^-∧ A_max) + u^P_μ^X( t, μ^X_t ) )^2
        },

with terminal condition u^P (T, μ^X_T ) = 0, and where 

    q (z, u)    :=θ+ R_A z^2 - u   and   F_0 (q) := inf_γ < 0{Σ^⋆ ( γ ) q + c_β^⋆ ( γ) }.





































In order to apply Theorem <ref>, we however need to ensure that Condition (<ref>) holds for the function v^P. Therefore, we assume that there exists some p > p^'/p^'-1 such that the following technical condition on the integrability of the contracts is enforced

    CARA^[ sup_0≤ t≤ T^p R_P ^[ ξ_t^ζ| _t^∘]]<+∞.
 
We will make use of the notation ε = √(p (p^'-1)/p^'). Under this assumption on contracts, we derive from Theorem <ref> the following verification result.

    Let u be a solution to PDE (<ref>), smooth enough in the sense of Definition <ref> and satisfying
    
    ^[  (∫_0^T | u_μ^X( t, μ^X_t ) |^2  t )^p^'/2 + sup_0 ≤ t ≤ Texp( - q^' p^'/p^'-1 R_P u (t, μ^X_t))  ] < + ∞,

   for q' = ε/(ε-1). Moreover, let v^⋆ : [0,T] ×() ⟶^3 be a function satisfying
    
    h^P ( u_μ^X( t, μ_t^X ), u_x, μ^X( t, μ_t^X ), v^⋆( t, μ_t^X ) ) = inf_v∈^3 h^P(u_μ^X( t, μ_t^X ), u_x, μ^X( t, μ_t^X ), v),

    where 
    
    h^P(u_1, u_2, v) :=    Σ^⋆ (γ) (h + R_A z^2 - u_2 )
            + c_β^⋆ (γ)
            + c_α^⋆ (z) 
            + 2 ρ( z^-∧ A_max) u_1 
       + (σ^∘)^2 (R_A + R_P) (z + z^μ)^2
            - 2 R_P ( σ^∘)^2 ( z + z^μ) u_1,

    then
    
        
  * V_0^P = - ^ R_P ( ξ_0 - u ( 0, μ^X_0 ) );
        
  * the optimal payment rate to induce a reduction of the average consumption deviation is a process Z^⋆, defined for all t ∈ [0,T] by Z^⋆_t = z^⋆(t, μ^X_t ), where the function z^⋆ is solution of the minimisation problem in (<ref>) and satisfies
        
    z^⋆ (t, μ) =0,  when  u_μ^X (t, μ ) ≥ 0,
                 and   z^⋆ (t, μ) ∈[u_μ^X (t, μ ) ∨ - A_max, 0 ]   when  u_μ^X(t, μ) ≤ 0;

        
  * the optimal payment rate Z^μ,⋆ is a process defined for all t ∈ [0,T] by Z_t^μ,⋆ = z^μ,⋆( t, μ^X_t ) where
        
    z^μ,⋆ ( t, μ ) := - z^⋆ ( t, μ ) + R_PR_A + R_Pu_μ^X ( t, μ ).

        Recalling that Z_s^μ,⋆ := 𝔼^_s[ Z_s^μ,⋆ (X_s) ], we can arbitrary set that z^μ,⋆ ( t, μ) (x) ≡z^μ,⋆( t, μ ) for all x ∈.
        
  * the optimal payment rate Γ^⋆ to induce a reduction of the volatility of the consumption deviation is a process defined for all t ∈ [0,T] by Γ^⋆_t = γ^⋆( t, μ^X_t ) where
        
    γ^⋆ ( t, μ ) := - max{θ - u_x,μ^X ( t, μ ) + R_A ( z^⋆ ( t, μ ) )^2, 1λ},   where  λ = max_k=1, …, dλ^k;

        
  * the second-best optimal contract is given by
        
    U_A^-1 (R_0)     - ∫_0^T  (X_s, μ^X_s, ζ_s^⋆, α_s^⋆)   s 
                + ∫_0^T Z^⋆_s (  X_s - 𝔼^_s[ X_s ] )
                + R_PR_A + R_P∫_0^T u_μ^X(s, μ^X_s ) 𝔼^_s[ X_s ] 
       + 12∫_0^T ( Γ^⋆_s + R_A (Z^⋆_s)^2 ) ⟨ X ⟩_s
                + 12R_A R^2_P(R_A + R_P)^2( σ^∘)^2 ∫_0^T  ( u_μ^X(s, μ^X_s ) )^2  s
                - 12 R_A ( σ^∘)^2 ∫_0^T ( Z^⋆_s )^2  s,

        where ℋ was defined above in (<ref>).
    


We refer to Appendix <ref> for the proof of this proposition, which is a consequence of Theorem <ref>.




Interpretation of the optimal contract. 
The most interesting part of the optimal contract is given by Proposition <ref> (v), and concerns the infinitesimal payment Z^⋆_s (  X_s - 𝔼^_s[ X_s ] ). Indeed, since Z^⋆≤ 0 by Proposition <ref> (ii), this payment is positive if the consumer's deviation consumption is below the mean of others' deviation. Conversely, if the consumer make less effort than the rest of the pool, this part of the compensation will be negative. Therefore, a part of the compensation is based on the comparison between the deviation consumption of a consumer and the mean of others' deviation consumption. 



In addition to that, we can derive a more illuminating form of contract by denoting by X^∘ the deviation consumption without common noise, whose dynamic under optimal efforts is given by

    X^∘_t = - ρ( (Z^⋆_t)^-∧ A_max) d t + σ^⋆ ( Γ^⋆_t ) ·dW_t.

The contract can thus be written in terms of the common noise as

    U_A^-1 (R_0)     - ∫_0^t (X^∘_s + σ^∘ W^∘_s, ζ_s^⋆)   s 
        + ∫_0^t Z^⋆_s  X^∘_s
        + 12∫_0^t ( Γ^⋆_s + R_A (Z^⋆_s)^2 ) ⟨ X^∘⟩_s  
       + R_PR_A + R_Pσ^∘∫_0^t u^P_μ^X(s, μ^X_s )  W^∘_s 
        + 12R_A R^2_P(R_A + R_P)^2( σ^∘)^2 ∫_0^t  ( u^P_μ^X(s, μ^X_s ) )^2  s,

where (x, ζ^⋆) :=   12 H_d (z^⋆) + 12 H_v (γ^⋆) + f(x). We can then divide the study of the contract in two parts
     
        
  * The first line of the contract defined in (<ref>) is the classical contract form for drift and volatility control, indexed on the process X^∘, that is the part of the deviation consumption which is really controlled by the Agent:
        
            
  * the contract is linear in the level of X^∘ and its quadratic variation ⟨ X^∘⟩;
            
  * by responding to the contract with optimal efforts, the consumer gains a certain amount of utility. Therefore, the Principal can subtract the certainty equivalent of this utility gain from the contract, that is the constant part ∫_0^t (X^∘_s + σ^∘ W^∘_s, ζ_s^⋆)   s;
            
  * due to the risk–aversion of the consumer, the additional payment 1/2 R_A (Z^⋆_t)^2 ⟨ X^∘⟩_t is needed to compensate the infinitesimal payment Z_t^⋆ X^∘_t.
        
Since the common noise W^∘ represents in our framework the climate hazards, the process X^∘ can also be seen as the deviation consumption adjusted for climate hazards. Therefore, this part of the contract is a fixed compensation, independent of weather conditions.
        
  * The other part of the contract is an indexation on the common noise, that is the remaining risk the Principal wants to give to the Agent. As for the infinitesimal payment Z_t  X_t, due to the risk aversion of the consumer, the term R_P/R_A + R_Pσ^∘u^P_μ^X(s, μ^X_s )  W^∘_s,
        must be compensated by 
        
    12 R_A ( R_PR_A + R_Pσ^∘u^P_μ^X(s, μ^X_s ) )^2 ⟨ W^∘⟩_s = 12R_A R^2_P(R_A + R_P)^2( σ^∘)^2 ( u^P_μ^X(s, μ^X_s ) )^2  s.

    
    
We can already notice that, if the Principal is risk–neutral, she will not use at all the common noise to provide incentives to the Agent. Indeed, since she is risk–neutral and the consumers are risk–averse, it is too costly to share the risk, and she can bear it alone. We refer to the next Subsection for the detailed contract in the risk–neutral case.



The conclusion of this interpretation is that the indexation of the contract on others allows the Principal to divide the deviation consumption of an Agent into two parts: the part which is really controlled by the Agent, X^∘, and the common noise. Hence, she offers a compensation indexed on the controlled deviation X^∘ to encourage the Agent for making effort on the drift and the volatility. Moreover, if she is risk–averse, she adds to this contract a part indexed on the common noise, to share the remaining risk, even if regulatory rules prevent her from using the common noise directly in the contract. 



    In the case where the consumers are risk–neutral (R_A =0), PDE (<ref>) reduces to
    
    0 =     - ∂_t u^P ( t, μ_t^X )
            + ∫ (g-f)(x) μ_t^X ( x)
            + θ2(σ^∘)^2
            - 12( σ^∘)^2 u^P_x, μ^X( t, μ_t^X )
            - 12ρ( u^P_μ^X( t, μ_t^X ) )^2  
       - 12( σ^∘)^2 u^P_μ^X, μ^X( t, μ_t^X )
            + 12 F_0 ( θ - u^P_x, μ^X( t, μ_t^X ) )
            + 12inf_z ∈{ρ( (z^-∧ A_max) + u^P_μ^X( t, μ_t^X ) )^2
            }.

    
Noting that the infimum is attained for all t ∈ [0,T] at Z_t^⋆ = u^P_μ^X( t, μ_t^X ), the optimal payment rate Γ^⋆ to induce a reduction of the volatility of the consumption deviation is
    
    Γ_t^⋆ = - max{θ - u^P_x,μ^X( t, μ_t^X ), 1λ},

    and the optimal payment rate Z^μ, ⋆ is
    
    Z_t^μ,⋆ = - Z_t^⋆ + u^P_μ^X( t, μ_t^X ) = 0   for all  t ∈ [0,T].

    
Hence, the certainty equivalent of the Principal's utility and the resulting optimal contract does not depend on the producer's risk aversion R_P. Moreover, since Z^μ, ⋆=0, the contract is not indexed on the law of other consumers. This result is particularly interesting since this contract has a classical form in the sense of <cit.> extended to a common noise model. Note that unlike the literature on Principal–Agent problems considering one Agent, the case R_A=0 does not coincide with the first–best problem (see Appendix <ref>).
    






  §.§.§ Risk–neutral Principal


The value function of a risk–neutral Principal is defined as V_0^0 = sup_∈𝔼^[- 𝔼^_T[ L^ζ^_T ] ]. Under this specification for U^P, we are looking for a solution v^0 of (<ref>) with the form

    v^0 (t, μ_t^Y) = - 𝔼^_t[ L^ζ_t ] + u^0 ( t, μ_t^X ),  with  u^0 (T, μ_T^X ) = 0.


By adapting the reasoning of Proposition <ref>, we obtain the following HJB equation  associated to u^0

    0 =     - ∂_t u^0 (t, μ_t^X)
        + ∫ (g-f)(x) μ_t^X ( x) 
        + θ2(σ^∘)^2
        - 12( σ^∘)^2 u^0_x, μ^X( t, μ^X_t )
        - 12ρ( u^0_μ^X( t, μ^X_t ) )^2 
       - 12( σ^∘)^2 u_μ^X, μ^X^0( t, μ^X_t )
        + 12inf_z ∈{ 
        F_0 ( q (z,u^0_x,μ^X( t, μ^X_t ) ) )
        + ρ( ( z^-∧ A_max) + u^0_μ^X( t, μ^X_t ) )^2
        },

with terminal condition u^0 ( T, μ^X_T ) = 0. This result can be found intuitively by setting R_P=0 in (<ref>).




























































Similarly, we can deduce the following result from Proposition <ref> with R_P=0. 


    If there is a solution u to the PDE (<ref>), smooth enough in the sense of Definition <ref>, such that the following condition is satisfied
    
    ^[ (∫_0^T | u_μ^X( t,μ_t^X ) |^2dt)^1/2] < + ∞,
 
    and a function v^⋆ : [0,T] × () ⟶^3 satisfying 
    
    h^0 (u_μ^X(t, μ^X_t ), u_x, μ^X(t, μ^X_t ), v^⋆(t, μ^X_t ) ) = inf_v∈^3 h^0 ( u_μ^X(t, μ^X_t ), u_x, μ^X(t, μ^X_t ), v),

    then
    
        
  * V_0^0 = - ξ_0 + u ( 0, μ^X_0 );
         
  * the optimal payment rate to induce a reduction of the average consumption deviation is the process Z^⋆ defined for all t ∈ [0,T] by Z^⋆_t = z^⋆( t, μ_t^X ) where the function z^⋆ is the optimiser  of the minimisation problem in (<ref>), and satisfies
        
    z^⋆ (t,μ) =0, u_μ^X (t,μ) ≥ 0,
                 z^⋆(t,μ) ∈[u_μ^X (t,μ) ∨ - A_max, 0 ]  u_μ^X (t,μ) ≤ 0;

        
  * the optimal payment rate Z^μ, ⋆ is equal to -Z^⋆;
        
  * the optimal payment rate Γ^⋆ is defined for all t ∈ [0,T] by Γ_t^⋆ := γ_t^⋆( t, μ^X_t ) where
        
    γ^⋆ (t, μ) := - max{θ- u_x,μ^X (t, μ)  + R_A (z^⋆ (t, μ))^2, 1λ};

               
  * let ζ^⋆ := ( Z^⋆, Z^μ, ⋆, Γ^⋆), then the second–best optimal contract is given by
        
    ξ_0  - ∫_0^t  (X_s, μ^X_s, ζ_s^⋆, α_s^⋆)   s 
                + ∫_0^t Z^⋆_s (  X_s - 𝔼^_s[ X_s ] )
                + 12∫_0^t ( Γ^⋆_s + R_A (Z^⋆_s)^2 ) ⟨ X ⟩_s- 12 R_A ( σ^∘)^2 ∫_0^t ( Z^⋆_s )^2  s.

    



    The proof consists simply in a slight adaptation of the proof in Appendix <ref>, by showing that the function v^0, defined as (<ref>), satisfies the assumptions necessary for the application of Theorem <ref>. Noticing that
    
    ∫∂_μ^X v(t, μ^Y_t)(x, ℓ) μ^Y_t ( x, ℓ) = u_μ^X( t,μ_t^X )   and  ∫∂_μ^L v(t, μ^Y_t)(x, ℓ)  μ^Y_t ( x, ℓ) = -1,

    and since u satisfies the condition (<ref>), we directly deduce that v satisfies (<ref>).




    Notice that the risk–neutral Principal's problem can be rewritten as follows
    V_0^0 = sup_∈𝔼^[- L^ζ^_T ]. Therefore, it is a standard stochastic control problem and can thus be solved in the classical way. Nevertheless, for the sake of consistency throughout this paper, we choose to solve it using Theorem <ref>.



Interpretation of the optimal contract. As in the previous subsection, to better see the compensation the consumer will receive, we can denote by X^∘ his deviation consumption without common noise, and write the contract in term of common noise:

    ξ_t^ζ^⋆ = ξ_0 - ∫_0^t (X^∘_s + σ^∘ W^∘_s, ζ^⋆_s )   s 
        + ∫_0^t Z^⋆_s  X^∘_s
        + 12∫_0^t ( Γ^⋆_s + R_A (Z^⋆_s)^2 ) ⟨ X^∘⟩_s.


Therefore, in the risk–neutral case, the optimal contract is the classical contract form for drift and volatility control, indexed on the process X^∘, the deviation consumption adjusted for climatic hazards. This result comes from the fact that the Principal uses the indexation of the contract on the deviation of others, z^μ, to isolate the common noise. Hence, she has a clear view of what is the deviation consumption of the Agents, without the common noise (X^∘). Therefore, she can offer a payment which is only indexed on the part of the consumption which is really optimised by the Agents. In this particular case of risk–averse Agents and risk–neutral Principal, the Principal can bear the risk alone and offers a contract which does not depend on the common noise. 





 §.§ Application to linear energy value discrepancy (EVD)


 The energy value discrepancy is the difference between a consumer's preference toward his deviation consumption (represented by the function f) and the production costs of this deviation (represented by g).
Following the line of <cit.>, to obtain closed–form solutions, we consider in this section the case where 

    (f-g) (x) = δ x,   x ∈ℝ.
 

Intuitively, if δ is positive, this means that the energy is more valuable for the consumer than it is costly for the producer. Therefore, a reduction of the consumption has a negative effect more important on the consumers' utilities than the positive effect on the producer's utility. Similarly, δ negative implies that an increase of consumption induces more cost for the producer than the benefit generated for the consumer. Therefore, intuitively, if δ is negative, it will be easier for the Principal to incentivise the consumers to reduce their consumption. 



Under this assumption, we derive a closed-form solution in both cases of a risk–averse and risk–neutral Principal and more explicit optimal payment rates. To lighten the notation, we define

    h(t, z) := F_0 (θ+ R_A z^2 ) + ρ( (z^-∧ A_max) + δ (T-t) )^2,  (t,z)∈[0,T]×.

We sum up the results in the following proposition.




























    Let the energy value discrepancy be linear, i.e. (f-g)(x) = δ x, x ∈ℝ. Define the certainty equivalent function u^P as
    
    u^P (t, μ_t^X) :=     δ (T-t) ∫ x μ_t^X ( x) - ∫_t^T m^P(s)  s,  where  m^P (t) := θ2( σ^∘)^2 
            + 12( ( σ^∘)^2 R - ρ) δ^2 (T-t)^2
            + 12inf_z ∈h(t, z),

    then
    
        
  * the optimal payment rate process ζ^⋆ = (Z^⋆, Z^μ, ⋆, Γ^⋆) is a deterministic function of time, independent of σ^∘ and is defined by
        
    Z_t^⋆   = Argmin_z ∈ℝh(t, z),  Z_t^μ, ⋆ = -Z_t^⋆ + R_PR_A + R_Pδ (T-t)   and  Γ_t^⋆ = - max{θ+ R_A (Z_t^⋆)^2, 1λ}.

        for all t ∈ [0,T].
    
  * the value function of a producer with a CARA utility function and a risk–aversion parameter R_P is given by V_0^P = - ^ R_P ( ξ_0- u^P ( 0, μ^X_0 ) );
    
  * the value function of a risk–neutral producer is given by V_0^0 = - ξ_0 + u^0 ( 0, μ^X_0 ).
    



    The proof of this proposition is a straightforward application of Propositions <ref> and <ref> with the specification (f-g)(x) = δ x, since the functions u^P and u^0 respectively satisfy Conditions (<ref>) and (<ref>). Indeed, noticing that u^P_μ^X(t, μ^X_t ) = u^0_μ^X(t, μ^X_t ) = δ (T-t), we clearly have 
    
    ^[  (∫_0^T | u^P_μ^X( t, μ^X_t ) |^2  t )^p^'/2]
            = δ^p^'T^3p^'/23^p^'/2  < + ∞  and  ^[ (∫_0^T | u^0_μ^X( t,μ_t^X ) |^2dt)^1/2]
            = δT^3/2√(3) < + ∞.
    
    Therefore, u^0 satisfies the condition (<ref>). To show that u^P satisfies (<ref>), it remains to prove that
    
    ^[ sup_0 ≤ t ≤ T^ - q^' p^'/p^' -1 R_P ( δ (T-t) ^ [X_t | ^∘_t] + ∫_t^T m^P(s)  s ) ],
            < + ∞

    which is true since m^P is continuous and X has bounded drift and volatility.



























    











































The above proposition underlines the fact that the optimal payment rates (Z^⋆, Γ^⋆) are the same, in both cases of a risk–averse or risk–neutral Principal. Hence, the efforts of the consumers on their deviation consumptions will be the same, whatever the risk aversion of the Principal. The Principal controls the risk she wants to bear thanks to the control Z^μ. Indeed, in the risk–neutral case, the Principal does not care about the risk, hence Z^μ is such that the contract does not depend on the common noise. On the other hand, in the risk–averse case, the Agent is remunerated for a part of the common noise: the risk induced by the common noise is shared between the Agent and the Principal. 

Moreover, one can notice that in this particular case, the only information that the Principal uses from the conditional law μ^X is actually the conditional mean. Indeed, the only term with μ^X appears in the certainty equivalent function u^P of the producer, with the form ∫ x μ_t^X ( x) which is equal to ^ [X_t | ^∘_t].























    For all t ∈ [0,T], the optimal payment rate Z_t^⋆ is equal to zero if δ is non-negative and lies between δ (T-t) ∨ - A_max and 0 if δ < 0.





§ COMPARISON WITH CLASSICAL CONTRACTS


The aim of this section is to study the benefits of indexing the contracts on the distribution of the deviation of other consumers.

We thus consider, as a benchmark case, the producer's problem when incentives are limited to payments for efforts of the considered consumer. More precisely, we consider only contracts controlled by ζ^0 := (Z, 0, Γ) instead of ζ := (Z, Z^μ, Γ). We denote by 𝒱^0 the corresponding restriction of 𝒱. We provide the optimal contract ξ^0 and effort of the consumers in Subsection <ref>. We focus on the linear energy value discrepancy (EVD) case to compare the results, in terms of consumers' effort and producer's utility, between the two types of contracts, in both cases of a risk–averse (see Subsection <ref>) or a risk–neutral producer (Subsection <ref>). 








 §.§ Optimal form of contracts


We consider the same model,



with the same dynamic of the deviation consumption X,



but we restrict our study to contracts offered by the Principal to a consumer depending only his deviation. This type of contracts has the classical form of contracts for drift and volatility control (see <cit.>, <cit.>, <cit.>):

    ξ_T^0 =     ξ_0  - ∫_0^T ^∘ (X_t, ζ^0_t)   t 
        + ∫_0^T Z_t  X_t
        + 12∫_0^T ( Γ_t + R_A Z_t^2 ) ⟨ X ⟩_t ,

where ζ^0 := (Z, 0,Γ), an ×{0}×–valued –predictable process, is the set of parameters chosen by the Principal and with ξ_0= U_A^-1 (R_0).






























 Intuitively, we have shown in Theorem <ref> that the consumer's optimal response to a contract indexed by ζ = (Z, Z^μ, Γ) is independent of Z^μ, and in particular ν^⋆(ζ^0 ) = (α^⋆(Z), β^⋆(Γ)). Therefore, in the case of classical contracts, mainly with Z^μ = 0, the latter should be the same function of (Z, Γ).






This result coincides with the results of <cit.>, and is consistent with the Remark <ref>. Thus, these contracts lead obviously to the same unique mean–field equilibrium as the one defined in Theorem <ref>.

















The Principal has to choose optimally the indexation parameters (Z, Γ) to maximise her utility. Her value function is the same as before, but restricted to the controls ζ^0∈^0

    V_0^0,P := sup_ζ^0 ∈^0^[ U^P ( - 𝔼^[ L^ζ^0_T | ^∘_T ] ) ].



Following the lines of the Section <ref>, 













































































































































we obtain an HJB equation  similar to (<ref>), but with the supremum on ζ^0 (intuitively by considering Z^μ = 0 in (<ref>)).





















































Therefore, we can establish an analogous result to Theorem <ref>.























 §.§ Principal with CARA utility




  §.§.§ Theoretical results


Under a CARA specification of the utility function of the producer, by mimicking Section <ref>, we expect a solution v^0,P to the HJB equation  associated with (<ref>) to be given by

    v^0,P (t, μ^Y_t) = - ^ R_P ( 𝔼^_t[ L^ζ^0_t ] - u^0,P (t, μ_t^X) ),

where u^0,P satisfies the following PDE (similar to (<ref>)) 

    0 =     - ∂_t u^0,P 
        +  ∫ (g-f)(x) μ_t^X ( x) 
        + θ2( σ^∘)^2 
        - 12( σ^∘)^2 u^0,P_x, μ^X 
        - 12( σ^∘)^2 u^0,P_μ^X, μ^X 
        - 12ρ( u^0,P_μ^X)^2
        
       + 12inf_z ∈{ 
        F_0 ( q ( z,u^0,P_x,μ^X) )
        + R_A (σ^∘)^2 z^2 
        + ρ( ( z^-∧ A_max) + u^0,P_μ^X)^2
        + R_P ( σ^∘)^2 ( - z + u^0,P_μ^X)^2
        },

with terminal condition u^0,P ( T, μ_T^X) = 0.




























































We can state the equivalent of Proposition <ref> in our benchmark case with classical contracts.

    If there is a solution u to PDE (<ref>), smooth enough in the sense of Definition <ref>, satisfying the condition (<ref>), and a function v^0,⋆ : [0,T] × (_T) ⟶×{0}×ℝ that reaches the infimum of h^P defined by (<ref>),
    
    
    
    
    then
    
        
  * V_0^0,P = - ^ R_P ( ξ_0 - u ( 0, μ^X_0 ) );
        
  * the optimal payment rate to induce a reduction of the average consumption deviation is the process Z^0,⋆ defined for all t ∈ [0,T] by Z^0,⋆_t := z^0,⋆(t, μ^X_t ) where the function z^0,⋆ is the minimiser of the minimisation problem in (<ref>);
        
  * the optimal payment rate Γ^0,⋆ to induce a reduction of the volatility of the consumption deviation is defined for all t ∈ [0,T] by Γ_t^0,⋆ := γ^0,⋆( t, μ^X_t ) where
        
    γ^0,⋆ (t, μ) := - max{θ- u_x,μ^X (t, μ)  + R_A (z^0,⋆ (t, μ) )^2, 1λ}.

    



















































    In the case where the consumers are risk–neutral (R_A =0), the PDE reduces to
    
    0 =     - ∂_t u^0,P
            +  ∫ (g-f)(x) μ^X ( x) 
            + θ2( σ^∘)^2 
            - 12( σ^∘)^2 u^0,P_x, μ^X
            - 12( σ^∘)^2 u^0,P_μ^X, μ^X
            - 12ρ( u^0,P_μ^X)^2 
       + 12 F_0 ( θ - u^0,P_x,μ^X)
            + 12inf_z ∈{ρ( ( z^-∧ A_max) + u^0,P_μ^X)^2
            + R_P ( σ^∘)^2 ( - z + u^0,P_μ^X)^2
            },

    
    
    
    
    
    
    Hence, the infimum is attained for z^⋆ := u^0,P_μ^X and, similarly to Remark <ref>, the resulting optimal contract do depend on the producer's risk aversion R_P. 


In order to obtain closed–form solutions, we can study the case of the linear EVD, similarly to Proposition <ref>. To lighten the notations, we denote

    h^P (t,z) := F_0 (θ + R_A z^2)
        + R_A (σ^∘)^2 z^2 
        + ρ( (z^-∧ A_max) + δ (T-t) )^2
        + R_P ( σ^∘)^2 ( - z + δ (T-t) )^2.


    Let the energy value discrepancy be linear, i.e. (f-g)(x) = δ x, x ∈ℝ. Then,
    
        
  * the producer's value function is given by V_0^0,P = - ^ R_P ( ξ_0 - u^0,P ( 0, μ^X_0 )) where the certainty equivalent function u^0,P is characterised by 
        
    u^0,P (t, μ_t^X)    = δ (T-t) ∫ x μ_t^X ( x) - ∫_t^T m^0,P(s)  s,   where  
            
            
                m^0,P (t) := θ2( σ^∘)^2
                - 12ρδ^2 (T-t)^2
                + 12inf_z ∈h^P (t,z),

        
  * the optimal payment rate process ζ^0,⋆ = ( Z^0,⋆, 0, Γ^0,⋆) is a deterministic function of time given by
        
    Z_t^0,⋆ = Argmin_z ∈ℝh^P (t,z)   and  Γ_t^0,⋆ = - max{θ + R_A ( Z_t^0,⋆)^2, 1λ}  for  t ∈ [0,T].

    


The main point is to study the consumers' effort and the producer's utility when she offers new contracts compared to classical ones, through a comparative analysis of the previous proposition with Proposition <ref>.




  §.§.§ Numerical results and discussion


To compare the efforts of consumers on the average level of their consumption, we need to compare Z^⋆ with Z^0,⋆, and Γ^⋆ with Γ^0,⋆ for their efforts on the volatility, since, by Theorem <ref>, for t ∈ [0,T],

    α_t^⋆ := a^⋆ (Z_t^⋆)   and  β_t^⋆ := b^⋆ (Γ_t^⋆).

Although some inequalities can be obtained analytically, it may be required to numerically compute the optimal payment rate Z^⋆, since this is the only quantity for which we cannot get a closed–form expression in the linear EVD case, see Proposition <ref>. For numerical computations, the calibration of the parameters detailed in <cit.> is used. Indeed, even if they considered in <cit.> the consumption, by fixing the initial condition of the consumption to be zero, the consumption process X in their work becomes directly the observed reduction of consumption, which is our canonical process X. More precisely, we will consider most of the time T=5.5 h, θ=4 × 10^-3 p/kW^2h, κ=11.76 p/kWh, δ=-55.44 p/kWh, R_P=6 × 10^-3 p^-1, R_A=5,7 × 10^-3 p^-1, ρ=9.3  × 10^-5 kW^2h^-1p^-1, η=1, λ=2.8  × 10^-2 kW^2h/p (p stands for pence). We will explicitly indicate different values for specific parameters, for instance when we investigate the influence of R_P on the utility of the Principal. Concerning the volatility calibrated in <cit.> (namely the nominal volatility, with value 0.085 kW/h^1/2), we will suppose that it is equal to the total volatility without effort in our model, i.e. √(Σ(1) + ( σ^∘ )^2). Hence, we will consider different values for σ^∘ but such that the total volatility without effort remains constant, equal to 0.085. Notice that the numerical computations will be performed for d=1.



Comparison of efforts. In order to compare the effort of the consumers, we need to distinguish two cases, depending on the sign of the linear EVD parameter δ.



(i) We first focus on the most representative case where δ≤ 0, since empirical results in <cit.> provide δ = -55.44. However, analytic comparison of efforts in this case is not clear. Figure <ref> represents the optimal efforts of the consumers on the drift and the volatility for two values of R_P close to the one calibrated in <cit.>, and when 50% of the variance is explained by the common noise (i.e. σ^∘ = σ = 0.085/√(2)≈ 0.0601). The blue lines represent the optimal efforts in the case of classical contracts, while the orange lines are dedicated to our new contracts. Recall that, with contracts indexed on others, the effort of the Agents on the drift and on the volatility are independent of the risk aversion of the Principal. Therefore, 

    
  * for R_P = 0.006 (upper graphs), thanks to the contract indexed on others, the Principal can incentivise the consumers to make more effort on the drift and on the volatility (orange curves compared to blue ones), for the entire duration of the contract;
    
  * if the risk aversion of the Principal increases (R_P = 0.03, lower graphs), with the classical contract, she is asking the consumer to make more efforts, whereas with the contract indexed on others, she requires the same effort regardless of her risk aversion. Thus, we obtain that with the new contract, the consumer makes still more efforts in the beginning of the contract, but less after. 


  

The fact that the efforts are decreasing in time can be explained as follows. At every moment t ∈ [0,T] of the contract, what matters to the Principal is rather the integral between 0 and t of the efforts than the instantaneous efforts. Indeed, she cares about the deviation X_t for all t ∈ [0,T], which is defined by X_t = - ∫_0^t α_t  t + ∫_0^t σ√(β_t) W_t + ∫_0^t σ^∘ W^∘_t, and the quadratic variation of X_T given by ⟨ X ⟩_T = ∫_0^T ( σ^2 β_t + (σ^∘)^2 )  t. Therefore, it is in the Principal's interest to ask for more effort at the beginning of the contract. In order to assess the benefit of our new contrats on the efforts of the consumers, we compute the following two quantities, 

    Δα^⋆ := ∫_0^T ( a^⋆ (Z^⋆_t) - a^⋆(Z_t^0,⋆) )  t /∫_0^T a^⋆(Z_t^0,⋆)  t  and  Δβ^⋆ := - σ^2 ∫_0^T (  b^⋆ (Γ^⋆_t) - b^⋆(Γ_t^0,⋆) )  t /σ^2 ∫_0^T b^⋆(Γ_t^0,⋆)  t + T (σ^∘)^2

representing the relative gain respectively in mean and in volatility of the consumption between new and classical contracts. More precisely, if Δα^⋆≥ 0 (resp. Δβ^⋆≥ 0), the new contracts incentivise the consumers to decrease more the mean (resp. the volatility) of their total consumption at the end of the contract (at time T). The results are presented in Figure <ref>. We choose values for R_P of the same order than the estimation in <cit.>. For σ^∘, we set values such that ( σ^∘ )^2 = x % of the total variance without effort (nominal variance), i.e. Σ(1) + ( σ^∘)^2 = 0.085^2. For example, when σ^∘ = 0.085, then (σ^∘)^2 = 100 % of the nominal variance: this means that the volatility in the deviation consumption is entirely related to climate hazards (σ = 0).


  



Figure <ref> show that, in most cases, our new contracts lead to a significant decrease in consumption on average and on volatility compared to classical contracts. However, when the risk–aversion of the Principal increases, this gain becomes negative. Nevertheless, it can be stressed that, on the one hand, for the parameters calibrated in <cit.>, there is a significant gain regardless of the correlation with the common noise. On the other hand, even if the Principal has a relatively high risk–aversion, our new contracts allow a reduction on average and on volatility of the consumption if it is strongly impacted by weather conditions. Therefore, our contracts can help to better manage consumption cut-off during peak demand due to climate hazard.







(ii) Out of curiosity, we can also investigate the positive δ case. Using Remark <ref>, we can prove, analytically in this case, that Z^0,⋆≥ Z^⋆ = 0. On the one hand, since the payment rate on the drift is positive in both cases and using Theorem <ref>, the effort of the consumer to reduce his consumption in average is zero. On the other hand, this inequality leads to Γ^0, ⋆≤Γ^⋆≤ 0. Therefore, when the Principal offers classical contracts, she incentivises more the consumers to make effort on the volatility. Nevertheless, since λ = 2.8 × 10^-2 and θ=4 × 10^-3, we can remark that the consumer will in fact make no effort on the volatility, since 

    Γ_t^0,⋆ = - max{θ+ R_A (Z_t^0,⋆)^2, 1/λ} = - 1/λ,

and thus 

    β_t^⋆( Γ_t^0,⋆) = 1 ∧( λ( Γ_t^0,⋆)^- )^-1/(η^k + 1)∨ B_min = 1.

Therefore, for small λ, both contracts lead to zero effort on the drift and on the volatility. To find a case where our contracts induce less effort on the volatility than classical ones, we need to increase drastically λ for example. Figure <ref> illustrates this particular case, with δ = 5, λ = 2.8 and when 50% of the variance is explained by the common noise (σ^∘ = σ = 0.085/√(2)).


 

Although this result does not seem intuitive, the explanation is as follows. When δ is positive, a reduction of the consumption strongly decreases the consumers' utility in comparison to the marginal gain on the producer's utility. Therefore, it is too costly for the Principal to incentivise the consumers to make efforts, in particular on the drift. Thus, the Principal sets a non negative payment rate Z (upper left graph). However, since she is risk–averse, she wants to share some risk with the consumers through the contract.  In the classical contracts case, the only way to share risk is through the infinitesimal payment Z^0,⋆_t  X_t. This explain why Z^0,⋆ is positive (upper left graph, blue curve), while, in the new contracts case, the Principal can share the risk through the indexation on others by Z^μ, ⋆, and can therefore set Z^⋆=0 (upper left graph, orange curve). Moreover, when the Principal offers a positive payment Z, she needs to compensate by giving a negative payment Γ (upper right graph, blue curve), in order to minimise the payment indexed on the quadratic variation (Γ_t + R_A Z_t^2) ⟨ X ⟩_t. Otherwise, in the new contracts case, the Principal manages the risk through the payment rate Z^μ, and does not need to compensate with a small (negative) Γ (upper right graph, orange curve).

We may think that the previous results are disappointing, because consumers make less effort to reduce the volatility of their consumption (lower right graph). But as mentioned above, we insist on the fact that this case is not supposed to happen, since, according to calibration in <cit.>, λ=2.8 × 10^-2 and δ=-55.44 ≤ 0.



Comparison of utility. We can prove analytically that the utility of the Principal is bigger in the case she can indexed contracts on others' deviation consumption. Indeed, we have

    m^0,P (t) =     θ2( σ^∘)^2
        - 12ρδ^2 (T-t)^2
        + 12inf_z ∈h^P (t,z) 
    ≥    θ2( σ^∘)^2
        - 12ρδ^2 (T-t)^2
        + 12inf_z ∈h(t,z)
        + 12(σ^∘)^2 inf_z ∈{ R_A  z^2 + R_P ( - z + δ (T-t) )^2 }.


The second infimum is attained on z = R_P δ (T-t) / (R_A + R_P), which leads to

    m^0,P (t) ≥    θ2( σ^∘)^2
        + 12( (σ^∘)^2 R - ρ) δ^2 (T-t)^2
        + 12inf_z ∈h(t,z)
        = m^P (t).

Hence, for all t ∈ [0,T] we have m^0,P (t) ≥  m^P (t), and thus




V_0^P≥ V_0^0,P. This result is very intuitive since in the case of new contracts, the Principal has more controls to maximise her utility (three instead of two).



In order to assure convergence when R_P tends to zero, we draw in Figure <ref> the utility difference defined as follow

    Δ V = 1+V_0^PR_P - 1+V_0^0,PR_P =  1R_P( V_0^P - V_0^0,P),

since 

    lim_R_P → 01+V_0^PR_P = lim_R_P → 01- ^ R_P ( ξ_0 - u^P ( 0, μ^X_0 ) ) R_P = -  ξ_0 + u^0 ( 0, μ^X_0 ) = V_0^0.

We study the effect of the risk–aversion parameter R_P on the producer's utility, and also the impact of the percentage of variance related to common noise. 





First of all, notice that the utility difference is of order 1, as the utility itself. Therefore, we have a significant gain by implementing this type of contracts, which is confirmed by Figure <ref>, representing the relative utility difference, computed as:

    ΔV = 1+V_0^PR_P - 1+V_0^0,PR_P1+V_0^0,PR_P
        = V_0^P - V_0^0,P1+V_0^0,P.


Moreover, it is clear that the more significant the correlation with the common noise is, the more important the utility difference is. This is an expected result, since our type of contracts allows the Principal to better choose the remaining risk she wants to bear, by indexing the contract on others. We have already noticed that, in absence of common noise (σ^∘ = 0), our contracts are reduced to classical contracts for drift and volatility control. 



Figure <ref> shows also that the gain in utility is decreasing with the risk–aversion of the Principal. Indeed, with classical contracts, she is forced to give to the consumers some risk through the linear payment Z_t  X_t. Since the consumers are risk–averse too, this payment must be compensated by a deterministic one. Our new contracts allows her to better choose the risk she wants to bear. On the one hand, if her risk–aversion is low, she can keep all the risk to herself. Thus, she does not need to compensate the risk with a deterministic payment, and therefore she make a significant gain. On the other hand, if she is risk–averse, she adds a random part to the contract, indexed on the common noise:

    R_PR_A + R_Pσ^∘δ∫_0^t (T-s)  W^∘_s.

But, since the consumers are risk–averse too, this random payment must be compensated by its quadratic variation:

    12R_A R^2_P(R_A + R_P)^2( σ^∘)^2 δ^2 ∫_0^t  ( T-s )^2  s,

Therefore, the more risk–averse the Principal is, the more costly it is for her to spread the risk.






 §.§ Risk–neutral Principal


If the Principal is risk–neutral,

































we expect a solution of the form 

    v^0,0 (t, μ^Y_t) = - 𝔼^_t[ L_t^ζ^0] + u^0,0 (t, μ_t^X).


It can be formally proved that the results of the previous section hold with R_P =0. In particular, u^0,0 is solution to the PDE (<ref>) with R_P = 0,














and we can also state the equivalent of the proposition <ref> with R_P=0 in this case.
















But, in order to obtain closed–form solution, we focus on the case of the linear energy value discrepancy.

    Let the energy value discrepancy be linear, i.e. (f-g)(x) = δ x, x ∈ℝ. Then
    
        
  (i) the producer's value function is given by V_0^0,0 = - ξ_0 + u^0,0 ( 0, μ^X_0 ) where the certainty equivalent function u^0,0 is characterised by 
        
    u^0,0 (t, μ_t^X)    = δ (T-t) ∫ x μ_t^X ( x) - ∫_t^T m^0,0(s)  s,   where  
                m^0,0 (t) := θ2( σ^∘)^2
                - 12ρδ^2 (T-t)^2
                + 12inf_z ∈h^0 (t,z),

        
  (ii) the optimal payment rate process ζ^0,⋆ = (Z^0,⋆, Γ^0,⋆) is a deterministic function of time given by
        
    Z_t^0,⋆ = Argmin_z ∈ℝh^0 (t,z)   and  Γ_t^0,⋆ = - max{θ+ R_A (Z_t^0,⋆)^2, 1λ}.

    


Let us compare this Proposition with the Proposition <ref>.



Comparison of efforts. As previously, we need to distinguish between cases according to positive or negative δ.



(i) On the one hand, in the meaningful case, when δ≤ 0, the efforts of the consumers are higher when the Principal can indexed contracts on other's deviation. In fact, let us recall the optimal payment rates Z in the two cases:

    Z_t^0,⋆   = Argmin_z ∈{ F_0 (h + R_A z^2)
        + R_A (σ^∘)^2 z^2 
        + ρ( (z^-∧ A_max) + δ (T-t) )^2 
        }≤ 0, 
     and   Z_t^⋆   = Argmin_z ∈{ F_0 (h + R_A z^2)
        + ρ( (z^-∧ A_max) + δ (T-t) )^2 
        }≤ 0.


By definition of the minimum, we have:

    F_0 (θ+ R_A ( Z_t^0,⋆)^2 )
        + R_A (σ^∘)^2  ( Z_t^0,⋆)^2
        + ρ(  ( ( Z_t^0,⋆)^-∧ A_max) + δ (T-t) )^2 
    ≤    F_0 (θ + R_A z^2)
        + R_A (σ^∘)^2 z^2 
        + ρ ( (z^-∧ A_max) + δ (T-t) )^2,

for all z, and in particular for z=Z_t^⋆. In the same way,

    F_0 (θ+ R_A ( Z_t^⋆)^2 )
        + ρ( ( Z_t^⋆)^-∧ A_max) + δ (T-t) )^2
           ≤ F_0 (h + R_A z^2)
        + ρ ( (z^-∧ A_max) + δ (T-t) )^2,

for all z and in particular for z=Z_t^0,⋆. Hence, using the first and then the second inequality we have

    R_A (σ^∘)^2 ( ( Z_t^0,⋆)^2 - ( Z_t^⋆)^2  )
        ≤    F_0 (θ+ R_A ( Z_t^⋆)^2 ) - F_0 (θ+ R_A ( Z_t^0,⋆)^2 ) 
       + ρ( ( Z_t^⋆)^-∧ A_max  + δ (T-t) )^2 - ρ(  ( Z_t^0,⋆)^-∧ A_max + δ (T-t) )^2 ≤ 0.


Hence R_A (σ^∘)^2 ( Z_t^0,⋆ - Z_t^⋆) ( Z_t^0,⋆ + Z_t^⋆) ≤ 0, and since Z_t^0,⋆,   Z_t^⋆≤ 0, we obtain 0 ≥ Z_t^0,⋆≥ Z_t^⋆. Therefore, in the case where the Principal can index contracts on the deviation consumption of others, the efforts of the consumer to reduce his deviation consumption in average is more important. Moreover, the inequality on the optimal payment rate Z implies that 0 ≥Γ_t^0,⋆≥Γ^⋆: the effort on the volatility is also more important. These results are presented in Figure <ref> for (σ^∘)^2 = 50%, i.e. 50% of the variance is explained by the common noise.

  



(ii) On the other hand, if δ≥ 0, we obtain Z^⋆ = 0 in both cases, which leads to zero effort from the consumers on their deviation consumption in average. Moreover, the optimal payment rate Γ^⋆ is also the same in both cases and leads to the same effort on the volatility. Therefore, in this particular case, the choice of new or classical contracts does not affect the consumers efforts.



Comparison of utility. The utility of a risk–neutral Principal is higher when she can index contracts on others' deviation consumption. Indeed,

    m^0,0 (t) =     θ2( σ^∘)^2
        - 12ρδ^2 (T-t)^2
        + 12inf_z ∈{ 
        F_0 (h + R_A z^2)
        + R_A (σ^∘)^2 z^2 
        + ρ( (z^-∧ A_max) + δ (T-t) )^2 }
    ≥    θ2( σ^∘)^2
        - 12ρδ^2 (T-t)^2
        + 12inf_z ∈{ 
        F_0 (h + R_A z^2)
        + ρ( (z^-∧ A_max) + δ (T-t) )^2
        } = m^0 (t).


Hence, for all t ∈ [0,T] we have m^0,0 (t) ≥  m^0 (t), which leads to

    - ∫_t^T m^0,0 (s)  s ≤ - ∫_t^T m^0 (s)  s,

and we conclude that V_0^0≥ V_0^0,0. This result is shown in Figure  <ref>. The absolute utility difference and the relative utility difference are increasing with respect to the correlation with the common noise, which is consistent with the intuition that the contract allows the Principal to manage the remaining risk. The more important this risk is, the more gain in utility the Principal receives. 





To conclude this section, considering linear EVD, there is a net benefice from implementing contracts with indexation on others' deviation consumption. In addition to the substantial gain in utility for the Principal, this type of contracts induces, in general, more efforts of the consumers to reduce their consumption in average and with less volatility. The best results are obtained for a risk–neutral producer. In this case, if the variance of the deviation is only explained by the common noise, the utility with new contracts is up to 1.5 the utility with classical contracts (see Figure <ref>). Moreover, Figure <ref> (left) shows that consumers reduce their consumption by 1.5 times more on average. The best results on volatility is when the volatility is half explained by the common noise, i.e. for σ^∘= 0.085 / √(2). The consumers thus increase their efforts on the volatility by almost 4%.







































    
































    

















































    















    







§ EXTENSION AND FIRST–BEST



 §.§ Contractible common noise


Throughout this paper, we have studied optimal contracting in the case where the Principal can not offer a contract directly indexed on the common noise. 

The goal of this section is to define an optimal form of contract in the case of a contractible common noise, and compare the results to those obtained in the previous case. In Section <ref>, we were looking at the optimal form of contracts for the representative consumer in the case the Principal can only index the contract on his deviation consumption and the conditional law of others. The Remark <ref> leads us to also study the class of contracts one can obtain if the Principal is able to index the contract on it. From (<ref>), we recall that, in this case, the Principal is offering a contract ^obs,∘–measurable. 



Therefore, we expect that the value function of the consumer now depends on three state variables: X, μ and W^∘. We consider the dynamic version of the value function of the representative consumer, V_t^A, which may be written as

    V^A_t = v^A (t, X_t ∧·, W^∘_t ∧·, μ_t).
 

If the function v^A : [0,T] ×([0,T], ^2) × (_T) is smooth enough in the sense defined in <cit.>, we can apply the Chain Rule with Common Noise under ^1,2,2–regularity, defined in <cit.> to v^A.















Following the same reasoning as the one developed in the Subsection <ref>, and using the computations in Remark <ref>, we obtain the following form of contract, 

















































indexed by the triple ζ^∘ = (Z, Z^∘, Γ),

    ξ_t =     ξ_0  - ∫_0^t ^∘ (X_s, ζ^∘_s)   s 
        + ∫_0^t Z_s  X_s 
        + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s
        + σ^∘∫_0^t Z^∘_s  W^∘_s 
        + 12 R_A ( σ^∘)^2 ∫_0^t Z^∘_s ( 2 Z_s + Z^∘_s )^2  s.


Therefore, if the Principal observes the common noise, it is equivalent to index the contract on the law of others or on the common noise. Indeed, the form of contract we obtain here is the same as the one in Remark <ref>. This contracts leads obviously to the same effort of the consumers and to a unique mean–field equilibrium. If we compare both cases where the Principal observes or not the common noise, the only difference is the measurability of the contract's parameters. In fact, the optimal form of contract is the same whether the Principal observes or not the common noise. Of course, the form of the contract is more explicit in this case, and we don't need the indexation on the law of others, but the only change is that the control ζ^∘ of the Principal here is predictable with respect to a bigger filtration ^obs,∘. 



To sum up, if the Principal does not observe the common noise, ^obs is the natural filtration generated by X and μ, thus ζ is ^obs–measurable and the optimal form of contract is given by (<ref>). If the Principal observes the common noise, ^obs, ∘ is the natural filtration generated by X, μ and W^∘, thus ζ is ^obs, ∘–measurable and the optimal form of contract is given by (<ref>). In this case, indexing the contract on μ or W^∘ is equivalent. In both cases, the contract form is the same, but we are allowed or not to write it in term of the common noise. 



If the Principal observes the common noise, she might have an interest to offer contracts indexed on it. However, intuitively, in the linear energy discrepancy case, since the optimal compensation rates for the contract are deterministic, the Principal should not gain from indexing the contract on the common noise. The optimisation problem of the Principal is the same as before, except that the supremum is taken over contracts ξ∈Ξ^∘. 





















In fact, following the same reasoning as in Section <ref>, Theorem <ref> and the propositions <ref>, <ref> and <ref> can be established in this case. Therefore, there is no benefice for indexing the contract on the common noise, if there is already an indexation on the law of others. This means that our contracts indexed on the law of others allow the Principal to index the compensation on the common noise in a hidden way. 







































































































































































































































































































































































































































































 §.§ First–best problem


In this section, we concentrate our attention to the so-called first-best framework, where there is no moral hazard and the Principal can actually choose directly both the contract ξ as well as the actions of the Agents. 



Given the reservation utility level of the representative Agent, R_0, the problem of the Principal is

    V_0^FB := inf_ρ > 0{ - ρ R_0 + sup_(, μ^X) ∈× (_T)sup_ξ∈Ξ^FB{ J_0^P (ξ, ) + ρ J_0^A (ξ, μ^X, ) }},

where ρ > 0 is the Lagrange multiplier associated to the participation constraint, and Ξ^FB is defined by (<ref>). Recall that the representative Agent is risk–averse, with a risk–aversion parameter R_A. We can consider both the cases of a risk–averse or risk–neutral Principal. 




We give the results below, then we provide the proofs in Appendix <ref>.



  §.§.§ Principal with CARA utility


If the utility of the Principal is defined as U^P(x) = - ^-R_P x,

using the same tools as in Section <ref>, we obtain the following proposition.





























































































































































































































































    In the first–best case, for a risk–averse producer with a CARA utility function
    
    (i) the utility of the producer is given by 
    
    V_0^FB   = R_0 ( V_0^RR_0)^1 + R_P/R_A,   where   V_0^R = - ^ -R  u^FB (0, μ_0^X)

    and u^FB solves the following HJB equation
    
    ∂_t u^FB   =
            + ∫ (g-f) (x) μ^X ( x)
            + θ2( σ^∘)^2 
            - 12( σ^∘)^2 u^FB_x, μ^X
            + 12( σ^∘)^2 R ( u^FB_μ^X)^2
            - 12( σ^∘)^2
            u^FB_μ^X μ^X
       + ρu^FB_μ^X( ( u^FB_μ^X)^-∧ A_max) 
            + 12 c_α^⋆( u^FB_μ^X)
            - 12( u^FB_x, μ^X -θ) Σ^⋆( u^FB_x, μ^X -θ) 
            + 12 c_β^⋆( u^FB_x, μ^X -θ),
    
     u(T,·)   =-1;

    
    (ii) the optimal effort is the process ν^FB,⋆ := (α^FB,⋆, β^FB,⋆) defined for all t ∈ [0,T] by α^FB,⋆_t := a^FB,⋆(t, μ^X_t ) and β^FB,⋆_t := b^FB,⋆(t, μ^X_t ) where, for k=1, …, d,
    
    a^k, FB,⋆ (t,μ) := ρ^k ( ( u^FB_μ^X (t,μ) )^-∧ A_max)   and   b^k,FB, ⋆ := 1 ∧( λ^k ( u^FB_x, μ^X (t, μ) -θ)^-)^-1/η^k + 1∨ B_min;

    
    (iii) the optimal contract is given by
    
    ξ^⋆ = 
            - 1R_Aln (-R_0)
            + ∫_0^T ( c ( ν_s^FB,⋆) - f(X_s) )  s;

    
    (iv) in the linear energy discrepancy case, u^FB is of the form
    
    u^FB(t, μ_t^X )    = δ (T-t) ∫ x μ_t^X ( x) - ∫_t^T m^P (s)  s,

    where 
    
    m^P (t) =     θ2( σ^∘)^2 
            + 12 ( ( σ^∘)^2 R - ρ) δ^2 (T-t)^2
            + ρ2( δ^- (T-t) ∧ A_max + δ (T-t) )^2
            + θ2Σ^⋆( -θ) 
            + 12 c_β^⋆( -θ),

    and the functions defining optimal efforts are deterministic functions of time:
    
    a^k,FB, ⋆ (t) := ρ^k ( ( δ (T-t) )^-∧ A_max)   and   b^k,FB, ⋆ (t) := 1 ∧( λ^kθ)^-1/η^k + 1∨ B_min,   for  k=1, …, d.





  §.§.§ Risk–neutral Principal










































The risk–neutral Principal problem is very similar to the risk–averse one, informally the following Proposition is obtained by setting R_P = 0 (and thus R = 0) in Proposition <ref>

    In the first–best case, for a risk–neutral producer,
    
    (i) her utility is given by 
    
    V_0^FB   = 1R_Aln ( - R_0 ) + V^0 (0, μ_0^X),

    where V^0 is solution to the following HJB equation
    
    0 =     ∂_t V^0
            + ∫ (f-g) (x) μ^X ( x)
            - θ2( σ^∘)^2 
            + 12( σ^∘)^2 V^0_x, μ^X
            + 12( σ^∘)^2 V^0_μ^X, μ^X
       - ρV^0_μ^X( ( V^0_μ^X)^-∧ A_max) - 12 c_α^⋆( V^0_μ^X)
            + 12( V^0_x, μ^X -θ) Σ^⋆( V^0_x, μ^X -θ) - 12 c_β^⋆( V^0_x, μ^X -θ);

    
    (ii) in the linear energy discrepancy case, V^0 is of the form
    
    V^0 (t, μ_t^X)    = δ (T-t) ∫ x μ_t^X ( x) - ∫_t^T m^0 (s)  s,

    where m^0 is equal to m^P for R = 0,
        
        
        
        
        
    and the functions defining optimal efforts are the same deterministic functions of time as in the risk–averse case.






§ CONCLUSION


We extend in this paper the problem of demand response contracts in electricity markets set in <cit.> by considering a continuum of consumers with mean–field interaction, whose consumption is impacted by a common noise. We proved that the producer can benefit from considering the continuum of consumers with mean–field interaction by indexing contracts on the consumption of one Agent and the law of others. This new type of contracts allows the Principal to reward a consumer who makes more effort than the others, or to penalise him if he makes less effort. At least in the linear energy value discrepancy case, the producer's utility is increased by the use of new contracts, and in most cases these contracts induce more efforts from the consumers to reduce the average level of their consumption and with less volatility. 



The optimal contract is indexed in a hidden way on the consumption adjusted for climate hazards. This allows the Principal to offer a compensation indexed on the process which is really controlled by the consumer, to encourage him for making effort on the drift and the volatility of his deviation. Moreover, if the Principal is risk-averse, she can add to this contract a part indexed on others, which is in fact an indexation on the common noise, to better choose the remaining risk she wants to bear. 



In the case where the principal is authorised to index the contract directly to the common noise, we obtain the same form of contracts. Therefore, contracting on the conditional law of others or on common noise is strictly equivalent. Nevertheless, if the Principal could not observe the common noise, or if there exist some regulatory rules preventing her from using the common noise directly in the contract, indexing the contract on others is a way to overcome this.



Our approach provides better management of the risk associated with common noise. Thus, the greater the variance explained by the common noise, the more significant the results are. Therefore, these new contracts could improve demand response during periods where consumption is strongly affected by weather conditions, for example in winter, when the risk of electricity blackouts is high, and thus demand response is more than needed. Naturally, in the absence of common noise, our contracts are reduced to classical contracts for drift and volatility control.








































































































































§ TECHNICAL PROOFS




 §.§ Proof of Lemma <ref>


Let ∈. First of all, by definition of  we have [ Λ∈_0 ] =1, thus Λ(ds,d v) = δ_ν^_s(d v) ds –a.s. for some –predictable control process ν^ := ( α^, β^). Therefore, (X, W, W^∘) is an Itō process with drift A(ν^) and quadratic variation B(ν_t^) B^⊤( ν_t^) under , where

    B(ν_t^) B^⊤( ν_t^) =
        [ Σ(β_t^) + (σ^∘)^2         σ^⊤(β_t^)               σ^∘;          σ (β_t^)               I_d               0_d;               σ^∘             0_d^⊤                 1 ] 
        = 
        [          0 σ^⊤ (β_t^)        σ^∘;        0_d        I_d        0_d;          0      0_d^⊤          1 ]×[       0   0_d^⊤       0; σ(β_t^)     I_d   0^⊤_d;     σ^∘   0_d^⊤      1, ],  t ⊗ (ω)-a.e.


Furthermore, following the line of <cit.>, we consider the extended space Ω^e = Ω×Ω' where Ω' =  ( [0,T], ^d+2). Ω' is equipped with the filtration ('_t)_t ≥ 0, generated by the canonical process, and _0' is the Wiener measure on Ω'. We define ^e_t := _t ⊗_t', ^e := ⊗' and ^e := ⊗_0'. We denote X^e, W^e and W^∘,e the natural extensions of W and W^∘ from Ω to Ω^e. By <cit.>, there is a d+2–dimensional Brownian motion B^e on (Ω^e, ^e, ^e), such that

    [   X^e_t;   W^e_t; W^∘,e_t ] 
        = 
        [ - α_t^·1_d;        0_d;          0 ] t
        + 
        [           0 σ^⊤( β_t^ )         σ^∘;         0_d         I_d         0_d;           0       0_d^⊤           1 ] B^e_t.


Therefore, we have W^e_t = ( B_t^e,2, …, B_t^e,d+1)^⊤ and W^∘,e_t =  B_t^e,d+2. Then, 

    X^e_t = - ∫_0^t α_s^·1_d  s + ∫_0^t ( 0, σ^⊤( β_s^ ), σ^∘)  B^e_s = - ∫_0^t α_s^·1_d  s + ∫_0^t σ ( β_s^ ) · W^e_s + ∫_0^t σ^∘ W^∘,e_s,

for t≥ 0, ^e–a.s., which implies the desired result.




 §.§ Another representation for the set of measures

The general approach to moral hazard problems in <cit.> requires to distinguish between the efforts of the agent which give rise to absolutely continuous probability measures in , namely the ones for which only the drift changes, or for which the volatility control changes while keeping fixed the quadratic variation of X. The goal of this subsection is to provide the appropriate formulation in our setting. Let us start by introducing some notations.



We let  be the set of probability measures  on (Ω, _T) such that

    
  * the canonical vector process (X,W,W^∘)^⊤ is an (,)–local martingale for which there exists an –predictable and B–valued process β^ such that the –quadratic variation of (X,W,W^∘)^⊤ is –a.s. equal to
     
    [ Σ(β_s^) + (σ^∘)^2        σ^⊤( β_s^)               σ^∘;          σ( β_s^)               I_d               0_d;               σ^∘             0_d^⊤                 1 ],  s∈[0,T];

 
    
  * [Λ∈_0]=1.






Arguing as in Lemma <ref>, we know that for all ∈

    X_t    = X_0  + ∫_0^t  σ(β^_s) · W_s + ∫_0^t σ^∘ W^∘_s,  t∈[0,T],  -a.s.

    

 Notice that using classical results of <cit.> (see <cit.> for a modern presentation), we can define a pathwise version of the quadratic variation of ⟨ X⟩,

being –predictable, allowing us to define the following _+–valued process

    S_t:=n→+∞limsup  n(⟨ X⟩_t-⟨ X⟩_t-1/n).



For any A–valued and –predictable process α, any ∈, and –predictable and B–valued process β[Strictly speaking, the process β should be indexed by the measure , but we chose to not do so in order to alleviate notations.] such that, –a.s., Σ(β^)=Σ(β),
we define the equivalent measures ^ν, for ν := (α, β), by their Radon–Nykodym density on _T:

    d^ν/d:=exp(-∫_0^Tα_s·1_d/Σ(β_s)σ(β_s)·dW_s-1/2∫_0^T(α_s·1_d)^2ds).


Notice that such a measure is well–defined since A is a compact set, and the B–valued processes are automatically bounded and bounded away from 0. It is then immediate to check that the  coincides exactly with the set of all probability measures of the form ^ν, which satisfy in addition

     
  * ^ν∘ (X_0)^-1 = ϱ, and there exists a measure ι on ℝ^d×ℝ such that ^ν∘((W_0,W_0^∘))^-1 = ι;
    
  * for –a.e. ω∈Ω and for every t ∈[0,T], we have μ_t(ω)= ( ^ν)^ω_t ∘ (X_t∧·)^-1;
    
  * (W^∘,μ) is ^ν–independent of W.

For any ∈, we denote by () the set of controls ν∈ such that ^ν∈.




 §.§ Best–reaction functions of the consumers and equilibrium


In this Subsection, we wish to relate the best–reaction function of a consumer to a given contract ξ∈Ξ, and a given measure μ played by the mean–field of the other consumers, in other words V_0^A(ξ,μ), to an appropriate second–order BSDE.

With this in mind, we consider the process S^0, taking values in the set of symmetric positive 2×2 matrices, defined by

    S^0_t:=[ S_t + (σ^∘)^2           σ^∘;           σ^∘             1 ],  t∈[0,T],

as well as the following norms, for any p≥ 1, 

    Z^p_ℍ^p
     :=
     sup_∈^[(∫_0^T Z_t^⊤ S^0_tZ_tdt)^p/2],   Y_𝕊^p^p
     :=
     sup_∈^[sup_0≤ t≤ T|Y_t|^p],

defined for any 𝔽^ obs–predictable, ^2–valued process Z and any 𝔽^ obs–optional, –valued process Y with càdlàg paths.  
 
We consider the following so–called second–order BSDE (2BSDE for short)

    Y_t
     =
    -e^-R_A ξ+∫_t^TF(X_s,Y_s,Z^1_s,S_s)ds
     -∫_t^T Z^1_sdX_s-σ^∘∫_t^T Z^2_sdW^∘_s+∫_t^Td K_s,

The following definition recalls the notion of 2BSDE, and uses the additional notation 

    𝒫_t(ℙ,(^ obs)^+)
     :=
     {^'∈𝒫: [E]=^'[E]  E∈(^ obs_t)^+},  for any (,t)∈×[0,T].


 
We say that (Y,Z, K) is a solution to the 2BSDE (<ref>) if for some k>1
 
    
  * Y is a càdlàg and an (^ obs)^_+–optional process, and Y _^k<+∞;
    
  * Z =(Z^1,Z^2)^⊤ is an (^ obs)^–predictable ^2–valued process with Z_^̋k<+∞;
    
  * K is an (^ obs)^–optional, càdlàg, non–decreasing, K_0=0, ∈sup ^[K_T^k]<+∞, and satisfies the minimality condition

    K_t
     =
     ℙ^'∈𝒫_t(ℙ,^+)  essinf^ℙ𝔼^ℙ^'[ K_T|(^ obs_t)^+],
      0≤ t≤ T,
      -a.s. ∈𝒫.



The main result of this section relates the solution to the above 2BSDE to the best–reaction function of the Agent. 

Fix (ξ,μ) ∈Ξ×(_T). Let (Y,(Z^1,Z^2)^⊤, K) be a solution to the 2BSDE (<ref>).

We have

    V_0^A(ξ,μ)=sup_∈^[Y_0].

Conversely, the (dynamic) value function V_t^A(ξ,μ) always provides the first component of a solution to (<ref>). Moreover, any optimal effort ν^⋆:=(α^^⋆,β^^⋆), and the optimal measure ^⋆∈ must be such that 
 
    K=0, (^⋆)^ν^⋆-a.s.,  (α^⋆_t,β^⋆_t)∈(a,b)∈ A×Σ^-1(S_t)argmax  F(X_t∧·, Y_t, Z^1_t,S_t), (^⋆)^ν^⋆-a.s.,

where (^⋆)^ν^⋆ is defined from ^⋆ by Definition <ref>.



The proof is classical and follows the lines of <cit.>. We thus only mention here why the required assumptions are satisfied. First of all, the map F can readily be rewritten as a function F(x,y,(S^0)^1/2(z^1,z^2)^⊤, S^0) as done by <cit.>, since the matrix S^0 is always invertible in our setting. Moreover, we can easily get rid off the linear term -R_Af(x)y in F by considering the 2BSDE satisfied by e^-∫_0^tf(X_s∧·)dsY_t instead. We therefore assume without loss of generality that f is 0 here. Then, F and the terminal condition -e^-R_A ξ satisfy the Lipschitz and integrability properties in <cit.>, because controls are bounded and by definition of the set of contracts, recall (<ref>) (and that the densities from probabilities in  to probabilities in  have moments of any order, uniformly on the measures).  <cit.> is also automatically satisfied as F is 0 for y=z^1=z^2=0.

Next, <cit.> are also satisfied by the set of measures , see for instance <cit.>. Finally, the set  is saturated in the sense of <cit.>, see 
<cit.>.

With Proposition <ref> in hand, we can now characterise mean–field equilibria thanks to a 2BSDE of mean–field type, reminiscent of the mean–field BSDE obtained in the setting of <cit.> where only the drift of X was controlled.


The pair (^⋆,μ^⋆) belongs to ^⋆(ξ) if and only if  there exists ^⋆∈ and ν^⋆:=(α^⋆,β^⋆) such that ^⋆= ( ^⋆)^ν^⋆, where ( ^⋆)^ν^⋆ is defined from ^⋆ in the sense of Definition <ref>, and

    K^⋆=0, ( ^⋆)^ν^⋆-a.s.,  (α^⋆_t,β^⋆_t)∈(a,b)∈ A×Σ^-1(S_t)argmax  F(X_t∧·, Y_t^⋆, Z^1⋆_t,S_t), ( ^⋆)^ν^⋆-a.s.,




where (Y^⋆,(Z^1⋆,Z^2⋆)^⊤, K^⋆) is a solution to the mean–field 2BSDE

    Y_t^⋆ =
        -e^-R_A ξ+∫_t^TF(X_s,Y_s^⋆,Z^1⋆_s,S_s)ds
        -∫_t^T Z^1⋆_sdX_s
        -σ^∘∫_t^T Z^2⋆_sdW^∘_s
        +∫_t^Td K^⋆_s,

which satisfies Definition <ref> and the fixed–point constraint

    μ_t(ω)=( ^⋆)^ω_t ∘ (X_t∧·)^-1.

 

By Proposition <ref>, we have a characterisation of the best–reaction function of the Agent to an arbitrary μ. An equilibrium then necessitates only that μ coincides with the conditional distribution of X under ^⋆, which is exactly what is given by the mean–field 2BSDE (<ref>).



We end this section with the following lemma which provides us with explicit integrability properties for the processes Z and Z^μ associated to a contract in Ξ_ S,  in the sense of Definition <ref>. This will prove useful for us when analysing the problem of the Principal.

For any (Z,Z^μ,Γ)∈, there exists some p^'∈(1,p) such that 

    sup_∈^[(∫_0^T|Z_s|^2ds)^p^'/2]+ sup_∈^[(∫_0^T|Z^μ_s|^2ds)^ p^'/2]<+∞.



First, we know by Theorem <ref> and its proof that if we define

    Y_t:=-e^-R_Aξ_t^ξ_0,ζ,   Z^1_t:=-R_AY_tZ_t,    Z^2_t:=-R_AY_t Z^μ_t, Γ_t:= -R_AY_tΓ_t,  t∈[0,T],


    K_t:=∫_0^t(-R_AY_s ^∘(X_s,ζ_s)-1/2Γ_s ( S_s + ( σ^∘)^2 ) - F(X_s, Y_s,  Z^1_s, S_s ) ) ds,  t∈[0,T],

then (Y,(Z^1,Z^2)^⊤,K) solves 2BSDE <ref> and in particular that there is some p̅∈ (1,p) such that (Z^1,Z^2)^⊤∈^̋p̅. Furthermore, we also have that 

    |1/Y_t|=e^R_Aξ_t^ξ_0,ζ,

so that we deduce using Hölder's inequality, the definition of Ξ_ S, and the fact that densities between measures in  and  have moments of any order

    sup_∈^[sup_0≤ t≤ T|1/Y_t|^p]<+∞.

Then, we have for any p̃∈(1,p̅)

    sup_∈^[(∫_0^T|Z_s|^2ds)^p̃/2]   =1/R_A^p̃sup_∈^[(∫_0^T|Z^1_s/Y_s|^2ds)^p̃/2]
       ≤1/R_A^p̃sup_∈^[sup_0≤ t≤ T|1/Y_t|^p̃(∫_0^T|Z^1_s|^2ds)^p̃/2]
       ≤1/R_A^p̃sup_∈(^[sup_0≤ t≤ T|1/Y_t|^p])^p̃/psup_∈(^[(∫_0^T|Z^1_s|^2ds)^pp̃/2(p-p̃)])^1-p̃/p

To conclude, we want to make sure that we can choose p̃∈ (1,p̅) such that pp̃/(p-p̃)∈(1,p̅]. This is equivalent to having

    p̃>p/1+p
    p̃≤pp̅/p+p̅,

which is always possible since pp̅/(p+p̅)>p/(1+p)⟺p̅(p-1)>0. The same reasoning gives us the required result for Z^μ.




 §.§ Proof of Theorem <ref>

Before explaining how to prove the aforementioned result, notice that the second equality in Theorem <ref> is trivial. Indeed, in absence of limited liability, the value of the Principal is a non–increasing function of the utility obtained by the Agent. Mathematically, this translates into the fact that the dynamics of both state variables in the Principal's problem actually do not depend on L, so that the dependence on the associated initial value is straightforward.

The proof of the first equality relies on arguments similar to the ones developed in <cit.>, <cit.> and <cit.>. Using Proposition <ref> and Theorem <ref>, we know that for ξ∈Ξ, we have that there exists an equilibrium (^⋆, μ^⋆) ∈^⋆(ξ), where ^⋆ is such that for ^⋆–a.e. ω∈Ω and for every t ∈ [0,T], we have
    
    μ^⋆_t(ω)=(^⋆)^ω_t ∘ (X_t ∧· )^-1,

and
 
    K=0, ^⋆-a.s.,  (α^⋆_t,β^⋆_t)∈(a,b)∈ A×Σ^-1(S_t)argmax  F(X_t∧·, Y_t, Z^1_t,S_t), ^⋆-a.s.,

 where K is the last component of the solution (Y,(Z^1,Z^2)^⊤,K) of the 2BSDE
 
    Y_t
     =
    -e^-R_A ξ+∫_t^TF(X_s, Y_s, Z^1_s,S_s)ds
     -∫_t^T Z^1_sdX_s-σ^∘∫_t^T Z^2_sdW^∘_s+∫_t^Td K_s.

 
The main difference between contracts in Ξ and Ξ_ S comes from whether the process K above is absolutely continuous with respect to Lebesgue measure or not. Since it is not in general, we will approximate it by a sequence of absolutely continuous ones. Fix thus some >0, and define the absolutely continuous approximation of K

    K^_t
     :=
     1/∫_(t-)^+^t K_sds,  t∈[0,T].

Clearly, K^ is ^–predictable, non–decreasing –q.s. and
 
    K^=0,
      ^⋆- (^⋆,μ^⋆)∈^⋆(ξ).

We next define for any t∈[0,T] the process
 
    Y^_t
     :=
     Y_0
     -∫_0^t F(X_s, Y^_s,Z^1_s,S_s)ds
     +∫_0^t Z^1_s dX_s+σ^∘∫_0^t Z^2_sdW^∘_s
     -∫_0^t dK^_s,

and verify that (Y^, (Z^1,Z^2), K^) solves the 2BSDE with terminal condition -e^-R_Aξ^:=Y^_T and generator F. Indeed, since K^≤ K,  K^ does satisfy the required minimality condition, which is obvious by (<ref>).  We also verify that sup_∈^[|e^-R_Aξ^|^p]<∞. Thus, by <cit.>, we have the estimates
 
    Y^_^p̅+(Z^1,Z^2)^⊤_^̋p̅<∞,  p̅∈(1,p).

We finally observe that a probability measure  satisfies K=0, –a.s. if and only if it satisfies K^=0, –a.s. Notice then that for any (t,ω,x,y,z^1,z^2)∈[0,T]×Ω×^4, the map

    γ⟼ -R_A y ^∘( x, - 1R_A y (z^1,z^2,γ) ) - 1/2γ(S_s(ω) + ( σ^∘)^2 ) -F(x,y,z^1,S_s(ω))
          (0,∞).

Indeed, it is non–negative, by definition of ^∘ and F, convex, continuous on the interior of its domain, and is coercive by the boundedness of the controls.


Let K̇^ denote the density of the absolutely continuous process K^ with respect to the Lebesgue measure. Applying a classical measurable selection argument (the maps appearing here are continuous, and we can use the results from <cit.>), we may deduce the existence of an ^ obs–predictable process Γ^ such that







    K̇_s^
     =
    -R_A Y^_s ^∘( X_s,  - 1R_A Y^_s (Z^1_s, Z^2_s, Γ_s^) ) - 1/2Γ_s^( S_s + ( σ^∘)^2 ) - F(X_s,Y^_s, Z^1_s,S_s).


For K̇_s^>0, this is clear from (<ref>), and if K̇_s^=0, Γ^_s can be chosen arbitrarily. Substituting in (<ref>), it follows that the following representation for Y^ holds










    Y^_t
     =
     Y_0
     +∫_0^t R_A Y^_s^∘( X_s, - 1R_A Y^_s (Z^1_s,Z^2_s,Γ_s^) ) ds
     +∫_0^t Z^1_s dX_s
     +σ^∘∫_0^t Z^2_s dW^∘_s
     +1/2∫_0^t Γ^_sd⟨ X⟩_s.



Applying Itō's formula to -1/R_Alog(-Y_t^), 

    ξ^_t =    - 1/R_Alog(-Y_0^) - ∫_0^t ^∘ (X_s, ζ_s)   s 
        + ∫_0^t Z_s  X_s 
        + σ^∘∫_0^t Z_s^μ W^∘_s 
        + 12∫_0^t ( Γ_s + R_A |Z_s|^2 ) ⟨ X ⟩_s 
       + 12 R_A  ( σ^∘)^2 ∫_0^t  Z_s^μ(Z_s^μ+ 2Z_s)   s.

where

    ζ:= (Z, Z^μ, Γ) = - 1R_A Y^ (Z^1, Z^2, Γ^).


Define Z^μ to be any ^ obs–predictable process, taking values in , such that ^^⋆_s[ Z_s^μ(X_s∧·)]= Z^μ_s. Using the dynamic of X, we deduce that

    ξ_t^ :=     -1/R_Alog(-Y^_0)  - ∫_0^t  (X_s, μ_s, ζ_s, α_s^⋆)   s 
        + ∫_0^t Z_s  X_s 
        + 12∫_0^t ( Γ_s + R_A Z_s^2 ) ⟨ X ⟩_s
        + ∫_0^t 𝔼^^⋆_s[ Z_s^μ(X_s∧·) X_s ]
        
       + 12 R_A ∫_0^t  𝔼^^⋆_s𝔼^^⋆_s[ Z_s^μ(X_s∧·) Z_s^μ(X_s∧·) ⟨X, X⟩_s ]
        + R_A ∫_0^t Z_s 𝔼^^⋆_s[Z_s^μ(X_s∧·) ⟨ X, X⟩_s ],  t∈[0,T],

where ζ:= (Z, Z^μ, Γ). This shows that the contract ξ^ has the required dynamics (<ref>), since, at equilibrium, μ^⋆=μ and the effort α^⋆ = α^⋆ and is unique. The fact that it belongs to Ξ_ S then stems from (<ref>) and arguments similar to those in Lemma <ref>. We can then conclude, in view of Appendix <ref> and as in the proof of <cit.> by noting that ξ^ε=ξ, ℙ^⋆–a.s.




 §.§ Proof of Theorem <ref>


Let v be a solution to the PDE (<ref>), smooth enough in the sense of Definition <ref>, such that the condition (<ref>) is satisfied. Moreover, assume that the supremum in the PDE (<ref>) is attained for a function v^⋆, from [0,T] ×(^2) to  ^3. We need to prove that V_0^P = v(0,μ^Y_0).



Applying the Chain Rule under ^1,2–regularity on v, as a function depending on time and on the conditional law μ^Y of Y^ζ = (X, L^ζ)^⊤, we obtain:

    v ( t, μ^Y_t ) = (    ∂_t v ( t, μ^Y_t )
        + ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ) (g-f)(x) μ^Y_t ( x, ℓ) 
        + 12( σ^∘)^2 ∫∫∂_μ^X^2  v ( t, μ^Y_t ) (y, y) μ^Y_t ( y) μ^Y_t (y) 
       + θ2(σ^∘)^2 ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ) μ^Y_t ( x, ℓ) 
        + 12( σ^∘)^2 ∫∂_x∂_μ^X v ( t, μ^Y_t ) (x, ℓ) μ^Y_t ( x, ℓ) 
       + 12 h(μ^Y_t, ∂_μ v (t, μ^Y_t), ∂_y∂_μ v(t,μ^Y_t), ∂^2_μ v(t,μ^Y_t), ζ) )  t 
       + σ^∘∫( - ∂_μ^X v ( t, μ^Y_t ) (x, ℓ)  + ∂_μ^L v ( t, μ^Y_t ) (x, ℓ) ( Z_t + Z_t^μ) ) μ^Y_t ( x, ℓ)  W_t^∘.


By assumption, v is solution to the HJB equation (<ref>):

    0 =     ∂_t v ( t, μ^Y_t )
        + 12( σ^∘)^2 ∫∫∂_μ^X^2  v ( t, μ^Y_t ) (x, ℓ, x, ℓ) μ^Y_t ( x, ℓ) μ^Y_t (x, ℓ)
        + ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ) (g-f)(x) μ^Y_t ( x, ℓ) 
       + θ2(σ^∘)^2 ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ) μ^Y_t ( x, ℓ)
        + 12( σ^∘)^2 ∫∂_x∂_μ^X v ( t, μ^Y_t ) (x, ℓ) μ^Y_t ( x, ℓ) 
       + 12sup_v∈^3 h(μ^Y_t, ∂_μ v (t, μ^Y_t), ∂_y∂_μ v(t,μ^Y_t), ∂^2_μ v(t,μ^Y_t), v),

therefore we obtain

    v (T, μ^Y_T ) =     v(0,μ^Y_0) 
        + 12∫_0^T ( 
        h(μ^Y_t, ∂_μ v, ∂_y∂_μ v, ∂^2_μ v, ζ) 
        -  sup_ζ∈^3 h(μ^Y_t, ∂_μ v, ∂_y∂_μ v, ∂^2_μ v, v)
        )  t 
       + σ^∘∫_0^T ∫( - ∂_μ^X v ( t, μ^Y_t ) (x, ℓ)  + ∂_μ^L v ( t, μ^Y_t ) (x, ℓ) ( Z_t + Z_t^μ) ) μ^Y_t ( x, ℓ)  W_t^∘


Under Assumption (<ref>) on the partial derivatives of v, the process

    σ^∘∫_0^·∫( - ∂_μ^X v ( t, μ^Y_t ) (x, ℓ)  + ∂_μ^L v ( t, μ^Y_t ) (x, ℓ) ( Z_t + Z_t^μ) ) μ^Y_t ( x, ℓ)  W_t^∘.

is a –martingale, since the following quantities

    ^[ sup_0≤ t≤ T| ∫_0^t ∫∂_μ^X v ( s, μ^Y_s ) (x, ℓ)   μ^Y_s ( x, ℓ)  W_s^∘| ] _=:A, and ^[ sup_0≤ t≤ T| ∫_0^t ∫∂_μ^L v ( s, μ^Y_s ) (x, ℓ) ( Z_s + Z_s^μ) μ^Y_s ( x, ℓ)  W_s^∘| ] _=:B,

are finite. Indeed, on the one hand, using Burkholder–Davis–Gundy inequality, we have for some constant C>0, independent of ,

    A   ≤ C ^[ (∫_0^T ( ∫∂_μ^X v ( t, μ^Y_t ) (x, ℓ) μ^Y_t ( x, ℓ) )^2  s)^1/2] <+∞,

by the first part of Assumption (<ref>). On the other hand, using in addition Hölder's inequality, we have, for some constant C > 0 independent of , and for p^'>1 given by Lemma <ref>

    B   ≤C^[ (∫_0^T ( ∫∂_μ^L v ( s, μ^Y_s ) (x, ℓ) ( Z_s + Z_s^μ)μ^Y_s ( x, ℓ) )^2  s)^1/2] 
       ≤  2 C^[ sup_0≤ t≤ T| ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ)μ^Y_t ( x, ℓ)|(∫_0^T  ( Z_s^2 + (Z_s^μ)^2 )  s)^1/2] 
       ≤  2 C(^[sup_0≤ t≤ T| ∫∂_μ^L v ( t, μ^Y_t ) (x, ℓ)μ^Y_t ( x, ℓ)|^p^'/p^'-1])^1-1/p^'(^[ (∫_0^T  ( Z_s^2 + (Z_s^μ)^2 )  s)^p^'/2])^1/p^'<+∞.

Indeed, the first term is finite by the second part of Assumption (<ref>), and the second term is also finite since ζ∈ implies that Z and Z^μ are in ^̋p^' by Lemma <ref>. Therefore we obtain 

    ^[ v (T, μ^Y_T ) ] = v(0,μ^Y_0) 
        + ∫_0^T ^[ 
            h(μ^Y_t,∂_μ v (t,μ^Y_t), ∂_y∂_μ v (t,μ^Y_t), ∂^2_μ v (t,μ^Y_t), ζ_t) 
       - sup_v∈^3θ(μ^Y_t, ∂_μ v (t,μ^Y_t), ∂_y∂_μ v (t,μ^Y_t), ∂^2_μ v (t,μ^Y_t), v)
        ]  t.


Using the terminal condition v^P ( T, μ^Y_T) = U^P ( - 𝔼^_T[ L^ζ_T ] ) and noticing that for all t ∈ [0,T],

    h(μ^Y_t,∂_μ v (t,μ^Y_t), ∂_y∂_μ v (t,μ^Y_t), ∂^2_μ v (t,μ^Y_t), ζ_t)
        - sup_v∈^3θ(μ^Y_t, ∂_μ v (t,μ^Y_t), ∂_y∂_μ v (t,μ^Y_t), ∂^2_μ v (t,μ^Y_t), v) ≤ 0,

with equality for ζ^⋆_t := v^⋆ (t, μ_t^Y) by assumption, which leads to

    ^[ U^P ( - 𝔼^_T[ L^ζ_T ] ) ] ≤ v(0, μ^Y_0),

with equality for ζ^⋆. Therefore, v(0, μ^Y_0) = V^P.




 §.§ Proof of Proposition <ref>



Let u be a solution to the PDE (<ref>), smooth enough in the sense of Definition <ref>, satisfying Condition (<ref>). Let ζ^⋆ = (Z^⋆, Z^μ,⋆, Γ^⋆) be a process in  such that for all t ∈ [0,T], ζ_t^⋆ := v^⋆(t, μ^X_t ) is the maximiser of h^P defined by (<ref>). We define the function v as:

    v(t, μ^Y_t) = - ^ R_P ( 𝔼^_t[L^ζ^⋆_t ] - u ( t, μ^X_t ) ) .


To prove the first point of the proposition, it is sufficient to show that the function v satisfies the assumptions of Theorem <ref>. Indeed, we will have, by the first point of the theorem, 

    - ^ R_P ( ξ_0- u (0, μ_0^X) )  = v(0,μ^Y_0) = V_0^P.


First of all, v has the same regularity as u, and is therefore smooth enough in the sense of Definition <ref>. 

Moreover, we can prove that v satisfies the condition (<ref>). Indeed, since 

    ∫∂_μ^X v(t, μ^Y_t)(x, ℓ) μ^Y_t ( x, ℓ)    = - R_P v(t,μ^Y_t) u_μ^X( t,μ^X_t )   and  ∫∂_μ^L v(t, μ^Y_t )(x, ℓ)  μ^Y_t ( x, ℓ) = R_P v(t,μ^Y_t),

Condition (<ref>) is equivalent here to

    ^[( ∫_0^T | u_μ^X( t,μ^X_t )  v(t,μ^Y_t) |^2  t)^1/2] +  ^[ sup_0≤ t≤ T|  v(t,μ^Y_t) |^p^'/(p^'-1)] < + ∞.


By applying Hölder's inequality twice, we have the following upper bound for the first expectation

    ( ^[  (∫_0^T | u_μ^X( t,μ^X_t ) |^2  t)^p^'/2] )^1/p^'(^[ sup_0≤ t≤ T|  v(t,μ^Y_t) |^p^' /(p^'-1)]  )^1-1/p^',

where the first expectation is finite since u satisfies Condition (<ref>). It remains to prove that the second one is finite. By applying Hölder's inequality,

    ^[ sup_0≤ t≤ T|  v(t,μ^Y_t) |^p^' /(p^' -1)]
           = ^[ sup_0≤ t≤ T^p^' R_P/p^' -1( 𝔼^_t[ L^ζ^⋆_t ] - u ( t, μ^X_t ) ) ] 
       ≤( ^[ sup_0≤ t≤ T^ε p^' R_P/p^'-1𝔼^_t[ L^ζ^⋆_t ]] )^1/ε( ^[ sup_0≤ t≤ T^- q^' p^' R_P/p^' -1 u ( t, μ^X_t )  t ] )^1/q^',

for q^' = ε/(ε-1) and recalling that ε = √(p (p^'-1)/p^'). Thus, the second expectation if finite since u satisfies Condition (<ref>). Moreover, since ⟨ X⟩ is bounded and applying again Holder's inequality with ε and q', there exists some positive constant C such that the first expectation has the following upper bound

    C ( ^[ sup_0≤ t≤ T^ε^2 p^' R_P/p^'-1𝔼^[ ξ^ζ^⋆_t | _t^∘]] )^1/ε^2(  ^[ sup_0≤ t≤ T^p R_P/ε-1𝔼^[ ∫_0^t g(X_s) s | _t^∘]] )^1/ε-1.

By noting that ε^2 p^'/p^' -1=p, we deduce from (<ref>) that the first term is finite. Since g has linear growth and X has bounded drift and volatility, the second term is also finite.



To apply Theorem <ref>, it remains to prove that v is a solution to the PDE (<ref>) and that ζ^⋆ satisfies the optimality condition on h. By computing the partial derivatives of v in term of u,












the function h in the PDE (<ref>) can be rewritten as:

    h(μ_t, ∂_μ v, ∂_y∂_μ v, ∂^2_μ v, v) = 
        R_P v (
           Σ^⋆ (γ) (θ+ R_A z^2 - u_x,μ^X) + c_β^⋆ (γ)
        + c_α^⋆ (z)
        + 2 ρ( z^-∧ A_max)  u_μ^X
       + (σ^∘)^2 (R_A + R_P) (z + z^μ)^2
        - 2 R_P ( σ^∘)^2 ( z + z^μ) u_μ^X).


Noticing that v < 0, 

    sup_v∈^3 h(μ^Y_t, ∂_μ v(t, μ^Y_t), ∂_y∂_μ v(t, μ^Y_t), ∂^2_μ v(t, μ^Y_t), v) =  R_P v(t, μ_t^Y)  inf_v∈^3 h^P(μ_t^X, u_μ^X(t, μ^X_t ), u_x, μ^X(t, μ^X_t ), v),

with h^P defined by (<ref>). Since the infimum of h^P on z^μ is attained in 

    z^μ,⋆(t, μ^X_t ) = - z + R_PR_A + R_Pu_μ^X(t, μ^X_t ),

point (iii) of the proposition has been proven and point (v) is an easy computation for simple contracts in Definition <ref> with the optimal payment rate Z_t^μ,⋆ = z^μ,⋆(t, μ^X_t ). Moreover, we obtain

    inf_v∈^3 h^P(μ_t^X, u_μ^X, u_x, μ^X, v) = 
           - (σ^∘)^2 R_P^2R_A + R_P( u_μ^X)^2 
        - ρ( u_μ^X)^2
        + inf_z ∈{ 
        F_0 (q(z,u_x,μ^X))
        + ρ( (z^-∧ A_max) + u_μ^X)^2
        }.


Therefore, the function v is solution to the PDE (<ref>) if

    0 = R_P v ( 
           - ∂_t u ( t, μ_t^X ) 
        + ∫ (g-f)(x) μ_t^X ( x) 
        + θ2(σ^∘)^2 
        + 12( ( σ^∘)^2 R - ρ)  ( u_μ^X( t, μ_t^X ) )^2 
       - 12( σ^∘)^2 ( u_x,μ^X + u_μ^X, μ^X) ( t, μ_t^X )
        + 12inf_z ∈{ 
        F_0 ( q (z,u_x,μ^X( t, μ_t^X ) ) )
        + ρ( (z^-∧ A_max) + u_μ^X( t, μ_t^X ) )^2
        }),

and this equality is true since u is solution to the PDE (<ref>).



Consider now the following minimisation problem:

    inf_z ∈{ 
        F_0 ( q (z,u_x,μ^X( t, μ_t^X ) ) )
        + ρ( (z^-∧ A_max) + u_μ^X( t, μ_t^X ) )^2
        }.


As noticed in <cit.>, the function F_0 is non–decreasing, and the infimum is reached for γ^⋆ = - q, which proves the point (iv) of the Proposition, and we have

    F_0 (q) = q Σ^⋆ ( -q ) + c_β^⋆ (-q) = ∑_k=1^d ( σ^k )^2λ^k[ λ^k 1_λ^k q ≤ 1 + 1η^k( ( 1 + η^k ) ( λ^k q )^η^k/1 + η^k -1 )  1_λ^k q > 1].


For z ≥ 0, the minimisation problem (<ref>) is equal to
ρ( u_μ^X( t, μ_t^X ) )^2 + inf_z ≥ 0{ F_0 ( q ( z,u_x,μ^X( t, μ_t^X ) ) ) }, and since F_0 is non-decreasing, its minimum is attained on the minimum of q ( z, u_x,μ^X( t, μ_t^X ) ), for z=0. Therefore, (<ref>) is equal to ρ( u^P_μ^X( t, μ_t^X ) )^2 + F_0 (θ- u_x, μ^X( t, μ_t^X ) ).



On the other hand, for z ≤ 0, the minimisation problem (<ref>) is equal to

    inf_z ≤ 0{ 
        F_0 ( q ( z,u_x,μ^X( t, μ_t^X ) ) )
        + ρ( (-z ∧ A_max) + u_μ^X( t, μ_t^X ) )^2
        },

then, if u_μ^X( t, μ_t^X ) ≥ 0, the infimum is reached on z=0. Otherwise, the infimum lie between u_μ^X( t, μ_t^X )  ∨ - A_max and 0.



To sum up, the optimal process Z^⋆ is defined for t∈[0,T] by Z_t^⋆ = z^⋆(t, μ^X_t ) which is the minimiser z^⋆ of (<ref>) and satisfies

    z^⋆(t, μ^X_t ) =0,  when  u_μ^X(t, μ^X_t ) ≥ 0,
         and   z^⋆(t, μ^X_t ) ∈[u_μ^X(t, μ^X_t ) ∨ - A_max, 0 ]   when  u_μ^X(t, μ^X_t ) ≤ 0,

thus the point (ii) has been proven. 



To conclude the proof, it is sufficient to notice that ζ^⋆ defined by the triple (Z^⋆, Z^μ, ⋆, Γ^⋆) satisfies the optimality condition and apply the Theorem <ref> to the function v.

























































































§ RESERVATION UTILITY OF THE CONSUMER


The contract ξ offered by the Principal has to satisfy the participation constraint V^A (ξ) ≥ R_0, where R_0 is defined as the expected utility of the consumer without contract:

    R_0 := sup_∈^[- exp( -R_A ∫_0^T ( f(X_s)-c ( ν^_s )  )  s ) ].

The underlying idea is that consumers will refuse the contract if it provides them with a utility level which is lower than the one they could attain by themselves without any contract. The corresponding value can then be obtained through a standard HJB equation PDE, which we can solve explicitly when the function f is linear. Apart from the terms depending on the common noise, the same results as in <cit.> are obtained.  Nevertheless, we choose to detail here the proofs of the various results of the section, to highlight the impact of the common noise.


Assume that f has linear growth. Then the following holds.
     
    
  * The consumer's reservation utility is given by R_0 = - ^- R_A ψ(0,X_0), where the corresponding certainty equivalent ψ is a solution (in the viscosity sense) of the HJB equation
    
    0 = ∂_t ψ(t,x)+ f(x) - 12(  c^⋆_β(γ^0(t,x)) - γ^0(t,x) Σ^⋆(γ^0(t,x)) - γ^0(t,x) (σ^∘)^2 ),   (t,x) ∈ [0,T) ×, 
    ψ(T,x) = 0,   x ∈,

    where γ^0:= ∂_xx^2 ψ - R_A (∂_x ψ )^2.
            
  * Assume that PDE (<ref>) has a ^1,2 solution ψ such that for any ∈ the following condition is satisfied
    
    ^[ ∫_0^T  ^-2 R_A ψ (t,X_t) ( ∂_x ψ (t,X_t) )^2   t]<+∞.

    Define the feedback control
    
    α_t^0 := 0   and β_t^0,k := b^k,⋆( γ^0(t,X_t) ),   k=1,…,d,   t ∈ [0,T].
 
    Then, an optimal effort of the consumer is defined by the feedback control (<ref>).    



(i) Since the function f is non–decreasing, the consumer has no reason to make an effort on the drift of his consumption deviation, as no compensation is offered for this costly effort. More rigorously, the comparison theorem for SDEs with the same diffusion coefficient, see for instance <cit.>, as well as the fact that f is non–decreasing imply immediately that the supremum in the definition of R_0 can only be attained for efforts of the form ν^=(0.β^)∈. Notice however that, due to his risk aversion, he might have interest to make effort on the volatility. Denoting by R(t, X_t) the dynamic version of the reservation utility, satisfying
    
    R(0, X_0) = R_0   and  R(T, X_T) = -1;

    and using standard stochastic control theory, we obtain the following HJB equation  for the function R:
    
    0 = ∂_t R(t,x) - R_A R(t,x) f(x) + 12 ( σ^∘)^2 ∂_xx^2 R(t,x) + 12sup_b∈ B{ R(t,x) R_A  c_β(b) + ∂_xx^2 R(t,x) Σ(b) }.

    
    The optimal effort on the volatility without contract is thus b^k,⋆ (γ^0) where
    
    γ^0(t,x) := - ∂_xx^2 R(t,x)R(t,x) R_A.

    
    Using the same notations as in the previous subsection, we obtain
    
    0 = ∂_t R(t,x) - R_A R(t,x) f(x) + 12  R(t,x) R_A (  c^⋆_β(γ^0(t,x)) - γ^0(t,x) Σ^⋆(γ^0(t,x)) - γ^0(t,x) (σ^∘)^2 ).

    
    The solution to the previous PDE is non–positive and can thus be written under the form R(t,x) = - ^- R_A ψ(t,x) where the function ψ is the certainty equivalent function, satisfying the PDE (<ref>). 
    
    (ii) Let ψ be a ^1,2–solution to the PDE (<ref>). We then can apply Itō's formula to the function R_0(t,x) := - ^-R_A ψ (t,x) under an arbitrary ∈
    
    R_0 (s,X_s) =     ∂_t R_0 (s,X_s)  s 
            - α^_s ·1_d ∂_x R_0 (s,X_s)  s 
            + ∂_x R_0 (s,X_s) ( σ(β_s^) · W_s + σ^∘ W^∘_s ) 
       + 12 ∂_xx^2 R_0 (s,X_s) ( Σ(β_s^) + ( σ^∘)^2 )  s.

    
Denoting by ( M_t^)_t ≥0 the process M_t^ = ^ R_A ∫_0^t ( 1/2 c_β (β_s^) - f(X_s) )  s  R_0(t,X_t), t∈[0,T], we obtain, again by Itō's formula
    
    M_t^ =     M_0^ + ∫_0^t ^ R_A ∫_0^s ( 1/2 c_β (β^_u) - f(X_u) )  u ( ∂_t R_0 (s,X_s) 
            - α^_s ·1_d ∂_x R_0 (s,X_s)
            + 12 ∂_xx^2 R_0 (s,X_s) ( Σ(β^_s) + ( σ^∘)^2 ) )  s 
       + ∫_0^t M_s^ R_A (c(ν_s^) - f(X_s))   s
            + ∫_0^t ^ R_A ∫_0^T ( 1/2 c_β (β^_s) - f(X_s) )  s ∂_x R_0 (s,X_s) ( σ(β^_s) · W_s + σ^∘ W^∘_s ).

    
Replacing by the derivatives of ψ, we obtain
    
    M_t^ = M_0^ + ∫_0^t R_A M_s^ h^ψ(X_s, ∂_x ψ, ∂_xx^2 ψ, α^_s, β^_s)  s
            - ∫_0^t R_A M_s^∂_x ψ( σ(β_s) · W_s + σ^∘ W^∘_s ), 
    where     h^ψ(x, ∂_x ψ, ∂_xx^2 ψ, a, b) =  - ∂_t ψ
            + c(ν_s) - f(x)
            + a ·1_d ∂_x ψ
            + 12 ( R_A ( ∂_xψ)^2 - ∂_xx^2 ψ)  ( Σ(b) + ( σ^∘)^2 ).

    Under Condition (<ref>), the term
   ∫_0^t R_A M_s^∂_x ψ( σ(β^_s) · W_s + σ^∘ W^∘_s ),
    is a –martingale. Indeed, recall that under any ∈, the drift and the volatility of X are bounded, c_β and Σ are continuous functions on the compact set B, and f has linear growth. Hence, using in particular Cauchy–Schwarz inequality, (<ref>) ensures that the above stochastic integral is in ℍ^1() and is thus a –martingale. We deduce
    
    ^ [M_T^] = M_0^ + ^[ ∫_0^t R_A M^_s h^ψ (X_s, ∂_x ψ, ∂^2_xxψ, α_s^, β^_s)  s ].

    
Using the boundary condition for ψ, and replacing by their respective values of M_0^ and M_T^, we obtain
    
    R_0(0,X_0) = ^[- ^ R_A ∫_0^T ( 1/2 c_β (β_s^) - f(X_s) )  s ] - ^[ ∫_0^t R_A M_s^ h^ψ (X_s, ∂_x ψ, ∂_xx^2 ψ, α_s^, β_s^)  s ].

    
Using the HJB equation satisfied by ψ, we have






    h^ψ (x, ∂_x ψ, ∂_xx^2 ψ, a, b) =     12 ( c_α(a) + 2 a ·1_d ∂_x ψ)
        + 12( c_β (b) - γ^0Σ(b) )
        - 12 c^⋆_β(γ^0) 
        + 12γ^0Σ^⋆(γ^0),

and by simple computations

    c_β (b) - γ_t^0Σ(b) ≥    inf_b' ∈ B{ c_β (b') - γ^0Σ(b') } = - H_v ( γ^0) = - γ^0Σ^⋆( γ^0) + c^⋆_β(γ^0), 
    
        c_α(a) + 2 a ·1_d ∂_x ψ≥    inf_a' ∈ A{ c_α(a') + 2 a' ·1_d ∂_x ψ} = - H_d (∂_x ψ ) = 0,

since the function ∂_x ψ is non–negative. Therefore, h^ψ (x, ∂_x ψ, ∂_xx^2 ψ, a, b) ≥ 0, with equality for the optimal controls (α^0, β^0) defined by (<ref>), which leads to
R_0(0,X_0) ≥^[- exp(R_A ∫_0^T ( 1/2 c_β (β_s^) - f(X_s) )  s ) ],
with equality for the optimal controls.









The previous result shows that, even without contracting, the consumer’s optimal behaviour exhibits a positive effort to reduce the volatility of the consumption deviation process. Of course, this is naturally due to the fact that consumers in our model are assumed to be risk–averse, and are therefore negatively impacted by the variance of their deviation. 



We conclude this section by providing a closed–form expression for the reservation utility when f is linear.


    Let f(x) = κ x, x ∈, with κ≥ 0. Then, the reservation utility of the consumer is
    
    R_0    = - ^- R_A ( κ T X_0 + ψ_0(T) ),  where ψ_0 (T) := - ∫_0^T H_0 (γ^0(t))  t, 
    γ^0(t)    = - R_A κ^2 (T-t)^2,   and   H_0 (γ) := 12( c^⋆_β(γ) - γΣ^⋆(γ) - γ(σ^∘)^2 ).

    
    The consumer’s optimal effort on the drift and on each volatility usage are respectively:
    
    α^0 := 0   and β_t^0,k := 1 ∧(  λ^k R_A κ^2 (T-t)^2 )^-1/η^k + 1∨ B_min,   k=1,…,d.

    thus inducing an optimal distribution ^0 under which the deviation process follows the dynamics 
    
    X_t = σ^⋆( γ^0(t) ) · W_t + σ^∘ W^∘_t.





    By directly plugging the guess ψ(t, x) = A(t)x + ψ_0(t) in the PDE (<ref>), we obtain
    
    0 = A'(t) x + ψ_0'(t) + κ x - 12( c^⋆_β(- R_A A^2(t)) + R_A A^2(t) Σ^⋆(- R_A A^2(t)) + R_A A^2(t) (σ^∘)^2 ),    A(T) = ψ_0(T) = 0.

    
    This provides A(t) = κ (T-t) and ψ_0(t) = - ∫_t^T H_0( - R_A A^2(s) )  s with
H_0 (γ) := 12( c^⋆_β(γ) - γΣ^⋆(γ) - γ(σ^∘)^2 ).
    
    Finally the expression of the maximiser β^0,k follows from Proposition <ref>. Moreover, this smooth solution to the PDE satisfies the condition (<ref>). Indeed, this condition is equivalent to having, for any ∈
    
    ^[ ∫_0^T  ^-2 R_A ( κ (T-t) X_t + ψ_0(t) )   (T-t)^2  t]<+∞,

    which is true since X is an Itō process with bounded drift and volatility. We thus conclude with Proposition <ref> (ii) that it is indeed the value function inducing the reservation utility.




    One can notice that the certainty equivalent ψ is a decreasing function of the correlation σ^∘ with the common noise, since
    
    ψ(t, x) 
            
               = κ x (T-t) - 12∫_t^T ( c^⋆(- R_A A^2(s)) + R_A A^2(s) Σ^⋆(- R_A A^2(s)) )  s
            - 12 R_A (σ^∘)^2 ∫_t^T A^2(s)  s.

    Therefore, the reservation utility of the consumer is negatively impacted by the presence of common noise.










§ DETAILS AND PROOF FOR THE FIRST–BEST CASE


Adapting the reasoning in <cit.>, we are led to introduce a slight modification of the so–called Morse–Transue space on the initial canonical space Ω, defined here for any ∈ by

    M^ () := {ϑ : Ω⟶,  measurable, ^ [ ϕ (a ϑ ) ] < + ∞,  for all  a ≥ 0 },

where ϕ : ⟶ is the following Young function ϕ : x ⟼exp ( |x|) - 1. Then, M^ () endowed with the norm ϑ_ϕ := inf{ k > 0: ^ [ ϕ(ϑ/k)] ≤ 1 } is a Banach space. In this case, the set of admissible contracts Ξ^FB is defined as

    Ξ^FB := {ξ∈ M^ (): _T-measurable, such that ^ [ξ | _T^∘] ∈ M^ (),  ∀ ∈}.

Thus, for any (ξ, μ^X, ) ∈Ξ^FB× (_T) ×, the quantities J_0^A(ξ, μ^X, ) and J_0^P (ξ, ) are well–defined. Given the reservation utility level of the representative Agent, R_0, the problem of the Principal is

    V_0^FB := inf_ρ > 0{ - ρ R_0 + sup_(, μ^X) ∈× (_T)sup_ξ∈Ξ^FB{ J_0^P (ξ, ) + ρ J_0^A (ξ, μ^X, ) }},

where ρ > 0 is the Lagrange multiplier associated to the participation constraint. We first maximise this utility with respect to ξ. Let us consider, for any probability (, μ^X) ∈× (_T), the following map Ξ^ : Ξ^FB⟶ defined by

    Ξ^ (ξ) := ^[ U^P ( - 𝔼^[ξ + ∫_0^T g ( X_s ) d s + θ2∫_0^T ⟨ X ⟩_s | ^∘_T ] ) 
        + ρ U^A ( ξ - ∫_0^T ( c ( ν^_s ) - f ( X_s ) ) d s ) ].


Recall that the representative Agent is risk–averse, with a risk–aversion parameter R_A. We can consider both the cases of a risk–averse or risk–neutral Principal. To simplify the notations, we define

    K^P_T :=  ∫_0^T g ( X_s ) d s + θ2∫_0^T ⟨ X ⟩_s,   K^A,_T := ∫_0^T ( c ( ν^_s ) - f ( X_s ) ) d s   and   K_T := K_T^A, + K_T^P.


We now turn to the proof of Proposition <ref> by considering a CARA risk averse principal since the risk-neutral principal case is deduced by taking R_P=0.


If the Principal is risk averse, the utility of the Principal is defined as U^P(x) = - ^-R_P x. Thus we obtain

    Ξ^ (ξ) := ^[ - exp(R_P 𝔼^[ξ + K^P_T | _T^∘] )
        - ρexp( - R_A ξ + R_A K^A,_T ) ].


For any ϑ∈Ξ^FB and ε≥ 0,

    1ε( Ξ^ (ξ + εϑ) - Ξ^ (ξ) ) = 
            1ε^[ - exp(R_P 𝔼^[ξ + εϑ+ K^P_T | ^∘_T ] )
        + exp(R_P 𝔼^[ξ + K^P_T | ^∘_T ] ) ] 
       + 1ε^[ - ρexp( - R_A ( ξ +εϑ) + R_A K_T^A,)
        + ρexp( - R_A ξ + R_A K_T^A,) ] 
    
        =     1ε^[ ^R_P 𝔼^ [ξ + K^P_T | ^∘_T ]( 1- ^R_P ε𝔼^ [ϑ| ^∘_T]) ]
        + 1ε^[ ρ^- R_A ξ + R_A K_T^A,(1- ^ - R_A εϑ)  ].


Therefore, letting ε→ 0, the Gâteaux derivative is given by

    D Ξ^ (ξ) [ϑ] =     ^[ - R_P 𝔼^ [ϑ| ^∘_T] ^R_P 𝔼^ [ξ + K^P_T | ^∘_T ] 
        + ρϑ R_A ^- R_A ξ + R_A K_T^A,] 
    
        =     ^[  𝔼^[- R_Pϑ^R_P 𝔼^ [ξ + K^P_T | ^∘_T ]| ^∘_T ]  
        + ρϑ R_A ^- R_A ξ + R_A K_T^A,]


Conditioning by ^∘_T, we obtain:

    D Ξ^ (ξ) [ϑ] =     ^[ 𝔼^[- R_P ϑ^R_P 𝔼^ [ξ + K^P_T | ^∘_T ]| ^∘_T ]  
        + ^[ ρ h R_A ^- R_A ξ + R_A K_T^A,| ^∘_T ] ] 
    
        =    ^[ - R_P ϑ^R_P 𝔼^ [ξ + K^P_T | ^∘_T ] 
        + ρϑ R_A ^- R_A ξ + R_A K_T^A,].


For any ∈, let us introduce ξ^⋆ () defined by

    ξ^⋆ () = 
        - 1R_A + R_Pln( R_Pρ R_A) 
        + K_T^A
        - R_PR_A + R_P𝔼^ [ K_T | ^∘_T ].

so that

    𝔼^ [ξ^⋆ () | ^∘_T ] := 
        - 1R_A + R_Pln( R_Pρ R_A) 
        + R_AR_A + R_P𝔼^ [ K_T^A | ^∘_T ]
        - R_PR_A + R_P𝔼^ [K^P_T | ^∘_T ],

and

    ξ^⋆ () := - 1R_Aln( R_Pρ R_A) + K_T^A - R_PR_A( 𝔼^ [ξ ^⋆ ()| ^∘_T ] + 𝔼^ [K^P_T | ^∘_T ] ).





Then, for any ϑ∈Ξ^FB, we have D Ξ^( ξ^⋆() ) [ϑ] = 0 and Ξ^ is strictly concave function, so that this ξ^⋆ () attains the minimum of Ξ^ and is therefore optimal. Plugging these expressions back into the Principal  and recalling that R is defined by 1/R := 1/R_A + 1/R_P, the value function of the Principal in the first best case rewrites:

    V_0^FB   = inf_ρ > 0{ρ( - R_0 + R_A + R_PR_Pexp( R_AR_A + R_Pln( R_Pρ R_A) ) V_0^R)  }, where  V_0^R:= 
        sup_∈^[ 
        - exp( R 𝔼^[ K_T | ^∘_T ] ) ].

Notice that V_0^R does not depend on ρ. Then direct calculations lead to the optimal Lagrange multiplier and first–best value function:

    ρ^⋆ = R_PR_A( V_0^RR_0)^1 + R_P/R_A and  
        V_0^FB   = R_0 ( V_0^RR_0)^1 + R_P/R_A.



Using the same tools as in Section <ref>, we can easily prove the points (i), (ii) and (iv) of Proposition <ref>. The point (iii) is a straightforward computation of the contract defined by (<ref>). 





















































































































































































































































































































    

























































































































































































































































































































































































































































































