Forex trading with functional programming

Let me apologize in advance for my poor English.

I'm looking for information about how to program a forex trading system with functional programming (I use scheme). Any idea or link you could give me?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Off topic here...

Most of us here lack the requisite domain knowledge; and "how to program in scheme"-specific questions are best sent to a scheme mailing list or group.

Thanks Scott, but it's not

Thanks Scott, but it's not an "how to program in scheme" question, just trying to mix forex with fractal geometry trough functional programming. Sorry if it seems to you an off topic.

Off topic

It seems to me to be off topic as well (but I have no idea what forex is, I think). Perhaps if you can explain what kind of answer you are looking for someone will be able to help. It is best if you give an email address so people who can help can contact you directly.

Don't know much about forex or trading systems...

...but I know what they are, at least: "foreign exchange", which is about trading various money-like financial instruments denominated in different currencies. Trading systems are either the central servers that constitute an electronic marketplace, or systems used by traders to talk to these servers: I'm guessing the poster is interested in the latter. These trading systems will talk to the central server to gather information on open bids & other financial data, and will allow the trader to execute trades; in addition traders like trading systems that do analysis as well, and maybe also automatically execute trades.

Some links:

  • There are a number of open source implementations of trading systems. The page for the Open Java Trading System has some interesting links. Java seems to be where the centre of gravity is, both with opne source offerings and open off-the-shelf systems from big vendors: using a JVM-friendly functional language (eg. SISC, Scala) to talk to a trading back end implemented in Java seems like an obvious place to start, if you are only interested in FP for analysis and automated trading;
  • There's been work done on functional implementations of trading systems, none of it open source. See Yaron Minsky's article in Monad Reader (pp.23-34) on implementing a futures trading system in OCaml. Joel Raymont has talked of building a trading system in Erlang; the comment by QuantPlus in this thread captures my thoughts on anyone without a trading background thinking of doing automated trading off their own bat...
  • Simon Peyton Jones work on financial contracts isn't directly about trading systems, but I gather they are considered a possible application. Cf. Combinators for contracts.

This doesn't sound like a homework topic, and it does link to LtU interests, so I think we can afford to be generous when assessing its on/off-topicness.

Postscript: Cameron Purdy's comments explain what's up with trading systems. He makes a useful threefold distinction between trading exchanges, trading systems and trading clients.

Composing Contracts - An Adventure in Financial Engineering

Earlier this year, Simon Peyton Jones presented his work, Composing Contracts, at a functional programming seminar hosted by Ericsson.

Ulf Wiger has a video of the presentation.

Though his stuff isn't about trading systems, it might be of use if you have to do financial modeling.


Let me remind everyone that in order to ensure the continuity of our discussions it is strongly encouraged to link to previous LtU discussions of papers mentioned etc. (instead of directly to the papers, for example).

Wrong forum

As others have already said, this is probably the wrong forum to get advice about building trading systems in functional languages. Besides, you haven't indicated what part you want to build: integrate with some FIX like engine, a system which monitors markets and generates trades, something which is just used to test your ideas, etc.

In any case, the following post discusses domain specific languages for financial trading. Might help.