Fija vault analysis
Run
erc-4626-single-vault.ipynbanalysis for all Fija
To generate a a HTML report:
jupyter nbconvert --no-input --to html docs/source/tutorials/erc-4626-fija-vaults.ipynb
mv docs/source/tutorials/erc-4626-fija-vaults.html ~/Downloads
Setup
Set up notebook rendering output mode
Use static image charts so this notebook is readeable on Github / ReadTheDocs
[17]:
import pandas as pd
from plotly.offline import init_notebook_mode
import plotly.io as pio
from eth_defi.vault.base import VaultSpec
from eth_defi.research.notebook import set_large_plotly_chart_font
pd.options.display.float_format = "{:,.2f}".format
pd.options.display.max_columns = None
pd.options.display.max_rows = None
# Set up Plotly chart output as SVG
image_format = "png"
width = 1400
height = 800
# https://stackoverflow.com/a/52956402/315168
init_notebook_mode()
# https://plotly.com/python/renderers/#overriding-the-default-renderer
pio.renderers.default = image_format
current_renderer = pio.renderers[image_format]
# Have SVGs default pixel with
current_renderer.width = width
current_renderer.height = height
# Set all Plotly charts to use large font sizes for better readability,
# for sharing on mobile
set_large_plotly_chart_font(
line_width=5,
legend_font_size=16,
axis_title_font_size=16,
font_size=20,
)
pio.templates.default = "custom"
print("Notebook formatting setup done")