This application is developed using the FastAPI and Streamlit packages. The workflow begins by reading the option pricing data from either CSV or Excel format files, and then stores the data in an SQLite database. Users can also provide market data in JSON-formatted text or call the API endpoint with JSON text. The application renders web pages using the Streamlit package to provide an interface for various CRUD operations.
When users select the option to calculate option prices, the application calculates the option prices using the Black76 model and displays the results in a tabular format, as well as an interactive line plot (using the Python Bokeh package). It also provides the option to download the option prices in a CSV file.
(needed only one time to setup the environment)
python -m venv .venv
.\.venv\Scripts\activate.ps1
python -m pip install -r ./requirements.txt
Activate Virtual Environment:
.\.venv\Scripts\activate.ps1
Run API server
python .\src\api_manager.py
Run Web server
streamlit run .\src\gui_manager.py
Run the test cases
pytest .\src\tests\test_b76_option_model.py
pytest .\src\tests\test_option_pricer_api.py

