Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Domain-Specific Language for Financial Products Arie van Deursen May 2001.

Similar presentations


Presentation on theme: "A Domain-Specific Language for Financial Products Arie van Deursen May 2001."— Presentation transcript:

1 A Domain-Specific Language for Financial Products Arie van Deursen May 2001

2 2 Financial Products  Financial needs of large customers  Start date, short / long maturity, currency  Manage risks (opportunities)  currency / interest rates  Interest rate products:  Loan, bond, option, future, swap  Different rate expectations / risk reallocation  Interbank trade.

3 3 Deposit Cash Flows Principle Amount Flow startmaturity Interest Amount Flow startmaturity Interest Payment period

4 4 Currency Interest Rate Swap  Start date: Bank A and Bank B exchange a large principle amount.  Bank A: Currency A, fixed interest rate P.  Bank B: Currency B, floating market rate.  Interest payment intervals  Maturity: swap back principle amounts.  Valuation depends on market expectations

5 5 Staying Competitive  Banks introduce new interest rate products  Software implications:  Management information systems (risk!)  Financial administration  All sorts or reporting  Bank’s solution:  Software generation

6 6 Risla  Rente Informatie Systeem -- Language  Describe essence of interest rate products in domain-specific language  Appropriate level of abstraction  Generate necessary Cobol routines  Interface to bank’s existing systems  Started in 1990  CAP, MeesPierson, ING, CWI.

7 7 The Risla Language  Product characterized by cash flows  Object-oriented influences:  Product description ~ class  Contract ~ object  Product provides methods for access, query, registraction  Various built-in data types + operations  Based on existing Cobol library

8 8 Example Risla Data Types  cash flow:  Interval:  cf-list: [, … ]  rate-interval:  int-rate-set: [ri1, …, riN]  balance: [, …, ]  given int-rate-set, balance, and date convention, compute interest amount cash flow list. Unpleasant to express in Cobol

9 9 product LOAN declaration contract data PAMOUNT : amount % Principal Amount STARTDATE : date % Starting date MATURDATE : date % Maturity data INTRATE : int-rate % Interest rate RDMLIST := [] : cashflow-list % List of redemptions. information PAF : cashflow-list % Principal Amount Flow IAF : cashflow-list % Interest Amount Flow registration % Register one redemption. RDM(AMOUNT : amount, DATE : date) Risla Loan: Interface

10 10 local % Final Principal Amount FPA(CHFLLIST : cashflow-list) : amount % Final redemption FRDM : cashflow error checks "Wrong term dates" in case of STARTDATE >= MATURDATE "Negative amount" in case of PAMOUNT < 0.0 implementation local define FPA as IBD(CHFLLIST, -/-PAMOUNT, MATURDATE) define FRDM as Risla Loan: Internals

11 11 information define PAF as [ ] >> RDMLIST >> [FRDM] define IAF as [ >), INTRATE ), MATURDATE >] registration define RDM as error checks "Date not in interval" in case of (DATUM = MATURDATE) "Negative amount" in case of AMOUNT <= 0.0 "Amount too big" in case of FPA(RDMLIST >> [ ]) > 0.0 RDMLIST := RDMLIST >> [ ] Risla Loan: Semantics

12 12 Risla’s Generated Cobol Risla Compiler Risla Product Definition Management Info. Routines (Cobol) Registration Methods (Cobol Input Screens (CICS) Legacy Data Structures (VSAM)

13 13 Modular Risla  Different products share larger chunks:  Swap consists of two Deposits  Various loans share “principal amount construction”  Combinations of product (parts) required  Modularization constructs  Library of “Building Blocks”  “Flattener”, mapping mod. Risla to pure Risla.

14 14 Modular Risla (II)  Modularization constructs:  Uses “one”, uses “many”  export, parameterization, renaming.  Example components:  Principle amount, duration, interest computations,  Flattening:  pro: simplicity; con: code size explosion

15 15 From Risla to Cobol Modular Risla Flat Risla ASF + SDF Flat Risla COBOL C / lex yacc Cobol Library Risla Functions Risla Building Blocks

16 16 Risla Evaluation  Successful adoption  Time to market: 3 months -> 3 weeks.  100 building blocks, 50 products  Merger survivor thanks to flexibility  Problematic  Maintenance of Risla tools  Flattening code explosion

17 17 Domain-Specific Languages Benefits  Correct level of abstraction.  Self documenting  Portability  Optimizability  Testability Risks  Cost of DSL design and implementation  Education cost  Limited availability  Finding proper scope  Balance between general purpose / domspec  Loss of efficiency

18 18 In Conclusion  Risla users satisfied  Open issues  How to decrease cost of tool development and maintenance  How to find suitable domains: domain engineering


Download ppt "A Domain-Specific Language for Financial Products Arie van Deursen May 2001."

Similar presentations


Ads by Google