F# in Finance

Doing data science with FsLab

Tomas Petricek

About us

Tomas Petricek

  • F# book author and developer
  • Contributed to F# at Microsoft
  • Working on data science tools
    with BlueMountain Capital


  • Provides F# training & consulting
  • Finance, machine learning, etc.
  • Working mostly in UK and US

The F# Software Foundation


The mission of the F# Software Foundation is to promote, protect, and advance the F# programming language.

  • Independent registered non-profit
  • Open-source community & contributors
  • Microsoft, Xamarin, Tachyus, Jet.com,...

F# in the news

ThoughtWorks radar, March 2012

F# is excellent at expressing business logic. Developers may opt to express their domain in F# with the plumbing code in C#.

TIOBE index, March 2014

F# has risen to the 12th spot in this month's rankings. As the index headline notes, "F# is on its way to the Top 10."

F# for Analytical Components


  • According to testimonials, F# makes development faster


  • Type system prevents many errors including null


  • Functional style makes it easier to write complex logic


  • Performance profile of C# with async and parallelism

F# Testimonials


"I have delivered three business critical projects written in F#.
I am still waiting for the first bug to come in." (source)

"I wrote the first prototype of the click prediction system deployed in Microsoft AdCenter in F# in a few days." (source)

On-line real-time action game: 6 months uptime, 30B+ requests, 0 exception, 0 crash, 0 reset (source)

Why are they using F#

Tachyus oil & gas startup

  • time-to-market, cross-platform, data analysis

Credit Suisse finance industry

  • complexity, correctness, efficiency

GameSys building MMORPG games

  • time-to-market, scalability, efficiency

FsLab: F# tools for data science


FsLab is a collection of libraries for data-science. It provides a rapid development envi­ronment that lets you write advanced analysis with a few lines of production-quality code.

FsLab.org: Data science with F#

The data science workflow

  • Data access integrated in the language
  • Interactive analysis using .NET & R
  • Visualization with HTML & PDF reports

High-quality open-source libraries


Visualizing world indicators

Completed source

Data access

F# Data

First-class data access

CSV, XML, JSON and more


Time-series and data-frames

C# and F# friendly


Working with stock prices

Completed source

Data exploration

Deedle time series

Alignment, missing values, slicing

Exploration, statistics, indexing

Upcoming support for "big data"

R Type provider

Smooth R and F# integration

Access 5000+ statistical packages


Stock price reporting

Completed source
and produced report

Data visualization

FsLab journals

Produce HTML and PDF reports

Extensible and open-source

Charting libraries

Rich charting libraries

Both desktop and HTML5

Why choose F# for data science?

Data access

First-class data support in the language

Data exploration

Environment both scientists and programmers understand

Data visualization

Interactive charting and reporting tools

Thank you!

Tomas Petricek, fsharpWorks

See functional-programming.net for books & trainings!
@tomaspetricek | tomasp.net | fsharpworks.com