StableOps
StableOps is an analysis of potential arbitrage opportunities derived from volatility in stablecoin pricing. It was observed that many stablecoins have some volatility. Although usually pegged to a FIAT currency, like the US dollar, they sometimes drift to be a little over or under their peg value.
If this volatility could be harnessed, it might be profitable. The objective of this project is to analyze volatility in stablecoin pricing and assess whether this volatility could provide profitable arbitrage opportunities.
Data Sources
Technologies Used
- Pandas - A python library with advanced financial analysis tools.
- Jupyter Lab - An IDE used for visualization.
- anaconda - A python framework consisting of several tools used in financial analysis, such as Pandas and Jupyter Lab.
- Requests - A python library used to interact with APIs.
- JSON - A python library that facilitates working with data in JSON format.
- python-dotenv - A python library used to configure an environment through key-value pairs stored in a file.
- hvplot - A set of Python visualization tools used to create compelling, and interactive visualizations.
- pytz - A python library that facilitates time zone handling and conversion
- Jupyter Notebook Slides - Uses Jupyter Notebook and turns it into a slideshow for a technical presentation.
Installation Guide
Prerequisites
- Ensure that Anaconda is installed
- It is recommended that a conda virtual environment is created and used for this analysis
conda create -n <environment name> python=3.7 anaconda
conda activate <environment name>
note: remember to deactivate your environmnent when done with conda deactivate
- ensure hvplot is installed in your conda environment
conda install hvplot
see hvplot installation guide for more information.
Start Jupyter Lab
Once your conda virtural environment is started with all prerequisites, start Jupyter Lab:
jupyter lab
Usage
StableOps Analysis Notebook
Once Jupyter Lab has started in your browser, select the StableOps.ipynb notebook from the Left Sidebar. This is the main analytical notebook.
StableOps Presentation Notebook
Launch the Desktop Jupyter Notebook app. Start by selecting View from the menu followed by Cell Toolbar and Slideshow.
Once Slideshow is activated, changing the view will allow to set the type of slides for each cell. There are 5 Types of slides to choose from:
- Slide | Main content of a slide - can use markdown, visuals, or code.
- Sub-Slide | Considered as a new slide with transition animation.
- Fragment | Component of the previous cell. Fragment will be inside the main slide but with a fade-in transition.
- Skip | This cell will not be shown on the slides.
- Notes | Creates Speaker notes (not tested - need a local copy of the Reveal.JS file)
YOU CAN HIDE THE CODES FROM THE SLIDE by changing the Cell Toolbar view into Tags (View -> Cell Toolbar View -> Tags). For each code cell that has visualisation element, enter "to_remove" on the field and press Add Tag.
Run StableOps Presentation
Simply open the presentation file using a browser.
Run a New Version of the StableOps Presentation
In the StableOps directory type in:
jupyter nbconvert "StableOps_Presentation_01.ipynb" --to slides --no-prompt --TagRemovePreprocessor.remove_input_tags={\"to_remove\"} --post serve
This will create a new "StableOps_Presentation_01.slides .html" and run the new presentation using a browser.
Additional Notebooks
- intraday.ipynb - A notebook that analyzed stablecoin volatility using high resolution data, up to 1 minute intervals.
- stable_coin_compare.ipynb - A notebook that surveyed and analyzed yield farming opportynities.
- Terra.ipynb - A notebook that analuzed the collapse of UST and LUNA that occured between 2022-05-07 - 2022-05-14
Summary of Analysis and Results
Method
The following analysis was conducted:
Contributors
-
Quintin Bland |
email: quintinbland2@gmail.com |
-
Kevin Corstorphine |
email: kevincorstorphine@gmail.com |
-
John Gruenewald |
email: john.h.gruenewald@gmail.com |
-
Martin Smith |
email: msmith92663@gmail.com |
-
Yanick Wiliksy |
email: yanickw@gmail.com |
License