1. Review each exercise and write your own variant.

2. Write a tickerplant that sends information about
all securities that start with A through J to server1,
all from K through M to server2, and all from N through Z
to server3. 
	home5_2_client.q -- sends data of the form
		h"appendto[\"ibm; 181\"]";
	home5_2_ticker.q -- distributes the data based on alphabetical
	home5_2_server1.q
	home5_2_server2.q
	home5_2_server3.q
	Remember that when initializing, you must initialize
	the servers first.

3. Review the performance tests of perfexamp.q
on a splayed rantrade table and record the numbers.
Draw conclusions.
Some operations may not work.

4. Review the performance tests of perfexamp.q
on a partitioned rantrade table and record the numbers.
Draw conclusions.
Some operations may not work.

Team Projects. Choose any one of these.
Teams should consist of at most three people.
Individual projects can be found in the homeworks in the realtime
and smartiesfin directories.

Projects choose any one of these:

1. Look up decision tree learning
and implement in q.
Try to apply it to data you can get about the prices of commodities
that you obtain from the web.
A good source for such information is
http://www.cs.cmu.edu/~awm/15781/2003/
See the notes on information theory and decision tree learning.

2. Look up the notion of sketches and see if you can
use it to build a fast way to find highly correlated
pairs of time series.
Here the time series are based on the returns of securities.
http://cs.nyu.edu/courses/fall11/CSCI-GA.2434-001/timeseries.ppt

3. Look up the algorithm for affinity propagation and
use it to cluster stocks based on their similarities in their end-of-day
stock price return time series.
http://www.psi.toronto.edu/index.php?q=3Daffinity%20propagation

4. Write an extension to findmissing that looks for likely
bugs in q code.

5. Extend the implementation of the aquery subset given
to the whole model, with the goal to get a pure sql upgrade.

6. Build a data warehouse for finance that implements fintime
on some trade data you have available.
Use partitioning for the data and offer a rich application-programmer
interface.
http://cs.nyu.edu/shasha/fintime.html

7. Build a compiler for rules for entering or leaving
a position.
Each rule should consist of a trigger-in price (price at which
you go in), trigger-in direction (whether prices must be rising
or falling when you go in),
trigger-in quantity,
trigger-out price,
trigger-out direction.
Test strategy on historical data.

8. Use a genetic algorithm approach to find rules in stock prices
of the form "if stock x has gone down/up by more than y% over the last
z days, then it will go down/up by q% over the next day".
Thus the x, y, z, q and up/down are all things that can change.
Backtest your algorithm by training it on part of your data and
testing it on another using cross-validation.

