A customer case study in the use of F# has been made available on www.microsoft.com. Enjoy!
P.S. The company in question has a policy of anonymity, a common restriction in this sector.
Financial Services Firm
Banking Firm Uses Functional Language to Speed Development by 50 Percent
A large financial services firm in Europe sought new development tools that could cut costs, boost productivity, and improve the quality of its mathematical models. To address its needs, the bank deployed Microsoft F#, the Microsoft .NET Framework, and Microsoft Visual Studio. It will soon upgrade to Visual Studio 2010 and the integrated Microsoft Visual F#. With its new tools, the bank can speed development by 50 percent or more, improve quality, and reduce costs.
A large European financial services organization develops and maintains mathematical models to manage derivatives trading and analyze investment portfolios. Built with sophisticated algorithms, each model must be highly precise and reliable so that traders can provide quality information to internal and external customers. Employees access the models either through Microsoft Office Excel 2003 spreadsheet software or through custom applications. Because the models are extremely compute-intensive, they run in proprietary frameworks on the desktop and on a remote cluster of servers that includes hundreds of systems.
Mathematical models are created by both developers and mathematicians who are not professional software developers. For the past 15 years, modelers used the C++ programming language, Microsoft Component Object Model (COM) technology, and Office Excel 2003 for their projects. To meet changing requirements, the organization sought new, easy-to-use tools that could streamline the development of models and reduce costs.
Although they were powerful, models created with C++ took longer to develop than desired and required significant investments to ensure accuracy. In some cases, modelers used Office Excel 2003 for their projects to expedite development. However, modelers could not reuse the calculations from spreadsheets and this slowed overall productivity. In addition, the proprietary frameworks required ongoing maintenance, which increased long-term project costs. The frameworks also slowed development because few employees knew how to use the proprietary debugging tools.
After evaluating numerous technologies including C#, the firm decided to use the Microsoft F# programming language for the creation of all new models. As a functional language, F# provides features that simplify development, reduce errors, and are easy for professional developers and domain experts—such as mathematicians—to use. For example, F# makes use of immutable objects (that cannot be modified once they are constructed) to provide a foundation for building flexible, composable models. “What we get in Microsoft F# is a really compelling combination of factors,” says a director at the firm. “The type system is very strong so it can be used to express constraints that cannot be expressed in other languages. The code is also very concise. You build small units of functionality and combine them to create a model.”
Microsoft F# also interoperates with the Microsoft .NET Framework. As a result, developers can take advantage of .NET Framework tools such as Windows Presentation Foundation to create interfaces. Interoperability between the .NET Framework and COM technology also means that the firm can use existing models along with new models built more efficiently with the new capabilities in F# and the Microsoft Visual Studio development system.
In December 2007, the firm created a proof of concept with Microsoft F#, the .NET Framework, and Microsoft Visual Studio 2008 Professional Edition. By June 2008, about 60 employees were using the new solution. Since then, teams have used the development environment to deliver a suite of 200 product-valuation models.
At the end of 2009, three software developers at the firm began to use a beta version of Microsoft Visual Studio 2010 Ultimate to test and remediate the firm’s existing code base. Impressed with the new tools in Visual Studio 2010, development teams will use it in production shortly after the product launches in April 2010. Visual Studio 2010 includes an integrated and fully supported version of F# with the first release of the Microsoft Visual F# development tool. In addition, Visual Studio 2010 offers new features that boost efficiency, such as multi-targeting. With this feature, the firm can continue targeting the Microsoft .NET Framework 3.5, which is already widely deployed, as well as future versions of the .NET Framework.
With its new Visual Studio development solution, the firm can accelerate development by 50 percent, minimize errors, boost reliability, and cut costs.
Speeds Development by at Least 50 Percent
Today, modelers can build more robust code more quickly than they could before. “We could not have developed 200 models in two years without F# and Visual Studio,” says the director. “It would have taken us at least twice as long with our previous tools.” The solution streamlines development in numerous ways. “With a functional language like F#, we can create simple, compositional code, and so we naturally see a high degree of code reuse,” he explains. “Immutable data structures and functional idioms also create more reliable code and parallelizable structures.”
Reduces the Number of Errors and Shortens Debugging
Today, teams can create code with fewer errors. “With F#, we can create very concise models that we don’t think we could have built with C#,” says the director. “The static typing and type inference in F# prevents numerous errors even before you compile code. When you’re editing F# code in Visual Studio, you instantly see if something is wrong because errors are highlighted with a red line.” Debugging also takes less time. “We no longer have to deal with bottlenecks because only a few people can use the proprietary debugging tools,” he says.
Cuts Costs and Improves Quality
Shorter development cycles and early bug detection translate into reduced costs. In addition, multi-targeting and compatibility with previous technologies means that the organization can avoid rebuilding some existing models. “With F#, we can call COM code transparently as if it were .NET code,” says the director. The firm also saves money, minimizes development efforts, and boosts quality by using the .NET Framework rather than proprietary frameworks. “We have built more robust and reliable products with F# than we have with any of our previous tools,” he explains. “Without it, we would not have been able to build some of the projects that we have, in a reasonable period of time or at a reasonable cost.”