Archive for the ‘C#’ Category


I would like to share with you a small project that I created in C# for collecting end-of-day data from Yahoo!Finance.  This application (source included) will create a directory on your C:\ drive called “data” where it will create many CSV files for each instrument listed in “MasterSymbols.txt” listed in the Working directory, that is the directory that you run the executable from.  Add symbols to the “MasterSymbols.txt” file if you want to have the application pull them down as well. It is a console application that will write out exactly what symbol it is downloading and from when it is doing this.

The source code and binaries are here

You will need 7-zip to un-compress them.


well there has been demand for a utility to download data from Yahoo!Finance so here you go (

Well here you go, a small C# class for Kalman filtering (….it has a dependency on the GeneralMatrix ( library but any matrix library would suffice….Enjoy and as always if you have questions ASK!

C# class for spreads

Posted: January 16, 2011 in .NET, C#, Strategies

Per requests, I put together a simple C# class for spreads that we have spoken of to date in this blog.  You can grab it from my sourceforge site (

Programming languages:

The industry until now has been dominated by C (lesser extent), C# (the current market), and C++ ( the old King and close runner up).  I believe I am seeing a gradual shift in the current marketplace though.  It seems like many friends of mine are jumping ship and going to OCaml or its knock off brother, F#.  I must admit that I recently downloaded F# ( from Microsoft Research and liked it.

Like it or now, I believe that F# is going to take over the functional programming world (I am sadden too here; Haskell/Erlang guy right here!) and with the .NET integration with other products already this isn’t unreasonable considering greater than 50% of the trading shops are running windows .

Modeling software:

This has been all over the place in the last few years from R, Matlab, SAS, Mathematica, …… but I feel that the industry has chopped it down to a close 3: R, Matlab, and Python (use I called it under Modeling software….I know it is a scripting language but quants love it and programmers hate it just like LISP).  Most hedge funds and prop shops seem to go with Matlab while amateur traders and academia prefers R.  I actually prefer R because it is free and has many of the same add-ins that the Matlab toolboxes provide if you are willing to dig some for them.

I think we will see a larger migration to R as the packages become more robust and we see companies ease back on expenditures.

Trading platforms:

I used to see many traders perfectly content with packages like Xtrader and CQG for their trading but it seems like over the last 5 years much of the industry has went to their own in-house platform solutions as the need for advanced trading strategy integration and execution speed has become a concern.  While I have personally used many customizable off the shelf advanced platforms like RTS and Orc, it appears even they are losing the battle to in-house  software investments.  I personally really like Orc’s software too!

There are many open source code options for developers to go off of but my personal recommendation for anyone trying to get in the field is to come out of the college with a decent knowledge of C# and be prepared to learn OCaml/F# in a few years.  Also focus on market micro structure as that is the realm where these trading algorithms live for the most part; other quants typically handle the large picture with co-integration, covariance, distribution estimation models, etc.

I believe we will see Trading Technologies, CQG, and others lose much of their commercial industry support as the bulk goes in-house.  I am not sure how they are going to combat it easily but I see it coming based on the type of work that I have done/or been involved in recent years.

C# Yahoo! stock data downloading/charting

Posted: February 10, 2010 in .NET, C#

I ran across this ( tutorial and code a few days ago.  I think they have done a fantastic job.