Uploaded on

Strangeloop 2012 presentation

Strangeloop 2012 presentation

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
6,266
On Slideshare
0
From Embeds
0
Number of Embeds
7

Actions

Shares
Downloads
31
Comments
0
Likes
9

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • F# - not explicitly built for trading butBased on Ocaml which Janes St & others have been using for over a decadeEarly adopters in trading community Credit Suisse, E-OnF# community dominated by finance, insurance
  • Community MattersPython PrincipleEarly adopters = Traders > DevelopersExcelF#Hedge FundsBanks IT Departments are ConservativeLanguage/Tool approve listRunning VS2005/2008 (via phone interviews)Credit Suisse, Trafigura, BarCap
  • Leverage

Transcript

  • 1. F# for TradingPhillip TrelfordTrayport
  • 2. F# Community
  • 3. F# Language• Strongly Typed• Functional First• Object Orientated• Open Source• First Class .Net language• In Visual Studio
  • 4. Visual Studio
  • 5. Joule Energy Trading Screen
  • 6. Leverage• Existing code• Domain modelling• Computation• Concurrency• Libraries
  • 7. Specification by Example
  • 8. TickSpec: Breakpoint in text file
  • 9. Thoughtworks Tech RadarMarch 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#.”
  • 10. Order – Record typetype Order = { Side : Side LimitPrice : Price Quantity : Quantity IsAllOrNone : bool }
  • 11. Time in Force – Union typetype TimeInForce = | Immediate | GoodForDay | GoodTillDate of DateTime
  • 12. Units of Measure
  • 13. Excel – Type ProviderExcel Visual Studio
  • 14. F# for Computation• Standard F# tools ▫ F# language and core libraries• Workstation libraries ▫ Math.NET Numerics (open source) ▫ StatFactory FCore• Distributed libraries ▫ Microsoft Cloud Numerics ▫ Nessos {m}brace cloud
  • 15. Monte Carlo estimation of Pi
  • 16. R – Type Provider
  • 17. ShowDialog – Async workflows
  • 18. Rxnotifications. BufferWithTimeOrCount( TimeSpan.FromSeconds(0.01), 50);
  • 19. MiniRx int closure = i; mouseMove .Select(e => e.GetPosition(canvas)) .Delay(closure * 100) .OnDispatcher() .Subscribe(pos => { Canvas.SetLeft(label, pos.X + closure * 10); Canvas.SetTop(label, pos.Y); });
  • 20. F# Agents – MailboxProcessor typeAgent.Start (fun inbox -> async { while true do let! instruction = instruction.Receive() instruction |> market.Update |> notify } )
  • 21. The future – {m}brace the cloud• Programming model that looks sequential but executes distributed ▫ async { } ▫… ▫ cloud { }
  • 22. .Net 4.5 Garbage CollectorLatency Mode Application ScenariosBatch Command line Server SideInteractive LOB applicationsLowLatency Trading ScreensSustainedLowLatency Financial Applications
  • 23. Meet the F#ers @rickasaurus @tomaspetricek @dmohl
  • 24. Try F#: http://tryfsharp.org
  • 25. Questions?Me F#Twitter: @ptrelford Twitter: #fsharpFeed: http://trelford.com/blog Feed: http://fpound.net