Instruction Add-In DT
Instruction Add-In DT
The MS Excel add-in “Decision Tree” is intended for building and analyzing
decision tree and events for situations of uncertainty and risk.
The decision tree and events tree is built in a regular Excel sheet. When
constructing, standard formulas are automatically added to select, estimate
the average expected result and calculate the probability.
The main version of the add-in works in 32-bit and 64-bit versions of MS Excel since MS
Office 2007. Older versions of MS Excel are not supported.
A worksheet with a built decision tree is formatted in a special way, but it remains a regular
Excel sheet and can be edited freely after building the tree.
The add-in file is named: “Decision Tree yy. mm. xlam ”(depending on the version) and can
either run as a regular MS Excel file (you must agree to launch the add-in macros), or
connect automatically as any add-on (you need to write the file to the add-in folder of MS
Excel C: \ Users \ User \ AppData \ Roaming \ Microsoft \ AddIns \). After launch, a new item
appears in the Excel menu "Decision Tree".
For making decisions in a situation of uncertainty, the method of "tables of winnings and
losses" is widely used. However, in difficult cases one has to choose between alternatives,
each of which is a “multi-step” decision-making process. Such steps may be separated in
time, at each step a new set of alternatives and scenarios for the future may arise, the
calculation of the probabilities of various events becomes more complicated.
In this case, it is convenient to visualize the process of choosing from the considered
alternatives with the help of a diagram or a graph, called a decision tree (tree). A decision
tree is a necessary tool for strategic planning and investment analysis.
Beginning of work.
The decision tree is built using the commands of the add-in interface window. This window
can be closed and open again to continue working at any stage of building the decision
tree.
The decision tree must have a strictly defined structure in order for the automatically
generated formulas to work correctly, and for the add-in to correctly determine the
structure of the tree when making changes to the decision tree.
Therefore, all changes to the tree, with the exception of adding numerical data and
calculation formulas, should be done only through the add-in interface (!!!) .
1. You need to start building a tree using the “Create a tree” button, which will create a
new page with a standard start of the tree (“trunk”). The trunk (the beginning of the tree) is
shown in brown. The red asterisk here and hereafter is a possible point of “growth” of the
tree, since it is possible to insert a continuation of the tree into the cell containing the
asterisk. Some of the cells are hidden so as not to burden the overhead scheme.
2. To continue designing the decision tree, you need to decide on how many options you
need to choose the main solution. The number of variants is indicated in the “Number of
branches” window with the help of more / less arrows to the right of the
window. Impossible number options are blocked.By default, in the “Add a fork” panel of
events, the option “Decision selection” is checked, meaning that a solution can be selected
from a certain number of options. If you leave the number of branches equal to 2 and
press the “Add tree” button, the fork will grow green with the comment Solution 1, 2 .... In
each of the two asterisks that appear, the tree can be continued.
In the root cell of the fork, the formula = MAX (L2: L6) is automatically recorded, with the
help of which the choice will be made later, which of the solutions is the most attractive.
Sometimes a tree can begin with a fork "Options for the future." In this case, the decision
can not be chosen - here with a certain probability and regardless of your will, one of the
possible future is realized. But in most cases, the fork “Options for the future” tree at some
point continues, which realizes our incomplete knowledge about the future.
In order to insert such a fork, click the “Variants of the Future” radio button, select the
number of branches (say, 3), select (click the mouse) one of the cells with an asterisk and
click the “Add” button. As a result, an orange fork with three branches and additional
information about the probability of each branch will be added to the decision tree.
The automatically generated formula = SUMPRODUCT (N2: N4; Q2: Q4) allows us to
estimate the weighted average result for this probabilistic fork of events.
1. Undo and Redo commands. Two buttons with arrows in the “Operations” panel in the
lower left corner of the interface window are used to roll back recent changes or return to
a newer version of the tree. It should be borne in mind that the Undo \ Redo mechanism
built into MS Excel does not support changes that add-ins make. Therefore, when the add-
in works, there are two independent sets of recent changes: the Excel version and the
“Decision Tree” add-in version. If you want to roll back changes made outside the add-in
interface, you should use the Edit - Cancel \ Repeat menu. The state of the decision tree
after each operation through the add-in interface is also remembered and can be
returned. However, the changes made outside the interface after the last operation will be
lost. Unfortunately, this can confuse the user when returning more than one or two steps.
2. The “Delete” command of the “Continue tree from node” panel. With this button you can
delete the entire continuation of the tree with all branches, starting from the selected
node. If a cell that is not a tree node is selected, no reaction will follow.
3. Commands "Copy" and "Paste" of the panel "Continuation of the tree from the node". If
you select a cell with a tree node and click the Copy button, the entire continuation of the
tree from the specified node to the end of the branches is copied into a special buffer. The
copied continuation of the decision tree can be inserted into any cell with an asterisk. This
is convenient when part of the tree needs to be repeated in another place. The copy is
retained until another “Copy” command follows.
4. The “Align” command in the “Tree” panel.
If the decision tree is built, but the ends of the branches are in different columns, it may be
convenient to align them for a better view of the tree.
To do this, you can use the "Align" command. When you click this button, all open
branches of the tree grow to the longest branch by adding single branches that repeat the
previous information.
5. Using the Add operation of the Add events fork, you can insert an additional fork into an
existing node of the decision tree, if, as a result of analyzing the tree, you need, say, to
provide additional choice. To do this, select the tree node (for example, L2), set the node
type and the number of branches and click the Add button. The old continuation of the
decision tree from the current node will be transferred to the end of the first branch of the
newly inserted node Q2.
For calculations on the decision tree, the data reflected in the tree under the name
"Variables" is used. By default (for reasons of programming technique) a single variable is
used in the tree (the column is entitled “_1”).
If you want to reduce the number of variables, you should use the down arrow to choose a
negative number indicating how many variables you need to eliminate. In this case, the
inscription on the button changes to "Delete". Since it is impossible to leave less than one
variable, when selecting an impossible reduction, the window is highlighted in pink, and
the Add / Delete button is deactivated.
You can change the number of variables at any stage of working with the decision tree.
2. After completing data entry or at the stage of building a tree, it is convenient to see the
tree in the most compact form possible. To do this, use the command "Hide" variables. In
this case, the Excel command “Hide columns” is applied to the columns containing
variables. The "Show" button returns visibility to columns with variables.
3. When entering values of variables, it is enough to write them down at the fork, after
which the values of the variables become determined. At later forks, the entered values of
the variables will be reproduced automatically, since the cells of the variables contain
formulas referring to the previous branch.
4. In the final decision tree, all trailing asterisks of all branches should be replaced with
numerical values or formulas that calculate these values with variables. These are fruits
(sometimes it is illogical to say - leaves) of a tree, i.e. numerical (financial) characteristics of
the situations to which the chain of events described in the tree resulted.
Comment. The “Choice of solution” nodes contains the formula = MAX (....), which selects
the highest value in the following nodes of this fork.Obviously, this is correct only if the
more, the better. If the best value is the minimum value, you should replace the formulas =
MAX (....) by = MIN (....) (this can be done through the menu "Edit \ Replace").