F# for Trading - Øredev 2013

Post on 06-May-2015

3.582 views 2 download

Tags:

description

F# for Trading talk at Øredev in Malmö, Sweden covering the community, benefits and application areas like domain modelling and data processing.

Transcript of F# for Trading - Øredev 2013

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

F#UNCTIONAL LONDONERS

600+ Members

Founded Feb 4, 2010

51 Meetings

NEW YORK CITY F# USER GROUP550+ Members

Founded Nov 10, 2010

30 Meetings

FSHARP.ORG/GROUPS

WHO, WHY, WHAT F# for Trading

WHO?

Investment Banks

Hedge funds

Prop shops

Utilities

Insurance

F# FOR PROFIT

Time to Market

Efficiency

Correctness

Complexity

TIME TO MARKET

speed development by 50 percent or more,

European IB

order of magnitude increase in productivity,

GameSys

EFFICIENCY

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

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

CORRECTNESS

leads to virtually bug-free code,

Fixed Income

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

E-On

COMPLEXITY

everything becomes simple and clear when expressed in F#,

Byron Cook

SHOW ME THE MONEY F# for Trading

JOULE ENERGY TRADING SCREEN

TICKSPEC: DEBUG EXAMPLES

ORDER TYPE

type Order = {

Side : Side

LimitPrice : Price

Quantity : Quantity

IsAllOrNone : bool

}

DOMAIN TIME IN FORCE

type TimeInForce =

| Immediate

| GoodForDay

| GoodTillDate of DateTime

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#

SPREADSHEETS F# for Trading

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

UNITS OF MEASURE

TSUNAMI + FCELL = F# IN EXCEL

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

TYPE PROVIDERS F# for Trading

CSV TYPE PROVIDER

R – TYPE PROVIDER

WORLD BANK DATA

GARBAGE F# in Finance

.NET 4.5 GARBAGE COLLECTOR

Latency Mode Application Scenarios

Batch Command lineServer Side

Interactive LOB applications

LowLatency Trading Screens

SustainedLowLatency Financial Applications

SGEN GC / MONO

Performance Target

• Mac

• Linux

• Android

• iOS

• FreeBSD

SOLD F# in Finance

TRY IT BEFORE YOU BUY IT

BUY THE BOOK

GET THE T-SHIRT

GET A JOB

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