website: snapshot

This commit is contained in:
nym21
2026-02-04 17:26:35 +01:00
parent 0d5d7da70f
commit 0437ce1bb4
33 changed files with 5752 additions and 995 deletions

View File

@@ -58,7 +58,15 @@ export function createValuationSectionFull({ cohort, title }) {
{
name: "Realized Cap",
title: title("Realized Cap"),
bottom: createSingleRealizedCapSeries(cohort),
bottom: [
...createSingleRealizedCapSeries(cohort),
baseline({
metric: tree.realized.realizedCapRelToOwnMarketCap,
name: "Rel. to Own M.Cap",
color,
unit: Unit.pctOwnMcap,
}),
],
},
{
name: "30d Change",
@@ -163,3 +171,63 @@ export function createGroupedValuationSection({ list, title }) {
],
};
}
/**
* @template {{ name: string, color: Color, tree: { realized: { realizedCap: AnyMetricPattern, realizedCap30dDelta: AnyMetricPattern, realizedCapRelToOwnMarketCap: AnyMetricPattern, realizedPriceExtra: { ratio: AnyMetricPattern } } } }} T
* @param {{ list: readonly T[], title: (metric: string) => string }} args
* @returns {PartialOptionsGroup}
*/
export function createGroupedValuationSectionWithOwnMarketCap({ list, title }) {
return {
name: "Valuation",
tree: [
{
name: "Realized Cap",
title: title("Realized Cap"),
bottom: [
...list.map(({ name, color, tree }) =>
line({
metric: tree.realized.realizedCap,
name,
color,
unit: Unit.usd,
}),
),
...list.map(({ name, color, tree }) =>
baseline({
metric: tree.realized.realizedCapRelToOwnMarketCap,
name,
color,
unit: Unit.pctOwnMcap,
}),
),
],
},
{
name: "30d Change",
title: title("Realized Cap 30d Change"),
bottom: list.map(({ name, color, tree }) =>
baseline({
metric: tree.realized.realizedCap30dDelta,
name,
color,
unit: Unit.usd,
}),
),
},
{
name: "MVRV",
title: title("MVRV"),
bottom: list.map(({ name, color, tree }) =>
baseline({
metric: tree.realized.realizedPriceExtra.ratio,
name,
color,
unit: Unit.ratio,
base: 1,
}),
),
},
],
};
}