SlideShare a Scribd company logo
1 of 64
| Basel

Succeeding with
Functional-First
Languages in Finance
Dr. Don Syme
Principal Researcher, Microsoft
dsyme@microsoft.com
Today: Some Simple Observations About

Quantitative Finance
Analytical Programming
Calculation Engines
Financial Engineering
Trading Engines
with

F#
(and associated technologies)
Let’s focus on the business perspective and its
correspondence to the technical features of F#
Mostly based on informal observations of >50
successful F# adoptions
fsharp.org/testimonials
some of the same lessons hold for
OCaml, Erlang, Clojure, Scala, …
I will use a standard methodology for
communicating “complex” products.

S
P
I
N

• Situation
• Problem
• Implication
TM

• Need
Part 1
What’s the Situation? What’s the Problem?
The Recurring Business Situation
“I lead a team developing…”
•
•
•
•
•
•
•

Financial Models
Insurance Calculation Engines
Trading Platforms
Algorithmic Trading Systems
Online Recommendation Engines
Bio-informatics Algorithms
…
The Recurring Business Situation
“I lead a team developing…”
•
•
•
•
•
•

Analytical Components
Analytical Components
Analytical Components
Analytical Components
Analytical Components
…
Understanding the Situation
The Recurring Business Problems
Time to Market
Efficiency

Correctness
Complexity

• for analytical components
Is Time to Market a Problem?
Late Models  Missed Trading Opportunities
Late Services  Missed Information Markets
Late Products  Software Business Failure
Is Correctness a Problem?
Buggy Models  Incorrect Values/Risks/Trades
Buggy Services  Reputation Loss
Buggy Products  Lost Customers
Is Efficiency a Problem?
Slow Models  Out-of-date Valuations/Risks
Slow Services  Can’t Scale Out
Slow Products  Customer Complaints
Is Intractable Complexity a Problem?
The Recurring Business Problems
Time to Market
Efficiency

Correctness
Complexity

• for analytical components
What’s the Need?
Analytical programmers delivering correct,
efficient components in the enterprise, on-time
This is the set of problems that functional-first
programming helps solve
Part 2 - Why?
Observations and Examples
Observation #1
At the core of every functional-first language
is this:
simple, correct, robust code for solving
complex problems
On Windows, Microsoft recommend
F# and the Visual F# tools
for your functional-first programming
needs
"Functional-first programming is a generalpurpose programming technique particularly
suited to tasks where Time-to-deployment,
Efficiency, Correctness and Taming
Complexity dominate."
"Examples include ETL pipelines, general
data-manipulation, calculation engines,
service implementation, programmatic UIs
and data science.

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 objects and
state as necessary.
Observation #2
A highly interoperable
language allows
rapid, non-intrusive
deployment and
integration of
components

… functional-first code is a part of a
larger solution. With F# your code
can be rapidly integrated and
deployed.
Observation #2 cont.
Interoperable
languages remove
entire phases from
the analytical software
development process.

…no R  C#
…no Mathematica  C++
…no Excel  Java
Observation #3
Strongly-typed
functional-first
languages maintain
efficiency
…as good as C# and Java,
and sometimes C++
Observation #4
Strongly-typed
functional languages
help analytical
programmers tackle
more complex
problems

…more time in the domain,
less time on nulls and object
hierarchies.
Recap – How Functional-first Helps
Simple, correct, robust code
Interoperability eliminates entire phases
Strong-typing gives efficiency
Analytical developers empowered to solve
complex problems
Example #1 (power company)
I have written an application to balance the national
power generation schedule … for an energy company.
...the calculation engine was written in F#.

The use of F# to address the complexity at the heart of
this application clearly demonstrates a sweet spot for
the language … algorithmic analysis of large data sets.
Simon Cousins (Eon Powergen)
Example #1 (power company)
Interoperation ... Seamless. The C#
programmer need never know.

Units of measure … a huge time
saver...it eradicates a whole class of
errors…

Parallelism …The functional purity ...
makes it ripe for exploiting the inherent
parallelism in processing vectors of
data.

Code reduction… … vectors and
Exploratory programming

…Working with F# Interactive allowed me
to explore the solution space more
effectively.

matrices…higher order functions eat these
for breakfast with minimal fuss, minimal
code. Beautiful.

Lack of bugs… Functional programming
Unit testing …a joy to test. There are no
complex time-dependent interactions
to screw things up….

can feel strange. .. once the type checker
is satisfied that’s often it, it works.
Example #2/#3: F# in Finance
Example #3: F# in Insurance
I work for a large actuarial company... …Despite adopting
Agile/Scrum …the usual delays, complications and sometimes
…failures.
We used F#, and quickly created a system which would perform the
necessary calculations highly efficiently, in parallel, and with a
perfect match to the spreadsheet results.
All of the advantages which are commonly touted for F# do play out
in practice. Immutability, Easy Parallelisation, Expressiveness,
Testability, Conciseness, Flexibility, Productivity
[ Company name omitted ]
fsharp.org/testimonials
Example #4: Finance trading
platform Front End
F# + C# for Trading
Leverage F#’s features:
- extensive type system
- asynchronous workflows, agents and
immutable types
- rich pattern matching and parser support
“Experienced F# developers regularly solve problems
in days that would take weeks using more traditional
languages…solving complex problems in an elegant
and highly maintainable manner”
Phil Trelford, Trayport
Example #5: OCaml @ Jane St

source: http://www.janestcapital.com/yaron_minsky-cufp_2006.pdf
Example #5: OCaml @ Jane St

source: http://www.janestcapital.com/yaron_minsky-cufp_2006.pdf
Example #6: F# in Biotech
...F# rocks - building algorithms for DNA processing and it's like a drug.
12-15 at Amyris use F#... A complete genome resequencing pipeline with
interface, algs, reporting in ~5K lines and it has been incredibly reliable,
fast and easy to maintain.. A suffix tree in 150 lines that can index
200,000 bases a second

F# v. Python: F# has been phenomenally useful. I would be writing a lot
of this in Python otherwise and F# is more robust, 20x - 100x faster to
run and faster to develop.

Darren Platt, Amyris BioTechnologies
Example #7: F# in Advertisement Ranking &
Rating @ Microsoft
Around 95% of the code in these projects has been developed in F#.
F# allowed for rapid development of prototypes, and thus also rapid
verification or falsification of the underlying mathematical models.
Complex algorithms, for example to compute Nash equilibria in game
theory, can be expressed succinctly.
Units of measure reduced the chance of errors dramatically: Prices,
probabilities, derivatives, etc. can already be kept apart at compile time.
Example #8: F# at Kaggle
At Kaggle we initially chose F# for our core data analysis algorithms
because of its expressiveness.

We’ve found ourselves moving more and more of our application …into
F#. The F# code is shorter, easier to read, easier to refactor, and,
because of the strong typing, contains far fewer bugs.
As our data analysis tools have developed, we’ve seen domain-specific
constructs emerge very naturally. As our codebase gets larger, we
become more productive.

fsharp.org/testimonials
Example #9: F# for Machine Learning at
Microsoft
I wrote the first prototype of the click prediction system deployed in
Microsoft AdCenter in F# in a few days.

For a machine learning scientist, speed of experimentation is the critical
factor to optimize.
Unlike C# and C++, F# was designed for this mode of interaction.
Switching to F# was liberating and exhilarating.
The world is moving toward functional programming with good
justifications: the code is cleaner and easier to debug in a distributed
environment.
Dr. Patrice Simard, Microsoft Distinguished Engineer, fsharp.org/testimonials
Summary – The Data Agrees
Simple, correct, robust code
Interoperability improves time-to-market
Strong-typing gives efficiency
Analytical developers empowered to solve
more complex problems
Part 3 – F# in Practice
Today you will hear about…
F# Basics

F# for Data
Science

F# for
Pricing

F# for GPUs

F# for DSLs
in Risk and
Insurance

F# for Cloud
Data

F# + R
Proposition 1
The world is information-rich
The Information Revolution

1

2

3

4

5

6

7

2012

2013

6,432 10,537
Proposition 2
Our languages are informationsparse
Data is like water…
Data is like water…
Actually these days it’s more like a flood…
The Problem for Data
Our programming tools are data-sparse
getting data into a programming language is tiresome, error prone and boring
We need to bring financial data into
the language…
At full market-scale, strongly tooled, strongly
typed
Demo
F# + Xenomorph TimeScape
An F# type provider gives deep, simple, robust integration of financial
data, at massive, worldwide-scale, both in-cloud and on-premise
SQL

19/12/2013

50
CSV

19/12/2013

51
JSON

19/12/2013

52
XML

19/12/2013

53
Hadoop/Hive

19/12/2013

54
World Bank

19/12/2013

55
Freebase

19/12/2013

56
OData

19/12/2013

57
WSDL

19/12/2013

58
WMI

19/12/2013

59
JavaScript/TypeScript

19/12/2013

60
R

19/12/2013

61
In Summary – F#
Open, crossplatform, strongly
typed, efficient, rocksolid stable

Unbeatable data
integration

The safe choice for
functional-first

F#
Visual F# - tooling you
can trust from Microsoft
To find out more…
Learn F# at tryfsharp.org (including financial)
Lots of resources at fsharp.org
Testimonials at fsharp.org/testimonials
Over 100 videos at fsharp.org/videos
Questions?

More Related Content

What's hot

Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigmsJohn Paul Hallasgo
 
The Programmer Life Cycle
The Programmer Life CycleThe Programmer Life Cycle
The Programmer Life CycleRussell Ovans
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Krishna Sai
 
Software engineering
Software engineeringSoftware engineering
Software engineeringFahe Em
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
Towards Universal Semantic Understanding of Natural Languages
Towards Universal Semantic Understanding of Natural LanguagesTowards Universal Semantic Understanding of Natural Languages
Towards Universal Semantic Understanding of Natural LanguagesYunyao Li
 
Towards Universal Language Understanding
Towards Universal Language UnderstandingTowards Universal Language Understanding
Towards Universal Language UnderstandingYunyao Li
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5Alok Jain
 
Chapter 5( programming) answer
Chapter 5( programming) answerChapter 5( programming) answer
Chapter 5( programming) answersmkengkilili2011
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Akshay Nagpurkar
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programmingRob Paok
 
Cmp2412 programming principles
Cmp2412 programming principlesCmp2412 programming principles
Cmp2412 programming principlesNIKANOR THOMAS
 
An Efficient Approach to Produce Source Code by Interpreting Algorithm
An Efficient Approach to Produce Source Code by Interpreting AlgorithmAn Efficient Approach to Produce Source Code by Interpreting Algorithm
An Efficient Approach to Produce Source Code by Interpreting AlgorithmIRJET Journal
 
Programming Guidelines
Programming GuidelinesProgramming Guidelines
Programming GuidelinesRamesh Joshi
 

What's hot (20)

Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigms
 
The Programmer Life Cycle
The Programmer Life CycleThe Programmer Life Cycle
The Programmer Life Cycle
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
 
Notacd07
Notacd07Notacd07
Notacd07
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Computer
ComputerComputer
Computer
 
Towards Universal Semantic Understanding of Natural Languages
Towards Universal Semantic Understanding of Natural LanguagesTowards Universal Semantic Understanding of Natural Languages
Towards Universal Semantic Understanding of Natural Languages
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
 
Towards Universal Language Understanding
Towards Universal Language UnderstandingTowards Universal Language Understanding
Towards Universal Language Understanding
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Chapter 5( programming) answer
Chapter 5( programming) answerChapter 5( programming) answer
Chapter 5( programming) answer
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
 
Cmp2412 programming principles
Cmp2412 programming principlesCmp2412 programming principles
Cmp2412 programming principles
 
An Efficient Approach to Produce Source Code by Interpreting Algorithm
An Efficient Approach to Produce Source Code by Interpreting AlgorithmAn Efficient Approach to Produce Source Code by Interpreting Algorithm
An Efficient Approach to Produce Source Code by Interpreting Algorithm
 
Programming Guidelines
Programming GuidelinesProgramming Guidelines
Programming Guidelines
 
C aptitude book
C aptitude bookC aptitude book
C aptitude book
 
Introduction to compilers
Introduction to compilersIntroduction to compilers
Introduction to compilers
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 

Similar to Succeeding with Functional-first Programming in Enterprise

London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010Skills Matter
 
Google machine learning engineer exam dumps 2022
Google machine learning engineer exam dumps 2022Google machine learning engineer exam dumps 2022
Google machine learning engineer exam dumps 2022SkillCertProExams
 
Annotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable SoftwareAnnotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable SoftwareMary Brown
 
OSCON 2014: Data Workflows for Machine Learning
OSCON 2014: Data Workflows for Machine LearningOSCON 2014: Data Workflows for Machine Learning
OSCON 2014: Data Workflows for Machine LearningPaco Nathan
 
Data Workflows for Machine Learning - Seattle DAML
Data Workflows for Machine Learning - Seattle DAMLData Workflows for Machine Learning - Seattle DAML
Data Workflows for Machine Learning - Seattle DAMLPaco Nathan
 
Leverage the power of machine learning on windows
Leverage the power of machine learning on windowsLeverage the power of machine learning on windows
Leverage the power of machine learning on windowsMia Chang
 
Data Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area MLData Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area MLPaco Nathan
 
MEL_WOLINSKY_20170124
MEL_WOLINSKY_20170124MEL_WOLINSKY_20170124
MEL_WOLINSKY_20170124Mel Wolinsky
 
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...DataScienceConferenc1
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 EstimationLawrence Bernstein
 
Eng Cal Reduced1
Eng Cal Reduced1Eng Cal Reduced1
Eng Cal Reduced1rtmote
 
Data Science - Part II - Working with R & R studio
Data Science - Part II -  Working with R & R studioData Science - Part II -  Working with R & R studio
Data Science - Part II - Working with R & R studioDerek Kane
 
ICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPTICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPTDr. Haxel Consult
 
Week 3 Lecture 1 - Business SoftwareManagement of Information .docx
Week 3 Lecture 1 - Business SoftwareManagement of Information .docxWeek 3 Lecture 1 - Business SoftwareManagement of Information .docx
Week 3 Lecture 1 - Business SoftwareManagement of Information .docxjessiehampson
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming LanguagesIshan Monga
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Skills Matter
 
Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersnishajj
 
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINALJun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINALAlex Tarra
 

Similar to Succeeding with Functional-first Programming in Enterprise (20)

London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010
 
Google machine learning engineer exam dumps 2022
Google machine learning engineer exam dumps 2022Google machine learning engineer exam dumps 2022
Google machine learning engineer exam dumps 2022
 
Annotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable SoftwareAnnotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable Software
 
OSCON 2014: Data Workflows for Machine Learning
OSCON 2014: Data Workflows for Machine LearningOSCON 2014: Data Workflows for Machine Learning
OSCON 2014: Data Workflows for Machine Learning
 
Data Workflows for Machine Learning - Seattle DAML
Data Workflows for Machine Learning - Seattle DAMLData Workflows for Machine Learning - Seattle DAML
Data Workflows for Machine Learning - Seattle DAML
 
Consulting
ConsultingConsulting
Consulting
 
Leverage the power of machine learning on windows
Leverage the power of machine learning on windowsLeverage the power of machine learning on windows
Leverage the power of machine learning on windows
 
Data Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area MLData Workflows for Machine Learning - SF Bay Area ML
Data Workflows for Machine Learning - SF Bay Area ML
 
MEL_WOLINSKY_20170124
MEL_WOLINSKY_20170124MEL_WOLINSKY_20170124
MEL_WOLINSKY_20170124
 
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...
[DSC Europe 23] Igor Ilic - Redefining User Experience with Large Language Mo...
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
 
Intro1
Intro1Intro1
Intro1
 
Eng Cal Reduced1
Eng Cal Reduced1Eng Cal Reduced1
Eng Cal Reduced1
 
Data Science - Part II - Working with R & R studio
Data Science - Part II -  Working with R & R studioData Science - Part II -  Working with R & R studio
Data Science - Part II - Working with R & R studio
 
ICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPTICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPT
 
Week 3 Lecture 1 - Business SoftwareManagement of Information .docx
Week 3 Lecture 1 - Business SoftwareManagement of Information .docxWeek 3 Lecture 1 - Business SoftwareManagement of Information .docx
Week 3 Lecture 1 - Business SoftwareManagement of Information .docx
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming Languages
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answers
 
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINALJun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Succeeding with Functional-first Programming in Enterprise

  • 1. | Basel Succeeding with Functional-First Languages in Finance Dr. Don Syme Principal Researcher, Microsoft dsyme@microsoft.com
  • 2. Today: Some Simple Observations About Quantitative Finance Analytical Programming Calculation Engines Financial Engineering Trading Engines with F# (and associated technologies)
  • 3. Let’s focus on the business perspective and its correspondence to the technical features of F# Mostly based on informal observations of >50 successful F# adoptions fsharp.org/testimonials some of the same lessons hold for OCaml, Erlang, Clojure, Scala, …
  • 4. I will use a standard methodology for communicating “complex” products. S P I N • Situation • Problem • Implication TM • Need
  • 5. Part 1 What’s the Situation? What’s the Problem?
  • 6. The Recurring Business Situation “I lead a team developing…” • • • • • • • Financial Models Insurance Calculation Engines Trading Platforms Algorithmic Trading Systems Online Recommendation Engines Bio-informatics Algorithms …
  • 7. The Recurring Business Situation “I lead a team developing…” • • • • • • Analytical Components Analytical Components Analytical Components Analytical Components Analytical Components …
  • 9. The Recurring Business Problems Time to Market Efficiency Correctness Complexity • for analytical components
  • 10. Is Time to Market a Problem? Late Models  Missed Trading Opportunities Late Services  Missed Information Markets Late Products  Software Business Failure
  • 11. Is Correctness a Problem? Buggy Models  Incorrect Values/Risks/Trades Buggy Services  Reputation Loss Buggy Products  Lost Customers
  • 12. Is Efficiency a Problem? Slow Models  Out-of-date Valuations/Risks Slow Services  Can’t Scale Out Slow Products  Customer Complaints
  • 14. The Recurring Business Problems Time to Market Efficiency Correctness Complexity • for analytical components
  • 15. What’s the Need? Analytical programmers delivering correct, efficient components in the enterprise, on-time This is the set of problems that functional-first programming helps solve
  • 16. Part 2 - Why? Observations and Examples
  • 17. Observation #1 At the core of every functional-first language is this: simple, correct, robust code for solving complex problems
  • 18. On Windows, Microsoft recommend F# and the Visual F# tools for your functional-first programming needs
  • 19. "Functional-first programming is a generalpurpose programming technique particularly suited to tasks where Time-to-deployment, Efficiency, Correctness and Taming Complexity dominate."
  • 20. "Examples include ETL pipelines, general data-manipulation, calculation engines, service implementation, programmatic UIs and data science. While these problems can be solved using other programming paradigms, they are particularly amenable to functional-first programming."
  • 21. Functional-first programming uses functional programming as the initial paradigm for most purposes, but employs other techniques such as objects and state as necessary.
  • 22. Observation #2 A highly interoperable language allows rapid, non-intrusive deployment and integration of components … functional-first code is a part of a larger solution. With F# your code can be rapidly integrated and deployed.
  • 23. Observation #2 cont. Interoperable languages remove entire phases from the analytical software development process. …no R  C# …no Mathematica  C++ …no Excel  Java
  • 25. Observation #4 Strongly-typed functional languages help analytical programmers tackle more complex problems …more time in the domain, less time on nulls and object hierarchies.
  • 26. Recap – How Functional-first Helps Simple, correct, robust code Interoperability eliminates entire phases Strong-typing gives efficiency Analytical developers empowered to solve complex problems
  • 27. Example #1 (power company) I have written an application to balance the national power generation schedule … for an energy company. ...the calculation engine was written in F#. The use of F# to address the complexity at the heart of this application clearly demonstrates a sweet spot for the language … algorithmic analysis of large data sets. Simon Cousins (Eon Powergen)
  • 28. Example #1 (power company) Interoperation ... Seamless. The C# programmer need never know. Units of measure … a huge time saver...it eradicates a whole class of errors… Parallelism …The functional purity ... makes it ripe for exploiting the inherent parallelism in processing vectors of data. Code reduction… … vectors and Exploratory programming …Working with F# Interactive allowed me to explore the solution space more effectively. matrices…higher order functions eat these for breakfast with minimal fuss, minimal code. Beautiful. Lack of bugs… Functional programming Unit testing …a joy to test. There are no complex time-dependent interactions to screw things up…. can feel strange. .. once the type checker is satisfied that’s often it, it works.
  • 29. Example #2/#3: F# in Finance
  • 30. Example #3: F# in Insurance I work for a large actuarial company... …Despite adopting Agile/Scrum …the usual delays, complications and sometimes …failures. We used F#, and quickly created a system which would perform the necessary calculations highly efficiently, in parallel, and with a perfect match to the spreadsheet results. All of the advantages which are commonly touted for F# do play out in practice. Immutability, Easy Parallelisation, Expressiveness, Testability, Conciseness, Flexibility, Productivity [ Company name omitted ] fsharp.org/testimonials
  • 31. Example #4: Finance trading platform Front End F# + C# for Trading Leverage F#’s features: - extensive type system - asynchronous workflows, agents and immutable types - rich pattern matching and parser support “Experienced F# developers regularly solve problems in days that would take weeks using more traditional languages…solving complex problems in an elegant and highly maintainable manner” Phil Trelford, Trayport
  • 32. Example #5: OCaml @ Jane St source: http://www.janestcapital.com/yaron_minsky-cufp_2006.pdf
  • 33. Example #5: OCaml @ Jane St source: http://www.janestcapital.com/yaron_minsky-cufp_2006.pdf
  • 34. Example #6: F# in Biotech ...F# rocks - building algorithms for DNA processing and it's like a drug. 12-15 at Amyris use F#... A complete genome resequencing pipeline with interface, algs, reporting in ~5K lines and it has been incredibly reliable, fast and easy to maintain.. A suffix tree in 150 lines that can index 200,000 bases a second F# v. Python: F# has been phenomenally useful. I would be writing a lot of this in Python otherwise and F# is more robust, 20x - 100x faster to run and faster to develop. Darren Platt, Amyris BioTechnologies
  • 35. Example #7: F# in Advertisement Ranking & Rating @ Microsoft Around 95% of the code in these projects has been developed in F#. F# allowed for rapid development of prototypes, and thus also rapid verification or falsification of the underlying mathematical models. Complex algorithms, for example to compute Nash equilibria in game theory, can be expressed succinctly. Units of measure reduced the chance of errors dramatically: Prices, probabilities, derivatives, etc. can already be kept apart at compile time.
  • 36. Example #8: F# at Kaggle At Kaggle we initially chose F# for our core data analysis algorithms because of its expressiveness. We’ve found ourselves moving more and more of our application …into F#. The F# code is shorter, easier to read, easier to refactor, and, because of the strong typing, contains far fewer bugs. As our data analysis tools have developed, we’ve seen domain-specific constructs emerge very naturally. As our codebase gets larger, we become more productive. fsharp.org/testimonials
  • 37. Example #9: F# for Machine Learning at Microsoft I wrote the first prototype of the click prediction system deployed in Microsoft AdCenter in F# in a few days. For a machine learning scientist, speed of experimentation is the critical factor to optimize. Unlike C# and C++, F# was designed for this mode of interaction. Switching to F# was liberating and exhilarating. The world is moving toward functional programming with good justifications: the code is cleaner and easier to debug in a distributed environment. Dr. Patrice Simard, Microsoft Distinguished Engineer, fsharp.org/testimonials
  • 38. Summary – The Data Agrees Simple, correct, robust code Interoperability improves time-to-market Strong-typing gives efficiency Analytical developers empowered to solve more complex problems
  • 39. Part 3 – F# in Practice
  • 40. Today you will hear about… F# Basics F# for Data Science F# for Pricing F# for GPUs F# for DSLs in Risk and Insurance F# for Cloud Data F# + R
  • 41. Proposition 1 The world is information-rich
  • 43. Proposition 2 Our languages are informationsparse
  • 44. Data is like water…
  • 45. Data is like water…
  • 46. Actually these days it’s more like a flood…
  • 47. The Problem for Data Our programming tools are data-sparse getting data into a programming language is tiresome, error prone and boring
  • 48. We need to bring financial data into the language… At full market-scale, strongly tooled, strongly typed
  • 49. Demo F# + Xenomorph TimeScape An F# type provider gives deep, simple, robust integration of financial data, at massive, worldwide-scale, both in-cloud and on-premise
  • 62. In Summary – F# Open, crossplatform, strongly typed, efficient, rocksolid stable Unbeatable data integration The safe choice for functional-first F# Visual F# - tooling you can trust from Microsoft
  • 63. To find out more… Learn F# at tryfsharp.org (including financial) Lots of resources at fsharp.org Testimonials at fsharp.org/testimonials Over 100 videos at fsharp.org/videos

Editor's Notes

  1. “Take a moment to stop and think about the ramifications of time-to-market problems through software delays in analytical components for QF, FE, Trading and Calculation Engines more broadly”
  2. “Take a moment to stop and think about the ramifications of correctness problems through software delays in analytical components for QF, FE, Trading and Calculation Engines more broadly”
  3. “Take a moment to stop and think about the ramifications of efficiency problems through software delays in analytical components for QF, FE, Trading and Calculation Engines more broadly”
  4. We don’t talk enough about the software we were never able to write. We don’t talk enough about why good analytical programmers leave their jobs.
  5. Functional programming tools empower when combined with other technologies
  6. Functional programming tools empower when combined with other technologies
  7. Functional programming tools empower when combined with other technologies