 s.gerat
|
|
| Total Posts: 5 |
| Joined: Jun 2012 |
| |
|
| Hi all, i need your advice and input. i'm trying to learn python and perl. i read some online documents and manuals. but i don't think it's fair to claim that you now become an expert. so i want to know your experience, how you became an expert in python and/or perl. did you take classes from cs dept. or just taught yourself by reading? do you have comments what you need to do to become an expert. thanks. |
emc2 |
|
|
 |
 Hansi
|
|
| Total Posts: 190 |
| Joined: Mar 2010 |
| |
|
| Ignore perl. For Python read this: http://learnpythonthehardway.org/ |
|
|
 |
 h0h0
|
|
| Total Posts: 18 |
| Joined: Apr 2010 |
| |
|
tutorial: http://docs.python.org/tutorial/ followed by 'Code Like A Pythonista: Idiomatic Python'
numerical analysis: http://scipy-lectures.github.com/
timeseries: Python for Data Analysis [I got the early draft version for $15]
video tutorials: http://pyvideo.org/category/17/pycon-us-2012
LPTHW is a great resource for people without any background in programming. |
|
|
|
 |
 goldorak
|
|
| Total Posts: 385 |
| Joined: Nov 2004 |
| |
|
> Ignore perl.
Ignore that kind of immature comment. Perl rocks for most finance tasks. People criticize because of knowledge gap. 95% of our applications are written in perl.
For Perl, perlmonks.org will appear in most of your internet searches. I personally had the chance to attend a few courses/seminars held by Damian Conway. But like any other language it is the number of code lines and the complexity of the tasks you solved in that language that will make the difference. The famous 10000 hours of Mastery.
Once you've gone through selfGol you can pretend to be Master level. http://libarynth.org/selfgol Since selfGol Damian Conway was not welcome anymore to participate in self-obfuscation contests...
|
If you are not living on the edge you are taking up too much space. |
|
 |
 Strange
|
|
| Total Posts: 1250 |
| Joined: Jun 2004 |
| |
|
| Perl is great. There is a ton of stuff that takes seconds to do in Perl, it is a perfect glue language and a perfect replacement for shell scripts. |
It's buy futures, sell futures, when there is no future! |
|
|
 |
 gnarsed
|
|
| Total Posts: 73 |
| Joined: Feb 2008 |
| |
|
| if you already know perl, that's fine, use it. if you are just starting out it would be a mistake to invest time and energy in learning perl, and you should stick with python. python has more libraries, third party packages, and related tools, and there are a lot more people actively working on more. that is much more important than code succinctness or powerful one-liners. in contrast, perl is a language with a shrinking user base, and is mostly preferred by an older generation of programmers who picked it up when was much more widely used 10-15 or so years ago. in addition, if you are working in finance, or plan to do any kind of numerical analysis, visualization, etc. python is a no-brainer. |
|
|
 |
 goldorak
|
|
| Total Posts: 385 |
| Joined: Nov 2004 |
| |
|
Sorry to tell that if nowadays you really want to be at the top of the pyramid you would run for languages like Haskell, OCaml, Scala or Julia. With Python you are definitely "old generation" too. So do not waste your time and jump into modernity.
I have nothing against python itself btw. A bit over hyped for what it is. Sounds a bit to me like when Java came out. All of a sudden C++ was a definitive piece of crap, you had to do things in Java. 15 years later, well...
|
If you are not living on the edge you are taking up too much space. |
|
|
 |
 Strange
|
|
| Total Posts: 1250 |
| Joined: Jun 2004 |
| |
|
Do people actually use any of the above actively for true life development/research? So far, in finance I have seen (in order) R, matlab, python, Java and C++ and I've yet to hear of anyone using Julia, Haskell or Scala. I think Jane Street uses OCaml, though. What are the advantages of these languages vs any of the current ones? Would I benefit from switching from R to Julia or OCaml?
PS. For a trader (or anyone in quant finance), a programming language is just a tool, nothing more. I am a bit surprised to see programming language holy wars here, out of all places. |
It's buy futures, sell futures, when there is no future! |
|
 |
 s.gerat
|
|
| Total Posts: 5 |
| Joined: Jun 2012 |
| |
|
| thanks for being very helpful with your inputs. if others have something (your experience) to add to this thread, i certainly welcome them. thank you. |
emc2 |
|
|
 |
|
Find the search button and learn how to use it. There is a wealth of info here already without starting yet another thread. Python is excellent and well worth a look, I don't know much about perl. |
|
|
 |
 smt1
|
|
| Total Posts: 1 |
| Joined: Jun 2012 |
| |
|
Having learned perl first, I find there is little python can't do equally if not better, except for maybe writing what are the equivalent of shell scripts.
Most people I see using perl these days are those who learned perl 20 years ago and never bothered to pick up python (or some other scripting language) 10 years ago. In other industries, like web development, ex-perl programmers moved on to other scripting languages like Ruby. Since python tends to have more mindshare these days, I also find more wrappers for popular C++ libraries. |
|
|
|
 |
 goldorak
|
|
| Total Posts: 385 |
| Joined: Nov 2004 |
| |
|
@Strange: > Do people actually use any of the above actively for true life development/research? So far, in finance I have seen (in order) R, matlab, python, Java and C++ and I've yet to hear of anyone using Julia, Haskell or Scala. I think Jane Street uses OCaml, though. What are the advantages of these languages vs any of the current ones? Would I benefit from switching from R to Julia or OCaml?
To answer your question, I would say that well I do not know that many people who were using R, Matlab and python 10-15 years ago. I mentioned these languages because they will be be the NEXT generation. gnarsed was presenting the idea that "perl is old", "python is new". Well, no. Both are old. The truth is somewhere else!
1) It looks like Julia is VERY hot among academics and may quickly show up as a better thing than Matlab and R. Of course it may as well end up in the limbs of IT together with ROOT.
2) OCaml and Haskell are, well, OCaml and Haskell. You know what it means or you don't.
3) Scala is in my opinion language number one language for what we do in less than 10 years. I am definitely betting and investing time on that one.
> For a trader (or anyone in quant finance), a programming language is just a tool, nothing more. I am a bit surprised to see programming language holy wars here, out of all places.
Well I do agree, and this is why I got rid of C++/Java/Matlab stuff. Perl (together with a modicum of Inline C when it is REALLY needed) suits perfectly all my need. 
|
If you are not living on the edge you are taking up too much space. |
|
 |
|
@Strange: > Would I benefit from switching from R to Julia or OCaml (Scala, ...) All these languages are (more or less) functional languages. Functional languages got a little bit of a hype a few years ago with the change from the CPU-GHz race change to the multiple cores race. The reason behind that is, that functional languages can be much easier be used in (explicit) parallel computing.
|
|
|
|
 |
 jslade
|
|
| Total Posts: 751 |
| Joined: Feb 2007 |
| |
|
@Goldorak
Out of curiosity, why Scala over Clojure? I have some bigdata friends who use it, and it does have some modest speed advantages, but it seems to be more religious preference than anything else (aka, they went to CMU and are still pissed off about learning Lisp). I'd probably bet on F# looking at stuff objectively, but I've already put a bit of sunk cost into the JVM.
I liked Perl back in the day myself; you can do some amazing stuff in it, though I confess it's been so long, I generally just reach for sed or something.
|
"Learning, n. The kind of ignorance distinguishing the studious." |
|
 |
 goldorak
|
|
| Total Posts: 385 |
| Joined: Nov 2004 |
| |
|
Clojure? Something that looks like Lisp? never! 
F#: I tend to stay as remote as possible from everything with a MS birthplace!
|
If you are not living on the edge you are taking up too much space. |
|
|
 |
 YukaRedux
|
| Now with added evil |
| Total Posts: 574 |
| Joined: Dec 2004 |
| |
|
| If that's your reason for staying away from F# then you're missing out, my friend... |
Back from the dead. And still not a girl. |
|
 |
 mtsm
|
|
| Total Posts: 94 |
| Joined: Dec 2010 |
| |
|
I have seen oCAML, actually the microsoft implementation F#, in action fairly big-time at a large investment bank. Haskell also, although that was generally being perceived as being too difficult to program by the common quant, so it did not get much support. People were raving about F# though.
Personally I am a big python fan and regret the fact that the language doesn't offer more functional programming features. The itertoools package offers some relief though.
I am also a little put off by the fact F# is really so MS specific and moreover is very tied to .net CLR, etc... Furthermore a few years back the language was in a pretty basic state, i.e. virtually no libraries available a bit like C++ without STL. Good luck with that. Although that might have changed by now.
I have messed around quite seriously with C++ boost bind, lambda and function in the past, but I just can't say that it was that great an experience. It is a bitch to compile and potentially seriously performance breaking. I had some serious disappointments with these tools. I was told that boost spirit is the real deal, but lost patience.
I sometimes wonder to what extent the programming language matters over programming paradigms. For example I know of several groups on the street who make extensive use of data structures based on relational algebra. Thinking and doing table-based programming has a fairly important impact as far as I know. I mean I am not suggesting that this is useful everywhere, but it can be quite far reaching and it is almost orthogonal to the language. Has anybody else experience with this? |
|
|
|
 |
 Patrik
|
| Founding Member |
| Total Posts: 1179 |
| Joined: Mar 2004 |
| |
|
Using what one feels comfortable and what can get the job done tends to be a good starting point. I use ruby since I've been using that since around 2000 or something and I echo goldorak's comment about Scala - to me it's familiar enough and suits me better than java. My combo is jruby on the JVM with bits factored out into Scala if there's a performance reason for it, which so far I have zero cases of.
EDIT: Just realized that was a post with zero relevance to the original question.. Sorry. Seems even pragmatic people get bit excited to champion their platforms.. |
Capital Structure Demolition LLC  |
|
 |
 umarmung
|
|
| Total Posts: 14 |
| Joined: Nov 2011 |
| |
|
Scala vs F# debate: infrastructure, not language one. You either work at a JVM shop or a .NET shop - you will rarely get opportunity to choose equally and both are sufficient for most numerical programming needs. In addition, if anything Scala is marginally more developed in both paradigm support (including functional) and server stack support than F#. The learning hump is getting over functional programming and concurrency concepts not these language implementations.
Clojure: regardless how terse it is, that it writes to JVM too and more pure functional than Scala or F#, it lacks (static) typing flexibility and is not multi-paradigm. The latter combined with the Lisp syntax are great turn offs in enterprise setting. Though for startups, (very) small teams and new code bases, it may have some attraction.
Perl: adore it for system admin programming, small tools and as a very powerful glue language. I would not use it for numerical programming and never seen it in that context, though it is often in the underlying server infrastructure for such (though Python displacing it). You really do not need more than original Programming Perl and the Cookbook since you will assuredly not scale past those needs in most situations on sell-side or large buy-side. In addition, modern OOP developments are easily picked up from online documentation.
Python: much more useful for finance. Excellent general rapid application development language and good glue language too. Numpy/Scipy are of great value, even if you have access to R or Matlab. Once you are up to scratch with basic Python, read the docs at http://docs.scipy.org/doc/. You will learn everything else as you use it and from forums. |
|
|
|
 |
 jslade
|
|
| Total Posts: 751 |
| Joined: Feb 2007 |
| |
|
FWIIW, I know a guy who wrote an options trading strategy for a big Chicago house in Perl ~2000 or so.
Clojure is definitely not multi-paradigm. It makes fabulous Java glue though, leiningen makes classpath hell ... fun, and I haven't found anything faster than Lisp for developing big solo projects from the ground up. Unfortunately, it looks like I'm going to have to learn Java and the JNI to take full advantage of it. There is a local quanty shop which does everything in Clojure; they have some impressive technology and a fairly large team. Dumb business plan though.
I'd bet on F# because it is an OCaML on a platform which will last. I hear it told that Mono is pretty OK these days, but I haven't found a reason to fiddle with it. |
"Learning, n. The kind of ignorance distinguishing the studious." |
|
 |
 MrMagoo
|
|
| Total Posts: 188 |
| Joined: Jan 2008 |
| |
|
my phriend
choose your weapons wisely.
Nothing wrong with knowing matlab and R : very good for prototyping, both evolving and alive platforms, with growing user base. Many cant live without one or both.
The (not so) new choice to do very cool phynancial things is python. Id learn it in the first place if i was 10 years younger. Its very powerful and useful.
But each player has its own specific needs, tradeoffs and protocols.
IMO, its a time constrained optimization the choice of the programming languages to properly learn.
I mean, if you work with phynance and is not a full time software developer, that´s it. |
"One who says it can't be done should not interrupt the person doing it."
|
|
|
 |
 Strange
|
|
| Total Posts: 1250 |
| Joined: Jun 2004 |
| |
|
I have been playing with Python lately, though I don't really have the time to learn it and switch to it. From the short exposure, it appears that Python is a nearly perfect "infrastructure" language. It could definitely replace the mess of C++ and Perl that I have built up to take care of data munching, various high-speed calculations and text/web sharking. If and when I have to re-build my trading infrastructure, I will certainly give Python a lot of thought (need to learn it first, obviously).
PS. IMHO, it can't compete with R as a research tool (even with NumPy), simply because it's a lower level "modelling" language. |
It's buy futures, sell futures, when there is no future! |
|
 |
 Scotty
|
|
| Total Posts: 667 |
| Joined: Jun 2004 |
| |
|
Hmmm, getting there I think. See the libraries:
pandas scikit-learn statsmodels
I think the real benefit is to be able to handle the data wrangling, the analysis and the execution in the one language. |
“Whatever you do, or dream you can, begin it. Boldness has genius and power and magic in it.” |
|
|
 |
 FatChoi
|
|
| Total Posts: 107 |
| Joined: Feb 2008 |
| |
|
IPython, for interaction with pylab and pandas, debugging and easy parallel computing is very good. Cython for speeding stuff up and integrating C code. Also very nice is PiCloud which gives you very easy cloud computing access. R has well thought out libraries for standard things and sometimes the only libraries for some more obscure things but if you were starting R now you would likely start somewhere else, hence Julia and Incanter (an attempt to rebuild R on Clojure slightly hampered by an excess of parantheses and the difficulty of tuning numerics in Java). IPython, Pandas and Matplotlib make the interactive environment very good and you can even use R transparently from the command line and display R charts inline. For larger scale development PyDev on Eclipse is excellent. It seems pretty good from a group productivity point of view as well, it seems easier to build big things than with some alternatives and it's hard to write something like selgol in Python, even by accident. It's possible Julia will make Python look similarly antiquated in a few years but for now it's good enough that we have happily replaced Matlab and some Java stuff with it. |
|
|
 |
 lim_nick
|
|
| Total Posts: 22 |
| Joined: Jan 2011 |
| |
|
| Also check out ipython notebook + pylab for a browser based interactive shell with inline plots and some nifty features for rapid development. |
|
|
|
 |