• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Why Perl Scripting?

Perhaps all of you out there knew the answer, except me as a software developer:

Why do many Quant job postings for developing systematic/algorithmic trading systems require Perl scripting skill?

(I thought C++/Java/C# skills would be the sufficient programming languages ???)

Hope someone here in Quant Net can explain the role of Perl scripting on the development of automatic algorithmic trading strategies.

ITor
 
Perl and all its flavors are very good for data analysis. They are basically built for parsing data, applying regular expressions, in one word: data mining.
This task can be done also in C++, however it is more time-consuming. For example, in a few lines of Perl code, we can populate several hashes with different keys.

On the other hand, Perl interpreter paradigm and very high level language will not provide same performance as raw C. Adding to that, the object oriented model is limited. I doubt that large libraries are built in Perl.
Then again, some companies I know have plenty of Cobol code :)
 
Perl is good for large data sets and it is also used for manipulating with texts, network, DB, Web.

Why Perl is pretty popular now is that Perl reduces labor costs for the companies and currently labor cost is becoming more expensive and cost of hardware is less expensive. Such languages as C++ efficiently use memory, hardware etc., but difficult to learn and imply higher level of professionalism.
 
A little known fact is that Perl6 is the official scripting language for Duke Nukem Forever mapping utilities as well as the Infinium gaming console.
 
I second that. Here's a diverse list of things I've accomplished with Perl:

Back in the day I used perl to download Howard Stern recording chunks off Usenet, uudecode and concatenate them and store them in directories based on the original air date.

I wrote a usenet newsreader that allowed me to post messages anonymously.

I wrote a program that rips and encodes CD's, goes out to CDDB, set the mp3id tags and rename the files based on content info and file it away in my mp3 hierarchy.

I wrote web spiders.

I wrote a utility that pings all machines on a network, and sent a pager request to the network admin when a host went down. There were even netware machines that didn't speak IP.

I wrote a front end to Quake 3 which verifies the directory structures of the map files _and_ unzipped the file on the fly to memory to grab screenshots so I can see what the map looks like before playing it.

I used it to process output files of a numerical PDE solver (written in C). Perl created movies from the output files of how the solution evolved with time. It's one thing to write a PDE solver and see a bunch of numbers. It's another thing altogether to see, graphically, how your IC evolves as a movie file.

I wrote a program that undeletes files off an ext2 filesystem.

I wrote a batch processor system for a Beowulf cluster.

I've written cgi scripts (although php is nicer for that)

I used Perl to download every single Spanish infinitive and use POST to get all the conjugations from conjugation.org (GET would've been easy!)

I've _heard_ (although I've never done it) that Active Perl even knows about Microsoft ActiveX and automation.

The list goes on and on. Perl is truly the swiss army knife of programming languages. There seems to be no limit to what Perl can do.

However, I'm not entirely sure if it's really the thing to learn if your goal is to get a quant job. I think the time would be better spent on other things.

Of course, if you just want to do cool things with a supremely powerful language, then Perl is right up your alley.
 
We use Perl at work for a daily task that goes to MarkIt website, download the data, put them into our computer. There is another script that will take this data and import into our SQL server.

On a related note, I did some research into how Python is used after talking to some people using it at their HF.

They use Front Arena for integration between trading, risk, sales, operation and Front Arena has an extension library called AEF which uses Python as their business logic language.
AEF: Customisation with Python AEL and ACM - Front University

They also use Python to process XML data.
Overall, I don't think scripting language is that hard to get to a working level. There is no telling which language your next job will use but it's something people should pick up on the job.
 
As other have pointed out, PERL is extremely useful in data analysis.
We use it for data analysis, parsing and reporting, Actually, I just learned couple of weeks, that it can even build UI components (although it is not very straightforward), if you really want to deploy something quick.
 
One should know at least one scripting language. Perl is a good choice since its 3rd party libraries are rich and it runs on so many platforms. One bad thing is that its OO-support is crude.
 

alain

Older and Wiser
Perl is great... if you want to keep your job because it is very easy to write extremely awful code that nobody else will understand. If you need to learn a script language (which I will recommend to anybody), learn python.
 
As a Perl developer of 10+ years I concur with all the positive things said, for quantitative analysis Perl is one of the best high-level general purpose programming languages out there. I would say the term "scripting" language is a misnomer, as Perl and all other high-level interpreted languages can do anything nowadays and are as general purpose as Java or C# for example.

Just want to reply to some comments made about shortcomings, for OO programming the comments made are not correct anymore. Yes the old built-in OO functionality in the core language was somewhat limited but no one in the Perl world really uses the built-in OO functionality anymore, we all use Moose and I would recommend learning it to anyone. Moose includes static typing and very nice parameter passing as well which is a must in larger projects. Please see http://moose.perl.org/, http://search.cpan.org/dist/Moose/ , and an overview of all the major add-ons http://search.cpan.org/search?query=MooseX::*&mode=dist . Perl's Moose OOP is much better than Python's OOP and you will find many references to this on the web.

For Perl being ugly unreadable code this is a completely false statement. Perl, unlike Python, gives you so much power to do things in different ways, and the saying goes "with great power comes great responsibility". Bad programmers will write bad unreadable code in any language, as a Python programmer as well I've read quite a bit of Python code that is horribly written. Since Perl allows for a lot of flexibility a programmer coding teams must take a bit more care to apply across the board coding standards. Please have a look at the book "Perl Best Practices", which is the official Perl book for coding standards/guidelines, and you can use Perl::Critic http://search.cpan.org/dist/Perl-Critic/ and Perl::Tidy http://search.cpan.org/dist/Perl-Tidy/ for code standards analysis and clean up based on the standards laid out in the book.

For UI development in Perl I would recommend WxPerl, see http://wxperl.sourceforge.net/ and http://search.cpan.org/dist/Wx/, its the best cross-platform UI development tool for desktop applications. A great example of a GUI application written fully in Perl using WxPerl is the Padre IDE see http://padre.perlide.org/ and http://search.cpan.org/dist/Padre/ . Padre is in my opinion the best IDE for Perl development and I use it everyday. A good alternative would be the Eclipse platform with the EPIC plugin.

As for Perl being slower than C or C++, this is true of any high-level interpreted language including Python, PHP, Ruby, etc. All of these programming languages including Perl are written in C and as one of you said they are much easier to use as they abstract away so many things like pointers and memory allocation but you pay a price in performance. Perl is in general faster than Python, PHP and Ruby in head-to-head comparisons and you will find multiple references to this on the web.

One thing that is sometimes overlooked is that If you are working on a programming project where you need speed, Perl offers many ways to incorporate C or C++ code for the parts where you need more performance. See Inline::C, Inline::CPP, Perl XS, Perl XS++. Python has similar facilities. I've used Perl with these interfaces and performance will increase many fold while you still write most of your code in Perl so you develop faster than doing everything in C or C++.

The biggest "killer app" for Perl is CPAN, with over 20,000 libraries you will find a library to do almost anything. There are just so many rock solid recommended ones I can't list them all. If anyone has a question about the best library for a certain task I would be more than happy to help.
 
Top