See GitHub Repository here
See GitHub Pages here
Name | Pacakage | Version |
---|---|---|
Pandas | 1.3.5 | |
Matplotlib | 1.1.1 | |
Scikit-learn | 1.0.2 | |
pdblp | 0.1.8 | |
seaborn | 0.11.2 | |
plotly | 5.9.0 | |
matplotlib | 3.5.0 |
This model is the streamlit version of the Swaption PCA analysis for ATM Swaptions. The streamlit functionality is for downstream deployment and to seamlessly work on top of Bloomberg Terminal. The idea behind his model is built upon measuring the rolling z-scores of ATM Swaption Implied Volatilities for richness and cheapness.
# Git Install
git clone https://github.com/diegodalvarez/SwaptionVolPCASurface
# Then to run cd into the directory and use streamlit
cd root
streamlit run streamlit_frotend.py
The landing page shows four heatmaps.
- The upper left shows the current Swaption Surface
- The upper right shows the spread between historical Swaption implied volatilty and its current value
- The bottom left shows the ratio between historical Swaption Implied volatility and its current value
- The bottom right shows the z-scores of the residuals when fitting the surface via PCA
Using the selectbar on the left you can select historical volatilities and view any from the tenor.
Using the selectbar on the left you can select historical z-scores to see which are trading rich or cheap
Using the selectbar on the left you can select historical PCs to see how the PCs have changed over time
- The upper left shows the explained variance per each PC
- The upper right shows the cumulative explained variance per each PC
- The bottom left shows the historical PCs
- The bottom right shows the historical PCs scaled by their explained variance
Selecting Barch Chart Richness / Cheapness shows the current z-scores from the PCA model and aligns them from cheapest to richess.