mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 14:49:58 -07:00
global: snapshot
This commit is contained in:
@@ -174,13 +174,13 @@ function coinsDestroyedTree(list, all, title) {
|
||||
title: title("Coins Destroyed"),
|
||||
bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => [
|
||||
line({
|
||||
metric: tree.activity.coinblocksDestroyed.sum,
|
||||
metric: tree.activity.coinblocksDestroyed.sum._24h,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.coinblocks,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.coindaysDestroyed.sum,
|
||||
metric: tree.activity.coindaysDestroyed.sum._24h,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.coindays,
|
||||
@@ -677,19 +677,19 @@ export function createActivitySection({
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.sent.sats.sum,
|
||||
metric: tree.activity.sent.base.sats,
|
||||
name: "sum",
|
||||
color,
|
||||
unit: Unit.sats,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.sent.btc.sum,
|
||||
metric: tree.activity.sent.base.btc,
|
||||
name: "sum",
|
||||
color,
|
||||
unit: Unit.btc,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.sent.usd.sum,
|
||||
metric: tree.activity.sent.base.usd,
|
||||
name: "sum",
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -701,19 +701,19 @@ export function createActivitySection({
|
||||
title: title("Sent Volume (Total)"),
|
||||
bottom: [
|
||||
line({
|
||||
metric: tree.activity.sent.sats.cumulative,
|
||||
metric: tree.activity.sent.cumulative.sats,
|
||||
name: "all-time",
|
||||
color,
|
||||
unit: Unit.sats,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.sent.btc.cumulative,
|
||||
metric: tree.activity.sent.cumulative.btc,
|
||||
name: "all-time",
|
||||
color,
|
||||
unit: Unit.btc,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.sent.usd.cumulative,
|
||||
metric: tree.activity.sent.cumulative.usd,
|
||||
name: "all-time",
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -816,13 +816,13 @@ export function createActivitySection({
|
||||
title: title("Coins Destroyed"),
|
||||
bottom: [
|
||||
line({
|
||||
metric: tree.activity.coinblocksDestroyed.sum,
|
||||
metric: tree.activity.coinblocksDestroyed.sum._24h,
|
||||
name: "Coinblocks",
|
||||
color,
|
||||
unit: Unit.coinblocks,
|
||||
}),
|
||||
line({
|
||||
metric: tree.activity.coindaysDestroyed.sum,
|
||||
metric: tree.activity.coindaysDestroyed.sum._24h,
|
||||
name: "Coindays",
|
||||
color,
|
||||
unit: Unit.coindays,
|
||||
@@ -1021,9 +1021,9 @@ export function createGroupedActivitySection({
|
||||
bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
satsBtcUsd({
|
||||
pattern: {
|
||||
sats: tree.activity.sent.sats.sum,
|
||||
btc: tree.activity.sent.btc.sum,
|
||||
usd: tree.activity.sent.usd.sum,
|
||||
sats: tree.activity.sent.base.sats,
|
||||
btc: tree.activity.sent.base.btc,
|
||||
usd: tree.activity.sent.base.usd,
|
||||
},
|
||||
name,
|
||||
color,
|
||||
|
||||
@@ -74,7 +74,7 @@ export function createPricesSectionFull({ cohort, title }) {
|
||||
context: cohort.name,
|
||||
legend: "Realized",
|
||||
pricePattern: tree.realized.realizedPrice,
|
||||
ratio: tree.realized.realizedPriceExtra,
|
||||
ratio: { ...tree.realized.realizedPriceExtra, ...tree.realized.realizedPriceRatioExt },
|
||||
color,
|
||||
priceTitle: title("Realized Price"),
|
||||
titlePrefix: "Realized Price",
|
||||
@@ -86,7 +86,7 @@ export function createPricesSectionFull({ cohort, title }) {
|
||||
context: cohort.name,
|
||||
legend: "Investor",
|
||||
pricePattern: tree.realized.investorPrice,
|
||||
ratio: tree.realized.investorPriceExtra,
|
||||
ratio: { ...tree.realized.investorPriceExtra, ...tree.realized.investorPriceRatioExt },
|
||||
color,
|
||||
priceTitle: title("Investor Price"),
|
||||
titlePrefix: "Investor Price",
|
||||
|
||||
@@ -519,21 +519,21 @@ function realizedPnlSum(tree) {
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
dots({
|
||||
metric: r.realizedProfit.sum,
|
||||
metric: r.realizedProfit.height,
|
||||
name: "Profit",
|
||||
color: colors.profit,
|
||||
unit: Unit.usd,
|
||||
defaultActive: false,
|
||||
}),
|
||||
dots({
|
||||
metric: r.negRealizedLoss.sum,
|
||||
metric: r.negRealizedLoss,
|
||||
name: "Negative Loss",
|
||||
color: colors.loss,
|
||||
unit: Unit.usd,
|
||||
defaultActive: false,
|
||||
}),
|
||||
dots({
|
||||
metric: r.realizedLoss.sum,
|
||||
metric: r.realizedLoss.height,
|
||||
name: "Loss",
|
||||
color: colors.loss,
|
||||
unit: Unit.usd,
|
||||
@@ -547,13 +547,13 @@ function realizedPnlSum(tree) {
|
||||
defaultActive: false,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.realizedProfitRelToRealizedCap.sum,
|
||||
metric: r.realizedProfitRelToRealizedCap,
|
||||
name: "Profit",
|
||||
color: colors.profit,
|
||||
unit: Unit.pctRcap,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.realizedLossRelToRealizedCap.sum,
|
||||
metric: r.realizedLossRelToRealizedCap,
|
||||
name: "Loss",
|
||||
color: colors.loss,
|
||||
unit: Unit.pctRcap,
|
||||
@@ -575,13 +575,13 @@ function realizedNetPnlSum(tree) {
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
dotsBaseline({
|
||||
metric: r.netRealizedPnl.sum,
|
||||
metric: r.netRealizedPnl.height,
|
||||
name: "Net",
|
||||
unit: Unit.usd,
|
||||
defaultActive: false,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.netRealizedPnlRelToRealizedCap.sum,
|
||||
metric: r.netRealizedPnlRelToRealizedCap,
|
||||
name: "Net",
|
||||
unit: Unit.pctRcap,
|
||||
}),
|
||||
@@ -609,20 +609,20 @@ function realizedPnlCumulative(tree) {
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
line({
|
||||
metric: r.negRealizedLoss.cumulative,
|
||||
metric: r.negRealizedLoss,
|
||||
name: "Negative Loss",
|
||||
color: colors.loss,
|
||||
unit: Unit.usd,
|
||||
defaultActive: false,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.realizedProfitRelToRealizedCap.cumulative,
|
||||
metric: r.realizedProfitRelToRealizedCap,
|
||||
name: "Profit",
|
||||
color: colors.profit,
|
||||
unit: Unit.pctRcap,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.realizedLossRelToRealizedCap.cumulative,
|
||||
metric: r.realizedLossRelToRealizedCap,
|
||||
name: "Loss",
|
||||
color: colors.loss,
|
||||
unit: Unit.pctRcap,
|
||||
@@ -644,7 +644,7 @@ function realizedNetPnlCumulative(tree) {
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
baseline({
|
||||
metric: r.netRealizedPnlRelToRealizedCap.cumulative,
|
||||
metric: r.netRealizedPnlRelToRealizedCap,
|
||||
name: "Net",
|
||||
unit: Unit.pctRcap,
|
||||
}),
|
||||
@@ -704,13 +704,13 @@ function sentInPnlTree(tree, title) {
|
||||
}),
|
||||
...satsBtcUsdFrom({
|
||||
source: r.sentInProfit,
|
||||
key: "sum",
|
||||
key: "base",
|
||||
name: "In Profit",
|
||||
color: colors.profit,
|
||||
}),
|
||||
...satsBtcUsdFrom({
|
||||
source: r.sentInLoss,
|
||||
key: "sum",
|
||||
key: "base",
|
||||
name: "In Loss",
|
||||
color: colors.loss,
|
||||
}),
|
||||
@@ -945,7 +945,7 @@ function realizedSubfolder(tree, title, rollingTree) {
|
||||
title: title("Realized Peak Regret"),
|
||||
bottom: [
|
||||
line({
|
||||
metric: r.peakRegret.sum,
|
||||
metric: r.peakRegret.height,
|
||||
name: "Peak Regret",
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
@@ -1839,7 +1839,7 @@ function groupedRealizedPnlSum(list, all, title) {
|
||||
title: title("Realized Profit"),
|
||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
line({
|
||||
metric: tree.realized.realizedProfit.sum,
|
||||
metric: tree.realized.realizedProfit.height,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -1851,7 +1851,7 @@ function groupedRealizedPnlSum(list, all, title) {
|
||||
title: title("Realized Loss"),
|
||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
line({
|
||||
metric: tree.realized.negRealizedLoss.sum,
|
||||
metric: tree.realized.negRealizedLoss,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -1936,7 +1936,7 @@ function groupedRealizedPnlCumulative(list, all, title) {
|
||||
title: title("Cumulative Realized Loss"),
|
||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
line({
|
||||
metric: tree.realized.negRealizedLoss.cumulative,
|
||||
metric: tree.realized.realizedLoss.cumulative,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -1973,7 +1973,7 @@ function groupedSentInPnl(list, all, title) {
|
||||
...flatMapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
satsBtcUsdFrom({
|
||||
source: tree.realized.sentInProfit,
|
||||
key: "sum",
|
||||
key: "base",
|
||||
name,
|
||||
color,
|
||||
}),
|
||||
@@ -1995,7 +1995,7 @@ function groupedSentInPnl(list, all, title) {
|
||||
...flatMapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
satsBtcUsdFrom({
|
||||
source: tree.realized.sentInLoss,
|
||||
key: "sum",
|
||||
key: "base",
|
||||
name,
|
||||
color,
|
||||
}),
|
||||
@@ -2104,7 +2104,7 @@ function groupedRealizedSubfolder(list, all, title) {
|
||||
title: title("Net Realized P&L"),
|
||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
baseline({
|
||||
metric: tree.realized.netRealizedPnl.sum,
|
||||
metric: tree.realized.netRealizedPnl.height,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
@@ -2166,7 +2166,7 @@ function groupedRealizedSubfolderWithExtras(list, all, title) {
|
||||
title: title("Net Realized P&L"),
|
||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||
baseline({
|
||||
metric: tree.realized.netRealizedPnl.sum,
|
||||
metric: tree.realized.netRealizedPnl.height,
|
||||
name,
|
||||
color,
|
||||
unit: Unit.usd,
|
||||
|
||||
@@ -76,7 +76,7 @@ export function createValuationSectionFull({ cohort, title }) {
|
||||
createRatioChart({
|
||||
title,
|
||||
pricePattern: tree.realized.realizedPrice,
|
||||
ratio: tree.realized.realizedPriceExtra,
|
||||
ratio: { ...tree.realized.realizedPriceExtra, ...tree.realized.realizedPriceRatioExt },
|
||||
color,
|
||||
name: "MVRV",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user