For other titles in the Wiley Finance Series

please see www.wiley.com/finance

This edition first published 2015

© 2015 John Wiley & Sons, Ltd

First edition published 2009, second edition published 2012 by John Wiley & Sons, Ltd

Registered office

John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, United Kingdom

For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. It is sold on the understanding that the publisher is not engaged in rendering professional services and neither the publisher nor the author shall be liable for damages arising herefrom. If professional advice or other expert assistance is required, the services of a competent professional should be sought.

*Library of Congress Cataloging-in-Publication Data is available*

A catalogue record for this book is available from the British Library.

ISBN 978-1-119-10941-9 (hbk) ISBN 978-1-119-10943-3 (ebk)

ISBN 978-1-119-10942-6 (ebk) ISBN 978-1-119-10944-0 (ebk)

Cover design: Wiley

Cover image: © Julia Kopacheva/shutterstock

Set in 10/12pt Times by Sparks – www.sparkspublishing.com

To Sylvia, Mimsie, Stella, Cara, Eliza-Joy, Stevie, Peach, Jim, Ginnie, George and Christy

One of the key features of the first and second editions of this book was the accompanying spreadsheets that were prepared to allow the reader to gain some simple insight into some of the quantitative aspects discussed. Many of these examples have been used for training courses and have therefore evolved to be quite intuitive and user-friendly.

The spreadsheets can be downloaded freely from Jon Gregory's website, www.cvacentral.com, under the counterparty risk section. New examples may be added over time.

Spreadsheet 4.1 | Counterparty risk for a forward contract-type exposure |

Spreadsheet 6.1 | Collateral calculation including thresholds and initial margins |

Spreadsheet 7.1 | EE and PFE for a normal distribution |

Spreadsheet 7.2 | EPE and EEPE example |

Spreadsheet 7.3 | Simple example of a cross-currency swap profile |

Spreadsheet 7.4 | Simple calculation of the exposure of a CDS |

Spreadsheet 7.5 | Simple two-transaction example of netting effects |

Spreadsheet 8.1 | Joint default probability calculation |

Spreadsheet 8.2 | Calculation of “alpha” factor |

Spreadsheet 10.1 | Semi-analytical calculation of the exposure for a swap |

Spreadsheet 10.2 | Simple simulation of an interest rate swap exposure |

Spreadsheet 10.3 | Illustration of the impact of netting |

Spreadsheet 10.4 | Example marginal exposure calculation |

Spreadsheet 10.5 | Incremental exposure calculations |

Spreadsheet 10.6 | Marginal exposure calculation |

Spreadsheet 11.1 | Quantifying the impact of collateral on exposure |

Spreadsheet 12.1 | Calculating risk-neutral default probabilities |

Spreadsheet 12.2 | Impact of credit curve shape on risk-neutral default probabilities |

Spreadsheet 14.1 | Simple CVA calculation |

Spreadsheet 14.2 | Simple BCVA calculation |

Spreadsheet 15.1 | Example FVA calculation |

Spreadsheet 17.1 | Simple wrong-way risk example |

Spreadsheet 19.1 | Simple xVA calculator |

The following is a list of Appendices that contain additional mathematical detail. These Appendices can be downloaded freely from www.cvacentral.com.

Appendix 7A | Simple formula for the EE, PFE and EPE of a normal distribution |

Appendix 7B | Simple representation of exposures profiles |

Appendix 7C | Exposure profile of a cross-currency swap |

Appendix 7D | Simple netting formula |

Appendix 8A | LHP approximation and IRB formula |

Appendix 8B | Double default formula |

Appendix 8C | Standardised method |

Appendix 8D | Treatment of EAD for repo transactions |

Appendix 10A | Exposure and swaption analogy |

Appendix 10B | Comments on exposure models by asset class |

Appendix 10C | Computation of incremental and marginal exposure |

Appendix 11A | Simple formula for the impact of collateral on exposure |

Appendix 11B | Approximate ratio for uncollateralised and collateralised EPE |

Appendix 11C | Impact of initial margin on exposure |

Appendix 12A | Additional details on risk-neutral default probability calculations |

Appendix 14A | Derivation of standard CVA formula |

Appendix 14B | CVA computation details |

Appendix 14C | Approximate CVA formula |

Appendix 14D | CVA for a long option position |

Appendix 14E | Incremental CVA formula |

Appendix 14F | Bilateral CVA formula |

Appendix 17A | Simple wrong-way risk formula |

Appendix 17B | Devaluation approach for wrong-way risk |

Appendix 17C | Credit default swap with counterparty risk |

The first edition of this book focused on counterparty credit risk and was written in 2009, during the aftermath of the global financial crisis. Since then, the subject matter has necessarily broadened to give more attention to aspects such as funding, collateral and capital. It has been less than three years since the second edition was finished and again, the subject has changed dramatically. Indeed, as before, this is much more than a new edition because most of the content has been rewritten and expanded with several new chapters. I hope this will be a comprehensive reference for the subject we now generally refer to as xVA.

As with the last edition, I have saved space by putting mathematical appendices together with the accompanying spreadsheets on my personal website at www.cvacentral. com. Since many do not study this material in depth, this has proved to be a reasonable compromise for most readers.

I have also made use of a number of survey results and I am grateful to Solum Financial and Deloitte for allowing me to reproduce these results. I am also grateful to IBM and Markit who have provided calculation examples. These will all be mentioned in the text.

Finally, I would like to thank the following people for feedback on this and earlier editions of the book: Manuel Ballester, Ronnie Barnes, Raymond Cheng, Vladimir Cheremisin, Michael Clayton, Daniel Dickler, Wei-Ming Feng, Julia Fernald, Piero Foscari, Teddy Fredaigues, Dimitrios Giannoulis, Arthur Guerin, Kale Kakhiani, Henry Kwon, David Mengle, Ivan Pomarico, Hans-Werner Pfaff, Erik van Raaij, Guilherme Sanches, Neil Schofield, Florent Serre, Masum Shaikh, Ana Sousa, Richard Stratford, Carlos Sterling, Hidetoshi Tanimura, Todd Tauzer, Nick Vause, Frederic Vrins and Valter Yoshida.

Jon Gregory

May 2015

Jon Gregory is an independent expert specialising in counterparty risk and related aspects. He has worked on many aspects of credit risk in his career, being previously with Barclays Capital, BNP Paribas and Citigroup. He is a senior advisor for Solum Financial Derivatives Advisory and is a faculty member for the Certificate of Quantitative Finance (CQR).

Jon has a PhD from Cambridge University.