Cover Page

The Wiley Finance series contains books written specifically for finance and investment professionals as well as sophisticated individual investors and their financial advisors. Book topics range from portfolio management to e-commerce, risk management, financial engineering, valuation and financial instrument analysis, as well as much more. For a list of available titles, visit our website at www.WileyFinance.com.

Founded in 1807, John Wiley & Sons is the oldest independent publishing company in the United States. With offices in North America, Europe, Australia and Asia, Wiley is globally committed to developing and marketing print and electronic products and services for our customers' professional and personal knowledge and understanding.

Hedge Fund Modelling and Analysis

An Object Oriented Approach Using C++



PAUL DARBYSHIRE
DAVID HAMPTON










Wiley Logo





Mum and Dad,

Whose love and support encourages me to achieve success.

– P.D.

For Marie-Christine, Juliette and Antoine.

– D.H.


Preface

This book is a practical introduction to modelling and analysing hedge funds using the C++ programming language. The structure of the book is as follows. Chapter 1 gives an overview of the C++ syntax in enough detail to approach the material covered in the technical chapters. Chapter 1 also introduces the concept of object oriented programming which allow us to build large and complex programs that can be broken down into smaller self-contained reusable code units known as classes. We will develop a series of classes throughout the book to tackle many of the problems encountered. Please note that this book is not intended to be an exhaustive exploration of C++ to solve problems in modelling and analysing hedge fund data. In addition, C++ is used to facilitate the solution of such problems through object oriented programming methods and various details highlighted as and when necessary.

Chapters 2 and 3 give an update of the current state of the global hedge fund industry and a detailed look at the primary data sources available to hedge fund managers and analysts. With this fundamental knowledge in place, Chapters 4–7 cover the more quantitative and theoretical material needed to effectively analyse a series of hedge fund returns and extract the relevant information required in order to make critical investment decisions.

C++ Source Code

Throughout the book there are numerous C++ source boxes (e.g., Source 2.4) typically listing the AClass.h, AClass.cpp, and main.cpp files and a console window showing the results of the class implementation. For example, an extract from the Optimise class is shown in Source P.1.

Source P.1: A Sample C++ Source Code

Comment blocks, such as:

// ...
// main.cpp
// ...

are used to omit parts of the source code (above and below) when new code is added to existing definitions or implementations. As we progress through the book we will gradually reduce unnecessary overuse of comments (//) within source listings once we feel confident we have clearly defined such routines and concepts in previous listings.

Please note that we do not give any warranty for completeness, nor do we guarantee that the code is error free. Any damage or loss incurred in the application of the C++ source code, algorithms and classes discussed in the book are entirely the reader's responsibility. If you notice any errors in the C++ source code, algorithms or classes, or you wish to submit some new method as a C++ function, algorithm, class, model or some improvement of the method illustrated in the book, you are very welcome.

Hypothetical Hedge Fund Data

Throughout the book there is constant reference to many monthly hedge fund return series. The 10 hedge funds are all hypothetical and have been simulated by the authors as a unique data set for demonstration purposes only. The techniques and models used in the book can therefore be tested on the hypothetical data before being applied to real-life situations by the reader. The hypothetical data is nonetheless close to what would be expected in reality. The 10 funds are a mixture of several major hedge fund strategies i.e. Commodity Trading Advisor (CTA), Long/Short Equity (LS), Global Macro (GM) and Market Neutral (MN) strategies as described in Table P.1.

Table P.1 10 Hypothetical Hedge Funds

Hedge Fund Abbreviation
Commodity Trading Advisor CTA1, CTA2, CTA3
Long Short Equity LS1, LS2, LS3
Global Macro GM1, GM2
Market Neutral MN1, MN2

All data files used throughout the book are identified in italics e.g. 10_hedge_funds.dat.

Book Website

The official website for the book is located at: www.darbyshirehampton.com

The website provides free downloads to all of the hypothetical data, C++ programs and classes, as well as many other useful resources.

The authors can be contacted on any matter relating to the book, or in a professional capacity, at the following email addresses: