F# for TradingPhillip TrelfordTrayport
F# Community
F# Language•   Strongly Typed•   Functional First•   Object Orientated•   Open Source•   First Class .Net language•   In V...
Visual Studio
Joule Energy Trading Screen
Leverage•   Existing code•   Domain modelling•   Computation•   Concurrency•   Libraries
Specification by Example
TickSpec: Breakpoint in text file
Thoughtworks Tech RadarMarch 2012    “F# is excellent at concisely expressing         business and domain logic.” “Develop...
Order – Record typetype Order = {  Side : Side  LimitPrice : Price  Quantity : Quantity  IsAllOrNone : bool  }
Time in Force – Union typetype TimeInForce =  | Immediate  | GoodForDay  | GoodTillDate of DateTime
Units of Measure
Excel – Type ProviderExcel              Visual Studio
F# for Computation• Standard F# tools  ▫ F# language and core libraries• Workstation libraries  ▫ Math.NET Numerics (open ...
Monte Carlo estimation of Pi
R – Type Provider
ShowDialog – Async workflows
Rxnotifications.    BufferWithTimeOrCount(    TimeSpan.FromSeconds(0.01),    50);
MiniRx   int closure = i;   mouseMove     .Select(e => e.GetPosition(canvas))     .Delay(closure * 100)     .OnDispatcher(...
F# Agents – MailboxProcessor typeAgent.Start (fun inbox -> async {    while true do        let! instruction =            i...
The future – {m}brace the cloud• Programming model that looks sequential but  executes distributed ▫ async { } ▫… ▫ cloud ...
.Net 4.5 Garbage CollectorLatency Mode          Application ScenariosBatch                 Command line                   ...
Meet the F#ers     @rickasaurus      @tomaspetricek     @dmohl
Try F#: http://tryfsharp.org
Questions?Me                               F#Twitter: @ptrelford              Twitter: #fsharpFeed: http://trelford.com/bl...
Upcoming SlideShare
Loading in...5
×

F# for Trading

6,584

Published on

Strangeloop 2012 presentation

Published in: Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,584
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
34
Comments
0
Likes
9
Embeds 0
No embeds

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
  • F# for Trading

    1. 1. F# for TradingPhillip TrelfordTrayport
    2. 2. F# Community
    3. 3. F# Language• Strongly Typed• Functional First• Object Orientated• Open Source• First Class .Net language• In Visual Studio
    4. 4. Visual Studio
    5. 5. Joule Energy Trading Screen
    6. 6. Leverage• Existing code• Domain modelling• Computation• Concurrency• Libraries
    7. 7. Specification by Example
    8. 8. TickSpec: Breakpoint in text file
    9. 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. 10. Order – Record typetype Order = { Side : Side LimitPrice : Price Quantity : Quantity IsAllOrNone : bool }
    11. 11. Time in Force – Union typetype TimeInForce = | Immediate | GoodForDay | GoodTillDate of DateTime
    12. 12. Units of Measure
    13. 13. Excel – Type ProviderExcel Visual Studio
    14. 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. 15. Monte Carlo estimation of Pi
    16. 16. R – Type Provider
    17. 17. ShowDialog – Async workflows
    18. 18. Rxnotifications. BufferWithTimeOrCount( TimeSpan.FromSeconds(0.01), 50);
    19. 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. 20. F# Agents – MailboxProcessor typeAgent.Start (fun inbox -> async { while true do let! instruction = instruction.Receive() instruction |> market.Update |> notify } )
    21. 21. The future – {m}brace the cloud• Programming model that looks sequential but executes distributed ▫ async { } ▫… ▫ cloud { }
    22. 22. .Net 4.5 Garbage CollectorLatency Mode Application ScenariosBatch Command line Server SideInteractive LOB applicationsLowLatency Trading ScreensSustainedLowLatency Financial Applications
    23. 23. Meet the F#ers @rickasaurus @tomaspetricek @dmohl
    24. 24. Try F#: http://tryfsharp.org
    25. 25. Questions?Me F#Twitter: @ptrelford Twitter: #fsharpFeed: http://trelford.com/blog Feed: http://fpound.net
    1. ¿Le ha llamado la atención una diapositiva en particular?

      Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

    ×