If no further restrictions or features are set in the configuration file (e.g. not showing any window or starting with executing a certain XploRe Quantlet) the XQC should look like shown in the screen shot. It opens with the two screen components CONSOLE and OUTPUT/RESULT window. The CONSOLE allows for the sending of single-line XploRe commands to the server to be executed immediately. It also offers a history of the last 20 commands sent to the server. To repeat a command from the history, all that is required is a mouse click on the command, and it will be copied to the command line. Pressing the `Return' key on the keyboard executes the XploRe command.
Text output coming from the XploRe server will be shown in the OUTPUT / RESULT window. Any text that is displayed can be selected and copied for use in other applications - e.g. for presentation of results within a scientific article. At the top of the screen the XQC offers additional functions via a menu bar. These functions are grouped into four categories. The XQC menu contains the features Connect, Disconnect, Reconnect and Quit.
Depending on the actual server status not every feature is enabled - e.g. if the client is not connected (the server status is indicated by a red traffic light) it does not make sense to disconnect or reconnect, if the client is already connected (server status equals a green light) the connect feature is disabled.
The Program menu contains the features New Program, Open Program (local)... and Open Program (net).... New Program opens a new and empty text editor window. This window enables the user to construct own XploRe Quantlets.
The feature Open Program (local) offers the possibility of accessing XploRe Quantlets stored on the local hard disk drive. It is only available if the XQC is running as an application or a certified applet. Due the Java sandbox restrictions running the XQC as an unsigned applet, it is not possible to access local programs.
If the user has access to the internet the menu item Open Program (net) can be useful. This feature allows the opening of Quantlets stored on a remote Web server. All it needs is the filename and the URL address at which the file is located.
Figure 21.3 shows a screen shot of the editor window containing a simple XploRe Quantlet. Two icons offer actions on the XploRe code:
The Quantlet shown in Figure 21.3 assigns two three-dimensional
standard normal distributions to the variables x and y. The
generated data are formatted to a certain color, shape and size using the
command setmaskp
. The result is finally shown in a single display.
The Data menu contains the features New Data..., Open Data (local)..., Open Data (net)..., Download DataSet from Server... and DataSets uploaded to Server.
New Data can be used to generate a new and empty data window. Before the data frame opens a pop-up window as shown in Figure 21.4 appears, asking for the desired dimension - the number of rows and cols - of the new data set. The XQC needs this information to create the spreadsheet. This definition does not have to be the exact and final decision, it is possible to add and delete rows and columns later on.
The menu item Open Data (local) enables the user to open data sets stored on the local hard disk. Again, access to local resources of the user's computer is only possible if the XQC is running as an application or a certified applet. The file will be interpreted as a common text format file. Line breaks within the file are considered as new rows for the data set. To recognize data belonging to a certain column the single data in one line must be separated by either using a ``;'' or a ``tab'' (separating the data by just a ``space'' will force the XQC to open the complete line in just on cell).
Open Data (net) lets the user open a data set that is stored on a web server by specifying the URL.
The menu item Download DataSet from Server offers the possibility to download data from the server. The data will automatically be opened in a new method and data window, offering all features of the method and data window (e.g. applying methods, saving, ...) to them.
A helpful feature especially for research purposes is presented with the menu item DataSets uploaded to Server. This item opens a window that contains a list of objects uploaded to the server using the data window or the console. Changes of these objects are documented as an object history. Due to performance reasons only uploaded data and actions on data from the CONSOLE and the TABLE MODEL are recorded.
The appearance of the data window depends on the settings in the configuration file. If a method tree is defined and supposed to be shown, the window shows the method tree on the left part and data spreadsheet on the right part of the frame. If no method tree has been defined, only the spreadsheet will be shown. The method tree will be discussed in more detail in Section 21.3.3. Figure 21.5 shows a screen shot of the combined data and method frame.
Icons on the upper part of the data and method window offer additional functionalities:
The spreadsheet of the data and method window also offers a context menu containing the following items:
Most of the context menu items are self-explaining. However, there are two items that are worth taking a closer look at - `Set Row as Header Line' and `Set column Header'. The spreadsheet has the capability to specify a header for each column. This information can be used within XploRe Quantlets to name the axis within a plot, making it easier for the user to interpret graphics. A more detailed description is included in Section 21.3.3. Default values for the headers are COL1, COL2, ...as shown in Figure 21.6. Naming a single column can be performed using the menu item `Set column Header'. The name has to be maintained within the pop up window that appears right after choosing this menu item. It can also be used to change existing column headers. The spreadsheet also offers the possibility to set column headers all at once. If the data set already contains a row with header information - either coming from manual input or as part of an opened data set - these row can be set as header using the menu item `Set Row as Header Line'. The row with the cell that is active at that time will be cut out of the data set and pasted into the header line.
Setting the header is also possible while opening a data set. After choosing the data, a pop up asks whether or not the first row of the data set to be opened should be used as the header. Nevertheless, the context menu features just described above are of course still available, enabling the user to set or change headers afterwards.
Working with the XQC's method and data window does not require any XploRe programming knowledge. All it requires is a pointing device like the mouse. Applying, for example, the scatter-plot-method on the two columns would only mean to
Result will be a plot as shown in Figure 21.6. As stated
above, the selected area can also be uploaded to the server using the
icon in order to be used for further
investigation. This new variable can be used within XploRe Quantlets written
using the EDITOR window or manipulated via the CONSOLE.
The METHOD TREE represents a tool for accessing statistical methods in an easy way. Its setup does not require any Java programming skills. All it needs is the maintenance of two configuration files.
Settings maintained within the xqc.ini file tell to the XQC whether
there will be a method tree to be shown or not and where to get the tree
information from. The client also needs to know where the methods are stored
at. The MethodPath
contains this information. Path statements can either
be absolute statements or relative to the directory the XQC has been started
in. For relative path information the path must start with XQCROOT
. The
settings in the example below tell the client to generate a method tree by
using the file xqc_methodtree.ini with the XploRe Quantlets stored in
the relative subdirectory xqc_quantlets/
.
ShowMethodTree = yes MethodTreeIniFile = xqc_methodtree.ini MethodPath = XQCROOT/xqc_quantlets/
The actual method tree is set up in a separate configuration file that is given
by the property of MethodTreeIniFile
. This file contains a systematic
structure of the tree - nodes and children, the method to be executed and its
description to be shown within the tree frame.
Node_1 = path name Child_1.1 = method|description Child_1.2 = method|description Child_1.3 = method|description Node_2 = path name Node_2.1 = path name Child_2.1.1 = method|description
The name of the method has to be identical to the name of the XploRe program
(Quantlet). The Quantlet itself has to have a procedure with the same name as
the method. This procedure is called by the XQC on execution within the method
tree.
Example
The following example shows how to set up a simple method tree. First of all, we choose XploRe Quantlets used within this e-book that we want to be part of the method tree. The aim of the Quantlet should be to generate graphics from selected data of the data spreadsheet or to just generate text output. Before being able to use the Quantlets within the method tree, they have to be `wrapped' in a procedure. The name of the procedure - in our case for example `STFstab08MT' - has to equal the name of the saved XploRe file. Our example Quantlet STFstab08MT.xpl is based on the original Quantlet STFstab08.xpl used in Chapter 1. The procedure must further have two parameters:
data
- Used for passing the selected data to the XploRe Quantlet.
names
- Contains the names of the selected columns taken from the header of the spreadsheet.
It might also be necessary to make some minor adjustments within the Quantlet in order to refer to the parameter handed over by the XQC. Those changes depend on the Quantlet itself.
extendedchars = true, basicstyle = , frame = single, lineskip = -1pt, extendedchars = true, tabsize = 4,
The XploRe coding within the procedure statement is not subject to any further needs or restrictions.
Once we have programmed the Quantlet it needs to be integrated into a method tree. For this purpose we define our own configuration file - xqc_methodtree_STF - with the following content shown in Figure 21.8.
extendedchars = true, basicstyle = , frame = single, lineskip = -1pt, extendedchars = true, tabsize = 4,
We create a node calling it `Estimation'. Below this first node we set up the Quantlets stabreg.xpl, stabcull.xpl and stabmom.xpl. A second node - `Examples' contains the Quantlets STFstab08.xpl, STFstab09.xpl and STFstab10.xpl. The text stated right beside each Quantlet (separated by the `') represents the text we would like to be shown in the method tree.
Now that we have programmed the XploRe Quantlet(s) and set up the method tree we still need to tell the XQC to show our method tree upon opening data sets.
extendedchars = true, basicstyle = , frame = single, lineskip = -1pt, extendedchars = true, tabsize = 4,
The settings as shown in Figure 21.9 tell the XQC to show the method tree that is set up in our xqc_methodtree_STF.ini file and to use our XploRe Quantlet stored in a subdirectory of the XQC itself.
Our method tree is now ready for finally being tested. Figure 21.10 shows a screenshot of the final result - the method tree, set up above.
The previous sections contain some examples of graphical output shown within a
display. The XQC's displays do not show only the graphical results received
from the XploRe server. Besides the possibility to print out the graphic it
offers additional features that can be helpful for investigating data -
especially for three-dimensional plots. Those features can be accessed via the
display's context menu.
Figure 21.11 shows three-dimensional plot of the
implied volatilities and fitted implied volatility surface
of DAX from January 4th 1999.
The red points in the plot represent observed implied volatilities on
different maturities
. The plot
shows that implied volatilities are observed in strings and there are more
observations on the strings with small maturities than on the strings with
larger maturities. The surface is obtained with Nadaraya-Watson kernel
estimator.
For a more detailed inspection three-dimensional plots can be rotated by using a pointing device such as a mouse (with the left mouse-button pressed) or by using the keyboards arrow-keys. Figure 21.12 shows the same plot as before - it has just been rotated by some degrees. Now, one can see implied volatilities ``smiles'' and ``smirks'' and recognize different curvature for different maturities. For further research it would be helpful to know which data point belongs to which string. Here the XQC's display offers a feature to show the point's coordinates. This feature can be accessed via the display's context menu. `Showing coordinates' is not the only option. The user could also switch between the three dimensions - `Show XY', `Show XZ' and `Show YZ'.
After the `Showing coordinates' has been chosen all it needs is to point the mouse arrow on a certain data point in order to get the information.
The possibility to configure the XploRe Quantlet Client for special purposes as well as its platform independence are features that recommends itself for the integration into HTML and PDF contents for visualizing statistical and mathematical coherences as already shown in this e-book.