Putting the F# in Finance with Xenomorph TimeScape: A World of Financial Data at your Fingertips, Strongly Tooled and Strongly Typed

(This is a slightly edited cross-posting of this blog from Xenomorph).

We are glad to bring you a sample demonstrator for applying the F# 3.0 Type Providers and the Visual Studio Tools for F# to enterprise financial data sources, both on-premise and cloud-hosted in Azure.

At F# in Finance (London Edition), Don Syme of Microsoft Research demonstrated F# connecting to the Xenomorph TimeScape financial data provision service running on the Windows Azure cloud.

The code is available as a sample (which you can contribute to further) and is a proof-of-concept F# type provider for Xenomorph TimeScape. If that doesn't mean much to you, then a practical example below will help, showing how the financial instrument data in TimeScape is exposed at runtime into the F# programming environment. The key point is just how easy it looks to code with data, since effectively you get guided through what is (and is not!) available as you are coding. Example steps are shown below:

Referencing the Xenomorph TimeScape type provider and creating a data context:  


Connecting to a TimeScape database:


Looking at categories (classes) of financial instrument available:


Choosing an item (instrument) in a category by name:


Looking at the properties associated with an item:


The intellisense-like behaviour above is similar to what TimeScape's Query Explorer offers and it is great to see this implemented in an external run-time programming language such as F#. Don additionally made the point that each instrument only displays the data it individually has available, making it easy to understand what data you have to work with. This functionality is based on F#'s ability to make each item uniquely nameable, and to optionally to assign each item (instrument) a unique type, where all the category properties (defined at the category schema level) that are not available for the item are hidden.  

The next event for F# in Finance will take place in New York on Wednesday 11th of December 2013 in New York, so hope to see you there. We are currently working on a beta program for this functionality to be available early in the New Year so please get in touch if this is of interest via info@xenomorph.com.  


F# is an open, cross-platform language and you can read testimonials about how F# is used in the software industry at the pages of the F# Software Foundation, a major community organization for the F# language. We recommend the Visual F# Tools as the best, most productive and highly stable route for functional-first programming in the Windows ecosystem.   You can find out more about functional-first programming in industry in the recent talk Succeeding With Functional First Programming in Industry at NDC Oslo, and at the excellent website F# for Fun and Profit (external link). You can also learn F# in your browser using Try F#.

Functional-first programming is a general-purpose programming technique represented by langauges such as Clojure, Scala, Haskell, F#, OCaml and is particularly suited to analytical programming tasks such as calculation engines, data-science programming, ETL pipelines and general data-manipulation. While these problems can be solved using other programming paradigms, they are particularly amenable to functional-first programming. Functional-first programming uses functional programming as the initial paradigm for most purposes, but employs other techniques such as object-oriented programming and state manipulation as necessary.   If your organization decides to invest in functional-first programming, then we recommend you use the Visual F# Tools from Microsoft.