Quick thank you to Don Syme of Microsoft Research for including a demonstration of F# connecting to TimeScape running on the Windows Azure cloud in the F# in Finance event this week in London. F# is functional language that is developing a large following in finance due to its applicability to mathematical problems, the ease of development with F# and its performance. You can find some testimonials on the language here.
Don has implemented a proof-of-concept F# type provider for 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. I guess 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 (sorry if I sound impressed, I spent a reasonable amount of time writing mathematical C code using vi in the mid 90’s – so any young uber-geeks reading this, please make allowances as I am getting old(er)…). 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 firstname.lastname@example.org.