To describe the SOBI strategy family more precisely, we need to introduce some terminology.
Note that Si and Bi will always be positive numbers. They can be interpreted as a measure of the "distance" from the last price of the top i*25% of the respective order book.
1. Basic SOBI. The basic SOBI strategy perpetually
computes Si and Bi and places buy or sell orders according to the
following rules:
If (Si - Bi > theta),
place an order to buy x shares at (lastPrice-p);
If (Bi - Si > theta), place
an order to sell x shares at (lastPrice+p);
We refer to SOBI as a family of strategies because we leave the choices of i=1,2,3,4, theta, p, and x as parameters.
2. Hedging SOBI. Here we introduce a new parameter hp, the "hedge" parameter.
If (Si - Bi > theta),
place an order to buy x shares at (lastPrice-p);
and also place an order to sell x shares at (lastPrice+hp);
If (Bi - Si > theta), place
an order to sell x shares at (lastPrice+p);
and also place an order to buy x shares at (lastPrice-hp);
Notes:
1. to avoid port
collision,
users must use only their assigned port numbers!
mkearns 9586 0.1 0.2 2552 2032 pts/81 S 08:13:55 0:01 ./pxs -p 9800
mkearns 10272 0.1 0.1 976 744 pts/81 S 08:18:17 0:00 grep pxs
This simply indicates that among all users, there are two jobs running involving the string "pxs". One of these is the ps command itself, but the other, number 9586, is a simulator job. This job can be terminated by the command kill -9 9586. You can learn more about ps via doing "man ps".
set terminal postscript
set output "foo.ps"
plot "foo.dat" with lines
set terminal x11
set output
Please, read below for more information.
To make gnuplot to write the plot in "postscript" format, just execute the following command in the gnuplot interpreter
set terminal postscript
We also want gnuplot to write the plot to a file. To write to file "foo.ps", type
set output "foo.ps"
Finally, to plot the data file "foo.dat" as a line, type
plot "foo.dat" with lines
Note that when we execute this command, the plot will not be shown as an X window, since we have changed the terminal. So we'll not really see what we are plotting and the current X window will not refresh. The idea is that before we changed the terminal and output, we had plotted the data to the X windows already. The command will instead generate a file "foo.ps" that is a postscript version of the plot. You can then use an external postscript viewer like 'gv' (outside gnuplot!) to display and print the postscript file. When done plotting to the file, we want to get back to the default values for terminal and output in gnuplot. To do this, type
set terminal x11
set output
This will set the terminal so that future plots will be shown in the screen and the output will be written to the X window terminal where gnuplot is running, as it was before we decided to plot to a postscript file. This is important since if the terminal or the output is not changed, gnuplot will keep writting future plots to the output file in the terminal format specified!
One way to know the current setting of these options is by executing the command 'show'. For instance,
show terminal
show output
displays information about the current settings of the terminal and output options, respectively. Similarly with other options.
You can always learn more by using the help provided in gnuplot. For instance, typing
help
will display the main help menu. From there you can get additional help on different sub-topics. You can also go immediate to the help for a specific command, option, or keyword in gnuplot, by typing
help [command | option | keyword]
For example,
help plot
displays help on how the plot command works. Similarly, you can execute 'help set', 'help terminal', 'help output', 'help with', 'help lines', etc. You can also find more information, and even manuals on how to use gnuplot, by doing a web-search.