Giter VIP home page Giter VIP logo

swaptionvolpcasurface's Introduction

Not Intended as investment advice

Built with pdblp

See GitHub Repository here

See GitHub Pages here

Required Packages

Name Pacakage Version
Pandas Pandas 1.3.5
Matplotlib Matplotlib 1.1.1
Scikit-learn scikit-learn 1.0.2
pdblp 0.1.8
seaborn 0.11.2
plotly Plotly 5.9.0
matplotlib Matplotlib 3.5.0

Background

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.

Building and Deploying the model

Streamlit deployment

# 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

Landing Page

image 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

Historical Volatilities

image Using the selectbar on the left you can select historical volatilities and view any from the tenor.

Historical Z-Scores

image Using the selectbar on the left you can select historical z-scores to see which are trading rich or cheap

Historical PCs

Using the selectbar on the left you can select historical PCs to see how the PCs have changed over time image

  • 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

Barchart Richness and Cheapness

image Selecting Barch Chart Richness / Cheapness shows the current z-scores from the PCA model and aligns them from cheapest to richess.

swaptionvolpcasurface's People

Contributors

diegodalvarez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.