How vihaan-narvekar/black-scholes-pricing works
Main Components
• User Interface Layer: Represented by the interactive Streamlit components that let users input parameters (stock price, strike price, volatility, interest rate) and display results.
• Computation/Business Logic: Encapsulated in the BlackScholes.py file, which contains the functions or methods for calculating option prices, computing Greeks, and preparing data for visualization.
• Visualization Components: These are the parts to render charts like Greek plots and heatmaps based on the computed outputs from the Black-Scholes model.
• External Libraries & Dependencies: The requirements.txt indicates that external Python libraries (such as Streamlit, numpy, pandas, matplotlib, etc., if used) are part of the ecosystem.
Relationships and Interactions
• The User Interface collects parameters from the user via sidebar inputs.
• These parameters are passed to the computation component (BlackScholes.py), which calculates prices and Greeks.
• The results are then fed into the visualization components (plots and heatmaps) that are rendered on the Streamlit web page.
• The application also serves via a hosted URL (the Streamlit app link mentioned in the README), which indicates deployment on a cloud platform.
Architectural Patterns and Design Principles
• Separation of Concerns: Even though the project is implemented as a single file, it conceptually separates input handling, business logic (Black-Scholes calculations), and output rendering.
• Interactive and Real-Time Feedback: Emphasizing the reactive nature of Streamlit, where user inputs immediately trigger recomputation and refresh of outputs.
Relevant Technologies/Frameworks
• Python is the primary language.
• Streamlit is used for rapid web interface design.
• Libraries for mathematical computations and visualizations (which should be listed in requirements.txt) play a vital role.
Detailed Steps
• A component for “Option Price Output” (showing Call and Put pricing analysis)
• A component for “Greeks Analysis” (displaying Delta, Gamma, Theta, Vega, Rho values)
• A component for “Heatmap Visualization” (depicting parameter sensitivities).
• A note or label that the system is deployed on a cloud platform (as referenced by the Streamlit app link).