Data Science in Bond Market
When we think about finance and investments, I believe that the first thought of most of the people is about stocks, stocks markets, trading and others think that we could call they more charming. In reality, the biggest market in financial assets are bonds, fixed income. The ICMA data says that in 2020 the overall size of the global bond market in terms of UDS are equivalent to, approximately $ 128.3tn (exactly, Trillions!), by comparation, the total market capitalization of all publicly traded securities was USD 93,7 tn by the end of 2020.
As the biggest market, there are a lot of space for improvement and applications for Data Science. I believe that there is a long way to this market be more fitted in algorithms. The challenges in this field rely in the fact that to build those more tech solutions the programmer must have a deep understanding of Macroeconomics, financial science, fixed income deep knowledge. I could say that the most part of this field is supported by excel and VBA.
Below there are some arguments pointed by professor David Duarte in the Computational Finance class:
Spreadsheets are an excellent tool that have proved their usefulness for decades:
Their reactive nature means everything is calculated in real-time;
Pretty intuitive to get started and produce results and graphs;
Easy data entry;
However, there are a few issues to be aware of:
Data storage, analysis and presentation are mixed into the same space, which many times leads to errors that are hard to detect;
Difficult to follow all the calculations as they are spread throughout various cells.
On the other hand, important Data Science features that spreadsheets are lacking:
Reproducibility. A data analysis needs to be reproducible;
Maintainability;
Accuracy. Numerical accuracy, correct date parsing, among others are really lacking in Excel;
Version control. For collaboration and reproducibility of previous results;
Testing. You should not trust untested code.
The idea of this post is to share an exercise delivered as evaluation for Financial Derivatives class at NOVA-IMS. The go was building a code capable to pricing bonds and interest rates, estimating cash flows, interest rate swaps, hedge positions, cap and floor for the bond.
The parameters:
Notional: EUR 1,748,653.15
Start: 19-01-2007
Maturity: 19-01-2022
Interest: Euribor 6M, half-yearly, act/360, modified following, adjusted
As final Graph we reached in the image below: