Successfully reported this slideshow.

F# for Trading

11

Share

Loading in …3
×
1 of 25
1 of 25

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

F# for Trading

  1. F# for Trading Phillip Trelford Trayport
  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 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#.”
  10. Order – Record type type Order = { Side : Side LimitPrice : Price Quantity : Quantity IsAllOrNone : bool }
  11. Time in Force – Union type type TimeInForce = | Immediate | GoodForDay | GoodTillDate of DateTime
  12. Units of Measure
  13. Excel – Type Provider Excel 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. Rx notifications. 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 type Agent.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 Collector Latency Mode Application Scenarios Batch Command line Server Side Interactive LOB applications LowLatency Trading Screens SustainedLowLatency Financial Applications
  23. Meet the F#ers @rickasaurus @tomaspetricek @dmohl
  24. Try F#: http://tryfsharp.org
  25. Questions? Me F# Twitter: @ptrelford Twitter: #fsharp Feed: http://trelford.com/blog Feed: http://fpound.net

Editor's Notes

  • 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
  • ×