QuoteOriginally posted by: ArthurDentQuoteOriginally posted by: twofishOne general problem in financial is specifying complex payoffs, and since payoffs are a complicated function, it makes since to use a functional language to do this. One thing that lisp, haskell, and ML are good at doing that C++ is particularly bad at doing is specifying complex functions. For example, in any functional language, it's quite easy to create a functional called "Americanize" which takes some bizarre payoff you've already created and turns it into an American version of that option. You can't really do that easily with C++.Aren't C++ templates, visitor pattern etc intended for this kind of scenario you describe - "Write a functional operator that can take functions with the appropriate signature and create a new function"? Agreed they are not easy (Cuchulainn would probably disagree ) but the mechanism exists, no? Obviously a functional language would help, but how much work is it to integrate C++ with Haskell/Ocaml? And what happens to efficiency?Functional programming is applied Category Theory (this used to be a quiche mathematics subject in university)STL has some functionality to handle functions, composition of functions but I find it a bit cumbersome. Depends on what you by 'complex functions' but F# might an idea, it look maybe interestin, who knows? I have written some template functions (vector, vector-valued) for euclidean space that I can use for DEs but no more. It means I only need one class. What is needed is how map spaces using FO techniques, then you could do it in a few lines of code. I suppose lisp can do this already. There's a lot of stuff in C++ apps that is more functional than 'pure' OO.boost has some stuff but I have not used it.FC++boost lambdaThe devil you know I suppose; if it's anything like STL it should be good and this shortens the learning curve. Has anyone used these? Quotein any functional language, it's quite easy to create a functional called "Americanize" which takes some bizarre payoff you've already created and turns it into an American version of that option. You can't really do that easily with C++.can you explain a bit more? Are you referring to 'views' of an option?Everything is possible in C++ with the correct design being done beforehand. Downside is it might take much longer than in Haskell.
Last edited by Cuchulainn
on January 13th, 2008, 11:00 pm, edited 1 time in total.