Git Product home page Git Product logo

convertible-bonds's Introduction

Team

This repository contains the code for the project on Convertible Bonds of the FIN-404 Derivatives course. The team is composed of

  • Santiago Gallego
  • Hilda Abigél Horváth
  • Benedek Harsányi

Dependencies

The project was written with Python 3.8. We used external libraries matplotlib, numpy and statsmodels to generate plots, vectorize some calculations and to perform a linear regression for the model calibration.

Reproducing Results

In order to reproduce our results for the Analysis (Part 5) one should just run python3 run.py. This calls the main function of the file, where the calculations happened. The model calibration happened in the calibration.py file. Running this script is possible with python3 calibration.py. The dividend yield (delta), riskless interest rate (r), up factor (U) and down factor (D) will be printed out on terminal along with the results of the linear regression.

Repo Architecture

model.py contains our implementation of the BinomialModel along with intermediate calculations of the evolution of the risky asset, the calculation of the EMM probabilities and arbitrage checking. In order to initialize a BM, one should instantiate a BM object with its parameters. This instance is then passed to the corresponding derivative. All derivatives are implemented in the same file as well. A derivative should have an underlying model and a function calculate_price() which returns the price as of today and sets the class attribute price_tree to a np.ndarray matrix, representing the price at different nodes of the BM. We implemented the pricing of simple derivatives (Zero Coupon Bonds, Vanilla Bonds, European Options and American Options ), which we can use as building blocks for pricing more complicated securities such as Mandatory Convertible Bonds, (vanilla) Convertible Bonds and Callable Convertible Bonds. For each derivative we tested the correctness of our implementations in test.py.

  
├─── results : Folder containing plots
├─── run.py : Standalone executable produces answers for Analysis (Part5)
├─── model.py : Binomial model and Derivative class implementations 
├─── test.py : Pricing tests of the different derivative classes
├─── calibration.py : Binomial Model calibration based on J&J historical data
├─── data.txt : Historical data on Johnson & Johnson option prices
├─── README.md 
├─── .gitignore 
├─── report.pdf : Our report for the project
└─── description.pdf : Contains all specifications and questions of the project

convertible-bonds's People

Contributors

hbenedek avatar hhildaa avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.