back in 2009 (i think), i made a stockgame in batch. Here is the source code. The game is in Danish