12
Bond Pricing: Design, Implementation and Excel Interfacing
12.1 INTRODUCTION AND OBJECTIVES
In this chapter we discuss a complete application whose goal is to calculate the price and yield of various kinds of bonds. We describe how to implement a software system that realises this goal. We describe the requirements of the financial problem and we implement them in C# using object-oriented techniques such as inheritance, aggregation and composition. The system we describe in this chapter is based on the information flow from input to output. The system displays bond yield and bond price in Excel:
- Create a fixed rate bond of a given type (for example, German, French and Italian government bonds). We associate specific characteristics – such as the number of days between trade date and settlement date, coupon frequency and the algorithm to compute coupons – with the given bond. In particular, we pay attention to how accrued interest is computed. This creational process is achieved using Excel.
- Using the scheduling subsystem (containing class Schedule) we generate an array of payment dates. We create a hierarchy of Schedule classes to suit different bond models.
- We present the results in Excel; we create an Excel add-in that allows the user to enter data, call a worksheet function and then present the results in Excel. We discuss Excel add-ins in more detail in Chapters 21 and 22.
We extend and formalise this software process in Chapter 18. We assume that the reader is familiar ...
Get C# for Financial Markets now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.