f# for trading nyc

30
F# FOR TRADING Phil Trelford Trayport NYC 2013

Upload: phillip-trelford

Post on 06-May-2015

2.767 views

Category:

Technology


1 download

DESCRIPTION

F# for Trading talk at NYC meetup on May 1st 2013

TRANSCRIPT

Page 1: F# for Trading NYC

F# FOR TRADINGPhil TrelfordTrayportNYC 2013

Page 2: F# for Trading NYC

F#UNCTIONAL LONDONERS

500+ Members

Founded Feb 4, 2010

37 Meetings

Page 3: F# for Trading NYC

NEW YORK CITY F# USER GROUP500+ Members

Founded Nov 10, 2010

25 Meetings

Page 4: F# for Trading NYC

FSHARP.ORG/GROUPS

Page 5: F# for Trading NYC

WHO, WHY, WHAT F# for Trading

Page 6: F# for Trading NYC

WHO?

Investment Banks

Hedge funds

Prop shops

Utilities

Insurance

Page 7: F# for Trading NYC

WHY?

Time to Market

Efficiency

Correctness

Complexity

Page 8: F# for Trading NYC

FSHARP.ORG/TESTIMONIALS

speed development by 50 percent or more, European IB

order of magnitude increase in productivity, GameSys

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

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

leads to virtually bug-free code, Fixed Income

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

complex algorithms can be expressed succinctly, Microsoft

everything becomes simple and clear when expressed in F#, Byron Cook

Page 9: F# for Trading NYC

WHAT?

F# is a practical, functional-first language

that lets you write simple code

to solve complex problems

Page 10: F# for Trading NYC

SHOW ME THE MONEY F# for Trading

Page 11: F# for Trading NYC

JOULE: TRADING SCREEN

Page 12: F# for Trading NYC

TICKSPEC: DEBUG EXAMPLES

Page 13: F# for Trading NYC

SPECIFICATION BY EXAMPLE

Page 14: F# for Trading NYC

UNIT TEST

Page 15: F# for Trading NYC

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 16: F# for Trading NYC

ORDER – RECORD TYPE

type Order = {

Side : Side

LimitPrice : Price

Quantity : Quantity

IsAllOrNone : bool

}

Page 17: F# for Trading NYC

TIME IN FORCE – UNION TYPEtype TimeInForce =

| Immediate

| GoodForDay

| GoodTillDate of DateTime

Page 18: F# for Trading NYC

UNITS OF MEASURE

Page 19: F# for Trading NYC

EXCEL – TYPE PROVIDER

Excel Visual Studio

Page 20: F# for Trading NYC

F# FOR COMPUTATION

Standard F# tools F# language and core libraries

Workstation libraries Math.NET Numerics (open source) StatFactory FMat

Distributed libraries Microsoft Cloud Numerics Nessos {m}brace cloud

Page 21: F# for Trading NYC

MONTE CARLO ESTIMATION OF PI

Page 22: F# for Trading NYC

R – TYPE PROVIDER

Page 23: F# for Trading NYC

WORLD BANK DATA

Page 24: F# for Trading NYC

SHOWDIALOG – ASYNC WORKFLOWS

Page 25: F# for Trading NYC

ASYNC FRACTALS

Page 26: F# for Trading NYC

Programming model that looks sequential but executes distributed async { } … cloud { }

{M}BRACE THE CLOUD

Page 27: F# for Trading NYC

.NET 4.5 GARBAGE COLLECTOR

Latency Mode Application Scenarios

Batch Command lineServer Side

Interactive LOB applications

LowLatency Trading Screens

SustainedLowLatency Financial Applications

Page 28: F# for Trading NYC

TRY F#: HTTP://TRYFSHARP.ORG

Page 29: F# for Trading NYC

F# TUTORIALS NYC SEPT 18/19

Page 30: F# for Trading NYC

QUESTIONS?

Twitter: @ptrelford

Blog: http://trelford.com/blog

Foundation: http://fsharp.org