BestSection
Documentation for eth_defi.vault_report.post.BestSection Python class.
- class BestSection
Bases:
objectOne ranked vault group of the post: its table, performance chart and section.
The single definition of a best-performing section. The tables, the chart selection, the chart panel, the criteria notes and the post section are all derived from it, see
BEST_SECTIONS. Keeping them in one place means a new vault group, or a changed ranking metric, cannot leave the table, the chart and the investability check candidates (eth_defi.vault_report.report.collect_top_lists()) out of step.Tables rank by the one-month return like the website’s live ranking, while the charts rank by the steadier three-month return, see
chart_metric, so the two lists of a section may differ.Attributes summary
Section key, e.g.
Vault group, see
eth_defi.vault_report.sections.classify_vault()Section heading
Heading anchor id
The ranked vaults in chart titles and alt texts, e.g.
What the chart compares the vaults against
Table ranking column
Chart lines:
equitycurves, or the rollingsharperatio ranked bymetricHow the chart subtitle describes the ranking, e.g.
Live page on the website, without
https://, for the chart footerIntroduction paragraph HTML, with links to the website
Key of the performance chart in
PostContext.charts.Column that picks and ranks the chart vaults: the steadier three-month return, or the Sharpe ratio.
The post section of this group.
Methods summary
__init__(key, group, heading, heading_id, ...)- key: str
Section key, e.g.
lending: the table and criteria notes key
- group: str
Vault group, see
eth_defi.vault_report.sections.classify_vault()
- heading: str
Section heading
- heading_id: str
Heading anchor id
- subject: str
The ranked vaults in chart titles and alt texts, e.g.
the best-performing lending vaults
- benchmark: str
What the chart compares the vaults against
- metric: str
Table ranking column
- measure: Literal['equity', 'sharpe']
Chart lines:
equitycurves, or the rollingsharperatio ranked bymetric
- ranked_by: str
How the chart subtitle describes the ranking, e.g.
funds by 3M return
- link: str
Live page on the website, without
https://, for the chart footer
- intro: str
Introduction paragraph HTML, with links to the website
- property chart_key: str
Key of the performance chart in
PostContext.charts.
- property chart_metric: str
Column that picks and ranks the chart vaults: the steadier three-month return, or the Sharpe ratio.
- property template: eth_defi.vault_report.post.SectionTemplate
The post section of this group.
- __init__(key, group, heading, heading_id, subject, benchmark='their benchmarks', metric='one_month_cagr_best', measure='equity', ranked_by='by 3M return', link='tradingstrategy.ai/vaults', intro='')