A data-driven model for evaluating financial option contracts using binomial tree methods and live market data.
This app provides a step-by-step walkthrough of European and American option pricing based on the binomial model, integrating real-time inputs and an intuitive interface.
- 🧮 Binomial Tree Option Pricing: Supports European options (calls & puts)
- 📊 Dynamic Market Inputs: Fetches real-time stock data from Yahoo Finance
- ⚙️ Custom Parameters: Define number of steps, risk-free rate, and option-type
- 🧠 Fully Explainable: Transparent logic with no black-box modeling
- 📈 Streamlit UI: Clean, interactive interface to explore option valuations
- Language: Python
- Libraries: NumPy, Pandas, yfinance, Streamlit
- Model: Binomial Option Pricing (Cox-Ross-Rubinstein formulation)
- Visualization: Streamlit widgets and interactive result tables
| File | Description |
|---|---|
app.py |
Streamlit app interface |
binomial.py |
Core binomial pricing engine |
exceptions.py |
Custom exceptions for input validation |
sp500.json |
Stock ticker mapping (S&P 500) |
requirements.txt |
Required Python dependencies |
LICENSE |
MIT License |
binomial_option_price_model.gif |
UI Demo GIF used in README |
Want to estimate the fair price of a European call option on AAPL expiring in 30 days with a strike price of $180?
This tool lets you plug in all relevant inputs and instantly get the fair option value using a discretized binomial tree.
- ✅ No reliance on external APIs beyond Yahoo Finance
- ✅ Helps visualize how tree depth, volatility, and expiration affect option value
- ✅ Built for learning, experimentation, and rapid prototyping
- Clone the repository:
git clone https://github.com/<MunjPatel>/BinomialOptionPricer.git
cd BinomialOptionPricer- Install dependencies:
pip install -r requirements.txt- Launch the app:
streamlit run app.py- Designed for financial clarity and transparency — ideal for students, researchers, or interview prep
- Provides fast experimentation without complex installations or proprietary APIs
This project is licensed under the MIT License.
