Start with the primer.
General: https://code.kx.com/trac/wiki/Cookbook/UsingKdb

My whole goal is to get you programming
as quickly as possible.
We will mix small problems that have to do with finance
with simple puzzles, but after each module, you will be programming.

The modules are:
fundamental arithmetic operations.

1. (Very easy) find the mean of a list
        q findmean.q 2 3 1 45 3
2. (Easy) find the present value of a set of payments, each once per year
assuming an interest rate of 6.5%.
        q presval.q 100 300 200 400
3. (Easy) design a procedure to find the 95% confidence interval of
the average of a list
        q findconf.q 3 2 1 4555 2
4. (Middle) determine whether the difference between two means
of measurements taken at different days is significant
        q evalsig.q 3.4 4 5 _ 3.2 3 1
        q evalsig.q 10 -10 6 _ 0 7 0 7 0 7
returns the average of the first list, the average of the second
and the p-value that the difference in the average will be this great.
5. (Middle) The present interest rate is 5%.
        Over each of the next five years (including the first year),
        the interest rate can go up
        by 0.5%, down by 0.5%, or stay the same, all with the same
        probability.
        Find the median net 5 year interest rate, as well as the 75th
        and 25th percentiles.

        q montecarlo.q 5 0.5
6. (Hard) Something with date arithmetic


Section 2: 
  file input/output; interprocess communication; string manipulation
 read in files
 write to files
 interprocess communication
 elementary parsing

Look at https://code.kx.com/trac/browser/cookbook_code/yahoo.q

1. (Very easy) Read in a file and count the number of characters per line
2. (Easy) Read in a file and replace all "the" by "a" and write out
3. (Middle) Read in a file and replace all full word "the" by "a" and write out
4. (Middle) Communicate from a client to a server where the server computes
the present value given a certain interest rate value.
5. (Hard) Communicate from a client to three servers to compute the 
present value assuming a variety of interest rates.
6. (Hard) Query mapquest and produce a list of directions 
from point A to point B
 
  
Dictionaries, tables, and database operations

https://code.kx.com/trac/wiki/Cookbook/UsingKdb

trade:([] stock:(); price: (); amount:(); time:())
    or
stock: `ibm`bac`usb`bac`bac`usb
stock,: `ibm`bac`usb`ibm`bac`usb
price: 1.1 2.4 3.3 3.0 2.8 1.8
price,: 3.1 4.4 1.3 2.0 3.8 5.8
amount: 100 200 300 400 500 300
amount,: 300 200 400 600 700 800
time: 09:03:06.000 09:03:23.000 09:04:01.000 09:05:01.000 09:06:01.000 09:07:01.000
time,: 10:03:06.000 10:03:23.000 10:04:01.000 10:05:01.000 10:06:01.000 10:07:01.000
trade:([]stock; price; amt:amount; time)
If you want a key field
`:filename set trade / to write
save `:trade.csv / to write a csv file
save `:trade.txt / to write a text file
trade: get `:filename / to read

market:([[name:`symbol$(); country:`symbol$()] address:())
Just as you can define a type constraint for name (viz. that it
must be a symbol), so can you declarie something to be a foreign key
by using `tablename$()

trade:([] stock:`symbol$(); market:`market$(); ...
Not clear whether this will work when market does not have a single key



Assume a file data.csv with columns of type string, int and string.
mytable: ("SIS"; enlist ",") 0: `data.csv / this assumes column names

Cols: ("SIS"; ",") 0: `datanocols.csv / by not having the enlist
mytable2: flip `name`age`activity!Cols

1. (Easy) Import a table of stock prices in csv format (`trade.csv
as written during class)
and find the average price
	q readavg.q
2. (Middle) Compute the moving average for a group of stock prices
3. (Middle) Compute the correlation of the returns of two stocks, updated
every second.
4. (Hard) Find the highest correlated pairs of stocks in terms
of their returns over the last month.

Interacting with Other Software
1. (Easy) Java to q
2. (Middle) q to linpack


