Minds, Markets, and Machines


Welcome to Minds, Markets and Machines

Wherein, we take a casual stroll through the intersection of machine learning, quantitative analysis, and functional programming. It’s a pretty interesting intersection. Machine learning and general AI are already beginning to rapidly transform the world around us. Functional programming seems to be an ideal programming paradigm to implement these ideas. I see the next ten years bringing massive advances in the fields of ML, general AI, robotics, etc. Even if I wasn’t using some of this professionally, it would be of great interest to me.

Professionally, I work in the field of what is often called 'alpha discovery'. (just think data science for finance) Like data science in general, it encompasses a number of domains:

  • Math
  • Statistical analysis
  • Machine learning
  • Diverse programming skills

It goes a bit further. To do it really well you need an understanding of

  • Behavioral economics
  • Market structure (financial domain knowledge)
  • Control theory
  • Reinforcement learning (a branch of ML)

Actionable decisions from distant feedback

Reinforcement Learning isn't something you hear that much about, but it I think 2014 may see that change somewhat. Already Google’s acquisition of Deep Mind has generated some interest. RL is particularly important because it allows one to learn models that produce actionable decisions where the feedback is distant in time from the inputs used to make those decisions. For a fun example, check out “The RL Flappy Bird hack

The Deep Learning train has been chuggin’ along with fantastic results and has produced some amazing advances. The up and coming DARPA 2012-2014 challenge to develop semi-autonomous ground robots that can do "complex tasks” will undoubtedly focus more attention on reinforcement learning, and lead to similarly significant advances in the field. Expect to see some amazing results!

Wait... What's functional programming got to do with it?

Functional programming is well suited to the task. There is all that great stuff you hear about functional programming.

  • Clean, concise code leading to fewer bugs and easier maintenance
  • Immutability by default, which prevents a large class of errors
  • Concurrency - asynchronous programming is very easy, as is parallelism
  • Domain modelling is easy and explicit

But there is one aspect that is particularly useful when modelling real world event streams...

Agents, Agents, Agents

Agents are ideal for modelling multiple concurrent event streams. Scott Wlaschin sums it up nicely in his post on Messages and agents.

It encourages a "pipeline" model of programming with "producers" sending messages to decoupled "consumers"

As an example, a single agent can be created to handle each of the real-time streams of information, and then child agents can be created to handle the various transformations of the data. Finally, a master controlling agent can monitor the data produced to make decisions. The best thing about this is that you can use this same approach for both the simulations used in model building and in real-time systems. Concurrency and scalability can easily be built in. (Checkout Yan Cui's slides on Slideshare for examples of scalability using AWS and F# in gaming)

That is a brief overview of what I hope to cover here. Hopefully, you will enjoy reading it as much as I enjoy writing about it.

comments powered by Disqus