Options Pricer is a web application for pricing options using the Black-Scholes and Binomial pricing models.
Options Pricer features:
- Interactive frontend user interface for computing options prices
- REST API exposing pricing models as endpoints
The Black-Scholes model works primarily on European options. It provides users with an accurate options price without requiring a large amount of computational resources. The Black-Scholes model is not as flexible as other models, but it provides a solid baseline for pricing options quickly.
On the other hand, the Binomial model is a more accurate model that is slower as it requires a larger amount of computational resources. It provides the same result as the Black-Scholes model when used for European options. Comparitively, the Binomial model is more flexible, as it allows the user to account for early exercise — which are possible when dealing with American options. Here, the Binomial model computes the price for American options.
Options Pricer can easily be self hosted. Dockerfiles have been provided as official releases here. If you would like to locally build the application, follow the steps below.
-
Ensure that Rust, Node.js and Screen are installed on the machine.
-
Clone the repository with
git clone https://github.com/ayushgun/options-pricer
. -
Run the
pricer.sh
script with thestart
argument to start the application:./pricer.sh start
.
Note: To stop the application, run the pricer.sh
script with the kill
argument: ./pricer.sh kill
.
If you plan on modifying the API, a default test suite has been included in this repository.
To run the test suite:
-
Start the API with the script:
./pricer.sh start
. -
Move to the test suite directory with
cd tests
. Then, install the test suite dependencies withpip3 install -r requirements.txt
. -
Run the test suite with
python3 api_tests.py
.
We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting an issue
- Discussing the current state of the project
- Submitting a fix
- Proposing new features
To get started, check Issues for a list of tracked issues.
Ayush Gundawar and Sriharsha Kocherla are the authors of this project.
React is the library used to build the frontend UI.
Actix is the web framework used to build the backend API. It is a powerful, pragmatic, and performant HTTP web framework.