Free .NET object cache at CodeProject.
Wonder if the code has been touch for a while, or whether anyone is using this cache...
©2006 Marc Adler - All Rights Reserved
Saturday, October 21, 2006
Concurrency, Joe Duffy and Wall Street
Joe Duffy is soliciting ideas for a new book on concurrency.
Joe's name comes up a lot my talks with Microsoft team that supports me. He and Rico Mariani are two resources from Redmond that I would love to get on an advisory basis. My vision is that they would help us out with optimal .Net architectures for low-latency, high-performance systems.
The elephant in the room that everyone is worried about is the projected Opra feeds of 456,000 messages per second. As I am the Global Architect for Equity Derivatives for one of the largest investment banks in the world, this is something that I am responsible for. As such,the things I need for our stack include high-speed market data feeds with caching and conflation, complex event processing, hardware acceleration, object caches, threading models, efficient GUIs and client-side frameworks, hardware acceleration, super-tight code generation, efficient messaging between components, (and did I mention hardware acceleration?).
From a concurrency point of view, I would like to know what Microsoft considers to be best practices to implement quasi-real-time data processing. Also, what anti-patterns exist and what to avoid in the .Net framework. How to use PerfMon and other third-party performance tools to get the most out of my systems. Coding rules that maximize performance. Things that Microsoft will be releasing (or thinking about) five years down the road.
And, for my own selfish reasons, I would love to see Joe implement a trading system to test out his ideas!
©2006 Marc Adler - All Rights Reserved
Joe's name comes up a lot my talks with Microsoft team that supports me. He and Rico Mariani are two resources from Redmond that I would love to get on an advisory basis. My vision is that they would help us out with optimal .Net architectures for low-latency, high-performance systems.
The elephant in the room that everyone is worried about is the projected Opra feeds of 456,000 messages per second. As I am the Global Architect for Equity Derivatives for one of the largest investment banks in the world, this is something that I am responsible for. As such,the things I need for our stack include high-speed market data feeds with caching and conflation, complex event processing, hardware acceleration, object caches, threading models, efficient GUIs and client-side frameworks, hardware acceleration, super-tight code generation, efficient messaging between components, (and did I mention hardware acceleration?).
From a concurrency point of view, I would like to know what Microsoft considers to be best practices to implement quasi-real-time data processing. Also, what anti-patterns exist and what to avoid in the .Net framework. How to use PerfMon and other third-party performance tools to get the most out of my systems. Coding rules that maximize performance. Things that Microsoft will be releasing (or thinking about) five years down the road.
And, for my own selfish reasons, I would love to see Joe implement a trading system to test out his ideas!
©2006 Marc Adler - All Rights Reserved
Friday, October 20, 2006
Financial Systems Books
I just got the new Third Edition of the classic After the Trade is Made. At a first glance, it looks like they have fattened up the book a bunch, and added a chapter on trading systems. I will report later on the quality of this chapter if I can get a block of free time to read it.
A decent companion to this book is Practical .Net for Financial Markets. I ordered this book after reading my colleague Ted's glowing review of the book on Amazon. I have to admit that, for me, the book was a bit on the disappointing side. The book has a little bit of everything ... a simple crossing engine, some messaging (designed to illustrate how STP works), some encryption, some good example of networking, etc.
However, what seems to be missing from the marketplace is a great book that deals with the entire spectrum of financial instruments from a developer's point of view. Something that will not only discuss the business domain and underlying technology, but will also point to real products that implement the various systems. A deep dive for the developer to become completly immersed in Wall Street systems.
For example, let's take Equities. From a systems standpoint, I want to know what goes on from the time that a trade is entered until someone receives confirmation through snailmail. I want to know what an order entry system does, how trades are routed to the exchanges, how FIX messaging is used, how crossing engines and auto-execution engines work, how stat arb and algorithmic trading factors in, how market-making functions, how settlment is done, how positions are maintained and how P&L are calculated, how market data gets into a system, how risk is calculated, etc. I want to know how systems and vendors like Bloomberg, Fidessa, Reuters, Wombat, Vhayu, etc fit into this space.
In addition, I would like to see topics that are tangental in nature, but geared towards the financial systems developer. How to develop low-latency systems. How to write UI's with fast-updating grids of market data. How to use complex event processing to implement stat arb trading. How to do order routing efficiently using rules engines.
I want a complete end-to-end picture. I want FinancialSystemsPedia.
My former colleague Matt was thinking about writing this kind of book several years ago. I think that there is a real need for this kind of knowledge to be put on paper.
©2006 Marc Adler - All Rights Reserved
A decent companion to this book is Practical .Net for Financial Markets. I ordered this book after reading my colleague Ted's glowing review of the book on Amazon. I have to admit that, for me, the book was a bit on the disappointing side. The book has a little bit of everything ... a simple crossing engine, some messaging (designed to illustrate how STP works), some encryption, some good example of networking, etc.
However, what seems to be missing from the marketplace is a great book that deals with the entire spectrum of financial instruments from a developer's point of view. Something that will not only discuss the business domain and underlying technology, but will also point to real products that implement the various systems. A deep dive for the developer to become completly immersed in Wall Street systems.
For example, let's take Equities. From a systems standpoint, I want to know what goes on from the time that a trade is entered until someone receives confirmation through snailmail. I want to know what an order entry system does, how trades are routed to the exchanges, how FIX messaging is used, how crossing engines and auto-execution engines work, how stat arb and algorithmic trading factors in, how market-making functions, how settlment is done, how positions are maintained and how P&L are calculated, how market data gets into a system, how risk is calculated, etc. I want to know how systems and vendors like Bloomberg, Fidessa, Reuters, Wombat, Vhayu, etc fit into this space.
In addition, I would like to see topics that are tangental in nature, but geared towards the financial systems developer. How to develop low-latency systems. How to write UI's with fast-updating grids of market data. How to use complex event processing to implement stat arb trading. How to do order routing efficiently using rules engines.
I want a complete end-to-end picture. I want FinancialSystemsPedia.
My former colleague Matt was thinking about writing this kind of book several years ago. I think that there is a real need for this kind of knowledge to be put on paper.
©2006 Marc Adler - All Rights Reserved
Thursday, October 19, 2006
Good Luck to Matt Devlin
One of our favorite poachers, Matt Devlin, has just left Finetix to strike out on his own.
Good luck Matt (but stay away from my team!). Poaching is one of the toughest jobs on The Street, especially when it is so close to bonus season.
©2006 Marc Adler - All Rights Reserved
Good luck Matt (but stay away from my team!). Poaching is one of the toughest jobs on The Street, especially when it is so close to bonus season.
©2006 Marc Adler - All Rights Reserved
Tuesday, October 17, 2006
Shortage of Indian Engineers
From today's New York Times:
As its technology companies soar to the outsourcing skies, India is bumping up against an improbable challenge. In a country once regarded as a bottomless well of low-cost, ready-to-work, English-speaking engineers, a shortage looms.
India still produces plenty of engineers, nearly 400,000 a year at last count. But their competence has become the issue.
...found only one in four engineering graduates to be employable. The rest were deficient in the required technical skills, fluency in English or ability to work in a team or deliver basic oral presentations.
©2006 Marc Adler - All Rights Reserved
As its technology companies soar to the outsourcing skies, India is bumping up against an improbable challenge. In a country once regarded as a bottomless well of low-cost, ready-to-work, English-speaking engineers, a shortage looms.
India still produces plenty of engineers, nearly 400,000 a year at last count. But their competence has become the issue.
...found only one in four engineering graduates to be employable. The rest were deficient in the required technical skills, fluency in English or ability to work in a team or deliver basic oral presentations.
©2006 Marc Adler - All Rights Reserved
Monday, October 16, 2006
.NET/C# Trading System
Amazing Aeronautical Charts Site
http://skyvector.com/
If you are a real pilot or a virtual one, then this is the site you want to go to in order to see charts.
©2006 Marc Adler - All Rights Reserved
If you are a real pilot or a virtual one, then this is the site you want to go to in order to see charts.
©2006 Marc Adler - All Rights Reserved
Sunday, October 15, 2006
Wall Street meets Hollywood
From the New York Times article here.
Hedge funds and Wall Street investment banks are plowing money into Hollywood films, paying producers like Joel Silver and Ivan Reitman to produce hits.
I guess that we have to write a market data source that monitors the turnstiles of each of the movies that we invest in. Craig, can you come up with a feed handler in a week?
(I wonder how we will hedge this .... Long Ivan Reitman and short Delta House?)
©2006 Marc Adler - All Rights Reserved
Hedge funds and Wall Street investment banks are plowing money into Hollywood films, paying producers like Joel Silver and Ivan Reitman to produce hits.
I guess that we have to write a market data source that monitors the turnstiles of each of the movies that we invest in. Craig, can you come up with a feed handler in a week?
(I wonder how we will hedge this .... Long Ivan Reitman and short Delta House?)
©2006 Marc Adler - All Rights Reserved
Wanted: Easy way to set multiple breakpoints in VS 2005
I am tracing through some legacy code where a certain class has about 20 different constructors. I would like some way where I can tell VS.NET 2005 to set a breakpoint on each of the constructors.
Likewise, given the name of a method, I would like a way to set a breakpoint at the entry to all of the variants of the method. For instance, if I have a method called GetValue(), and we have a large number of polymophic methods such as
void GetValue(ref bool b)
void GetValue(ref int i)
void GetValue(ref double d)
void GetValue(ref string s)
there should be a way to set a breakpoint at the entry point to each one the GetValue() methods with one one right-click of the mouse.
Sounds like a possible enhancement for Resharper? Or maybe, someone has written a VS macro to do this?
©2006 Marc Adler - All Rights Reserved
Likewise, given the name of a method, I would like a way to set a breakpoint at the entry to all of the variants of the method. For instance, if I have a method called GetValue(), and we have a large number of polymophic methods such as
void GetValue(ref bool b)
void GetValue(ref int i)
void GetValue(ref double d)
void GetValue(ref string s)
there should be a way to set a breakpoint at the entry point to each one the GetValue() methods with one one right-click of the mouse.
Sounds like a possible enhancement for Resharper? Or maybe, someone has written a VS macro to do this?
©2006 Marc Adler - All Rights Reserved
Sunday, October 08, 2006
Fall Foliage

I flew up to Bennington, Vermont yesterday. The fall foliage is absolutely magnificent. There is no place in the United States like Vermont.
It's about a 1-1/4 hour flight from Morristown (MMU) Airport to Stephen Morse Airport in Bennington. Fly over the Catskills to Albany, then make a right turn at the 083 radial of the Albany VOR. It's about another 10 minutes.
©2006 Marc Adler - All Rights Reserved
Saturday, October 07, 2006
What are you doing with your MFC Apps?
An awful lot of IBs still have a lot of front ends written in Microsoft Foundation Classes (MFC).
1) Are you considering MFC to be an end-of-life product?
2) What are your plans for migrating the front ends to other frameworks? Are you going to .NET/C#, .NET/C++, or Java?
3) How will you be doing the migration? Are you devoting a year's worth of time to rewritting the app from scratch? And, while you are doing that, will you be refactoring all of the business logic that you wished that you ha not embedded in the GUI into a new middle tier?
4) Are you going straight for Vista/WPF for your rewrite?
5) Do you wish that Microsoft had a strategy for upgrading your massive MFC codebase to .NET?
Update: John responds here
©2006 Marc Adler - All Rights Reserved
1) Are you considering MFC to be an end-of-life product?
2) What are your plans for migrating the front ends to other frameworks? Are you going to .NET/C#, .NET/C++, or Java?
3) How will you be doing the migration? Are you devoting a year's worth of time to rewritting the app from scratch? And, while you are doing that, will you be refactoring all of the business logic that you wished that you ha not embedded in the GUI into a new middle tier?
4) Are you going straight for Vista/WPF for your rewrite?
5) Do you wish that Microsoft had a strategy for upgrading your massive MFC codebase to .NET?
Update: John responds here
©2006 Marc Adler - All Rights Reserved
Microsoft ESB News
http://www.intelligententerprise.com/showArticle.jhtml?articleID=193104592
©2006 Marc Adler - All Rights Reserved
©2006 Marc Adler - All Rights Reserved
Thursday, October 05, 2006
Sungard's Grid for Analytics
It was brought to my attention today that Sungard has Adaptiv Analytics, a calculation framework that is grid enabled. The marketing literature says that it has pricing and risk simulations right out of the box.
What might be attractive about this is :
1) Sungard has a long history of dealing with financial companies
2) The product seems to be tuned for a specific vertical industry and a specific purpose .... to speed up pricing and risk.
3) They claim to be based totally on .NET !!!!!!!!!!
Anybody using this thing yet? Wonder what the other grid vendors have to say about this?
©2006 Marc Adler - All Rights Reserved
What might be attractive about this is :
1) Sungard has a long history of dealing with financial companies
2) The product seems to be tuned for a specific vertical industry and a specific purpose .... to speed up pricing and risk.
3) They claim to be based totally on .NET !!!!!!!!!!
Anybody using this thing yet? Wonder what the other grid vendors have to say about this?
©2006 Marc Adler - All Rights Reserved
Thanks, Mark Pollack
The co-head of the Spring.Net consortium gave very generously of his time and gave a 2-hour lecture on Spring to my company. There are interesting things coming down the pike for Spring.Net, especially along the areas of messaging.
An ex-colleague of mine was developing a GUI framework for Spring.Net, but now that he is gainfully employed by a major IB, I wonder what will become of that effort. I thought that it could give CAB some real competition. Matt is also delving deep into the CAB world. Wonder if he will take over the framework.
©2006 Marc Adler - All Rights Reserved
An ex-colleague of mine was developing a GUI framework for Spring.Net, but now that he is gainfully employed by a major IB, I wonder what will become of that effort. I thought that it could give CAB some real competition. Matt is also delving deep into the CAB world. Wonder if he will take over the framework.
©2006 Marc Adler - All Rights Reserved
Monday, October 02, 2006
Newest Joshi Paper
Thanks to Mark Joshi for pointing out that he has an updated version of his paper on "A Day in the Life of a Quant".
http://www.markjoshi.com/downloads/advice.pdf
Now maybe I'll be able to talk to Ryan! (Inside joke)
©2006 Marc Adler - All Rights Reserved
http://www.markjoshi.com/downloads/advice.pdf
Now maybe I'll be able to talk to Ryan! (Inside joke)
©2006 Marc Adler - All Rights Reserved
Thursday, September 28, 2006
IBM WebSphere Front Office for Financial Markets
Discussed here on IBM's website.
and from the press release on IBM's Haifa Research Lab (bold text is my highlighting) :
...IBM announced the availability of WebSphere Front Office for Financial Markets, a flexible, high-throughput, low-latency platform. The WebSphere Front Office platform is built on an award-winning portfolio of IBM middleware products that provide an integrated environment optimized for high-volume trading.
Several innovative technologies from the IBM Research Lab in Haifa enabled the platform's performance characteristics and the high availability support including detection, notification and recovery.
"This is IBM's first appearance in the financial front office space for stock exchanges and large institutional customers, which is characterized by extreme data rates measured in hundreds thousands messages per second, and by sub-millisecond delivery latency requirements."
The Reliable Multicast Messaging (RMM) technology and TurboFlow technologies have enabled IBM to address these performance goals and to build an infrastructure that supports the extremely challenging demands of front office financial customers. In addition to high throughput and low latency, RMM is characterized by significant scalability that allows the delivery of financial information to multiple traders at the same time.
Combined with the ITRA (Inter-Tier. Relationship architecture) technology it allows for subsecond data stream failover.
Considering that OPRA (options) data is forcasted to be coming in at 456,000 messages per second, it would be interesting to see if this new product could handle it.
An article in the Inside Market Data newsletter make specific mention of competition against Reuters and Wombat.
©2006 Marc Adler - All Rights Reserved
and from the press release on IBM's Haifa Research Lab (bold text is my highlighting) :
...IBM announced the availability of WebSphere Front Office for Financial Markets, a flexible, high-throughput, low-latency platform. The WebSphere Front Office platform is built on an award-winning portfolio of IBM middleware products that provide an integrated environment optimized for high-volume trading.
Several innovative technologies from the IBM Research Lab in Haifa enabled the platform's performance characteristics and the high availability support including detection, notification and recovery.
"This is IBM's first appearance in the financial front office space for stock exchanges and large institutional customers, which is characterized by extreme data rates measured in hundreds thousands messages per second, and by sub-millisecond delivery latency requirements."
The Reliable Multicast Messaging (RMM) technology and TurboFlow technologies have enabled IBM to address these performance goals and to build an infrastructure that supports the extremely challenging demands of front office financial customers. In addition to high throughput and low latency, RMM is characterized by significant scalability that allows the delivery of financial information to multiple traders at the same time.
Combined with the ITRA (Inter-Tier. Relationship architecture) technology it allows for subsecond data stream failover.
Considering that OPRA (options) data is forcasted to be coming in at 456,000 messages per second, it would be interesting to see if this new product could handle it.
An article in the Inside Market Data newsletter make specific mention of competition against Reuters and Wombat.
©2006 Marc Adler - All Rights Reserved
Sunday, September 24, 2006
Wanted: A Data Pumping Tool
In the companies that I have been involved with in my Wall Street consulting career, it is remarkable how many systems do not have Unit Testing set up.
Concepts like Unit Testing, TDD, code metrics, etc are just starting to make their ways into development groups in IB's. However, one of the areas that has been ignored is stress and soak testing.
One of the tools that we need is what I refer to as a generic Data Pumper. This is a service that can be run to generate data of a certain shape, and pump the data into waiting applications. Some types of data that we may need to pump include quotes, executions, risk, etc.
Here are the features that I would like to see from a Data Pumper:
Playback Modes
We need to have the data replayed in certain temporal formats. We can also apply a distribution curve to the replay interval.
- Burst Mode: Play back data all at once, as fast as we can.
- Interval Mode: Play the data back at certain intervals. For example, playback 500 messages per second. We can also put some sort of distribution on the interval, so that the intervals would be the lowest at the beginning and at the end of the playback period (simulating market open and close).
- Timed Mode: This would cause playback at the exact timings that actual data was generated. In this mode, we would have to first capture real data and record the exact time that the real data was received. Then we would play back the simulated data using the timings of the real data.
Transports
We need to configure the transport mechanism which the data is delivered to the waiting application.
- Tibco RV or EMS (Right now, most IB's use Tibco for the distribution of high-frequency data)
- LBM (a Tibco competitor)
- Sockets (or SmartSockets)
- MQ or MSMQ
- CPS (Morgan Stanley)
Data Generation
- Capture actual data for several days in order to provide some reference data
- We can tag certain fields for random data generation. For example, we can vary the prices of the various instruments.
- We can generate completely random data.
Formats
XML seems to be used in many places, but you have the latency involved in deserialization. Binary Objects is fast, but necessitates a homogeneous environment.
- XML
- Tibco binary message map
- delimited strings
- binary object
- Fixed-length ASCII
- Reuters (Craig will tell me about the legality of simulating data in Reuters format)
Other Considerations
- Instead of sending data directly to the end application, we can send it to an object cache, and let the object cache handle distribution.
- We need a GUI for monitoring the transmission of data, and controls to let the user dynamically modify the timing intervals.
- We need to have probes in the target application so we can monitor its performance in real time under various loads.
Concepts like Unit Testing, TDD, code metrics, etc are just starting to make their ways into development groups in IB's. However, one of the areas that has been ignored is stress and soak testing.
One of the tools that we need is what I refer to as a generic Data Pumper. This is a service that can be run to generate data of a certain shape, and pump the data into waiting applications. Some types of data that we may need to pump include quotes, executions, risk, etc.
Here are the features that I would like to see from a Data Pumper:
Playback Modes
We need to have the data replayed in certain temporal formats. We can also apply a distribution curve to the replay interval.
- Burst Mode: Play back data all at once, as fast as we can.
- Interval Mode: Play the data back at certain intervals. For example, playback 500 messages per second. We can also put some sort of distribution on the interval, so that the intervals would be the lowest at the beginning and at the end of the playback period (simulating market open and close).
- Timed Mode: This would cause playback at the exact timings that actual data was generated. In this mode, we would have to first capture real data and record the exact time that the real data was received. Then we would play back the simulated data using the timings of the real data.
Transports
We need to configure the transport mechanism which the data is delivered to the waiting application.
- Tibco RV or EMS (Right now, most IB's use Tibco for the distribution of high-frequency data)
- LBM (a Tibco competitor)
- Sockets (or SmartSockets)
- MQ or MSMQ
- CPS (Morgan Stanley)
Data Generation
- Capture actual data for several days in order to provide some reference data
- We can tag certain fields for random data generation. For example, we can vary the prices of the various instruments.
- We can generate completely random data.
Formats
XML seems to be used in many places, but you have the latency involved in deserialization. Binary Objects is fast, but necessitates a homogeneous environment.
- XML
- Tibco binary message map
- delimited strings
- binary object
- Fixed-length ASCII
- Reuters (Craig will tell me about the legality of simulating data in Reuters format)
Other Considerations
- Instead of sending data directly to the end application, we can send it to an object cache, and let the object cache handle distribution.
- We need a GUI for monitoring the transmission of data, and controls to let the user dynamically modify the timing intervals.
- We need to have probes in the target application so we can monitor its performance in real time under various loads.
Thursday, September 21, 2006
Decode the Marketing Blurb
Here is a fun game for all of you. A certain vendor sells decision systems over a bunch of vertical industries. Here is a blurb from one of their webpages that outlines their offerings for the financial industry:
Modeling: Price and Risk Models
We model the equity market as an open, irreversible, far from equilibrium thermodynamic model subject to dynamic constraints. This approach results in a bi-linear model composed of two dynamical sub-models: price evolution and risk evolution. The price evolution sub-model represents the behavior of pricing of commodities and a market aggregate as a function of exogenous demand and control actions. The risk sub-model represents the behavior of risk as a function of exogenous uncertainty and actions. Further, the risk sub-model represents the uncertainty range of the values computed by the price evolution model.
The game here is to decode the blurb and tell me what this system does.
©2006 Marc Adler - All Rights Reserved
Modeling: Price and Risk Models
We model the equity market as an open, irreversible, far from equilibrium thermodynamic model subject to dynamic constraints. This approach results in a bi-linear model composed of two dynamical sub-models: price evolution and risk evolution. The price evolution sub-model represents the behavior of pricing of commodities and a market aggregate as a function of exogenous demand and control actions. The risk sub-model represents the behavior of risk as a function of exogenous uncertainty and actions. Further, the risk sub-model represents the uncertainty range of the values computed by the price evolution model.
The game here is to decode the blurb and tell me what this system does.
©2006 Marc Adler - All Rights Reserved
Subscribe to:
Posts (Atom)