Serving the Quantitative Finance Community

 
User avatar
dowjones123
Topic Author
Posts: 0
Joined: March 19th, 2008, 10:31 am

Cash Flow modelling and aggregation

January 9th, 2013, 4:18 pm

I am trying to model the following:30 different bonds, each with different tenor, frequency of payment, fixed coupon rate (all bullet and fixed bonds as of now, no amortization)Participant A buys these bonds, and gets repos on some of these bonds (frequency of repo leg and coupon to be specified, repo is not under margining)Several CDS transactions, also not under margining, If A has all these in a portfolio, and I want to find out month-by -month cash flows for A, and I should be able to categorise and do pivot-table kind of stuff (cash flow in next 6 months, from Repo of bond #1-10 only, etc kind of analysis)What is the best way to do this1) I have thought of doing it in excel- but maybe cumbersome. The bucketing, etc features would be easier in excel maybe2 ) writing VBA code3) writing C++ code and interfacing it with excelI think finally I would want to use excel for input and output , even if the intermediate processing be in C++ or VBAThis is not a pricing exercise, simply projecting the cash flows (we can assume a given forward curve if any LIBORs are needed) and bucketing them, seeing cash flow shortfalls, etcThanks for the advice in advance.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Cash Flow modelling and aggregation

January 10th, 2013, 7:39 am

4) Use C# in combination with Excel DNAThis solution improves productivity (sometimes > 3) in a big way compared to 3), which for this type of problem I would not do any more.And it should be possible to parallelise the C# code using TPL and PLINQ libraries. QuoteIf A has all these in a portfolio, and I want to find out month-by -month cash flows for A, and I should be able to categorise and do pivot-table kind of stuff (cash flow in next 6 months, from Repo of bond #1-10 only, etc kind of analysis)This kind of scenario analysis is a perfect candidate for (P)LINQ imo. And it has coupling to ADO.NET that might be useful if you have data stored in SQL databases. http://code.msdn.microsoft.com/101-LINQ ... samplepack http://code.google.com/p/linqtoexcel/I personally would not like to handcraft all this stuff in C++ .. it would take forever.
Last edited by Cuchulainn on January 9th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
dowjones123
Topic Author
Posts: 0
Joined: March 19th, 2008, 10:31 am

Cash Flow modelling and aggregation

January 10th, 2013, 3:30 pm

Thanks, I am wondering if there is an already existing library for this. Quantlib maybe?I have never used Visual studio or Linq or C# and I think learning the environment would take up some amount of time, while I won't be re-using that learning again I think (this is just a one of project)I am fairly conversant with C++ and VBA