An awful lot of finance (that used to run in Excel) is just side-effect free, compute-centric transformations over data. Time series, for example, have a relatively nice algebra that makes it easy to manipulate in terms of maps, scans and folds. And anything that makes it easier to avoid off-by-one errors is a big win, especially if your traders and quants aren't trained software engineers.
>An awful lot of finance (that used to run in Excel) is just side-effect free, compute-centric transformations over data
true dat.
For example, in Excel, checkout PV ( Click on Formulas->Financial->PV )
Given a $1K@par 10Y bond paying $50 annual coupon at 2% interest, Excel says the Present Value (PV) of the bond must be $1269.48
Getting rid of the fold produces the list of discounted coupons and the discounted principal...just a trivial teaser example, but most quants look at that & go, wow if you could do all that in 1 line, imagine the possibilities if you are pricing a mortgage with tranches...you could get rid of 4 page spreadsheets & replace with a paragraph of straight math & it would just work...and they'd be right, too.
For offline analysis, I'd eagerly agree.
But have you had any success with FP for online analysis? E.g. you have 100 time series updating every second, and must yield some other series and events.
An eager functional language would probably die here, but it seems like a fine fit for a lazy one: compose a list of the other series/events as you scan.
What about datasets that don't fit in memory? How can a functional language deal with those (let's say we don't want to use a database)? Lazy sequences?
I mean, I loved clojure when I tried it out, I just do not know if I can use it to process data as with other languages with really good libraries (python, for example).
Clojure is very lazy about computation and the loading of values. You can work with sequences of infinite size. Lazy sequences are actually the default.
As to processing data like you would with other really good libraries... if you want to do it like that you can. Clojure gives you easy access to Java.
Functional programming in general.
An awful lot of finance (that used to run in Excel) is just side-effect free, compute-centric transformations over data. Time series, for example, have a relatively nice algebra that makes it easy to manipulate in terms of maps, scans and folds. And anything that makes it easier to avoid off-by-one errors is a big win, especially if your traders and quants aren't trained software engineers.