SlideShare une entreprise Scribd logo
1  sur  34
StreamInsight
A Capital Markets Tale
Agenda




                                                                                  2 StreamInsight: A Capital Markets Tale
About Lab49
(Very Brief) Overview Of Microsoft StreamInsight Complex Event Processing (CEP)
Capital Markets StreamInsight Solutions
• Market Strategy Engine
• Market Real-Time Risk (RTR) - SQL Server 2008 R2
• Market Real-Time Risk - Windows AppFabric Caching (Velocity)
Lessons Learnt
About Lab49
Lab49




                                                                                                   4 About Us
We create advanced solutions for the                 We combine the skills of our practices to
financial services industry through strategic         deliver innovation:
and technical consulting:                            • Strategy group
• Working with the world’s largest investment        • User Experience practice
  banks, hedge funds and exchanges.
                                                     • Development practices
• Designing and delivering some of the most
                                                     alongside the adoption of some key tenets:
  sophisticated and forward thinking financial
  applications.                                      • Domain Driven Development

• Applying user-centred principles to the world of   • Lean Agile Process
  bespoke software.                                  Our History
• From concept to complete, ui to server.            Lab49 was founded in 2002 and now comprises
                                                     approximately 200 people, with offices in
                                                     New York and London.
5 About Us
Matt Davey
Part of the TAP program since
July 2009
Requester for various
StreamInsight V1 features:
• Count Window
• Dynamic Query
  Composition at Runtime
Overview Of Microsoft StreamInsight
Complex Event Processing (CEP)
CEP in Finance




                                                                                                        7 CEP in Finance
• Banks are using CEP for feeding data into algorithmic trading systems as well as for finding dealing
  opportunities and trading pairs across asset class.
• Risk monitoring, fraud detection and surveillance are also growth areas for CEP
StreamInsight Features




                                                                                                      8 StreamInsight Features
• Process large volumes of events across multiple data streams in < 1 second
• Provides built-in support for different event types and rich query semantics
• Reduces development cost by utilising existing skill sets and investment in Microsoft development
  platform
• Flexible deployment options
StreamInsight (CEP) Application at Runtime



                                                   CEP Engine
                             Event                  Standing Queries



                             Event                                                Event
                                                                   Event
                   Input                                                                   Output
                                               Event
                  Adapters                                                                Adapters
9 StreamInsight




                             Event                                                Event

                                                        Event
                             Event
10 Market Strategy Engine
StreamInsight Deployment
Capital Markets StreamInsight Solutions
Market Strategy Engine
Markets are Changing




                                                                                                     13 Market Strategy Engine
• Markets are becoming more complex
  • StreamInsight offers a cleaner way to process events in this complex world
• Algorithmic trading has become mainstream
  • StreamInsight enhances the cleansing/validation of market data, order execution/management,
    pricing engines and more
• Speed and latency are critical to maximising profitability
  • StreamInsight’s leverages the Microsoft development platform to improve speed of development
    coupled with Microsoft’s commitment to “Process large volumes of events across multiple data
    streams” in “low latency”
• Back testing in the search for new strategies
  • StreamInsight’s adapter architecture allows easy access to historical market data repositories
    e.g. kdb+
The Problem - Butterfly Strategy




                                                                                       14 Market Strategy Engine
 Leg     Buy/Sell   Working Leg   Price Weight   Size Weighting


 Bobl      Buy          Yes            1               1


 Bund      Sell         No           -0.28            0.28


Schatz     Sell         No           -1.19            1.19




                                                                  Buy    10   Bobl
                                  10 Fly @ -49
                                                                  Sell   3    Bund


                                                                  Sell   12   Schatz
StreamInsight Engine Flow




                                        15 Market Strategy Engine
                      (1)




                            (3)

                                  (2)
Take Aways




                                                                          17 Take Aways
Benefits over existing non-CEP based strategy engines
• StreamInsight offers the advantage and benefits of CEP principles
 • Working and reasoning with Time - dealing with out of order arrivals
Benefits over existing competitor CEP based strategy engines
• LINQ/.NET implementation
• Easy integration to other Microsoft products
• Lower total cost of ownership
Market Real-Time Risk: SQL Server 2008
Market Risk




                                                                                                                     19 Market Risk
Market risk is the risk that the value of a portfolio, either an investment portfolio or a trading portfolio, will
decrease due to the change in value of the market risk factors
Why The Need For Real-Time Risk (RTR)?




                                                   20 Why The Need For Real-Time Risk (RTR)?
Investment banks need to hedge their positions
Latency
T-1 and warehousing - PnL Explain
Servers are cheaper and faster than workstations
Improved Aggregation and drill-down
High Level Architecture




                                                                                                                      21 High Level Architecture
        Streaminsight

        F#              Agent


                           Market Depth    Strategy         Strategy Definition




                                            LINQ
                                                                  Orders
                                                                                                            Agent
                                                                                                         Agent (F#)
                                                                                              Market    Agent (F#)
                                                                                                       Agent (F#)

                                                                 LINQ            Leg Orders

                                                                                   Trade



                                            LINQ
                                                                  Cancel




                        Aggregation                           Shocking Curve
                          Engine
                                          Market Risk HPC
                                                                 (GPU?)
Aggregation Engine Architecture




                                                                                                             22 Aggregation Engine Architecture
                                                            Static
                                                            Data



                              Microsoft StreamInsight
                   Position                              Database




                                                                                        Microsoft Analysis
                    Input                                 Output                SQL
                   Adapter                                Adapter              Server
                                                                              2008 R2




                                                                                             Services
                                        LINQ


                     Risk                                Real-Time            OLAP
                    Input                               Push Output           Cube
                   Adapter                                Adapter




                                      XMLA Server




          Client

                                                                      Excel
RTR Highlights




                                                                                                            23 RTR Highlights
• StreamInsight process Risk data, feeding SQL Server 2008 R2
• StreamInsight provides the XMLA service with real-time push notifications - e.g. portfolio ID’s
• “XMLA” Server sits between the client and SQL Server intercepting client requests, and providing “push”
  services (smart polling, subscription manager)
Live Demo
Take Aways




                                                                                             25 Take Aways
Compared To Other Solutions
• The Microsoft solution offers a modularised real-time risk solution that is customisable
• It’s a complete Microsoft (.NET) stack
• Leveraging SQL Server 2008 R2 Analysis Services - (ROLAP for T, and MOLAP T-x)
Performance
• We can improve further by adding another Microsoft product......
Market Real-Time Risk: Windows
AppFabric Caching (Velocity)
Velocity RTR Architecture




                                                                                                                 27 Velocity RTR Architecture
                                                          Static                 Risk Warehousing
                                                          Data



                            Microsoft StreamInsight
                 Position                              Database
                                                                                   SQL




                                                                                            Microsoft Analysis
                  Input                                 Output
                 Adapter                                Adapter                   Server
                                                                                 2008 R2




                                                                                                Services
                                      LINQ


                   Risk                                Real-Time
                  Input                               Push Output                OLAP
                 Adapter                                Adapter                  Cube




                                                                    Windows
                                                                      Server
                                   XMLA Server                      AppFabric
                                  XMLA Server
                                                                     Caching
                                                                    (Velocity)
        Client

                                                                                    Excel
Database vs Cache




                                                                                                           28 Database vs Cache
                                    Database                                       Cache




   Notification   Notification Service deprecated in SQL Server 2008   Windows AppFabric Cache Notification




   OLAP Cube                     Analysis Service                     Custom build of an in-memory cube




   Scalability       Out the box partitioning, hot-hot support                Distributed Cache
Take Aways




                                                                                             30 Take Aways
Compared To Other Solutions
• The Microsoft solution offers a modularised real-time risk solution that is customisable
• It’s a complete Microsoft (.NET) stack
• Best of both worlds
 • SQL Server - backup, warehousing (ROLAP for T, and MOLAP T-x)
 • Distributed Cache - performance
Closing
Lessons Learnt




                                                                       32 Lessons Learnt
Business
• StreamInsight improves the delivery timeline of business solutions
Technology
• CTI and AdvancedTimeImportSetting
• V1 Ugly Code Issues
• Nested classes
• Static UDF
• UDF’s offer lots of extensibility
• Reactive Framework (Rx) usage
• .NET 4 Not currently supported
thank you for your time…
any questions?




matt davey (matt.davey@lab49.com)
mdavey.wordpress.com | Tales from a trading desk
Principles of CEP




                                                                                                                                                          34 Principles of CEP
• Events are technology-neutral occurrences of interest, such as a new purchase, a change of address, or an attempt to break into a network. Events
  can come from people, devices, applications, networks, or databases.


• Events have context, that is, an instance of an event implies timing (when it happened, both in absolute terms and relative to other events),
  sequence (again relative to other events), and linking relationships to other events (patterns of events, either expected or implied).


• Events can also carry information about themselves. For example, a "purchase" event might contain the product purchased and the purchaser.


• Events can be evaluated, either based on their context, their data, or additional data that may not accompany the event but is relevant (for example,
  is the purchaser a gold customer?).


• Events form patterns in time and/or sequence that may be interesting. For example, a change of address followed by the reporting of a lost ATM
  card may indicate an attempt to profit from identity theft.


• Events comprise ad hoc processes, a sequence of activities that results in the execution of a process. For example, a revenue recognition process
  may be composed of the events "contract signing," "purchase order received," and "product shipped." An explicitly defined process automated using
  events is called an Event Flow.


• Events may be abstracted into other events. For example, a change of address event followed by the reporting of a lost ATM card event may be
  represented by the compound event "Attempted Fraud."


• Events can optionally generate responses, or actions. For example, an "Attempted Fraud" event may trigger, in some cases, a "Put Account on
  Referral" action to make sure downstream account activity is legitimate.

Contenu connexe

En vedette

Gas Hydrates - Big Potential with Uncertain Future
Gas Hydrates - Big Potential with Uncertain FutureGas Hydrates - Big Potential with Uncertain Future
Gas Hydrates - Big Potential with Uncertain Futureml285
 
1949-2015 בחירות
 1949-2015 בחירות 1949-2015 בחירות
1949-2015 בחירותAnochi.com.
 
bmxを普及させるための方法 ー
bmxを普及させるための方法 ーbmxを普及させるための方法 ー
bmxを普及させるための方法 ーrhmnsjkkk29
 
Digital marketing and Employee Advocacy
Digital marketing and Employee AdvocacyDigital marketing and Employee Advocacy
Digital marketing and Employee AdvocacyRay Hiltz
 
Trabajo de tic (conte)
Trabajo de tic (conte)Trabajo de tic (conte)
Trabajo de tic (conte)lautaro
 
150309 cotton open letter to iranian leaders
150309 cotton open letter to iranian leaders150309 cotton open letter to iranian leaders
150309 cotton open letter to iranian leadersAnochi.com.
 
Bmw vision (1)
Bmw vision (1)Bmw vision (1)
Bmw vision (1)rogerfacil
 
Social Media Breakfast Montreal Talking Points
Social Media Breakfast Montreal Talking PointsSocial Media Breakfast Montreal Talking Points
Social Media Breakfast Montreal Talking PointsRay Hiltz
 

En vedette (14)

Gas Hydrates - Big Potential with Uncertain Future
Gas Hydrates - Big Potential with Uncertain FutureGas Hydrates - Big Potential with Uncertain Future
Gas Hydrates - Big Potential with Uncertain Future
 
Susan alex july
Susan alex julySusan alex july
Susan alex july
 
1949-2015 בחירות
 1949-2015 בחירות 1949-2015 בחירות
1949-2015 בחירות
 
Sean f commercev2
Sean f commercev2Sean f commercev2
Sean f commercev2
 
bmxを普及させるための方法 ー
bmxを普及させるための方法 ーbmxを普及させるための方法 ー
bmxを普及させるための方法 ー
 
2 feed black box to forecast hazard Analysis Critical Control Points
2 feed black box to forecast hazard Analysis Critical Control Points2 feed black box to forecast hazard Analysis Critical Control Points
2 feed black box to forecast hazard Analysis Critical Control Points
 
Digital marketing and Employee Advocacy
Digital marketing and Employee AdvocacyDigital marketing and Employee Advocacy
Digital marketing and Employee Advocacy
 
Trabajo de tic (conte)
Trabajo de tic (conte)Trabajo de tic (conte)
Trabajo de tic (conte)
 
150309 cotton open letter to iranian leaders
150309 cotton open letter to iranian leaders150309 cotton open letter to iranian leaders
150309 cotton open letter to iranian leaders
 
Joe & The Museum of London
Joe & The Museum of LondonJoe & The Museum of London
Joe & The Museum of London
 
Bmw vision (1)
Bmw vision (1)Bmw vision (1)
Bmw vision (1)
 
Social Media Breakfast Montreal Talking Points
Social Media Breakfast Montreal Talking PointsSocial Media Breakfast Montreal Talking Points
Social Media Breakfast Montreal Talking Points
 
Company meeting aimee
Company meeting aimeeCompany meeting aimee
Company meeting aimee
 
Water Outlook 2030
Water Outlook 2030Water Outlook 2030
Water Outlook 2030
 

Dernier

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Microsoft StreamInsight Capital Market Solutions

  • 2. Agenda 2 StreamInsight: A Capital Markets Tale About Lab49 (Very Brief) Overview Of Microsoft StreamInsight Complex Event Processing (CEP) Capital Markets StreamInsight Solutions • Market Strategy Engine • Market Real-Time Risk (RTR) - SQL Server 2008 R2 • Market Real-Time Risk - Windows AppFabric Caching (Velocity) Lessons Learnt
  • 4. Lab49 4 About Us We create advanced solutions for the We combine the skills of our practices to financial services industry through strategic deliver innovation: and technical consulting: • Strategy group • Working with the world’s largest investment • User Experience practice banks, hedge funds and exchanges. • Development practices • Designing and delivering some of the most alongside the adoption of some key tenets: sophisticated and forward thinking financial applications. • Domain Driven Development • Applying user-centred principles to the world of • Lean Agile Process bespoke software. Our History • From concept to complete, ui to server. Lab49 was founded in 2002 and now comprises approximately 200 people, with offices in New York and London.
  • 5. 5 About Us Matt Davey Part of the TAP program since July 2009 Requester for various StreamInsight V1 features: • Count Window • Dynamic Query Composition at Runtime
  • 6. Overview Of Microsoft StreamInsight Complex Event Processing (CEP)
  • 7. CEP in Finance 7 CEP in Finance • Banks are using CEP for feeding data into algorithmic trading systems as well as for finding dealing opportunities and trading pairs across asset class. • Risk monitoring, fraud detection and surveillance are also growth areas for CEP
  • 8. StreamInsight Features 8 StreamInsight Features • Process large volumes of events across multiple data streams in < 1 second • Provides built-in support for different event types and rich query semantics • Reduces development cost by utilising existing skill sets and investment in Microsoft development platform • Flexible deployment options
  • 9. StreamInsight (CEP) Application at Runtime CEP Engine Event Standing Queries Event Event Event Input Output Event Adapters Adapters 9 StreamInsight Event Event Event Event
  • 10. 10 Market Strategy Engine StreamInsight Deployment
  • 13. Markets are Changing 13 Market Strategy Engine • Markets are becoming more complex • StreamInsight offers a cleaner way to process events in this complex world • Algorithmic trading has become mainstream • StreamInsight enhances the cleansing/validation of market data, order execution/management, pricing engines and more • Speed and latency are critical to maximising profitability • StreamInsight’s leverages the Microsoft development platform to improve speed of development coupled with Microsoft’s commitment to “Process large volumes of events across multiple data streams” in “low latency” • Back testing in the search for new strategies • StreamInsight’s adapter architecture allows easy access to historical market data repositories e.g. kdb+
  • 14. The Problem - Butterfly Strategy 14 Market Strategy Engine Leg Buy/Sell Working Leg Price Weight Size Weighting Bobl Buy Yes 1 1 Bund Sell No -0.28 0.28 Schatz Sell No -1.19 1.19 Buy 10 Bobl 10 Fly @ -49 Sell 3 Bund Sell 12 Schatz
  • 15. StreamInsight Engine Flow 15 Market Strategy Engine (1) (3) (2)
  • 16.
  • 17. Take Aways 17 Take Aways Benefits over existing non-CEP based strategy engines • StreamInsight offers the advantage and benefits of CEP principles • Working and reasoning with Time - dealing with out of order arrivals Benefits over existing competitor CEP based strategy engines • LINQ/.NET implementation • Easy integration to other Microsoft products • Lower total cost of ownership
  • 18. Market Real-Time Risk: SQL Server 2008
  • 19. Market Risk 19 Market Risk Market risk is the risk that the value of a portfolio, either an investment portfolio or a trading portfolio, will decrease due to the change in value of the market risk factors
  • 20. Why The Need For Real-Time Risk (RTR)? 20 Why The Need For Real-Time Risk (RTR)? Investment banks need to hedge their positions Latency T-1 and warehousing - PnL Explain Servers are cheaper and faster than workstations Improved Aggregation and drill-down
  • 21. High Level Architecture 21 High Level Architecture Streaminsight F# Agent Market Depth Strategy Strategy Definition LINQ Orders Agent Agent (F#) Market Agent (F#) Agent (F#) LINQ Leg Orders Trade LINQ Cancel Aggregation Shocking Curve Engine Market Risk HPC (GPU?)
  • 22. Aggregation Engine Architecture 22 Aggregation Engine Architecture Static Data Microsoft StreamInsight Position Database Microsoft Analysis Input Output SQL Adapter Adapter Server 2008 R2 Services LINQ Risk Real-Time OLAP Input Push Output Cube Adapter Adapter XMLA Server Client Excel
  • 23. RTR Highlights 23 RTR Highlights • StreamInsight process Risk data, feeding SQL Server 2008 R2 • StreamInsight provides the XMLA service with real-time push notifications - e.g. portfolio ID’s • “XMLA” Server sits between the client and SQL Server intercepting client requests, and providing “push” services (smart polling, subscription manager)
  • 25. Take Aways 25 Take Aways Compared To Other Solutions • The Microsoft solution offers a modularised real-time risk solution that is customisable • It’s a complete Microsoft (.NET) stack • Leveraging SQL Server 2008 R2 Analysis Services - (ROLAP for T, and MOLAP T-x) Performance • We can improve further by adding another Microsoft product......
  • 26. Market Real-Time Risk: Windows AppFabric Caching (Velocity)
  • 27. Velocity RTR Architecture 27 Velocity RTR Architecture Static Risk Warehousing Data Microsoft StreamInsight Position Database SQL Microsoft Analysis Input Output Adapter Adapter Server 2008 R2 Services LINQ Risk Real-Time Input Push Output OLAP Adapter Adapter Cube Windows Server XMLA Server AppFabric XMLA Server Caching (Velocity) Client Excel
  • 28. Database vs Cache 28 Database vs Cache Database Cache Notification Notification Service deprecated in SQL Server 2008 Windows AppFabric Cache Notification OLAP Cube Analysis Service Custom build of an in-memory cube Scalability Out the box partitioning, hot-hot support Distributed Cache
  • 29.
  • 30. Take Aways 30 Take Aways Compared To Other Solutions • The Microsoft solution offers a modularised real-time risk solution that is customisable • It’s a complete Microsoft (.NET) stack • Best of both worlds • SQL Server - backup, warehousing (ROLAP for T, and MOLAP T-x) • Distributed Cache - performance
  • 32. Lessons Learnt 32 Lessons Learnt Business • StreamInsight improves the delivery timeline of business solutions Technology • CTI and AdvancedTimeImportSetting • V1 Ugly Code Issues • Nested classes • Static UDF • UDF’s offer lots of extensibility • Reactive Framework (Rx) usage • .NET 4 Not currently supported
  • 33. thank you for your time… any questions? matt davey (matt.davey@lab49.com) mdavey.wordpress.com | Tales from a trading desk
  • 34. Principles of CEP 34 Principles of CEP • Events are technology-neutral occurrences of interest, such as a new purchase, a change of address, or an attempt to break into a network. Events can come from people, devices, applications, networks, or databases. • Events have context, that is, an instance of an event implies timing (when it happened, both in absolute terms and relative to other events), sequence (again relative to other events), and linking relationships to other events (patterns of events, either expected or implied). • Events can also carry information about themselves. For example, a "purchase" event might contain the product purchased and the purchaser. • Events can be evaluated, either based on their context, their data, or additional data that may not accompany the event but is relevant (for example, is the purchaser a gold customer?). • Events form patterns in time and/or sequence that may be interesting. For example, a change of address followed by the reporting of a lost ATM card may indicate an attempt to profit from identity theft. • Events comprise ad hoc processes, a sequence of activities that results in the execution of a process. For example, a revenue recognition process may be composed of the events "contract signing," "purchase order received," and "product shipped." An explicitly defined process automated using events is called an Event Flow. • Events may be abstracted into other events. For example, a change of address event followed by the reporting of a lost ATM card event may be represented by the compound event "Attempted Fraud." • Events can optionally generate responses, or actions. For example, an "Attempted Fraud" event may trigger, in some cases, a "Put Account on Referral" action to make sure downstream account activity is legitimate.

Notes de l'éditeur