Top Banner
F# FOR TRADING Øredev, Malmo, Sweden Phillip Trelford 2013
35

F# for Trading - Øredev 2013

May 06, 2015

Download

Business

F# for Trading talk at Øredev in Malmö, Sweden covering the community, benefits and application areas like domain modelling and data processing.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: F# for Trading - Øredev 2013

F# FOR TRADING Øredev, Malmo, SwedenPhillip Trelford 2013

Page 2: F# for Trading - Øredev 2013

F#UNCTIONAL LONDONERS

600+ Members

Founded Feb 4, 2010

51 Meetings

Page 3: F# for Trading - Øredev 2013

NEW YORK CITY F# USER GROUP550+ Members

Founded Nov 10, 2010

30 Meetings

Page 4: F# for Trading - Øredev 2013

FSHARP.ORG/GROUPS

Page 5: F# for Trading - Øredev 2013

WHO, WHY, WHAT F# for Trading

Page 6: F# for Trading - Øredev 2013

WHO?

Investment Banks

Hedge funds

Prop shops

Utilities

Insurance

Page 7: F# for Trading - Øredev 2013

F# FOR PROFIT

Time to Market

Efficiency

Correctness

Complexity

Page 8: F# for Trading - Øredev 2013

TIME TO MARKET

speed development by 50 percent or more,

European IB

order of magnitude increase in productivity,

GameSys

Page 9: F# for Trading - Øredev 2013

EFFICIENCY

processes that used to require hours now take just minutes, Grange Insurance

performance is 10× better than the C++ that it replaces, Aviva

Page 10: F# for Trading - Øredev 2013

CORRECTNESS

leads to virtually bug-free code,

Fixed Income

I am still waiting for the first bug to come in,

E-On

Page 11: F# for Trading - Øredev 2013

COMPLEXITY

everything becomes simple and clear when expressed in F#,

Byron Cook

Page 12: F# for Trading - Øredev 2013

SHOW ME THE MONEY F# for Trading

Page 13: F# for Trading - Øredev 2013

JOULE ENERGY TRADING SCREEN

Page 14: F# for Trading - Øredev 2013

TICKSPEC: DEBUG EXAMPLES

Page 15: F# for Trading - Øredev 2013

ORDER TYPE

type Order = {

Side : Side

LimitPrice : Price

Quantity : Quantity

IsAllOrNone : bool

}

Page 16: F# for Trading - Øredev 2013

DOMAIN TIME IN FORCE

type TimeInForce =

| Immediate

| GoodForDay

| GoodTillDate of DateTime

Page 17: F# for Trading - Øredev 2013

THOUGHTWORKS TECH RADAR MARCH 2012

F# is excellent at concisely expressing

business and domain logic.”

Developers trying to achieve explicit business logic within an application may opt to

express their domain in F#

with the majority of plumbing code in C#

Page 18: F# for Trading - Øredev 2013

SPREADSHEETS F# for Trading

Page 19: F# for Trading - Øredev 2013

UNITS IN CELLStype formula =

| Neg of formula

| Exp of formula * formula

| ArithmeticOp of

formula * arithmetic * formula

| LogicalOp of

formula * logical * formula

| Num of UnitValue

| Ref of int * int

| Range of int * int * int * int

| Fun of string * formula list

Page 20: F# for Trading - Øredev 2013

UNITS OF MEASURE

Page 21: F# for Trading - Øredev 2013

TSUNAMI + FCELL = F# IN EXCEL

Page 22: F# for Trading - Øredev 2013

SPREADSHEET HORROR STORIES

anomaly, audit finding, bug, bungled, chaos, cock-up, corrupt, damage, debug, defect, deficiency, disaster, dubious,

embarrassment, error, erroneous, Excel, exposed, failed, failure, false, falsify, fault, faulty, fiasco, flaw, foul-up, fraud, fraudulent,

fubar, garbage, GIGO, glitch, hell, horror story, inaccurate, inadequate, inadvertent, incorrect, insecure, misunderstood, nightmare, non-compliance, not correct, oops, overestimate,

overstatement, problem, risk, rogue, serious, slip, snafu, suspect, suspicious, trap, typo, unchecked, uncontrolled, uncorrected,

uncovered, underestimate, understatement, undetected, untested, violation, weak, weakness, wrong

Page 23: F# for Trading - Øredev 2013

TYPE PROVIDERS F# for Trading

Page 24: F# for Trading - Øredev 2013

CSV TYPE PROVIDER

Page 25: F# for Trading - Øredev 2013

R – TYPE PROVIDER

Page 26: F# for Trading - Øredev 2013

WORLD BANK DATA

Page 27: F# for Trading - Øredev 2013

GARBAGE F# in Finance

Page 28: F# for Trading - Øredev 2013

.NET 4.5 GARBAGE COLLECTOR

Latency Mode Application Scenarios

Batch Command lineServer Side

Interactive LOB applications

LowLatency Trading Screens

SustainedLowLatency Financial Applications

Page 29: F# for Trading - Øredev 2013

SGEN GC / MONO

Performance Target

• Mac

• Linux

• Android

• iOS

• FreeBSD

Page 30: F# for Trading - Øredev 2013

SOLD F# in Finance

Page 31: F# for Trading - Øredev 2013

TRY IT BEFORE YOU BUY IT

Page 32: F# for Trading - Øredev 2013

BUY THE BOOK

Page 33: F# for Trading - Øredev 2013

GET THE T-SHIRT

Page 34: F# for Trading - Øredev 2013

GET A JOB

Page 35: F# for Trading - Øredev 2013

QUESTIONS?

Community

F# Foundation http://fsharp.org

Twitter Tag: #fsharp

Upcoming conferences

F# in Finance (Microsoft London): http://fsharpinfinance.com Nov 25

CodeMesh London: http://codemesh.io Dec 3-5

NDC London: http://ndc-London.com Dec 2-6