I want to learn to program, where do I start

Hi, I would realy like to be able to program pricing models that I can adjust and twitch according to some parameters. I am not going to use it in the short-term but I think programming is a very useful skill that will surely come at handy in the long term.

I don’t have any IT background, although I am relatively tech savvy (I flash my own smartphones, I know how to format a pc, or fix minor software issues) programming is not something I have ever been exposed to.

The question is, where do I start, is there any resource (i.e. website, wiki) focused on financial programming out there? Is there a single programming language that is essential? or are different languages for different purposes?

Thank you in advance!

  1. Do you have an actual problem you are trying to solve or are you just trying to skill-up so you have something else to offer at job interviews?

  2. Is your goal to become a technologist or do you just want basic dev skills to be able to help get shit done. (i.e. process data, prototype models, etc).

  3. Do you have a programming language in mind that you are dead set on learning? (C#, C++, Python, VBA, etc)

If you just want something to get shit done and that’s effective, I would recommend starting with Excel/VBA. Having VBA skills to enhance your Excel skills is extremely powerful and can be used in basically any office job.

If programming pricing models is what you want to do, I would highly recommend looking into Paul Wilmott’s Quant Finance books. “Paul Wilmott Introduces Quantitative Finance 2nd Ed.” is really good and comes with a CD that has all the models in Excel/VBA. Maybe you could start here.

Feel free to contact me if you want to discuss. I’m happy to help you get started (i.e. give you problems to solve, critique your work, etc).

I agree with vba excel. That’s my next goal after this CFA studying is over with

Dude, running a C prompt and then typing in “format c:” and typing in “y” to “is it OK to wipe harddrive” isn’t really in the same solar system as writing a program.

Languages are like tools. Just like it is pretty dumb to say a screwdriver is better than a hammer, people who say C++ is better than Python for example are pretty foolish. It depends what you are doing.

What do you mean by “financial programming?” That’s a pretty broad statement. If you were building a trading app and speed mattered you would use C++. A hedge fund I worked at did some stuff using C#.

There are a ton of tutorials online. Depending on the language you need to understand the basics before you can even worry about applying them to financial situations.

R is a great language that is both a statistical tool AND a programming language and interacts with C++. That’s what I use most of the time.

start with Karel ++ :o)

I agree with Blake. It has a lot to do with what you want to do. In terms of learning, a lot of schools are now teaching with python for those who aren’t CS majors. I tend to use R or Matlab the most for financial applications. I hate using vba, but it can do a lot.

I like R.

It’s a PITB to start, but if you have a logical mind and dedicate a solid week to it (not including regular work), you should get to a point where you can start to do neat stuff. There are now a few decent books on R to help get you started (which didn’t really exist when I first took a stab at it).

I’ve heard good things about Python. Can anyone comment on what the fuss is about, and what kinds of things it is especially good for?

Thank you all for the answers. I know that my question sounded friboulous, but I have a genuine interest in the subject but no background or knowledge.

I am starting a quant master this september where I will hopefully learn about programming (the master uses intensively matlab and statistics programs), but I would like to know the basics before I start .

Additionaly, I am already planning on doing my master’s project on some economic theories applied to pricing models, for which I will need programming skills.

@ Cleverku’s :

Thank you for the answer. I am buying Wilmott’s book from Amazon right now. Re. your questions:

  1. Do you have an actual problem you are trying to solve or are you just trying to skill-up so you have something else to offer at job interviews?

I don’t have an actual problem or job interviews in mind. It’s only that I consider programming an important part of finance and I may use it in my master’s thesis.

  1. Is your goal to become a technologist or do you just want basic dev skills to be able to help get shit done. (i.e. process data, prototype models, etc).

First I wan’t to learn basic skills, if I become a “technologist” will only be because I end up loving it or if it is necessary to do well in my field after I graduate from the master.

  1. Do you have a programming language in mind that you are dead set on learning? (C#, C++, Python, VBA, etc)

I was under the impresion that C++ was the standard, but I don’t really have any preferences.

@ Blake McCallister:

Thank you too for the insight.

You would be surprised of how rare it is to find an economics graduate that knows anything at all about technology, at least in my environment.

Ok, let’s say I start with R, what tutorial do I watch first?

The book “R in a Nutshell” has a great tutorial in the beginning, plus being a good reference manual.

I find Michael Crawley’s “The R Book” is also really useful as a reference.

However, I have been programming on and off for years, so I can’t remember enough to say how it would go over with someone who is new to programming.

You can probably find both books at a university library if you want to take a look at it before purchasing.

Great, thanks. Borrowing stuff sounds cheaper than buying :smiley:

I learned R from a bunch of the pdf’s that are on the web like:

http://cran.r-project.org/doc/manuals/R-intro.pdf

I already knew how to program decently in Matlab, so it wasn’t that much of a stretch for me. I don’t think the documentation on functions is very good in a lot of the online resources (specifically like some of the IO related aspects), but downloading some standard packages and going through the way they set up the functions helped a lot.

Yes, online documentation for R sucks, though it has gotten a bit better in recent years.

It is definitely worth investing a few bucks in a good reference book plus tutorial, if you value your time at anything more than minimum wage.

As Blake mentioned, it all depends what you are trying to do, but as a general all-rounder I think you should also consider Python.

What’s the big fuss about Python?

Python is a great language for beginners (super easy to pick up, unlike say C++), but it’s also an awesome language for experienced developers (unlike VBA which for example isn’t object oriented and doesn’t have great standard math/stat libraries). A lot of quants and algo strategy guys use this to prototype stuff. You can build stuff really quickly using Python, but it’s also a grown-up enough language that you can use it directly in production. So your prototyping to deployment time is much quicker than if you have a quant develop something in R/Matlab, and then needs to re-interpreted into C++ to go live.

I hear great things about R, but I think Python packs a lot of punch whilst giving you a much broader scope for application. I think of R/Matlab as great research packages, but not as languages you use to build deployable solutions.

OP, C++ does hold a firm place in quant development, however it’s really only for speed. C++ is King if speed is critical.

Seriously man, I don’t know where you come up with the stuff you post. If you run a quant fund and have a multi-factor model for stock selection and you need to manipulate matrices, I can’t think of a better language than R to implement. Not to mention you can build your own quadratic optimizer rather than paying for someone elses. .

I don’t know what your math background is specifically linear algebra but think matrices and vectors. Most financial tools such as risk models, optimizers, multi-factor models are all built by manipulating vectors and matrices at the base level. No other way to do it.

Blake,

I don’t really understand why you get so agressive about my posts. You really need to chill a bit more, getting so angry all the time only increases your blood pressure and will affect your health.

The guy is asking for help on how to get started with programming. I’m giving him options. Python is a very easy language to learn and is also really powerful and has excellent math libraries. I’m just saying he should consider it.

And yeah, I’ve heard about Linear Algebra, thanks.

http://techcrunch.com/2012/04/17/a-sign-of-the-hiring-pocalypse/

wow, I didn’t know programming languages was such a controversial issue. I will take a look at both, maybe I end up studying the language that is easier to find resources about.

There is kind of an assumption among many out there that all “real” programmers know C++, in the sense that if you know C++, people will assume you can learn pretty much anything else, but if you know anything else, they will wonder if you know C++ too.

C++ does let you get in touch with the inner guts of the machine so it is often considered the best for things that require lightning speed calculations. For historical reasons, a lot of financial quantitative libraries have been written in C++, so if you know it, you can start using them. Increasingly, though, these libraries are being ported to other languges, so if you don’t need the speed, you are not as locked out of relevant libraries as you once were.

But real programmers tend to know more than one language, and there’s no reason that if you want to program, C++ has to be the first one.

I don’t know C++ myself. I know Java and R best, did Pascal a long time ago, have dabbled in Matlab and VBA, and have often wondered if I should take time to learn Python and Perl. Actually, maybe Javascript makes more sense, because you can write programs that run in web browsers.

I have just received PWIQF 2nd ed from Amazon. Wow! it looks very comprehensive and also very easy to follow. Some things are already covered by the CFA, but all I have to do is just skip them.

Thanks cleverku for the recommendation.

If you’re working and/or have a busy life like me, try enrolling in an online programming course. I’ve enrolled in several from www.edu2go.com which may be free.