Javascript Menu by
World Business Strategies Logo


Register Now on our Quants Hub Website

6 Month Course Outline:

Topics Covered

  • New and advanced language features in C# 5.0.
  • Libraries and features to create flexible and robust software systems.
  • Applying C# in computational finance.
  • Functional programming and multi-paradigm design.

Benefits of Course

  • New language features in C#.
  • Being effective with C#; what to use now and what to use later.
  • Incremental build-up of topics; learn step-by-step.
  • Practical exercises and end-of-course project.


We assume that the student has a good working knowledge of C#. If you have queries on this course please do not hesitate to contact me dduffy AT

This course is suitable for quant developers and model validators.


The goal of this hands-on course is to introduce the language features in C# and apply them to computational finance. We discuss advanced topics to help the quant developer to create flexible code, frameworks and applications.

The course style and contents have the same level of detail as in Daniel J. Duffy’s courses on and

Quants Hub Programming School 6 Month Format


Lecture 1. Quick Review of C#

The goal of this lecture is to review some essential C# syntax that we assume to be known and that will be used in later lectures. Key topics are: value and reference types, boxing and unboxing, structs versus classes, properties, object initializers, and .NET arrays.

Example: Black Scholes exact solution in C#; IR options and futures examples.

Lecture 2. Interfaces, Delegates and Software Contracts

This lecture discusses advanced issues that promote the interoperability of C# applications and that are used as the building blocks for design patterns. We introduce the interface concept, how to use it and how it differs from abstract classes. We also discuss delegates in detail and its applications to plug-in methods, event notification patterns and multicasting.

The mechanisms and features in this lecture form the basis for the design and implementation of component-based software systems using interface connection architectures.

Lecture 3. C# Generics A-Z

Generics tend to receive little attention and the goal of this lecture is to show how to use generics to produce reusable and reliable code. In general, we create a generic class or function once and then use it many times by specialising the underlying generic type. We discuss generic collections, tuples, interfaces and properties in .NET as well as generic constraints. Finally, we give some examples of how to create your own generic types.

Example: One-factor PDE software framework in C#.

Lecture 4. Disposal and Garbage Collection

We discuss both explicit resource management and automatic memory management (garbage collection) in this lecture. In particular, we show how to release resources such as open files, unmanaged objects, locks and operating system handles by implementing the IDispose interface.  We also give an overview of the garbage collector in .NET and its internals. We also discuss avoiding and resolving memory leaks in .NET.

Lecture 5. Diagnostics and Code Contracts

n this lecture we discuss how to improve the robustness and reliability of C# applications. On the one hand we wish to diagnose problems that arise during development while on the other hand we wish to gather and record diagnostic information once an application has shipped. To this end, we discuss conditional compilation, debug and trace classes, Windows event logs and debugger integration.

C# also supports the Design by Contract principle as pioneered in the Eiffel language. This allows us to define powerful contract-based assertions directly in code, for example, preconditions, postconditions, assertions and object invariants. To this, we discuss the contracts runtime class Contract in detail.

Lecture 6. Reflection and Assemblies

In this lecture we introduce two related topics. First, we discuss the Reflection API that has functionality that allows us to dynamically query metadata in the Common Language Runtime (CLR). It can be used in various situations, for example code generation and examining the contents of assemblies. Second, we introduce assemblies as a mechanism for encapsulating components in secondary storage. We discuss both private and shared assemblies.

We conclude this lecture with several remarks (good practices) on designing component-based systems using a combination of interfaces, classes, reflection and assemblies.

Example: bootstrapping/interpolation assemblies.

Lecture 7. LINQ (Language Integrated Query) Fundamentals

LINQ allows developers to query any collection that implements IEnumerable , including arrays, lists, XML DOM as well as remote data sources, for example SQL Server tables. LINQ offers both compile-time checking and dynamic query composition.

This lecture discusses LINQ architecture and fundamental queries and query composition, query expressions, deferred execution and subqueries.

Example: LINQ for fixed-income applications, for example discount factors, cash flows aggregation and scenarios.

Lecture 8.  Advanced LINQ

We describe LINQ query operators in this lecture. They allow us to create complex queries and reports. In particular, we discuss standard query operators, filtering, joins and projections.  We also introduce set and aggregation methods.

Lecture 9.  Native C++ and C# Interoperability

In this lecture we give an introduction to C++/CLI (a .NET language) that allows us to integrate C# and ISO C++. This can be a useful feature when we wish to integrate legacy C++ code into .NET-based applications or when we wish to call C# code from ISO C++ code. Topics discussed are: how C++/CLI syntax is close to C# syntax, generics and templates, interoperability scenarios.

Lecture 10. Project Discussion

The main focus of the projects is to take a well-defined problem and implement the schemes using C# language features and related design patterns. Some suggestions:

  • Monte Carlo simulation software framework.

  • Curve building.

  • Risk management scenarios with LINQ.

The final project will be marked with feedback and a pass or fail will be given when you take the online course. One retake is allowed if you fail.

About the Presenter

Originator and Trainer

Daniel J. Duffy is founder of Datasim Financial. He has been using C++ since 1989 and has a PhD in Numerical Analysis from Trinity College (Dublin University).

PRMIA Certification

The Professional Risk Managers' International Association (PRMIA) is a non-profit professional association, governed by a Board of Directors directly elected by its global membership, of nearly 90,000 members worldwide. PRMIA is represented globally by over 65 chapters in major cities around the world, led by Regional Directors appointed by PRMIA's Board.

The Programming School will be fully certified by PRMIA.

CPD Certification

The CPD Certification Service was established in 1996 as the independent CPD accreditation institution operating across industry sectors to complement the CPD policies of professional and academic bodies. The CPD Certification Service provides recognised independent CPD accreditation compatible with global CPD principles.