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

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

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