financecomputational-financequantitative-financequantitative

How to design a programming language adapted to financial instruments?


I work for a boutique specialized in finance.

We thought about designing a language to describe financial entities related to financial markets.

This would be mainly used as some kind of scripting language to replace many process run in spreadsheets and VBA macros.

It has to be simple and it has, in fact, to call various C++ and C# libraries behind the scenes. It has to let users handle abstractly objects which could represent time series (intraday and daily).

It has to be fully debuggable, when an user will have an issue, we must be able to step in the C++/C# code and reproduce the bugs. Ideally it has to be able to be launched via some mechanism within Excel and return the results within Excel. (unfortunately almost every person working in Finance is using Excel)

If you had to do this task, how would you go about it ?

Would you go for a functional syntax ?

Would you develop some scripting language which would be interpreted or would you compile it in another language (like converting the scripts in C++ or C#) ?

I did not find any open-source project for this kind of development, but is there any commercial product using this kind of syntax ?

EDIT: I read all your answers but I will wait more time before to pick an answer. They are all very useful opinions though !

EDIT2: I marked High-Performance Mark's as solution. All your replies are very useful and I have modded all of them up. He was one of the first answers and his reply is quite insightful for us.


Solution

  • I suggest that you concentrate on developing a rich set of classes in your preferred OO language (either C# or C++, though I suspect you might find it easier to integrate the former with Excel). That would give you your language to describe financial entities related to financial markets. When you've done that you should consider whether to continue to wrap these classes in some Domain Specific Language, or simply to expose them to your user community.

    I suspect that your domain has some irreducable complexity and that an intermediate DSL will have to be (nearly) as complex as your set of classes and that, therefore, you have little to gain by creating it.

    Another approach would be to integrate Excel with Mathematica for which Wolfram produce a toolbox of some sort. I have no experience of this, but Mathematica is certainly suitable for any of the computations you'll have to do.

    Regards