The DTREE Procedure

Example 6.2 Oil Wildcatter’s Problem in Risk-Averse Setting

(View the complete code for this example.)

Continuing with the oil wildcatter’s problem, suppose that in addition to possibly buying insurance to spread the risk of the venture, the wildcatter is considering sharing the risk by selling a portion of this venture to other investors. Now, the decision he faces is whether to buy insurance or not and what percentage of the investment to divest. Again, assume that the wildcatter is risk averse with a risk tolerance of $1,200,000. Notice that in the program that follows the 'Divestment' decision includes possibilities of no divestment to 100% divestment in 10% increments.

/* -- create the STAGEIN= data set                 -- */
data Dtoils4;
format _STNAME_ $12. _OUTCOM_ $15. _SUCCES_ $12.;
input _STNAME_ $ _STTYPE_ $ _OUTCOM_ $
    _SUCCES_ $ ;
datalines;
Divestment      Decision    No_Divestment      Insurance
.               .           10%_Divestment     Insurance
.               .           20%_Divestment     Insurance
.               .           30%_Divestment     Insurance
.               .           40%_Divestment     Insurance
.               .           50%_Divestment     Insurance
.               .           60%_Divestment     Insurance
.               .           70%_Divestment     Insurance
.               .           80%_Divestment     Insurance
.               .           90%_Divestment     Insurance
.               .           100%_Divestment    .
Insurance       Decision    Buy_Insurance      Cost
.               .           Do_Not_Buy         Cost
Cost            Chance      Low                Oil_Deposit
.               .           Fair               Oil_Deposit
.               .           High               Oil_Deposit
Oil_Deposit     Chance      Dry                .
.               .           Wet                .
.               .           Soaking            .
;

The probabilities associated with the uncertain events are given in the PROBIN= data set named Dtoilp4. Except for the order of the variables in this data set, it is the same as the Dtoilp1 data set used in the section Introductory Example.

/* -- create the PROBIN= data set                         -- */
data Dtoilp4;
input _EVENT1 $ _PROB1  _EVENT3 $ _PROB3 ;
datalines;
Low         0.2     Dry         0.5
Fair        0.6     Wet         0.3
High        0.2     Soaking     0.2
;

/* -- create the PAYOFFS= data set                        -- */
data Dtoilu4(drop=i j k l);
length _STATE1-_STATE4 $16. ;
format _VALUE_ dollar12.0;
/* define and initialize arrays */
array DIVEST{11}  $16. _TEMPORARY_ ('No_Divestment',
                                    '10%_Divestment',
                                    '20%_Divestment',
                                    '30%_Divestment',
                                    '40%_Divestment',
                                    '50%_Divestment',
                                    '60%_Divestment',
                                    '70%_Divestment',
                                    '80%_Divestment',
                                    '90%_Divestment',
                                    '100%_Divestment'  );
array INSUR{3} $16.    _TEMPORARY_ ('Do_Not_Buy',
                                    'Buy_Insurance',
                                    ' '                );
array COST{4} $        _TEMPORARY_ ('Low',
                                    'Fair',
                                    'High',
                                    ' '                );
array DEPOSIT{4} $     _TEMPORARY_ ('Dry',
                                    'Wet',
                                    'Soaking',
                                    ' '                 );

do i=1 to 10;            /* loop for each divestment */
   _STATE1=DIVEST{i};

   /*
    * determine the percentage of ownership retained
    * for this scenario
    */
   PCT=1.0-((i-1)*0.1);

   do j=1 to 2;       /* loop for insurance decision */
      _STATE2=INSUR{j};

      /*
       * determine the premium need to pay for this
       * scenario
       */
      if _STATE2='Buy_Insurance' then PREMIUM=130000;
      else                            PREMIUM=0;

      do k=1 to 3;        /* loop for each well cost */
         _STATE3=COST{k};

         /* determine the cost for this scenario */
         if      _STATE3='Low' then  _COST_=150000;
         else if _STATE3='Fair' then _COST_=300000;
         else                        _COST_=500000;

         do l=1 to 3;  /* loop for each deposit type */
            _STATE4=DEPOSIT{l};

            /*
             * determine the oil deposit and the
             * corresponding net payoff for this scenario
             */
            if      _STATE4='Dry' then _PAYOFF_=0;
            else if _STATE4='Wet' then _PAYOFF_=700000;
            else                       _PAYOFF_=1200000;

            /* determine redeem received for this scenario */
            if _STATE2='Buy_Insurance' and _STATE4='Dry' then
                 REDEEM=200000;
            else REDEEM=0;

            /* calculate the net return for this scenario */
            _VALUE_=(_PAYOFF_-_COST_-PREMIUM+REDEEM)*PCT;

            /* drop unneeded variables */
            drop _COST_ _PAYOFF_ PREMIUM REDEEM PCT;

            /* output this record */
            output;
         end;
      end;
   end;
end;

/* output an observation for the scenario 100%_Divestment */
_STATE1=DIVEST{11};
_STATE2=INSUR{3};
_STATE3=COST{4};
_STATE4=DEPOSIT{4};
_VALUE_=0;
output;

run;

The Dtoilu4 data set for this problem, which contains 181 observations and 5 variables, is displayed in Output 6.2.1.

Output 6.2.1: Payoffs of the Oil Wildcatter’s Problem with Risk Sharing

Oil Wildcatter's Problem
 
The Payoffs

Obs_STATE1_STATE2_STATE3_STATE4_VALUE_
1No_DivestmentDo_Not_BuyLowDry$-150,000
2No_DivestmentDo_Not_BuyLowWet$550,000
3No_DivestmentDo_Not_BuyLowSoaking$1,050,000
4No_DivestmentDo_Not_BuyFairDry$-300,000
5No_DivestmentDo_Not_BuyFairWet$400,000
6No_DivestmentDo_Not_BuyFairSoaking$900,000
7No_DivestmentDo_Not_BuyHighDry$-500,000
8No_DivestmentDo_Not_BuyHighWet$200,000
9No_DivestmentDo_Not_BuyHighSoaking$700,000
10No_DivestmentBuy_InsuranceLowDry$-80,000
11No_DivestmentBuy_InsuranceLowWet$420,000
12No_DivestmentBuy_InsuranceLowSoaking$920,000
13No_DivestmentBuy_InsuranceFairDry$-230,000
14No_DivestmentBuy_InsuranceFairWet$270,000
15No_DivestmentBuy_InsuranceFairSoaking$770,000
16No_DivestmentBuy_InsuranceHighDry$-430,000
17No_DivestmentBuy_InsuranceHighWet$70,000
18No_DivestmentBuy_InsuranceHighSoaking$570,000
1910%_DivestmentDo_Not_BuyLowDry$-135,000
2010%_DivestmentDo_Not_BuyLowWet$495,000
2110%_DivestmentDo_Not_BuyLowSoaking$945,000
2210%_DivestmentDo_Not_BuyFairDry$-270,000
2310%_DivestmentDo_Not_BuyFairWet$360,000
2410%_DivestmentDo_Not_BuyFairSoaking$810,000
2510%_DivestmentDo_Not_BuyHighDry$-450,000
2610%_DivestmentDo_Not_BuyHighWet$180,000
2710%_DivestmentDo_Not_BuyHighSoaking$630,000
2810%_DivestmentBuy_InsuranceLowDry$-72,000
2910%_DivestmentBuy_InsuranceLowWet$378,000
3010%_DivestmentBuy_InsuranceLowSoaking$828,000
3110%_DivestmentBuy_InsuranceFairDry$-207,000
3210%_DivestmentBuy_InsuranceFairWet$243,000
3310%_DivestmentBuy_InsuranceFairSoaking$693,000
3410%_DivestmentBuy_InsuranceHighDry$-387,000
3510%_DivestmentBuy_InsuranceHighWet$63,000
3610%_DivestmentBuy_InsuranceHighSoaking$513,000
3720%_DivestmentDo_Not_BuyLowDry$-120,000
3820%_DivestmentDo_Not_BuyLowWet$440,000
3920%_DivestmentDo_Not_BuyLowSoaking$840,000
4020%_DivestmentDo_Not_BuyFairDry$-240,000
4120%_DivestmentDo_Not_BuyFairWet$320,000
4220%_DivestmentDo_Not_BuyFairSoaking$720,000
4320%_DivestmentDo_Not_BuyHighDry$-400,000
4420%_DivestmentDo_Not_BuyHighWet$160,000
4520%_DivestmentDo_Not_BuyHighSoaking$560,000
4620%_DivestmentBuy_InsuranceLowDry$-64,000
4720%_DivestmentBuy_InsuranceLowWet$336,000
4820%_DivestmentBuy_InsuranceLowSoaking$736,000
4920%_DivestmentBuy_InsuranceFairDry$-184,000
5020%_DivestmentBuy_InsuranceFairWet$216,000
5120%_DivestmentBuy_InsuranceFairSoaking$616,000
5220%_DivestmentBuy_InsuranceHighDry$-344,000
5320%_DivestmentBuy_InsuranceHighWet$56,000
5420%_DivestmentBuy_InsuranceHighSoaking$456,000
5530%_DivestmentDo_Not_BuyLowDry$-105,000
5630%_DivestmentDo_Not_BuyLowWet$385,000
5730%_DivestmentDo_Not_BuyLowSoaking$735,000
5830%_DivestmentDo_Not_BuyFairDry$-210,000
5930%_DivestmentDo_Not_BuyFairWet$280,000
6030%_DivestmentDo_Not_BuyFairSoaking$630,000
6130%_DivestmentDo_Not_BuyHighDry$-350,000
6230%_DivestmentDo_Not_BuyHighWet$140,000
6330%_DivestmentDo_Not_BuyHighSoaking$490,000
6430%_DivestmentBuy_InsuranceLowDry$-56,000
6530%_DivestmentBuy_InsuranceLowWet$294,000
6630%_DivestmentBuy_InsuranceLowSoaking$644,000
6730%_DivestmentBuy_InsuranceFairDry$-161,000
6830%_DivestmentBuy_InsuranceFairWet$189,000
6930%_DivestmentBuy_InsuranceFairSoaking$539,000
7030%_DivestmentBuy_InsuranceHighDry$-301,000
7130%_DivestmentBuy_InsuranceHighWet$49,000
7230%_DivestmentBuy_InsuranceHighSoaking$399,000
7340%_DivestmentDo_Not_BuyLowDry$-90,000
7440%_DivestmentDo_Not_BuyLowWet$330,000
7540%_DivestmentDo_Not_BuyLowSoaking$630,000
7640%_DivestmentDo_Not_BuyFairDry$-180,000
7740%_DivestmentDo_Not_BuyFairWet$240,000
7840%_DivestmentDo_Not_BuyFairSoaking$540,000
7940%_DivestmentDo_Not_BuyHighDry$-300,000
8040%_DivestmentDo_Not_BuyHighWet$120,000
8140%_DivestmentDo_Not_BuyHighSoaking$420,000
8240%_DivestmentBuy_InsuranceLowDry$-48,000
8340%_DivestmentBuy_InsuranceLowWet$252,000
8440%_DivestmentBuy_InsuranceLowSoaking$552,000
8540%_DivestmentBuy_InsuranceFairDry$-138,000
8640%_DivestmentBuy_InsuranceFairWet$162,000
8740%_DivestmentBuy_InsuranceFairSoaking$462,000
8840%_DivestmentBuy_InsuranceHighDry$-258,000
8940%_DivestmentBuy_InsuranceHighWet$42,000
9040%_DivestmentBuy_InsuranceHighSoaking$342,000
9150%_DivestmentDo_Not_BuyLowDry$-75,000
9250%_DivestmentDo_Not_BuyLowWet$275,000
9350%_DivestmentDo_Not_BuyLowSoaking$525,000
9450%_DivestmentDo_Not_BuyFairDry$-150,000
9550%_DivestmentDo_Not_BuyFairWet$200,000
9650%_DivestmentDo_Not_BuyFairSoaking$450,000
9750%_DivestmentDo_Not_BuyHighDry$-250,000
9850%_DivestmentDo_Not_BuyHighWet$100,000
9950%_DivestmentDo_Not_BuyHighSoaking$350,000
10050%_DivestmentBuy_InsuranceLowDry$-40,000
10150%_DivestmentBuy_InsuranceLowWet$210,000
10250%_DivestmentBuy_InsuranceLowSoaking$460,000
10350%_DivestmentBuy_InsuranceFairDry$-115,000
10450%_DivestmentBuy_InsuranceFairWet$135,000
10550%_DivestmentBuy_InsuranceFairSoaking$385,000
10650%_DivestmentBuy_InsuranceHighDry$-215,000
10750%_DivestmentBuy_InsuranceHighWet$35,000
10850%_DivestmentBuy_InsuranceHighSoaking$285,000
10960%_DivestmentDo_Not_BuyLowDry$-60,000
11060%_DivestmentDo_Not_BuyLowWet$220,000
11160%_DivestmentDo_Not_BuyLowSoaking$420,000
11260%_DivestmentDo_Not_BuyFairDry$-120,000
11360%_DivestmentDo_Not_BuyFairWet$160,000
11460%_DivestmentDo_Not_BuyFairSoaking$360,000
11560%_DivestmentDo_Not_BuyHighDry$-200,000
11660%_DivestmentDo_Not_BuyHighWet$80,000
11760%_DivestmentDo_Not_BuyHighSoaking$280,000
11860%_DivestmentBuy_InsuranceLowDry$-32,000
11960%_DivestmentBuy_InsuranceLowWet$168,000
12060%_DivestmentBuy_InsuranceLowSoaking$368,000
12160%_DivestmentBuy_InsuranceFairDry$-92,000
12260%_DivestmentBuy_InsuranceFairWet$108,000
12360%_DivestmentBuy_InsuranceFairSoaking$308,000
12460%_DivestmentBuy_InsuranceHighDry$-172,000
12560%_DivestmentBuy_InsuranceHighWet$28,000
12660%_DivestmentBuy_InsuranceHighSoaking$228,000
12770%_DivestmentDo_Not_BuyLowDry$-45,000
12870%_DivestmentDo_Not_BuyLowWet$165,000
12970%_DivestmentDo_Not_BuyLowSoaking$315,000
13070%_DivestmentDo_Not_BuyFairDry$-90,000
13170%_DivestmentDo_Not_BuyFairWet$120,000
13270%_DivestmentDo_Not_BuyFairSoaking$270,000
13370%_DivestmentDo_Not_BuyHighDry$-150,000
13470%_DivestmentDo_Not_BuyHighWet$60,000
13570%_DivestmentDo_Not_BuyHighSoaking$210,000
13670%_DivestmentBuy_InsuranceLowDry$-24,000
13770%_DivestmentBuy_InsuranceLowWet$126,000
13870%_DivestmentBuy_InsuranceLowSoaking$276,000
13970%_DivestmentBuy_InsuranceFairDry$-69,000
14070%_DivestmentBuy_InsuranceFairWet$81,000
14170%_DivestmentBuy_InsuranceFairSoaking$231,000
14270%_DivestmentBuy_InsuranceHighDry$-129,000
14370%_DivestmentBuy_InsuranceHighWet$21,000
14470%_DivestmentBuy_InsuranceHighSoaking$171,000
14580%_DivestmentDo_Not_BuyLowDry$-30,000
14680%_DivestmentDo_Not_BuyLowWet$110,000
14780%_DivestmentDo_Not_BuyLowSoaking$210,000
14880%_DivestmentDo_Not_BuyFairDry$-60,000
14980%_DivestmentDo_Not_BuyFairWet$80,000
15080%_DivestmentDo_Not_BuyFairSoaking$180,000
15180%_DivestmentDo_Not_BuyHighDry$-100,000
15280%_DivestmentDo_Not_BuyHighWet$40,000
15380%_DivestmentDo_Not_BuyHighSoaking$140,000
15480%_DivestmentBuy_InsuranceLowDry$-16,000
15580%_DivestmentBuy_InsuranceLowWet$84,000
15680%_DivestmentBuy_InsuranceLowSoaking$184,000
15780%_DivestmentBuy_InsuranceFairDry$-46,000
15880%_DivestmentBuy_InsuranceFairWet$54,000
15980%_DivestmentBuy_InsuranceFairSoaking$154,000
16080%_DivestmentBuy_InsuranceHighDry$-86,000
16180%_DivestmentBuy_InsuranceHighWet$14,000
16280%_DivestmentBuy_InsuranceHighSoaking$114,000
16390%_DivestmentDo_Not_BuyLowDry$-15,000
16490%_DivestmentDo_Not_BuyLowWet$55,000
16590%_DivestmentDo_Not_BuyLowSoaking$105,000
16690%_DivestmentDo_Not_BuyFairDry$-30,000
16790%_DivestmentDo_Not_BuyFairWet$40,000
16890%_DivestmentDo_Not_BuyFairSoaking$90,000
16990%_DivestmentDo_Not_BuyHighDry$-50,000
17090%_DivestmentDo_Not_BuyHighWet$20,000
17190%_DivestmentDo_Not_BuyHighSoaking$70,000
17290%_DivestmentBuy_InsuranceLowDry$-8,000
17390%_DivestmentBuy_InsuranceLowWet$42,000
17490%_DivestmentBuy_InsuranceLowSoaking$92,000
17590%_DivestmentBuy_InsuranceFairDry$-23,000
17690%_DivestmentBuy_InsuranceFairWet$27,000
17790%_DivestmentBuy_InsuranceFairSoaking$77,000
17890%_DivestmentBuy_InsuranceHighDry$-43,000
17990%_DivestmentBuy_InsuranceHighWet$7,000
18090%_DivestmentBuy_InsuranceHighSoaking$57,000
181100%_Divestment   $0


The optimal decisions for this problem can be identified by invoking PROC DTREE and using the SUMMARY statement as follows:

title "Oil Wildcatter's Problem";
proc dtree stagein=Dtoils4
           probin=Dtoilp4
           payoffs=Dtoilu4
           criterion=maxce rt=1200000
           nowarning;
   evaluate;
   summary / target=Divestment;
   summary / target=Insurance;
quit;

The optimal decision summaries in Output 6.2.2 and Output 6.2.3 show the optimal strategy for the wildcatter.

  • The wildcatter should sell 30% of his investment to other companies and reject the insurance policy offered to him.

  • The insurance policy should be accepted only if the decision to not divest is made.

  • If the decision to buy the insurance policy is made, then it is optimal to divest 10% of the venture.

Output 6.2.2: Summary of the Oil Wildcatter’s Problem for DIVESTMENT

Oil Wildcatter's Problem

The DTREE Procedure
Optimal Decision Summary

Order of Stages
StageType
DivestmentDecision
InsuranceDecision
CostChance
Oil_DepositChance
_ENDST_End

Decision Parameters
Decision Criterion:Maximize Certain Equivalent Value (MAXCE)
Risk Tolerance:$1,200,000
Optimal Decision Yields:$50,104

Optimal Decision Policy
Up to Stage Divestment
Alternatives or OutcomesCumulative RewardEvaluating Value
No_Divestment $45,728
10%_Divestment $48,021
20%_Divestment $49,907
30%_Divestment $50,104*
40%_Divestment $48,558
50%_Divestment $45,219
60%_Divestment $40,036
70%_Divestment $32,965
80%_Divestment $23,961
90%_Divestment $12,985
100%_Divestment $0


Output 6.2.3: Summary of the Oil Wildcatter’s Problem for INSURANCE

Oil Wildcatter's Problem

The DTREE Procedure
Optimal Decision Summary

Order of Stages
StageType
DivestmentDecision
InsuranceDecision
CostChance
Oil_DepositChance
_ENDST_End

Decision Parameters
Decision Criterion:Maximize Certain Equivalent Value (MAXCE)
Risk Tolerance:$1,200,000
Optimal Decision Yields:$50,104

Optimal Decision Policy
Up to Stage Insurance
Alternatives or OutcomesCumulative RewardEvaluating Value
No_DivestmentBuy_Insurance $45,728*
No_DivestmentDo_Not_Buy $44,499
10%_DivestmentBuy_Insurance $46,552
10%_DivestmentDo_Not_Buy $48,021*
20%_DivestmentBuy_Insurance $46,257
20%_DivestmentDo_Not_Buy $49,907*
30%_DivestmentBuy_Insurance $44,812
30%_DivestmentDo_Not_Buy $50,104*
40%_DivestmentBuy_Insurance $42,186
40%_DivestmentDo_Not_Buy $48,558*
50%_DivestmentBuy_Insurance $38,350
50%_DivestmentDo_Not_Buy $45,219*
60%_DivestmentBuy_Insurance $33,273
60%_DivestmentDo_Not_Buy $40,036*
70%_DivestmentBuy_Insurance $26,927
70%_DivestmentDo_Not_Buy $32,965*
80%_DivestmentBuy_Insurance $19,284
80%_DivestmentDo_Not_Buy $23,961*
90%_DivestmentBuy_Insurance $10,317
90%_DivestmentDo_Not_Buy $12,985*


This information can be illustrated graphically using the GPLOT procedure. Output 6.2.4, produced by the PROC GPLOT statements shown in the following code, provides a clear picture of the effects of the divestment possibilities and the insurance options.

   /*  create a data set for the return corresponds to each */
   /*  divestment possibilities and the insurance options   */
data Data2g;
   input  INSURE DIVEST VALUE;
   datalines;
       1       0   45728
       0       0   44499
       1      10   46552
       0      10   48021
       1      20   46257
       0      20   49907
       1      30   44812
       0      30   50104
       1      40   42186
       0      40   48558
       1      50   38350
       0      50   45219
       1      60   33273
       0      60   40036
       1      70   26927
       0      70   32965
       1      80   19284
       0      80   23961
       1      90   10317
       0      90   12985
       1     100       0
       0     100       0
;

   /* -- define a format for INSURE variable             -- */
proc format;
   value sample 0='Do_Not_Buy' 1='Buy_Insurance';
run;

   /* -- define title                                    -- */
title h=3 "Oil Wildcatter's Problem";

   /* define legend                                      -- */
legend1 frame cframe=white label=none
        cborder=black position=center ;

   /* define symbol characteristics of the data points      */
   /* and the interpolation line for returns vs divestment  */
   /* when INSURE=0                                         */
symbol1 c=cyan i=join v=dot l=1 h=1;

   /* define symbol characteristics of the data points      */
   /* and the interpolation line for returns vs divestment  */
   /*  when INSURE=1                                        */
symbol2 c=green i=join v=square l=2 h=1;

   /* -- define axis characteristics                     -- */
axis1 minor=none label=('Divestment (in percentage)');
axis2 minor=none label=(angle=90 rotate=0 'Certainty Equivalent');

   /* set graphics options                                  */
goptions htext=1.5;

   /* plot VALUE vs DIVEST using INSURE as third variable   */
proc gplot data=Data2g ;
   plot VALUE*DIVEST=INSURE / haxis=axis1
                              vaxis=axis2
                              legend=legend1
                              name="dt2"
                              frame
                              cframe=white ;
   format INSURE SAMPLE.;
run;

quit;

Note that the data input into the Data2g data set is obtained from the optimal decision summary as in Output 6.2.3. The value 1 of the INSURE variable represents the alternative 'Buy_Insurance' and the value 0 represents the alternative 'Do_Not_Buy'.

Output 6.2.4: Returns of the Oil Wildcatter’s Problem

Returns of the Oil Wildcatter’s Problem


Last updated: August 31, 2020