diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index b5fc11e4b..f8aeda3ea 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -1071,15 +1071,15 @@ impl _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 { /// Pattern struct for repeated tree structure. pub struct CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern { - pub cap: CentsDeltaRelUsdPattern, + pub cap: CentsDeltaToUsdPattern, pub gross_pnl: BaseCumulativeSumPattern3, - pub investor: LowerPriceUpperPattern, - pub loss: BaseCapitulationCumulativeNegativeRelSumValuePattern, + pub investor: InvestorPricePattern, + pub loss: BaseCapitulationCumulativeNegativeSumToValuePattern, pub mvrv: SeriesPattern1, - pub net_pnl: BaseChangeCumulativeDeltaRelSumPattern, - pub peak_regret: BaseCumulativeRelPattern, + pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, + pub peak_regret: BaseCumulativeToPattern, pub price: BpsCentsPercentilesRatioSatsSmaStdUsdPattern, - pub profit: BaseCumulativeDistributionRelSumValuePattern, + pub profit: BaseCumulativeDistributionSumToValuePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, pub sell_side_risk_ratio: _1m1w1y24hPattern6, pub sopr: AdjustedRatioValuePattern, @@ -1120,7 +1120,7 @@ impl AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { +pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 { pub average: _1m1w1y24hPattern, pub base: SeriesPattern1, pub cumulative: SeriesPattern1, @@ -1134,7 +1134,7 @@ pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { pub sum: _1m1w1y24hPattern, } -impl AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { +impl AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -1153,6 +1153,21 @@ impl AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { } } +/// Pattern struct for repeated tree structure. +pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { + pub average: _1m1w1y24hPattern, + pub base: SeriesPattern18, + pub cumulative: SeriesPattern1, + pub max: _1m1w1y24hPattern, + pub median: _1m1w1y24hPattern, + pub min: _1m1w1y24hPattern, + pub pct10: _1m1w1y24hPattern, + pub pct25: _1m1w1y24hPattern, + pub pct75: _1m1w1y24hPattern, + pub pct90: _1m1w1y24hPattern, + pub sum: _1m1w1y24hPattern, +} + /// Pattern struct for repeated tree structure. pub struct AverageGainsLossesRsiStochPattern { pub average_gain: SeriesPattern1, @@ -1246,41 +1261,13 @@ impl AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern { - pub average: BtcCentsSatsUsdPattern, - pub max: BtcCentsSatsUsdPattern, - pub median: BtcCentsSatsUsdPattern, - pub min: BtcCentsSatsUsdPattern, - pub pct10: BtcCentsSatsUsdPattern, - pub pct25: BtcCentsSatsUsdPattern, - pub pct75: BtcCentsSatsUsdPattern, - pub pct90: BtcCentsSatsUsdPattern, -} - -impl AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern { - /// Create a new pattern node with accumulated series name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - average: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "average")), - max: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "max")), - median: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "median")), - min: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "min")), - pct10: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct10")), - pct25: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct25")), - pct75: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct75")), - pct90: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct90")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct BaseCapitulationCumulativeNegativeRelSumValuePattern { +pub struct BaseCapitulationCumulativeNegativeSumToValuePattern { pub base: CentsUsdPattern2, pub capitulation_flow: SeriesPattern1, pub cumulative: CentsUsdPattern2, pub negative: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, pub sum: _1m1w1y24hPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, } @@ -1298,7 +1285,7 @@ pub struct BpsCentsPercentilesRatioSatsSmaStdUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2 { +pub struct AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern { pub average: SeriesPattern18, pub max: SeriesPattern18, pub median: SeriesPattern18, @@ -1309,7 +1296,7 @@ pub struct AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2 { pub pct90: SeriesPattern18, } -impl AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2 { +impl AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -1378,38 +1365,38 @@ impl _1m1w1y24hBpsPercentRatioPattern { } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeDistributionRelSumValuePattern { +pub struct BaseCumulativeDistributionSumToValuePattern { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub distribution_flow: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, pub sum: _1m1w1y24hPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeNegativeRelSumPattern2 { +pub struct BaseCumulativeNegativeSumToPattern2 { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub negative: SeriesPattern1, - pub rel_to_mcap: BpsPercentRatioPattern3, - pub rel_to_own_gross: BpsPercentRatioPattern3, - pub rel_to_own_mcap: BpsPercentRatioPattern4, pub sum: _1m1w1y24hPattern4, + pub to_mcap: BpsPercentRatioPattern3, + pub to_own_gross_pnl: BpsPercentRatioPattern3, + pub to_own_mcap: BpsPercentRatioPattern4, } -impl BaseCumulativeNegativeRelSumPattern2 { +impl BaseCumulativeNegativeSumToPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { base: CentsUsdPattern2::new(client.clone(), _m(&acc, "unrealized_loss")), cumulative: CentsUsdPattern2::new(client.clone(), _m(&acc, "unrealized_loss_cumulative")), negative: SeriesPattern1::new(client.clone(), _m(&acc, "neg_unrealized_loss")), - rel_to_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_mcap")), - rel_to_own_gross: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_own_gross_pnl")), - rel_to_own_mcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_own_mcap")), sum: _1m1w1y24hPattern4::new(client.clone(), _m(&acc, "unrealized_loss_sum")), + to_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "unrealized_loss_to_mcap")), + to_own_gross_pnl: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "unrealized_loss_to_own_gross_pnl")), + to_own_mcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "unrealized_loss_to_own_mcap")), } } } @@ -1444,10 +1431,10 @@ impl CapLossMvrvNetPriceProfitSoprPattern { pub struct GrossInvestedLossNetNuplProfitSentimentPattern2 { pub gross_pnl: CentsUsdPattern2, pub invested_capital: InPattern, - pub loss: BaseCumulativeNegativeRelSumPattern2, - pub net_pnl: CentsRelUsdPattern2, + pub loss: BaseCumulativeNegativeSumToPattern2, + pub net_pnl: CentsToUsdPattern2, pub nupl: BpsRatioPattern, - pub profit: BaseCumulativeRelSumPattern2, + pub profit: BaseCumulativeSumToPattern2, pub sentiment: GreedNetPainPattern, } @@ -1476,49 +1463,49 @@ impl _1m1w1y2y4yAllPattern { } /// Pattern struct for repeated tree structure. -pub struct BaseChangeCumulativeDeltaRelSumPattern { +pub struct BaseChangeCumulativeDeltaSumToPattern { pub base: CentsUsdPattern, - pub change_1m: RelPattern, + pub change_1m: ToPattern, pub cumulative: CentsUsdPattern, pub delta: AbsoluteRatePattern2, - pub rel_to_rcap: BpsPercentRatioPattern, pub sum: _1m1w1y24hPattern3, + pub to_rcap: BpsPercentRatioPattern, } -impl BaseChangeCumulativeDeltaRelSumPattern { +impl BaseChangeCumulativeDeltaSumToPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { base: CentsUsdPattern::new(client.clone(), _m(&acc, "realized_pnl")), - change_1m: RelPattern::new(client.clone(), _m(&acc, "pnl_change_1m_rel_to")), + change_1m: ToPattern::new(client.clone(), _m(&acc, "pnl_change_1m_to")), cumulative: CentsUsdPattern::new(client.clone(), _m(&acc, "realized_pnl_cumulative")), delta: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "realized_pnl_delta")), - rel_to_rcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "realized_pnl_rel_to_rcap")), sum: _1m1w1y24hPattern3::new(client.clone(), _m(&acc, "realized_pnl_sum")), + to_rcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "realized_pnl_to_rcap")), } } } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeRelSumPattern2 { +pub struct BaseCumulativeSumToPattern2 { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, - pub rel_to_mcap: BpsPercentRatioPattern3, - pub rel_to_own_gross: BpsPercentRatioPattern3, - pub rel_to_own_mcap: BpsPercentRatioPattern3, pub sum: _1m1w1y24hPattern4, + pub to_mcap: BpsPercentRatioPattern3, + pub to_own_gross_pnl: BpsPercentRatioPattern3, + pub to_own_mcap: BpsPercentRatioPattern3, } -impl BaseCumulativeRelSumPattern2 { +impl BaseCumulativeSumToPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { base: CentsUsdPattern2::new(client.clone(), acc.clone()), cumulative: CentsUsdPattern2::new(client.clone(), _m(&acc, "cumulative")), - rel_to_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_mcap")), - rel_to_own_gross: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_own_gross_pnl")), - rel_to_own_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_own_mcap")), sum: _1m1w1y24hPattern4::new(client.clone(), _m(&acc, "sum")), + to_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_mcap")), + to_own_gross_pnl: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_own_gross_pnl")), + to_own_mcap: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_own_mcap")), } } } @@ -1548,24 +1535,24 @@ impl BpsCentsPercentilesRatioSatsUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct BtcCentsRelSatsUsdPattern3 { +pub struct BtcCentsSatsToUsdPattern3 { pub btc: SeriesPattern1, pub cents: SeriesPattern1, - pub rel_to_circulating: BpsPercentRatioPattern3, - pub rel_to_own: BpsPercentRatioPattern3, pub sats: SeriesPattern1, + pub to_circulating: BpsPercentRatioPattern3, + pub to_own: BpsPercentRatioPattern3, pub usd: SeriesPattern1, } -impl BtcCentsRelSatsUsdPattern3 { +impl BtcCentsSatsToUsdPattern3 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { btc: SeriesPattern1::new(client.clone(), acc.clone()), cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), - rel_to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_circulating")), - rel_to_own: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_own")), sats: SeriesPattern1::new(client.clone(), _m(&acc, "sats")), + to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), + to_own: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_own")), usd: SeriesPattern1::new(client.clone(), _m(&acc, "usd")), } } @@ -1596,48 +1583,48 @@ impl CapLossMvrvPriceProfitSoprPattern { } /// Pattern struct for repeated tree structure. -pub struct DeltaHalfInRelTotalPattern { +pub struct DeltaHalfInToTotalPattern { pub delta: AbsoluteRatePattern, pub half: BtcCentsSatsUsdPattern, - pub in_loss: BtcCentsRelSatsUsdPattern, - pub in_profit: BtcCentsRelSatsUsdPattern, - pub rel_to_circulating: BpsPercentRatioPattern3, + pub in_loss: BtcCentsSatsToUsdPattern, + pub in_profit: BtcCentsSatsToUsdPattern, + pub to_circulating: BpsPercentRatioPattern3, pub total: BtcCentsSatsUsdPattern, } -impl DeltaHalfInRelTotalPattern { +impl DeltaHalfInToTotalPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), half: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "half")), - in_loss: BtcCentsRelSatsUsdPattern::new(client.clone(), _m(&acc, "in_loss")), - in_profit: BtcCentsRelSatsUsdPattern::new(client.clone(), _m(&acc, "in_profit")), - rel_to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_circulating")), + in_loss: BtcCentsSatsToUsdPattern::new(client.clone(), _m(&acc, "in_loss")), + in_profit: BtcCentsSatsToUsdPattern::new(client.clone(), _m(&acc, "in_profit")), + to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), } } } /// Pattern struct for repeated tree structure. -pub struct DeltaHalfInRelTotalPattern2 { +pub struct DeltaHalfInToTotalPattern2 { pub delta: AbsoluteRatePattern, pub half: BtcCentsSatsUsdPattern, - pub in_loss: BtcCentsRelSatsUsdPattern3, - pub in_profit: BtcCentsRelSatsUsdPattern3, - pub rel_to_circulating: BpsPercentRatioPattern3, + pub in_loss: BtcCentsSatsToUsdPattern3, + pub in_profit: BtcCentsSatsToUsdPattern3, + pub to_circulating: BpsPercentRatioPattern3, pub total: BtcCentsSatsUsdPattern, } -impl DeltaHalfInRelTotalPattern2 { +impl DeltaHalfInToTotalPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), half: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "half")), - in_loss: BtcCentsRelSatsUsdPattern3::new(client.clone(), _m(&acc, "in_loss")), - in_profit: BtcCentsRelSatsUsdPattern3::new(client.clone(), _m(&acc, "in_profit")), - rel_to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_circulating")), + in_loss: BtcCentsSatsToUsdPattern3::new(client.clone(), _m(&acc, "in_loss")), + in_profit: BtcCentsSatsToUsdPattern3::new(client.clone(), _m(&acc, "in_profit")), + to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), } } @@ -1669,10 +1656,10 @@ impl Pct1Pct2Pct5Pct95Pct98Pct99Pattern { /// Pattern struct for repeated tree structure. pub struct ActivityOutputsRealizedSupplyUnrealizedPattern { - pub activity: CoindaysSentPattern, + pub activity: CoindaysTransferPattern, pub outputs: UnspentPattern, pub realized: CapLossMvrvNetPriceProfitSoprPattern, - pub supply: DeltaHalfInRelTotalPattern, + pub supply: DeltaHalfInToTotalPattern, pub unrealized: LossNetNuplProfitPattern, } @@ -1680,10 +1667,10 @@ impl ActivityOutputsRealizedSupplyUnrealizedPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - activity: CoindaysSentPattern::new(client.clone(), acc.clone()), + activity: CoindaysTransferPattern::new(client.clone(), acc.clone()), outputs: UnspentPattern::new(client.clone(), _m(&acc, "utxo_count")), realized: CapLossMvrvNetPriceProfitSoprPattern::new(client.clone(), acc.clone()), - supply: DeltaHalfInRelTotalPattern::new(client.clone(), _m(&acc, "supply")), + supply: DeltaHalfInToTotalPattern::new(client.clone(), _m(&acc, "supply")), unrealized: LossNetNuplProfitPattern::new(client.clone(), acc.clone()), } } @@ -1691,7 +1678,7 @@ impl ActivityOutputsRealizedSupplyUnrealizedPattern { /// Pattern struct for repeated tree structure. pub struct AddressOutputsRealizedSupplyUnrealizedPattern { - pub address_count: DeltaInnerPattern, + pub address_count: BaseDeltaPattern, pub outputs: UnspentPattern, pub realized: CapLossMvrvPriceProfitSoprPattern, pub supply: DeltaHalfTotalPattern, @@ -1702,7 +1689,7 @@ impl AddressOutputsRealizedSupplyUnrealizedPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - address_count: DeltaInnerPattern::new(client.clone(), _m(&acc, "address_count")), + address_count: BaseDeltaPattern::new(client.clone(), _m(&acc, "address_count")), outputs: UnspentPattern::new(client.clone(), _m(&acc, "utxo_count")), realized: CapLossMvrvPriceProfitSoprPattern::new(client.clone(), acc.clone()), supply: DeltaHalfTotalPattern::new(client.clone(), _m(&acc, "supply")), @@ -1778,44 +1765,44 @@ impl BtcCentsDeltaSatsUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct BtcCentsRelSatsUsdPattern { +pub struct BtcCentsSatsToUsdPattern { pub btc: SeriesPattern1, pub cents: SeriesPattern1, - pub rel_to_circulating: BpsPercentRatioPattern3, pub sats: SeriesPattern1, + pub to_circulating: BpsPercentRatioPattern3, pub usd: SeriesPattern1, } -impl BtcCentsRelSatsUsdPattern { +impl BtcCentsSatsToUsdPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { btc: SeriesPattern1::new(client.clone(), acc.clone()), cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), - rel_to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_circulating")), sats: SeriesPattern1::new(client.clone(), _m(&acc, "sats")), + to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), usd: SeriesPattern1::new(client.clone(), _m(&acc, "usd")), } } } /// Pattern struct for repeated tree structure. -pub struct BtcCentsRelSatsUsdPattern2 { +pub struct BtcCentsSatsToUsdPattern2 { pub btc: SeriesPattern1, pub cents: SeriesPattern1, - pub rel_to_own: BpsPercentRatioPattern3, pub sats: SeriesPattern1, + pub to_own: BpsPercentRatioPattern3, pub usd: SeriesPattern1, } -impl BtcCentsRelSatsUsdPattern2 { +impl BtcCentsSatsToUsdPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { btc: SeriesPattern1::new(client.clone(), acc.clone()), cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), - rel_to_own: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "rel_to_own")), sats: SeriesPattern1::new(client.clone(), _m(&acc, "sats")), + to_own: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_own")), usd: SeriesPattern1::new(client.clone(), _m(&acc, "usd")), } } @@ -1884,15 +1871,15 @@ impl PhsReboundThsPattern { } /// Pattern struct for repeated tree structure. -pub struct _1m1w1y24hHeightPattern { +pub struct _1m1w1y24hBasePattern { pub _1m: SeriesPattern1, pub _1w: SeriesPattern1, pub _1y: SeriesPattern1, pub _24h: SeriesPattern1, - pub height: SeriesPattern18, + pub base: SeriesPattern18, } -impl _1m1w1y24hHeightPattern { +impl _1m1w1y24hBasePattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -1900,7 +1887,7 @@ impl _1m1w1y24hHeightPattern { _1w: SeriesPattern1::new(client.clone(), _m(&acc, "average_1w")), _1y: SeriesPattern1::new(client.clone(), _m(&acc, "average_1y")), _24h: SeriesPattern1::new(client.clone(), _m(&acc, "average_24h")), - height: SeriesPattern18::new(client.clone(), acc.clone()), + base: SeriesPattern18::new(client.clone(), acc.clone()), } } } @@ -2083,20 +2070,20 @@ impl BaseCumulativeNegativeSumPattern { /// Pattern struct for repeated tree structure. pub struct BothReactivatedReceivingSendingPattern { - pub both: _1m1w1y24hHeightPattern, - pub reactivated: _1m1w1y24hHeightPattern, - pub receiving: _1m1w1y24hHeightPattern, - pub sending: _1m1w1y24hHeightPattern, + pub both: _1m1w1y24hBasePattern, + pub reactivated: _1m1w1y24hBasePattern, + pub receiving: _1m1w1y24hBasePattern, + pub sending: _1m1w1y24hBasePattern, } impl BothReactivatedReceivingSendingPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - both: _1m1w1y24hHeightPattern::new(client.clone(), _m(&acc, "both")), - reactivated: _1m1w1y24hHeightPattern::new(client.clone(), _m(&acc, "reactivated")), - receiving: _1m1w1y24hHeightPattern::new(client.clone(), _m(&acc, "receiving")), - sending: _1m1w1y24hHeightPattern::new(client.clone(), _m(&acc, "sending")), + both: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "both")), + reactivated: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "reactivated")), + receiving: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "receiving")), + sending: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "sending")), } } } @@ -2122,51 +2109,51 @@ impl BtcCentsSatsUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct CentsDeltaRelUsdPattern { +pub struct CentsDeltaToUsdPattern { pub cents: SeriesPattern1, pub delta: AbsoluteRatePattern2, - pub rel_to_own_mcap: BpsPercentRatioPattern4, + pub to_own_mcap: BpsPercentRatioPattern4, pub usd: SeriesPattern1, } -impl CentsDeltaRelUsdPattern { +impl CentsDeltaToUsdPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), delta: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "delta")), - rel_to_own_mcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "rel_to_own_mcap")), + to_own_mcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "to_own_mcap")), usd: SeriesPattern1::new(client.clone(), acc.clone()), } } } /// Pattern struct for repeated tree structure. -pub struct CentsRelUsdPattern2 { +pub struct CentsToUsdPattern2 { pub cents: SeriesPattern1, - pub rel_to_own_gross: BpsPercentRatioPattern, - pub rel_to_own_mcap: BpsPercentRatioPattern, + pub to_own_gross_pnl: BpsPercentRatioPattern, + pub to_own_mcap: BpsPercentRatioPattern, pub usd: SeriesPattern1, } -impl CentsRelUsdPattern2 { +impl CentsToUsdPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), - rel_to_own_gross: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_gross_pnl")), - rel_to_own_mcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_mcap")), + to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "to_own_gross_pnl")), + to_own_mcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "to_own_mcap")), usd: SeriesPattern1::new(client.clone(), acc.clone()), } } } /// Pattern struct for repeated tree structure. -pub struct CoindaysCoinyearsDormancySentPattern { +pub struct CoindaysCoinyearsDormancyTransferPattern { pub coindays_destroyed: BaseCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: SeriesPattern1, - pub sent: BaseCumulativeInSumPattern, + pub transfer_volume: BaseCumulativeInSumPattern, } /// Pattern struct for repeated tree structure. @@ -2268,19 +2255,19 @@ impl BaseCumulativeSumPattern4 { } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeRelPattern { +pub struct BaseCumulativeToPattern { pub base: SeriesPattern1, pub cumulative: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, } -impl BaseCumulativeRelPattern { +impl BaseCumulativeToPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { base: SeriesPattern1::new(client.clone(), acc.clone()), cumulative: SeriesPattern1::new(client.clone(), _m(&acc, "cumulative")), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "rel_to_rcap")), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "to_rcap")), } } } @@ -2508,6 +2495,24 @@ pub struct GreedNetPainPattern { pub pain_index: CentsUsdPattern2, } +/// Pattern struct for repeated tree structure. +pub struct InvestorPricePattern { + pub investor_lower_band: CentsSatsUsdPattern, + pub investor_upper_band: CentsSatsUsdPattern, + pub price: BpsCentsPercentilesRatioSatsUsdPattern, +} + +impl InvestorPricePattern { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + investor_lower_band: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "lower_band")), + investor_upper_band: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "upper_band")), + price: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), _m(&acc, "price")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct LossNuplProfitPattern { pub loss: BaseCumulativeNegativeSumPattern, @@ -2526,13 +2531,6 @@ impl LossNuplProfitPattern { } } -/// Pattern struct for repeated tree structure. -pub struct LowerPriceUpperPattern { - pub lower_price_band: CentsSatsUsdPattern, - pub price: BpsCentsPercentilesRatioSatsUsdPattern, - pub upper_price_band: CentsSatsUsdPattern, -} - /// Pattern struct for repeated tree structure. pub struct NuplRealizedSupplyPattern { pub nupl: BpsRatioPattern, @@ -2578,8 +2576,8 @@ impl RatioValuePattern { /// Pattern struct for repeated tree structure. pub struct _6bBlockTxPattern { - pub _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2, - pub block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2, + pub _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, + pub block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, pub tx_index: SeriesPattern19, } @@ -2587,8 +2585,8 @@ impl _6bBlockTxPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2::new(client.clone(), _m(&acc, "6b")), - block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2::new(client.clone(), acc.clone()), + _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), _m(&acc, "6b")), + block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), acc.clone()), tx_index: SeriesPattern19::new(client.clone(), acc.clone()), } } @@ -2676,6 +2674,22 @@ impl AllSthPattern { } } +/// Pattern struct for repeated tree structure. +pub struct BaseDeltaPattern { + pub base: SeriesPattern1, + pub delta: AbsoluteRatePattern, +} + +impl BaseDeltaPattern { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + base: SeriesPattern1::new(client.clone(), acc.clone()), + delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct BlocksDominancePattern { pub blocks_mined: BaseCumulativeSumPattern2, @@ -2757,33 +2771,17 @@ impl CentsUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct CoindaysSentPattern { +pub struct CoindaysTransferPattern { pub coindays_destroyed: BaseCumulativeSumPattern, - pub sent: BaseCumulativeInSumPattern, + pub transfer_volume: BaseCumulativeInSumPattern, } -impl CoindaysSentPattern { +impl CoindaysTransferPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { coindays_destroyed: BaseCumulativeSumPattern::new(client.clone(), _m(&acc, "coindays_destroyed")), - sent: BaseCumulativeInSumPattern::new(client.clone(), _m(&acc, "sent")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct DeltaInnerPattern { - pub delta: AbsoluteRatePattern, - pub inner: SeriesPattern1, -} - -impl DeltaInnerPattern { - /// Create a new pattern node with accumulated series name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), - inner: SeriesPattern1::new(client.clone(), acc.clone()), + transfer_volume: BaseCumulativeInSumPattern::new(client.clone(), _m(&acc, "transfer_volume")), } } } @@ -2820,28 +2818,28 @@ impl PriceRatioPattern { } } -/// Pattern struct for repeated tree structure. -pub struct RelPattern { - pub rel_to_mcap: BpsPercentRatioPattern, - pub rel_to_rcap: BpsPercentRatioPattern, -} - -impl RelPattern { - /// Create a new pattern node with accumulated series name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_mcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "mcap")), - rel_to_rcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rcap")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct SdSmaPattern { pub sd: SeriesPattern1, pub sma: SeriesPattern1, } +/// Pattern struct for repeated tree structure. +pub struct ToPattern { + pub to_mcap: BpsPercentRatioPattern, + pub to_rcap: BpsPercentRatioPattern, +} + +impl ToPattern { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + to_mcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "mcap")), + to_rcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rcap")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct ValuePattern { pub value_created: BaseCumulativeSumPattern, @@ -2888,14 +2886,14 @@ impl NuplPattern { /// Pattern struct for repeated tree structure. pub struct UnspentPattern { - pub unspent_count: DeltaInnerPattern, + pub unspent_count: BaseDeltaPattern, } impl UnspentPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - unspent_count: DeltaInnerPattern::new(client.clone(), acc.clone()), + unspent_count: BaseDeltaPattern::new(client.clone(), acc.clone()), } } } @@ -2954,8 +2952,8 @@ pub struct SeriesTree_Blocks { pub weight: SeriesTree_Blocks_Weight, pub count: SeriesTree_Blocks_Count, pub lookback: SeriesTree_Blocks_Lookback, - pub interval: _1m1w1y24hHeightPattern, - pub vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern, + pub interval: _1m1w1y24hBasePattern, + pub vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2, pub fullness: SeriesTree_Blocks_Fullness, pub halving: SeriesTree_Blocks_Halving, } @@ -2970,8 +2968,8 @@ impl SeriesTree_Blocks { weight: SeriesTree_Blocks_Weight::new(client.clone(), format!("{base_path}_weight")), count: SeriesTree_Blocks_Count::new(client.clone(), format!("{base_path}_count")), lookback: SeriesTree_Blocks_Lookback::new(client.clone(), format!("{base_path}_lookback")), - interval: _1m1w1y24hHeightPattern::new(client.clone(), "block_interval".to_string()), - vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "block_vbytes".to_string()), + interval: _1m1w1y24hBasePattern::new(client.clone(), "block_interval".to_string()), + vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2::new(client.clone(), "block_vbytes".to_string()), fullness: SeriesTree_Blocks_Fullness::new(client.clone(), format!("{base_path}_fullness")), halving: SeriesTree_Blocks_Halving::new(client.clone(), format!("{base_path}_halving")), } @@ -2981,22 +2979,22 @@ impl SeriesTree_Blocks { /// Series tree node. pub struct SeriesTree_Blocks_Difficulty { pub value: SeriesPattern1, - pub as_hash: SeriesPattern1, + pub hashrate: SeriesPattern1, pub adjustment: BpsPercentRatioPattern, pub epoch: SeriesPattern1, - pub blocks_before_next: SeriesPattern1, - pub days_before_next: SeriesPattern1, + pub blocks_to_retarget: SeriesPattern1, + pub days_to_retarget: SeriesPattern1, } impl SeriesTree_Blocks_Difficulty { pub fn new(client: Arc, base_path: String) -> Self { Self { value: SeriesPattern1::new(client.clone(), "difficulty".to_string()), - as_hash: SeriesPattern1::new(client.clone(), "difficulty_as_hash".to_string()), + hashrate: SeriesPattern1::new(client.clone(), "difficulty_hashrate".to_string()), adjustment: BpsPercentRatioPattern::new(client.clone(), "difficulty_adjustment".to_string()), epoch: SeriesPattern1::new(client.clone(), "difficulty_epoch".to_string()), - blocks_before_next: SeriesPattern1::new(client.clone(), "blocks_before_next_difficulty_adjustment".to_string()), - days_before_next: SeriesPattern1::new(client.clone(), "days_before_next_difficulty_adjustment".to_string()), + blocks_to_retarget: SeriesPattern1::new(client.clone(), "blocks_to_retarget".to_string()), + days_to_retarget: SeriesPattern1::new(client.clone(), "days_to_retarget".to_string()), } } } @@ -3020,7 +3018,7 @@ impl SeriesTree_Blocks_Time { /// Series tree node. pub struct SeriesTree_Blocks_Size { - pub total: SeriesPattern18, + pub base: SeriesPattern18, pub cumulative: SeriesPattern1, pub sum: _1m1w1y24hPattern, pub average: _1m1w1y24hPattern, @@ -3036,7 +3034,7 @@ pub struct SeriesTree_Blocks_Size { impl SeriesTree_Blocks_Size { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: SeriesPattern18::new(client.clone(), "total_size".to_string()), + base: SeriesPattern18::new(client.clone(), "total_size".to_string()), cumulative: SeriesPattern1::new(client.clone(), "block_size_cumulative".to_string()), sum: _1m1w1y24hPattern::new(client.clone(), "block_size_sum".to_string()), average: _1m1w1y24hPattern::new(client.clone(), "block_size_average".to_string()), @@ -3053,7 +3051,7 @@ impl SeriesTree_Blocks_Size { /// Series tree node. pub struct SeriesTree_Blocks_Weight { - pub raw: SeriesPattern18, + pub base: SeriesPattern18, pub cumulative: SeriesPattern1, pub sum: _1m1w1y24hPattern, pub average: _1m1w1y24hPattern, @@ -3069,7 +3067,7 @@ pub struct SeriesTree_Blocks_Weight { impl SeriesTree_Blocks_Weight { pub fn new(client: Arc, base_path: String) -> Self { Self { - raw: SeriesPattern18::new(client.clone(), "block_weight".to_string()), + base: SeriesPattern18::new(client.clone(), "block_weight".to_string()), cumulative: SeriesPattern1::new(client.clone(), "block_weight_cumulative".to_string()), sum: _1m1w1y24hPattern::new(client.clone(), "block_weight_sum".to_string()), average: _1m1w1y24hPattern::new(client.clone(), "block_weight_average".to_string()), @@ -3198,7 +3196,7 @@ impl SeriesTree_Blocks_Lookback { /// Series tree node. pub struct SeriesTree_Blocks_Fullness { - pub bps: _1m1w1y24hHeightPattern, + pub bps: _1m1w1y24hBasePattern, pub ratio: SeriesPattern1, pub percent: SeriesPattern1, } @@ -3206,7 +3204,7 @@ pub struct SeriesTree_Blocks_Fullness { impl SeriesTree_Blocks_Fullness { pub fn new(client: Arc, base_path: String) -> Self { Self { - bps: _1m1w1y24hHeightPattern::new(client.clone(), "block_fullness_bps".to_string()), + bps: _1m1w1y24hBasePattern::new(client.clone(), "block_fullness_bps".to_string()), ratio: SeriesPattern1::new(client.clone(), "block_fullness_ratio".to_string()), percent: SeriesPattern1::new(client.clone(), "block_fullness".to_string()), } @@ -3216,16 +3214,16 @@ impl SeriesTree_Blocks_Fullness { /// Series tree node. pub struct SeriesTree_Blocks_Halving { pub epoch: SeriesPattern1, - pub blocks_before_next: SeriesPattern1, - pub days_before_next: SeriesPattern1, + pub blocks_to_halving: SeriesPattern1, + pub days_to_halving: SeriesPattern1, } impl SeriesTree_Blocks_Halving { pub fn new(client: Arc, base_path: String) -> Self { Self { epoch: SeriesPattern1::new(client.clone(), "halving_epoch".to_string()), - blocks_before_next: SeriesPattern1::new(client.clone(), "blocks_before_next_halving".to_string()), - days_before_next: SeriesPattern1::new(client.clone(), "days_before_next_halving".to_string()), + blocks_to_halving: SeriesPattern1::new(client.clone(), "blocks_to_halving".to_string()), + days_to_halving: SeriesPattern1::new(client.clone(), "days_to_halving".to_string()), } } } @@ -3286,14 +3284,14 @@ impl SeriesTree_Transactions_Raw { /// Series tree node. pub struct SeriesTree_Transactions_Count { - pub total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern, + pub total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2, pub is_coinbase: SeriesPattern19, } impl SeriesTree_Transactions_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "tx_count".to_string()), + total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2::new(client.clone(), "tx_count".to_string()), is_coinbase: SeriesPattern19::new(client.clone(), "is_coinbase".to_string()), } } @@ -3352,8 +3350,8 @@ impl SeriesTree_Transactions_Versions { /// Series tree node. pub struct SeriesTree_Transactions_Volume { - pub sent_sum: BaseCumulativeSumPattern4, - pub received_sum: BaseCumulativeSumPattern4, + pub transfer_volume: BaseCumulativeSumPattern4, + pub output_volume: BaseCumulativeSumPattern4, pub tx_per_sec: SeriesPattern1, pub outputs_per_sec: SeriesPattern1, pub inputs_per_sec: SeriesPattern1, @@ -3362,8 +3360,8 @@ pub struct SeriesTree_Transactions_Volume { impl SeriesTree_Transactions_Volume { pub fn new(client: Arc, base_path: String) -> Self { Self { - sent_sum: BaseCumulativeSumPattern4::new(client.clone(), "sent_sum".to_string()), - received_sum: BaseCumulativeSumPattern4::new(client.clone(), "received_sum".to_string()), + transfer_volume: BaseCumulativeSumPattern4::new(client.clone(), "exact_transfer_volume".to_string()), + output_volume: BaseCumulativeSumPattern4::new(client.clone(), "output_volume".to_string()), tx_per_sec: SeriesPattern1::new(client.clone(), "tx_per_sec".to_string()), outputs_per_sec: SeriesPattern1::new(client.clone(), "outputs_per_sec".to_string()), inputs_per_sec: SeriesPattern1::new(client.clone(), "inputs_per_sec".to_string()), @@ -4020,12 +4018,16 @@ pub struct SeriesTree_Mining_Rewards_Fees { pub base: BtcCentsSatsUsdPattern, pub cumulative: BtcCentsSatsUsdPattern, pub sum: _1m1w1y24hPattern5, - pub _24h: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, - pub _1w: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, - pub _1m: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, - pub _1y: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, + pub average: _1m1w1y24hPattern5, + pub min: _1m1w1y24hPattern5, + pub max: _1m1w1y24hPattern5, + pub pct10: _1m1w1y24hPattern5, + pub pct25: _1m1w1y24hPattern5, + pub median: _1m1w1y24hPattern5, + pub pct75: _1m1w1y24hPattern5, + pub pct90: _1m1w1y24hPattern5, pub dominance: _1m1w1y24hBpsPercentRatioPattern, - pub ratio_multiple: SeriesTree_Mining_Rewards_Fees_RatioMultiple, + pub to_subsidy_ratio: SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio, } impl SeriesTree_Mining_Rewards_Fees { @@ -4034,31 +4036,35 @@ impl SeriesTree_Mining_Rewards_Fees { base: BtcCentsSatsUsdPattern::new(client.clone(), "fees".to_string()), cumulative: BtcCentsSatsUsdPattern::new(client.clone(), "fees_cumulative".to_string()), sum: _1m1w1y24hPattern5::new(client.clone(), "fees_sum".to_string()), - _24h: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "fees_24h".to_string()), - _1w: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "fees_1w".to_string()), - _1m: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "fees_1m".to_string()), - _1y: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "fees_1y".to_string()), + average: _1m1w1y24hPattern5::new(client.clone(), "fees_average".to_string()), + min: _1m1w1y24hPattern5::new(client.clone(), "fees_min".to_string()), + max: _1m1w1y24hPattern5::new(client.clone(), "fees_max".to_string()), + pct10: _1m1w1y24hPattern5::new(client.clone(), "fees_pct10".to_string()), + pct25: _1m1w1y24hPattern5::new(client.clone(), "fees_pct25".to_string()), + median: _1m1w1y24hPattern5::new(client.clone(), "fees_median".to_string()), + pct75: _1m1w1y24hPattern5::new(client.clone(), "fees_pct75".to_string()), + pct90: _1m1w1y24hPattern5::new(client.clone(), "fees_pct90".to_string()), dominance: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), "fee_dominance".to_string()), - ratio_multiple: SeriesTree_Mining_Rewards_Fees_RatioMultiple::new(client.clone(), format!("{base_path}_ratio_multiple")), + to_subsidy_ratio: SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio::new(client.clone(), format!("{base_path}_to_subsidy_ratio")), } } } /// Series tree node. -pub struct SeriesTree_Mining_Rewards_Fees_RatioMultiple { +pub struct SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio { pub _24h: BpsRatioPattern2, pub _1w: BpsRatioPattern2, pub _1m: BpsRatioPattern2, pub _1y: BpsRatioPattern2, } -impl SeriesTree_Mining_Rewards_Fees_RatioMultiple { +impl SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio { pub fn new(client: Arc, base_path: String) -> Self { Self { - _24h: BpsRatioPattern2::new(client.clone(), "fee_ratio_multiple_24h".to_string()), - _1w: BpsRatioPattern2::new(client.clone(), "fee_ratio_multiple_1w".to_string()), - _1m: BpsRatioPattern2::new(client.clone(), "fee_ratio_multiple_1m".to_string()), - _1y: BpsRatioPattern2::new(client.clone(), "fee_ratio_multiple_1y".to_string()), + _24h: BpsRatioPattern2::new(client.clone(), "fee_to_subsidy_ratio_24h".to_string()), + _1w: BpsRatioPattern2::new(client.clone(), "fee_to_subsidy_ratio_1w".to_string()), + _1m: BpsRatioPattern2::new(client.clone(), "fee_to_subsidy_ratio_1m".to_string()), + _1y: BpsRatioPattern2::new(client.clone(), "fee_to_subsidy_ratio_1y".to_string()), } } } @@ -4127,7 +4133,6 @@ pub struct SeriesTree_Cointime { pub prices: SeriesTree_Cointime_Prices, pub adjusted: SeriesTree_Cointime_Adjusted, pub reserve_risk: SeriesTree_Cointime_ReserveRisk, - pub coinblocks_destroyed: BaseCumulativeSumPattern, } impl SeriesTree_Cointime { @@ -4140,7 +4145,6 @@ impl SeriesTree_Cointime { prices: SeriesTree_Cointime_Prices::new(client.clone(), format!("{base_path}_prices")), adjusted: SeriesTree_Cointime_Adjusted::new(client.clone(), format!("{base_path}_adjusted")), reserve_risk: SeriesTree_Cointime_ReserveRisk::new(client.clone(), format!("{base_path}_reserve_risk")), - coinblocks_destroyed: BaseCumulativeSumPattern::new(client.clone(), "coinblocks_destroyed".to_string()), } } } @@ -4152,6 +4156,7 @@ pub struct SeriesTree_Cointime_Activity { pub liveliness: SeriesPattern1, pub vaultedness: SeriesPattern1, pub ratio: SeriesPattern1, + pub coinblocks_destroyed: BaseCumulativeSumPattern, } impl SeriesTree_Cointime_Activity { @@ -4161,7 +4166,8 @@ impl SeriesTree_Cointime_Activity { coinblocks_stored: BaseCumulativeSumPattern::new(client.clone(), "coinblocks_stored".to_string()), liveliness: SeriesPattern1::new(client.clone(), "liveliness".to_string()), vaultedness: SeriesPattern1::new(client.clone(), "vaultedness".to_string()), - ratio: SeriesPattern1::new(client.clone(), "activity_to_vaultedness_ratio".to_string()), + ratio: SeriesPattern1::new(client.clone(), "activity_to_vaultedness".to_string()), + coinblocks_destroyed: BaseCumulativeSumPattern::new(client.clone(), "coinblocks_destroyed".to_string()), } } } @@ -4233,7 +4239,6 @@ pub struct SeriesTree_Cointime_Prices { pub balanced: BpsCentsPercentilesRatioSatsUsdPattern, pub terminal: BpsCentsPercentilesRatioSatsUsdPattern, pub delta: BpsCentsPercentilesRatioSatsUsdPattern, - pub cumulative_market_cap: SeriesPattern1, } impl SeriesTree_Cointime_Prices { @@ -4247,7 +4252,6 @@ impl SeriesTree_Cointime_Prices { balanced: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "balanced_price".to_string()), terminal: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "terminal_price".to_string()), delta: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "delta_price".to_string()), - cumulative_market_cap: SeriesPattern1::new(client.clone(), "cumulative_market_cap".to_string()), } } } @@ -4928,12 +4932,12 @@ pub struct SeriesTree_Indicators { pub nvt: BpsRatioPattern2, pub gini: BpsPercentRatioPattern3, pub rhodl_ratio: BpsRatioPattern2, - pub thermocap_multiple: BpsRatioPattern2, + pub thermo_cap_multiple: BpsRatioPattern2, pub coindays_destroyed_supply_adjusted: SeriesPattern1, pub coinyears_destroyed_supply_adjusted: SeriesPattern1, pub dormancy: SeriesTree_Indicators_Dormancy, pub stock_to_flow: SeriesPattern1, - pub seller_exhaustion_constant: SeriesPattern1, + pub seller_exhaustion: SeriesPattern1, } impl SeriesTree_Indicators { @@ -4943,12 +4947,12 @@ impl SeriesTree_Indicators { nvt: BpsRatioPattern2::new(client.clone(), "nvt".to_string()), gini: BpsPercentRatioPattern3::new(client.clone(), "gini".to_string()), rhodl_ratio: BpsRatioPattern2::new(client.clone(), "rhodl_ratio".to_string()), - thermocap_multiple: BpsRatioPattern2::new(client.clone(), "thermocap_multiple".to_string()), + thermo_cap_multiple: BpsRatioPattern2::new(client.clone(), "thermo_cap_multiple".to_string()), coindays_destroyed_supply_adjusted: SeriesPattern1::new(client.clone(), "coindays_destroyed_supply_adjusted".to_string()), coinyears_destroyed_supply_adjusted: SeriesPattern1::new(client.clone(), "coinyears_destroyed_supply_adjusted".to_string()), dormancy: SeriesTree_Indicators_Dormancy::new(client.clone(), format!("{base_path}_dormancy")), stock_to_flow: SeriesPattern1::new(client.clone(), "stock_to_flow".to_string()), - seller_exhaustion_constant: SeriesPattern1::new(client.clone(), "seller_exhaustion_constant".to_string()), + seller_exhaustion: SeriesPattern1::new(client.clone(), "seller_exhaustion".to_string()), } } } @@ -5038,19 +5042,19 @@ pub struct SeriesTree_Market_Lookback { impl SeriesTree_Market_Lookback { pub fn new(client: Arc, base_path: String) -> Self { Self { - _24h: CentsSatsUsdPattern::new(client.clone(), "price_lookback_24h".to_string()), - _1w: CentsSatsUsdPattern::new(client.clone(), "price_lookback_1w".to_string()), - _1m: CentsSatsUsdPattern::new(client.clone(), "price_lookback_1m".to_string()), - _3m: CentsSatsUsdPattern::new(client.clone(), "price_lookback_3m".to_string()), - _6m: CentsSatsUsdPattern::new(client.clone(), "price_lookback_6m".to_string()), - _1y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_1y".to_string()), - _2y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_2y".to_string()), - _3y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_3y".to_string()), - _4y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_4y".to_string()), - _5y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_5y".to_string()), - _6y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_6y".to_string()), - _8y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_8y".to_string()), - _10y: CentsSatsUsdPattern::new(client.clone(), "price_lookback_10y".to_string()), + _24h: CentsSatsUsdPattern::new(client.clone(), "price_past_24h".to_string()), + _1w: CentsSatsUsdPattern::new(client.clone(), "price_past_1w".to_string()), + _1m: CentsSatsUsdPattern::new(client.clone(), "price_past_1m".to_string()), + _3m: CentsSatsUsdPattern::new(client.clone(), "price_past_3m".to_string()), + _6m: CentsSatsUsdPattern::new(client.clone(), "price_past_6m".to_string()), + _1y: CentsSatsUsdPattern::new(client.clone(), "price_past_1y".to_string()), + _2y: CentsSatsUsdPattern::new(client.clone(), "price_past_2y".to_string()), + _3y: CentsSatsUsdPattern::new(client.clone(), "price_past_3y".to_string()), + _4y: CentsSatsUsdPattern::new(client.clone(), "price_past_4y".to_string()), + _5y: CentsSatsUsdPattern::new(client.clone(), "price_past_5y".to_string()), + _6y: CentsSatsUsdPattern::new(client.clone(), "price_past_6y".to_string()), + _8y: CentsSatsUsdPattern::new(client.clone(), "price_past_8y".to_string()), + _10y: CentsSatsUsdPattern::new(client.clone(), "price_past_10y".to_string()), } } } @@ -5700,7 +5704,7 @@ impl SeriesTree_Market_Technical_Macd_1y { /// Series tree node. pub struct SeriesTree_Pools { - pub height_to_pool: SeriesPattern18, + pub pool: SeriesPattern18, pub major: SeriesTree_Pools_Major, pub minor: SeriesTree_Pools_Minor, } @@ -5708,7 +5712,7 @@ pub struct SeriesTree_Pools { impl SeriesTree_Pools { pub fn new(client: Arc, base_path: String) -> Self { Self { - height_to_pool: SeriesPattern18::new(client.clone(), "pool".to_string()), + pool: SeriesPattern18::new(client.clone(), "pool".to_string()), major: SeriesTree_Pools_Major::new(client.clone(), format!("{base_path}_major")), minor: SeriesTree_Pools_Minor::new(client.clone(), format!("{base_path}_minor")), } @@ -6135,7 +6139,7 @@ impl SeriesTree_Prices_Spot { pub struct SeriesTree_Supply { pub state: SeriesPattern18, pub circulating: BtcCentsSatsUsdPattern, - pub burned: SeriesTree_Supply_Burned, + pub burned: BaseCumulativeSumPattern4, pub inflation_rate: BpsPercentRatioPattern, pub velocity: SeriesTree_Supply_Velocity, pub market_cap: CentsDeltaUsdPattern, @@ -6148,25 +6152,12 @@ impl SeriesTree_Supply { Self { state: SeriesPattern18::new(client.clone(), "supply_state".to_string()), circulating: BtcCentsSatsUsdPattern::new(client.clone(), "circulating_supply".to_string()), - burned: SeriesTree_Supply_Burned::new(client.clone(), format!("{base_path}_burned")), + burned: BaseCumulativeSumPattern4::new(client.clone(), "unspendable_supply".to_string()), inflation_rate: BpsPercentRatioPattern::new(client.clone(), "inflation_rate".to_string()), velocity: SeriesTree_Supply_Velocity::new(client.clone(), format!("{base_path}_velocity")), market_cap: CentsDeltaUsdPattern::new(client.clone(), "market_cap".to_string()), market_minus_realized_cap_growth_rate: _1m1w1y24hPattern::new(client.clone(), "market_minus_realized_cap_growth_rate".to_string()), - hodled_or_lost: BtcCentsSatsUsdPattern::new(client.clone(), "hodled_or_lost_coins".to_string()), - } - } -} - -/// Series tree node. -pub struct SeriesTree_Supply_Burned { - pub unspendable: BaseCumulativeSumPattern4, -} - -impl SeriesTree_Supply_Burned { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - unspendable: BaseCumulativeSumPattern4::new(client.clone(), "unspendable_supply".to_string()), + hodled_or_lost: BtcCentsSatsUsdPattern::new(client.clone(), "hodled_or_lost_supply".to_string()), } } } @@ -6268,8 +6259,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Supply { pub total: BtcCentsSatsUsdPattern, pub half: BtcCentsSatsUsdPattern, pub delta: AbsoluteRatePattern, - pub in_profit: BtcCentsRelSatsUsdPattern2, - pub in_loss: BtcCentsRelSatsUsdPattern2, + pub in_profit: BtcCentsSatsToUsdPattern2, + pub in_loss: BtcCentsSatsToUsdPattern2, } impl SeriesTree_Cohorts_Utxo_All_Supply { @@ -6278,15 +6269,15 @@ impl SeriesTree_Cohorts_Utxo_All_Supply { total: BtcCentsSatsUsdPattern::new(client.clone(), "supply".to_string()), half: BtcCentsSatsUsdPattern::new(client.clone(), "supply_half".to_string()), delta: AbsoluteRatePattern::new(client.clone(), "supply_delta".to_string()), - in_profit: BtcCentsRelSatsUsdPattern2::new(client.clone(), "supply_in_profit".to_string()), - in_loss: BtcCentsRelSatsUsdPattern2::new(client.clone(), "supply_in_loss".to_string()), + in_profit: BtcCentsSatsToUsdPattern2::new(client.clone(), "supply_in_profit".to_string()), + in_loss: BtcCentsSatsToUsdPattern2::new(client.clone(), "supply_in_loss".to_string()), } } } /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Activity { - pub sent: BaseCumulativeInSumPattern, + pub transfer_volume: BaseCumulativeInSumPattern, pub coindays_destroyed: BaseCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: SeriesPattern1, @@ -6295,7 +6286,7 @@ pub struct SeriesTree_Cohorts_Utxo_All_Activity { impl SeriesTree_Cohorts_Utxo_All_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - sent: BaseCumulativeInSumPattern::new(client.clone(), "sent".to_string()), + transfer_volume: BaseCumulativeInSumPattern::new(client.clone(), "transfer_volume".to_string()), coindays_destroyed: BaseCumulativeSumPattern::new(client.clone(), "coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "coinyears_destroyed".to_string()), dormancy: SeriesPattern1::new(client.clone(), "dormancy".to_string()), @@ -6305,34 +6296,34 @@ impl SeriesTree_Cohorts_Utxo_All_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Realized { - pub cap: CentsDeltaRelUsdPattern, + pub cap: CentsDeltaToUsdPattern, pub profit: SeriesTree_Cohorts_Utxo_All_Realized_Profit, pub loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_All_Realized_Price, pub mvrv: SeriesPattern1, pub sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr, - pub net_pnl: BaseChangeCumulativeDeltaRelSumPattern, + pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, pub gross_pnl: BaseCumulativeSumPattern3, pub sell_side_risk_ratio: _1m1w1y24hPattern6, - pub peak_regret: BaseCumulativeRelPattern, - pub investor: SeriesTree_Cohorts_Utxo_All_Realized_Investor, + pub peak_regret: BaseCumulativeToPattern, + pub investor: InvestorPricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } impl SeriesTree_Cohorts_Utxo_All_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { - cap: CentsDeltaRelUsdPattern::new(client.clone(), "realized_cap".to_string()), + cap: CentsDeltaToUsdPattern::new(client.clone(), "realized_cap".to_string()), profit: SeriesTree_Cohorts_Utxo_All_Realized_Profit::new(client.clone(), format!("{base_path}_profit")), loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_All_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "mvrv".to_string()), sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - net_pnl: BaseChangeCumulativeDeltaRelSumPattern::new(client.clone(), "net".to_string()), + net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "net".to_string()), gross_pnl: BaseCumulativeSumPattern3::new(client.clone(), "realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern6::new(client.clone(), "sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeRelPattern::new(client.clone(), "realized_peak_regret".to_string()), - investor: SeriesTree_Cohorts_Utxo_All_Realized_Investor::new(client.clone(), format!("{base_path}_investor")), + peak_regret: BaseCumulativeToPattern::new(client.clone(), "realized_peak_regret".to_string()), + investor: InvestorPricePattern::new(client.clone(), "investor".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "realized_profit_to_loss_ratio".to_string()), } } @@ -6343,7 +6334,7 @@ pub struct SeriesTree_Cohorts_Utxo_All_Realized_Profit { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub distribution_flow: SeriesPattern1, @@ -6355,7 +6346,7 @@ impl SeriesTree_Cohorts_Utxo_All_Realized_Profit { base: CentsUsdPattern2::new(client.clone(), "realized_profit".to_string()), cumulative: CentsUsdPattern2::new(client.clone(), "realized_profit_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "realized_profit_sum".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "realized_profit_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "realized_profit_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "profit_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "profit_value_destroyed".to_string()), distribution_flow: SeriesPattern1::new(client.clone(), "distribution_flow".to_string()), @@ -6369,7 +6360,7 @@ pub struct SeriesTree_Cohorts_Utxo_All_Realized_Loss { pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, pub negative: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub capitulation_flow: SeriesPattern1, @@ -6382,7 +6373,7 @@ impl SeriesTree_Cohorts_Utxo_All_Realized_Loss { cumulative: CentsUsdPattern2::new(client.clone(), "realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "realized_loss_sum".to_string()), negative: SeriesPattern1::new(client.clone(), "neg_realized_loss".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "realized_loss_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "realized_loss_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "loss_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "loss_value_destroyed".to_string()), capitulation_flow: SeriesPattern1::new(client.clone(), "capitulation_flow".to_string()), @@ -6636,23 +6627,6 @@ impl SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted { } } -/// Series tree node. -pub struct SeriesTree_Cohorts_Utxo_All_Realized_Investor { - pub price: BpsCentsPercentilesRatioSatsUsdPattern, - pub lower_price_band: CentsSatsUsdPattern, - pub upper_price_band: CentsSatsUsdPattern, -} - -impl SeriesTree_Cohorts_Utxo_All_Realized_Investor { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - price: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "investor_price".to_string()), - lower_price_band: CentsSatsUsdPattern::new(client.clone(), "lower_price_band".to_string()), - upper_price_band: CentsSatsUsdPattern::new(client.clone(), "upper_price_band".to_string()), - } - } -} - /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_CostBasis { pub min: CentsSatsUsdPattern, @@ -6704,8 +6678,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Unrealized_Profit { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, - pub rel_to_mcap: BpsPercentRatioPattern3, - pub rel_to_own_gross: BpsPercentRatioPattern3, + pub to_mcap: BpsPercentRatioPattern3, + pub to_own_gross_pnl: BpsPercentRatioPattern3, } impl SeriesTree_Cohorts_Utxo_All_Unrealized_Profit { @@ -6714,8 +6688,8 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_Profit { base: CentsUsdPattern2::new(client.clone(), "unrealized_profit".to_string()), cumulative: CentsUsdPattern2::new(client.clone(), "unrealized_profit_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "unrealized_profit_sum".to_string()), - rel_to_mcap: BpsPercentRatioPattern3::new(client.clone(), "unrealized_profit_rel_to_mcap".to_string()), - rel_to_own_gross: BpsPercentRatioPattern3::new(client.clone(), "unrealized_profit_rel_to_own_gross_pnl".to_string()), + to_mcap: BpsPercentRatioPattern3::new(client.clone(), "unrealized_profit_to_mcap".to_string()), + to_own_gross_pnl: BpsPercentRatioPattern3::new(client.clone(), "unrealized_profit_to_own_gross_pnl".to_string()), } } } @@ -6726,8 +6700,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Unrealized_Loss { pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, pub negative: SeriesPattern1, - pub rel_to_mcap: BpsPercentRatioPattern3, - pub rel_to_own_gross: BpsPercentRatioPattern3, + pub to_mcap: BpsPercentRatioPattern3, + pub to_own_gross_pnl: BpsPercentRatioPattern3, } impl SeriesTree_Cohorts_Utxo_All_Unrealized_Loss { @@ -6737,8 +6711,8 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_Loss { cumulative: CentsUsdPattern2::new(client.clone(), "unrealized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "unrealized_loss_sum".to_string()), negative: SeriesPattern1::new(client.clone(), "neg_unrealized_loss".to_string()), - rel_to_mcap: BpsPercentRatioPattern3::new(client.clone(), "unrealized_loss_rel_to_mcap".to_string()), - rel_to_own_gross: BpsPercentRatioPattern3::new(client.clone(), "unrealized_loss_rel_to_own_gross_pnl".to_string()), + to_mcap: BpsPercentRatioPattern3::new(client.clone(), "unrealized_loss_to_mcap".to_string()), + to_own_gross_pnl: BpsPercentRatioPattern3::new(client.clone(), "unrealized_loss_to_own_gross_pnl".to_string()), } } } @@ -6747,7 +6721,7 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_Loss { pub struct SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl { pub usd: SeriesPattern1, pub cents: SeriesPattern1, - pub rel_to_own_gross: BpsPercentRatioPattern, + pub to_own_gross_pnl: BpsPercentRatioPattern, } impl SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl { @@ -6755,7 +6729,7 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl { Self { usd: SeriesPattern1::new(client.clone(), "net_unrealized_pnl".to_string()), cents: SeriesPattern1::new(client.clone(), "net_unrealized_pnl_cents".to_string()), - rel_to_own_gross: BpsPercentRatioPattern::new(client.clone(), "net_unrealized_pnl_rel_to_own_gross_pnl".to_string()), + to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), "net_unrealized_pnl_to_own_gross_pnl".to_string()), } } } @@ -6779,7 +6753,7 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth { - pub supply: DeltaHalfInRelTotalPattern2, + pub supply: DeltaHalfInToTotalPattern2, pub outputs: UnspentPattern, pub activity: SeriesTree_Cohorts_Utxo_Sth_Activity, pub realized: SeriesTree_Cohorts_Utxo_Sth_Realized, @@ -6790,7 +6764,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth { impl SeriesTree_Cohorts_Utxo_Sth { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: DeltaHalfInRelTotalPattern2::new(client.clone(), "sth_supply".to_string()), + supply: DeltaHalfInToTotalPattern2::new(client.clone(), "sth_supply".to_string()), outputs: UnspentPattern::new(client.clone(), "sth_utxo_count".to_string()), activity: SeriesTree_Cohorts_Utxo_Sth_Activity::new(client.clone(), format!("{base_path}_activity")), realized: SeriesTree_Cohorts_Utxo_Sth_Realized::new(client.clone(), format!("{base_path}_realized")), @@ -6802,7 +6776,7 @@ impl SeriesTree_Cohorts_Utxo_Sth { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Activity { - pub sent: BaseCumulativeInSumPattern, + pub transfer_volume: BaseCumulativeInSumPattern, pub coindays_destroyed: BaseCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: SeriesPattern1, @@ -6811,7 +6785,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Activity { impl SeriesTree_Cohorts_Utxo_Sth_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - sent: BaseCumulativeInSumPattern::new(client.clone(), "sth_sent".to_string()), + transfer_volume: BaseCumulativeInSumPattern::new(client.clone(), "sth_transfer_volume".to_string()), coindays_destroyed: BaseCumulativeSumPattern::new(client.clone(), "sth_coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "sth_coinyears_destroyed".to_string()), dormancy: SeriesPattern1::new(client.clone(), "sth_dormancy".to_string()), @@ -6821,34 +6795,34 @@ impl SeriesTree_Cohorts_Utxo_Sth_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Realized { - pub cap: CentsDeltaRelUsdPattern, + pub cap: CentsDeltaToUsdPattern, pub profit: SeriesTree_Cohorts_Utxo_Sth_Realized_Profit, pub loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price, pub mvrv: SeriesPattern1, pub sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr, - pub net_pnl: BaseChangeCumulativeDeltaRelSumPattern, + pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, pub gross_pnl: BaseCumulativeSumPattern3, pub sell_side_risk_ratio: _1m1w1y24hPattern6, - pub peak_regret: BaseCumulativeRelPattern, - pub investor: SeriesTree_Cohorts_Utxo_Sth_Realized_Investor, + pub peak_regret: BaseCumulativeToPattern, + pub investor: InvestorPricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } impl SeriesTree_Cohorts_Utxo_Sth_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { - cap: CentsDeltaRelUsdPattern::new(client.clone(), "sth_realized_cap".to_string()), + cap: CentsDeltaToUsdPattern::new(client.clone(), "sth_realized_cap".to_string()), profit: SeriesTree_Cohorts_Utxo_Sth_Realized_Profit::new(client.clone(), format!("{base_path}_profit")), loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "sth_mvrv".to_string()), sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - net_pnl: BaseChangeCumulativeDeltaRelSumPattern::new(client.clone(), "sth_net".to_string()), + net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "sth_net".to_string()), gross_pnl: BaseCumulativeSumPattern3::new(client.clone(), "sth_realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern6::new(client.clone(), "sth_sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeRelPattern::new(client.clone(), "sth_realized_peak_regret".to_string()), - investor: SeriesTree_Cohorts_Utxo_Sth_Realized_Investor::new(client.clone(), format!("{base_path}_investor")), + peak_regret: BaseCumulativeToPattern::new(client.clone(), "sth_realized_peak_regret".to_string()), + investor: InvestorPricePattern::new(client.clone(), "sth_investor".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "sth_realized_profit_to_loss_ratio".to_string()), } } @@ -6859,7 +6833,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Profit { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub distribution_flow: SeriesPattern1, @@ -6871,7 +6845,7 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized_Profit { base: CentsUsdPattern2::new(client.clone(), "sth_realized_profit".to_string()), cumulative: CentsUsdPattern2::new(client.clone(), "sth_realized_profit_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "sth_realized_profit_sum".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "sth_realized_profit_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "sth_realized_profit_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "sth_profit_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "sth_profit_value_destroyed".to_string()), distribution_flow: SeriesPattern1::new(client.clone(), "sth_distribution_flow".to_string()), @@ -6885,7 +6859,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Loss { pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, pub negative: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub capitulation_flow: SeriesPattern1, @@ -6898,7 +6872,7 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized_Loss { cumulative: CentsUsdPattern2::new(client.clone(), "sth_realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "sth_realized_loss_sum".to_string()), negative: SeriesPattern1::new(client.clone(), "sth_neg_realized_loss".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "sth_realized_loss_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "sth_realized_loss_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "sth_loss_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "sth_loss_value_destroyed".to_string()), capitulation_flow: SeriesPattern1::new(client.clone(), "sth_capitulation_flow".to_string()), @@ -7152,23 +7126,6 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted { } } -/// Series tree node. -pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Investor { - pub price: BpsCentsPercentilesRatioSatsUsdPattern, - pub lower_price_band: CentsSatsUsdPattern, - pub upper_price_band: CentsSatsUsdPattern, -} - -impl SeriesTree_Cohorts_Utxo_Sth_Realized_Investor { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - price: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "sth_investor_price".to_string()), - lower_price_band: CentsSatsUsdPattern::new(client.clone(), "sth_lower_price_band".to_string()), - upper_price_band: CentsSatsUsdPattern::new(client.clone(), "sth_upper_price_band".to_string()), - } - } -} - /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_CostBasis { pub min: CentsSatsUsdPattern, @@ -7193,9 +7150,9 @@ impl SeriesTree_Cohorts_Utxo_Sth_CostBasis { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Unrealized { pub nupl: BpsRatioPattern, - pub profit: BaseCumulativeRelSumPattern2, - pub loss: BaseCumulativeNegativeRelSumPattern2, - pub net_pnl: CentsRelUsdPattern2, + pub profit: BaseCumulativeSumToPattern2, + pub loss: BaseCumulativeNegativeSumToPattern2, + pub net_pnl: CentsToUsdPattern2, pub gross_pnl: CentsUsdPattern2, pub invested_capital: InPattern, pub sentiment: SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment, @@ -7205,9 +7162,9 @@ impl SeriesTree_Cohorts_Utxo_Sth_Unrealized { pub fn new(client: Arc, base_path: String) -> Self { Self { nupl: BpsRatioPattern::new(client.clone(), "sth_nupl".to_string()), - profit: BaseCumulativeRelSumPattern2::new(client.clone(), "sth_unrealized_profit".to_string()), - loss: BaseCumulativeNegativeRelSumPattern2::new(client.clone(), "sth".to_string()), - net_pnl: CentsRelUsdPattern2::new(client.clone(), "sth_net_unrealized_pnl".to_string()), + profit: BaseCumulativeSumToPattern2::new(client.clone(), "sth_unrealized_profit".to_string()), + loss: BaseCumulativeNegativeSumToPattern2::new(client.clone(), "sth".to_string()), + net_pnl: CentsToUsdPattern2::new(client.clone(), "sth_net_unrealized_pnl".to_string()), gross_pnl: CentsUsdPattern2::new(client.clone(), "sth_unrealized_gross_pnl".to_string()), invested_capital: InPattern::new(client.clone(), "sth_invested_capital_in".to_string()), sentiment: SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment::new(client.clone(), format!("{base_path}_sentiment")), @@ -7234,7 +7191,7 @@ impl SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth { - pub supply: DeltaHalfInRelTotalPattern2, + pub supply: DeltaHalfInToTotalPattern2, pub outputs: UnspentPattern, pub activity: SeriesTree_Cohorts_Utxo_Lth_Activity, pub realized: SeriesTree_Cohorts_Utxo_Lth_Realized, @@ -7245,7 +7202,7 @@ pub struct SeriesTree_Cohorts_Utxo_Lth { impl SeriesTree_Cohorts_Utxo_Lth { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: DeltaHalfInRelTotalPattern2::new(client.clone(), "lth_supply".to_string()), + supply: DeltaHalfInToTotalPattern2::new(client.clone(), "lth_supply".to_string()), outputs: UnspentPattern::new(client.clone(), "lth_utxo_count".to_string()), activity: SeriesTree_Cohorts_Utxo_Lth_Activity::new(client.clone(), format!("{base_path}_activity")), realized: SeriesTree_Cohorts_Utxo_Lth_Realized::new(client.clone(), format!("{base_path}_realized")), @@ -7257,7 +7214,7 @@ impl SeriesTree_Cohorts_Utxo_Lth { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Activity { - pub sent: BaseCumulativeInSumPattern, + pub transfer_volume: BaseCumulativeInSumPattern, pub coindays_destroyed: BaseCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: SeriesPattern1, @@ -7266,7 +7223,7 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Activity { impl SeriesTree_Cohorts_Utxo_Lth_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - sent: BaseCumulativeInSumPattern::new(client.clone(), "lth_sent".to_string()), + transfer_volume: BaseCumulativeInSumPattern::new(client.clone(), "lth_transfer_volume".to_string()), coindays_destroyed: BaseCumulativeSumPattern::new(client.clone(), "lth_coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "lth_coinyears_destroyed".to_string()), dormancy: SeriesPattern1::new(client.clone(), "lth_dormancy".to_string()), @@ -7276,34 +7233,34 @@ impl SeriesTree_Cohorts_Utxo_Lth_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Realized { - pub cap: CentsDeltaRelUsdPattern, + pub cap: CentsDeltaToUsdPattern, pub profit: SeriesTree_Cohorts_Utxo_Lth_Realized_Profit, pub loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price, pub mvrv: SeriesPattern1, pub sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr, - pub net_pnl: BaseChangeCumulativeDeltaRelSumPattern, + pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, pub gross_pnl: BaseCumulativeSumPattern3, pub sell_side_risk_ratio: _1m1w1y24hPattern6, - pub peak_regret: BaseCumulativeRelPattern, - pub investor: SeriesTree_Cohorts_Utxo_Lth_Realized_Investor, + pub peak_regret: BaseCumulativeToPattern, + pub investor: InvestorPricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } impl SeriesTree_Cohorts_Utxo_Lth_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { - cap: CentsDeltaRelUsdPattern::new(client.clone(), "lth_realized_cap".to_string()), + cap: CentsDeltaToUsdPattern::new(client.clone(), "lth_realized_cap".to_string()), profit: SeriesTree_Cohorts_Utxo_Lth_Realized_Profit::new(client.clone(), format!("{base_path}_profit")), loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "lth_mvrv".to_string()), sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - net_pnl: BaseChangeCumulativeDeltaRelSumPattern::new(client.clone(), "lth_net".to_string()), + net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "lth_net".to_string()), gross_pnl: BaseCumulativeSumPattern3::new(client.clone(), "lth_realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern6::new(client.clone(), "lth_sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeRelPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), - investor: SeriesTree_Cohorts_Utxo_Lth_Realized_Investor::new(client.clone(), format!("{base_path}_investor")), + peak_regret: BaseCumulativeToPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), + investor: InvestorPricePattern::new(client.clone(), "lth_investor".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "lth_realized_profit_to_loss_ratio".to_string()), } } @@ -7314,7 +7271,7 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Profit { pub base: CentsUsdPattern2, pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub distribution_flow: SeriesPattern1, @@ -7326,7 +7283,7 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized_Profit { base: CentsUsdPattern2::new(client.clone(), "lth_realized_profit".to_string()), cumulative: CentsUsdPattern2::new(client.clone(), "lth_realized_profit_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "lth_realized_profit_sum".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "lth_realized_profit_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "lth_realized_profit_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "lth_profit_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "lth_profit_value_destroyed".to_string()), distribution_flow: SeriesPattern1::new(client.clone(), "lth_distribution_flow".to_string()), @@ -7340,7 +7297,7 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Loss { pub cumulative: CentsUsdPattern2, pub sum: _1m1w1y24hPattern4, pub negative: SeriesPattern1, - pub rel_to_rcap: BpsPercentRatioPattern4, + pub to_rcap: BpsPercentRatioPattern4, pub value_created: BaseCumulativeSumPattern, pub value_destroyed: BaseCumulativeSumPattern, pub capitulation_flow: SeriesPattern1, @@ -7353,7 +7310,7 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized_Loss { cumulative: CentsUsdPattern2::new(client.clone(), "lth_realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "lth_realized_loss_sum".to_string()), negative: SeriesPattern1::new(client.clone(), "lth_neg_realized_loss".to_string()), - rel_to_rcap: BpsPercentRatioPattern4::new(client.clone(), "lth_realized_loss_rel_to_rcap".to_string()), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), "lth_realized_loss_to_rcap".to_string()), value_created: BaseCumulativeSumPattern::new(client.clone(), "lth_loss_value_created".to_string()), value_destroyed: BaseCumulativeSumPattern::new(client.clone(), "lth_loss_value_destroyed".to_string()), capitulation_flow: SeriesPattern1::new(client.clone(), "lth_capitulation_flow".to_string()), @@ -7588,23 +7545,6 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr { } } -/// Series tree node. -pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Investor { - pub price: BpsCentsPercentilesRatioSatsUsdPattern, - pub lower_price_band: CentsSatsUsdPattern, - pub upper_price_band: CentsSatsUsdPattern, -} - -impl SeriesTree_Cohorts_Utxo_Lth_Realized_Investor { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - price: BpsCentsPercentilesRatioSatsUsdPattern::new(client.clone(), "lth_investor_price".to_string()), - lower_price_band: CentsSatsUsdPattern::new(client.clone(), "lth_lower_price_band".to_string()), - upper_price_band: CentsSatsUsdPattern::new(client.clone(), "lth_upper_price_band".to_string()), - } - } -} - /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_CostBasis { pub min: CentsSatsUsdPattern, @@ -7629,9 +7569,9 @@ impl SeriesTree_Cohorts_Utxo_Lth_CostBasis { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Unrealized { pub nupl: BpsRatioPattern, - pub profit: BaseCumulativeRelSumPattern2, - pub loss: BaseCumulativeNegativeRelSumPattern2, - pub net_pnl: CentsRelUsdPattern2, + pub profit: BaseCumulativeSumToPattern2, + pub loss: BaseCumulativeNegativeSumToPattern2, + pub net_pnl: CentsToUsdPattern2, pub gross_pnl: CentsUsdPattern2, pub invested_capital: InPattern, pub sentiment: SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment, @@ -7641,9 +7581,9 @@ impl SeriesTree_Cohorts_Utxo_Lth_Unrealized { pub fn new(client: Arc, base_path: String) -> Self { Self { nupl: BpsRatioPattern::new(client.clone(), "lth_nupl".to_string()), - profit: BaseCumulativeRelSumPattern2::new(client.clone(), "lth_unrealized_profit".to_string()), - loss: BaseCumulativeNegativeRelSumPattern2::new(client.clone(), "lth".to_string()), - net_pnl: CentsRelUsdPattern2::new(client.clone(), "lth_net_unrealized_pnl".to_string()), + profit: BaseCumulativeSumToPattern2::new(client.clone(), "lth_unrealized_profit".to_string()), + loss: BaseCumulativeNegativeSumToPattern2::new(client.clone(), "lth".to_string()), + net_pnl: CentsToUsdPattern2::new(client.clone(), "lth_net_unrealized_pnl".to_string()), gross_pnl: CentsUsdPattern2::new(client.clone(), "lth_unrealized_gross_pnl".to_string()), invested_capital: InPattern::new(client.clone(), "lth_invested_capital_in".to_string()), sentiment: SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment::new(client.clone(), format!("{base_path}_sentiment")), diff --git a/crates/brk_computer/src/blocks/difficulty/compute.rs b/crates/brk_computer/src/blocks/difficulty/compute.rs index 028b9b259..7ae7ea4de 100644 --- a/crates/brk_computer/src/blocks/difficulty/compute.rs +++ b/crates/brk_computer/src/blocks/difficulty/compute.rs @@ -28,7 +28,7 @@ impl Vecs { exit, )?; - self.blocks_before_next.height.compute_transform( + self.blocks_to_retarget.height.compute_transform( starting_indexes.height, &indexes.height.identity, |(h, ..)| (h, StoredU32::from(h.left_before_next_diff_adj())), diff --git a/crates/brk_computer/src/blocks/difficulty/import.rs b/crates/brk_computer/src/blocks/difficulty/import.rs index 0ed8bec5f..79536857c 100644 --- a/crates/brk_computer/src/blocks/difficulty/import.rs +++ b/crates/brk_computer/src/blocks/difficulty/import.rs @@ -20,25 +20,25 @@ impl Vecs { ) -> Result { let v2 = Version::TWO; - let as_hash = LazyPerBlock::from_height_source::( - "difficulty_as_hash", + let hashrate = LazyPerBlock::from_height_source::( + "difficulty_hashrate", version, indexer.vecs.blocks.difficulty.read_only_boxed_clone(), indexes, ); - let blocks_before_next = PerBlock::forced_import( + let blocks_to_retarget = PerBlock::forced_import( db, - "blocks_before_next_difficulty_adjustment", + "blocks_to_retarget", version + v2, indexes, )?; - let days_before_next = LazyPerBlock::from_computed::( - "days_before_next_difficulty_adjustment", + let days_to_retarget = LazyPerBlock::from_computed::( + "days_to_retarget", version + v2, - blocks_before_next.height.read_only_boxed_clone(), - &blocks_before_next, + blocks_to_retarget.height.read_only_boxed_clone(), + &blocks_to_retarget, ); Ok(Self { @@ -48,7 +48,7 @@ impl Vecs { version, indexes, ), - as_hash, + hashrate, adjustment: PercentPerBlock::forced_import( db, "difficulty_adjustment", @@ -56,8 +56,8 @@ impl Vecs { indexes, )?, epoch: PerBlock::forced_import(db, "difficulty_epoch", version, indexes)?, - blocks_before_next, - days_before_next, + blocks_to_retarget, + days_to_retarget, }) } } diff --git a/crates/brk_computer/src/blocks/difficulty/vecs.rs b/crates/brk_computer/src/blocks/difficulty/vecs.rs index c164b1454..6395f0eda 100644 --- a/crates/brk_computer/src/blocks/difficulty/vecs.rs +++ b/crates/brk_computer/src/blocks/difficulty/vecs.rs @@ -6,9 +6,9 @@ use crate::internal::{LazyPerBlock, PerBlock, Resolutions, PercentPerBlock}; #[derive(Traversable)] pub struct Vecs { pub value: Resolutions, - pub as_hash: LazyPerBlock, + pub hashrate: LazyPerBlock, pub adjustment: PercentPerBlock, pub epoch: PerBlock, - pub blocks_before_next: PerBlock, - pub days_before_next: LazyPerBlock, + pub blocks_to_retarget: PerBlock, + pub days_to_retarget: LazyPerBlock, } diff --git a/crates/brk_computer/src/blocks/halving/compute.rs b/crates/brk_computer/src/blocks/halving/compute.rs index 17f1b3c4a..235efcf16 100644 --- a/crates/brk_computer/src/blocks/halving/compute.rs +++ b/crates/brk_computer/src/blocks/halving/compute.rs @@ -19,7 +19,7 @@ impl Vecs { exit, )?; - self.blocks_before_next.height.compute_transform( + self.blocks_to_halving.height.compute_transform( starting_indexes.height, &indexes.height.identity, |(h, ..)| (h, StoredU32::from(h.left_before_next_halving())), diff --git a/crates/brk_computer/src/blocks/halving/import.rs b/crates/brk_computer/src/blocks/halving/import.rs index 5175e545b..876d73093 100644 --- a/crates/brk_computer/src/blocks/halving/import.rs +++ b/crates/brk_computer/src/blocks/halving/import.rs @@ -16,21 +16,21 @@ impl Vecs { ) -> Result { let v2 = Version::TWO; - let blocks_before_next = PerBlock::forced_import( - db, "blocks_before_next_halving", version + v2, indexes, + let blocks_to_halving = PerBlock::forced_import( + db, "blocks_to_halving", version + v2, indexes, )?; - let days_before_next = LazyPerBlock::from_computed::( - "days_before_next_halving", + let days_to_halving = LazyPerBlock::from_computed::( + "days_to_halving", version + v2, - blocks_before_next.height.read_only_boxed_clone(), - &blocks_before_next, + blocks_to_halving.height.read_only_boxed_clone(), + &blocks_to_halving, ); Ok(Self { epoch: PerBlock::forced_import(db, "halving_epoch", version, indexes)?, - blocks_before_next, - days_before_next, + blocks_to_halving, + days_to_halving, }) } } diff --git a/crates/brk_computer/src/blocks/halving/vecs.rs b/crates/brk_computer/src/blocks/halving/vecs.rs index 6068f6269..a7eb8e2fa 100644 --- a/crates/brk_computer/src/blocks/halving/vecs.rs +++ b/crates/brk_computer/src/blocks/halving/vecs.rs @@ -6,6 +6,6 @@ use crate::internal::{LazyPerBlock, PerBlock}; #[derive(Traversable)] pub struct Vecs { pub epoch: PerBlock, - pub blocks_before_next: PerBlock, - pub days_before_next: LazyPerBlock, + pub blocks_to_halving: PerBlock, + pub days_to_halving: LazyPerBlock, } diff --git a/crates/brk_computer/src/cointime/activity/import.rs b/crates/brk_computer/src/cointime/activity/import.rs index fdc889fa1..1b4d981d7 100644 --- a/crates/brk_computer/src/cointime/activity/import.rs +++ b/crates/brk_computer/src/cointime/activity/import.rs @@ -35,7 +35,7 @@ impl Vecs { )?, liveliness, vaultedness, - ratio: PerBlock::forced_import(db, "activity_to_vaultedness_ratio", version, indexes)?, + ratio: PerBlock::forced_import(db, "activity_to_vaultedness", version, indexes)?, }) } } diff --git a/crates/brk_computer/src/cointime/prices/vecs.rs b/crates/brk_computer/src/cointime/prices/vecs.rs index 4135189aa..c665e55a8 100644 --- a/crates/brk_computer/src/cointime/prices/vecs.rs +++ b/crates/brk_computer/src/cointime/prices/vecs.rs @@ -15,5 +15,6 @@ pub struct Vecs { pub terminal: PriceWithRatioExtendedPerBlock, pub delta: PriceWithRatioExtendedPerBlock, + #[traversable(hidden)] pub cumulative_market_cap: PerBlock, } diff --git a/crates/brk_computer/src/distribution/address/activity.rs b/crates/brk_computer/src/distribution/address/activity.rs index 556b9bcee..72e08b5aa 100644 --- a/crates/brk_computer/src/distribution/address/activity.rs +++ b/crates/brk_computer/src/distribution/address/activity.rs @@ -113,39 +113,39 @@ impl ActivityCountVecs { pub(crate) fn min_stateful_len(&self) -> usize { self.reactivated - .height + .base .len() - .min(self.sending.height.len()) - .min(self.receiving.height.len()) - .min(self.both.height.len()) + .min(self.sending.base.len()) + .min(self.receiving.base.len()) + .min(self.both.base.len()) } pub(crate) fn par_iter_height_mut( &mut self, ) -> impl ParallelIterator { [ - &mut self.reactivated.height as &mut dyn AnyStoredVec, - &mut self.sending.height as &mut dyn AnyStoredVec, - &mut self.receiving.height as &mut dyn AnyStoredVec, - &mut self.both.height as &mut dyn AnyStoredVec, + &mut self.reactivated.base as &mut dyn AnyStoredVec, + &mut self.sending.base as &mut dyn AnyStoredVec, + &mut self.receiving.base as &mut dyn AnyStoredVec, + &mut self.both.base as &mut dyn AnyStoredVec, ] .into_par_iter() } pub(crate) fn reset_height(&mut self) -> Result<()> { - self.reactivated.height.reset()?; - self.sending.height.reset()?; - self.receiving.height.reset()?; - self.both.height.reset()?; + self.reactivated.base.reset()?; + self.sending.base.reset()?; + self.receiving.base.reset()?; + self.both.base.reset()?; Ok(()) } #[inline(always)] pub(crate) fn push_height(&mut self, counts: &BlockActivityCounts) { - self.reactivated.height.push(counts.reactivated.into()); - self.sending.height.push(counts.sending.into()); - self.receiving.height.push(counts.receiving.into()); - self.both.height.push(counts.both.into()); + self.reactivated.base.push(counts.reactivated.into()); + self.sending.base.push(counts.sending.into()); + self.receiving.base.push(counts.receiving.into()); + self.both.base.push(counts.both.into()); } pub(crate) fn compute_rest( @@ -206,10 +206,10 @@ impl AddressTypeToActivityCountVecs { ) -> impl ParallelIterator { let mut vecs: Vec<&mut dyn AnyStoredVec> = Vec::new(); for type_vecs in self.0.values_mut() { - vecs.push(&mut type_vecs.reactivated.height); - vecs.push(&mut type_vecs.sending.height); - vecs.push(&mut type_vecs.receiving.height); - vecs.push(&mut type_vecs.both.height); + vecs.push(&mut type_vecs.reactivated.base); + vecs.push(&mut type_vecs.sending.base); + vecs.push(&mut type_vecs.receiving.base); + vecs.push(&mut type_vecs.both.base); } vecs.into_par_iter() } diff --git a/crates/brk_computer/src/distribution/metrics/activity/core.rs b/crates/brk_computer/src/distribution/metrics/activity/core.rs index 21c03a913..01c99d732 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/core.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/core.rs @@ -11,33 +11,33 @@ use crate::{ #[derive(Traversable)] pub struct ActivityCore { - pub sent: PerBlockCumulativeWithSums, + pub transfer_volume: PerBlockCumulativeWithSums, pub coindays_destroyed: PerBlockCumulativeWithSums, - #[traversable(wrap = "sent", rename = "in_profit")] - pub sent_in_profit: AmountPerBlockCumulativeWithSums, - #[traversable(wrap = "sent", rename = "in_loss")] - pub sent_in_loss: AmountPerBlockCumulativeWithSums, + #[traversable(wrap = "transfer_volume", rename = "in_profit")] + pub transfer_volume_in_profit: AmountPerBlockCumulativeWithSums, + #[traversable(wrap = "transfer_volume", rename = "in_loss")] + pub transfer_volume_in_loss: AmountPerBlockCumulativeWithSums, } impl ActivityCore { pub(crate) fn forced_import(cfg: &ImportConfig) -> Result { let v1 = Version::ONE; Ok(Self { - sent: cfg.import("sent", v1)?, + transfer_volume: cfg.import("transfer_volume", v1)?, coindays_destroyed: cfg.import("coindays_destroyed", v1)?, - sent_in_profit: cfg.import("sent_in_profit", v1)?, - sent_in_loss: cfg.import("sent_in_loss", v1)?, + transfer_volume_in_profit: cfg.import("transfer_volume_in_profit", v1)?, + transfer_volume_in_loss: cfg.import("transfer_volume_in_loss", v1)?, }) } pub(crate) fn min_len(&self) -> usize { - self.sent + self.transfer_volume .base .height .len() .min(self.coindays_destroyed.base.height.len()) - .min(self.sent_in_profit.base.sats.height.len()) - .min(self.sent_in_loss.base.sats.height.len()) + .min(self.transfer_volume_in_profit.base.sats.height.len()) + .min(self.transfer_volume_in_loss.base.sats.height.len()) } #[inline(always)] @@ -45,16 +45,16 @@ impl ActivityCore { &mut self, state: &CohortState, ) { - self.sent.base.height.push(state.sent); + self.transfer_volume.base.height.push(state.sent); self.coindays_destroyed.base.height.push( StoredF64::from(Bitcoin::from(state.satdays_destroyed)), ); - self.sent_in_profit + self.transfer_volume_in_profit .base .sats .height .push(state.realized.sent_in_profit()); - self.sent_in_loss + self.transfer_volume_in_loss .base .sats .height @@ -63,12 +63,12 @@ impl ActivityCore { pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> { vec![ - &mut self.sent.base.height as &mut dyn AnyStoredVec, + &mut self.transfer_volume.base.height as &mut dyn AnyStoredVec, &mut self.coindays_destroyed.base.height, - &mut self.sent_in_profit.base.sats.height, - &mut self.sent_in_profit.base.cents.height, - &mut self.sent_in_loss.base.sats.height, - &mut self.sent_in_loss.base.cents.height, + &mut self.transfer_volume_in_profit.base.sats.height, + &mut self.transfer_volume_in_profit.base.cents.height, + &mut self.transfer_volume_in_loss.base.sats.height, + &mut self.transfer_volume_in_loss.base.cents.height, ] } @@ -82,18 +82,18 @@ impl ActivityCore { others: &[&Self], exit: &Exit, ) -> Result<()> { - self.sent.base.height.compute_sum_of_others( + self.transfer_volume.base.height.compute_sum_of_others( starting_indexes.height, &others .iter() - .map(|v| &v.sent.base.height) + .map(|v| &v.transfer_volume.base.height) .collect::>(), exit, )?; sum_others!(self, starting_indexes, others, exit; coindays_destroyed.base.height); - sum_others!(self, starting_indexes, others, exit; sent_in_profit.base.sats.height); - sum_others!(self, starting_indexes, others, exit; sent_in_loss.base.sats.height); + sum_others!(self, starting_indexes, others, exit; transfer_volume_in_profit.base.sats.height); + sum_others!(self, starting_indexes, others, exit; transfer_volume_in_loss.base.sats.height); Ok(()) } @@ -103,7 +103,7 @@ impl ActivityCore { starting_indexes: &Indexes, exit: &Exit, ) -> Result<()> { - self.sent + self.transfer_volume .compute_rest(starting_indexes.height, exit)?; self.coindays_destroyed .compute_rest(starting_indexes.height, exit)?; @@ -116,9 +116,9 @@ impl ActivityCore { starting_indexes: &Indexes, exit: &Exit, ) -> Result<()> { - self.sent_in_profit + self.transfer_volume_in_profit .compute_rest(starting_indexes.height, prices, exit)?; - self.sent_in_loss + self.transfer_volume_in_loss .compute_rest(starting_indexes.height, prices, exit)?; Ok(()) } diff --git a/crates/brk_computer/src/distribution/metrics/activity/full.rs b/crates/brk_computer/src/distribution/metrics/activity/full.rs index ad59ee9e0..0fe7f6d40 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/full.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/full.rs @@ -85,7 +85,7 @@ impl ActivityFull { self.dormancy.height.compute_transform2( starting_indexes.height, &self.inner.coindays_destroyed.base.height, - &self.inner.sent.base.height, + &self.inner.transfer_volume.base.height, |(i, cdd, sent_sats, ..)| { let sent_btc = f64::from(Bitcoin::from(sent_sats)); if sent_btc == 0.0 { diff --git a/crates/brk_computer/src/distribution/metrics/realized/full.rs b/crates/brk_computer/src/distribution/metrics/realized/full.rs index 98dc27ce8..1b298f279 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/full.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/full.rs @@ -31,7 +31,7 @@ use super::RealizedCore; #[derive(Traversable)] pub struct RealizedProfit { - pub rel_to_rcap: PercentPerBlock, + pub to_rcap: PercentPerBlock, pub value_created: PerBlockCumulativeWithSums, pub value_destroyed: PerBlockCumulativeWithSums, pub distribution_flow: LazyPerBlock, @@ -39,7 +39,7 @@ pub struct RealizedProfit { #[derive(Traversable)] pub struct RealizedLoss { - pub rel_to_rcap: PercentPerBlock, + pub to_rcap: PercentPerBlock, pub value_created: PerBlockCumulativeWithSums, pub value_destroyed: PerBlockCumulativeWithSums, pub capitulation_flow: LazyPerBlock, @@ -47,11 +47,11 @@ pub struct RealizedLoss { #[derive(Traversable)] pub struct RealizedNetPnl { - pub rel_to_rcap: PercentPerBlock, - #[traversable(wrap = "change_1m", rename = "rel_to_rcap")] - pub change_1m_rel_to_rcap: PercentPerBlock, - #[traversable(wrap = "change_1m", rename = "rel_to_mcap")] - pub change_1m_rel_to_mcap: PercentPerBlock, + pub to_rcap: PercentPerBlock, + #[traversable(wrap = "change_1m", rename = "to_rcap")] + pub change_1m_to_rcap: PercentPerBlock, + #[traversable(wrap = "change_1m", rename = "to_mcap")] + pub change_1m_to_mcap: PercentPerBlock, } #[derive(Traversable)] @@ -64,14 +64,14 @@ pub struct RealizedSopr { pub struct RealizedPeakRegret { #[traversable(flatten)] pub value: PerBlockCumulative, - pub rel_to_rcap: PercentPerBlock, + pub to_rcap: PercentPerBlock, } #[derive(Traversable)] pub struct RealizedInvestor { pub price: PriceWithRatioExtendedPerBlock, - pub lower_price_band: Price>, - pub upper_price_band: Price>, + pub investor_lower_band: Price>, + pub investor_upper_band: Price>, #[traversable(hidden)] pub cap_raw: M::Stored>, } @@ -96,8 +96,8 @@ pub struct RealizedFull { #[traversable(hidden)] pub cap_raw: M::Stored>, - #[traversable(wrap = "cap", rename = "rel_to_own_mcap")] - pub cap_rel_to_own_mcap: PercentPerBlock, + #[traversable(wrap = "cap", rename = "to_own_mcap")] + pub cap_to_own_mcap: PercentPerBlock, #[traversable(wrap = "price", rename = "percentiles")] pub price_ratio_percentiles: RatioPerBlockPercentiles, @@ -124,7 +124,7 @@ impl RealizedFull { &profit_value_destroyed.base, ); let profit = RealizedProfit { - rel_to_rcap: cfg.import("realized_profit_rel_to_rcap", Version::new(2))?, + to_rcap: cfg.import("realized_profit_to_rcap", Version::new(2))?, value_created: cfg.import("profit_value_created", v1)?, value_destroyed: profit_value_destroyed, distribution_flow: profit_flow, @@ -140,7 +140,7 @@ impl RealizedFull { &loss_value_destroyed.base, ); let loss = RealizedLoss { - rel_to_rcap: cfg.import("realized_loss_rel_to_rcap", Version::new(2))?, + to_rcap: cfg.import("realized_loss_to_rcap", Version::new(2))?, value_created: cfg.import("loss_value_created", v1)?, value_destroyed: loss_value_destroyed, capitulation_flow, @@ -153,12 +153,12 @@ impl RealizedFull { // Net PnL let net_pnl = RealizedNetPnl { - rel_to_rcap: cfg - .import("net_realized_pnl_rel_to_rcap", Version::new(2))?, - change_1m_rel_to_rcap: cfg - .import("net_pnl_change_1m_rel_to_rcap", Version::new(4))?, - change_1m_rel_to_mcap: cfg - .import("net_pnl_change_1m_rel_to_mcap", Version::new(4))?, + to_rcap: cfg + .import("net_realized_pnl_to_rcap", Version::new(2))?, + change_1m_to_rcap: cfg + .import("net_pnl_change_1m_to_rcap", Version::new(4))?, + change_1m_to_mcap: cfg + .import("net_pnl_change_1m_to_mcap", Version::new(4))?, }; // SOPR @@ -169,15 +169,15 @@ impl RealizedFull { // Peak regret let peak_regret = RealizedPeakRegret { value: cfg.import("realized_peak_regret", Version::new(2))?, - rel_to_rcap: cfg - .import("realized_peak_regret_rel_to_rcap", Version::new(2))?, + to_rcap: cfg + .import("realized_peak_regret_to_rcap", Version::new(2))?, }; // Investor let investor = RealizedInvestor { price: cfg.import("investor_price", v0)?, - lower_price_band: cfg.import("lower_price_band", v0)?, - upper_price_band: cfg.import("upper_price_band", v0)?, + investor_lower_band: cfg.import("investor_lower_band", v0)?, + investor_upper_band: cfg.import("investor_upper_band", v0)?, cap_raw: cfg.import("investor_cap_raw", v0)?, }; @@ -197,7 +197,7 @@ impl RealizedFull { investor, profit_to_loss_ratio: cfg.import("realized_profit_to_loss_ratio", v1)?, cap_raw: cfg.import("cap_raw", v0)?, - cap_rel_to_own_mcap: cfg.import("realized_cap_rel_to_own_mcap", v1)?, + cap_to_own_mcap: cfg.import("realized_cap_to_own_mcap", v1)?, price_ratio_percentiles: RatioPerBlockPercentiles::forced_import( cfg.db, &realized_price_name, @@ -403,7 +403,7 @@ impl RealizedFull { // Profit/loss/net_pnl rel to realized cap self.profit - .rel_to_rcap + .to_rcap .compute_binary::( starting_indexes.height, &self.core.minimal.profit.base.cents.height, @@ -411,7 +411,7 @@ impl RealizedFull { exit, )?; self.loss - .rel_to_rcap + .to_rcap .compute_binary::( starting_indexes.height, &self.core.minimal.loss.base.cents.height, @@ -419,7 +419,7 @@ impl RealizedFull { exit, )?; self.net_pnl - .rel_to_rcap + .to_rcap .compute_binary::( starting_indexes.height, &self.core.net_pnl.base.cents.height, @@ -453,7 +453,7 @@ impl RealizedFull { // Net PnL 1m change relative to rcap and mcap self.net_pnl - .change_1m_rel_to_rcap + .change_1m_to_rcap .compute_binary::( starting_indexes.height, &self.core.net_pnl.delta.absolute._1m.cents.height, @@ -461,7 +461,7 @@ impl RealizedFull { exit, )?; self.net_pnl - .change_1m_rel_to_mcap + .change_1m_to_mcap .compute_binary::( starting_indexes.height, &self.core.net_pnl.delta.absolute._1m.cents.height, @@ -471,7 +471,7 @@ impl RealizedFull { // Peak regret rel to rcap self.peak_regret - .rel_to_rcap + .to_rcap .compute_binary::( starting_indexes.height, &self.peak_regret.value.base.height, @@ -487,7 +487,7 @@ impl RealizedFull { )?; self.investor - .lower_price_band + .investor_lower_band .cents .height .compute_transform2( @@ -507,7 +507,7 @@ impl RealizedFull { )?; self.investor - .upper_price_band + .investor_upper_band .cents .height .compute_transform2( @@ -542,7 +542,7 @@ impl RealizedFull { } // Realized cap relative to own market cap - self.cap_rel_to_own_mcap + self.cap_to_own_mcap .compute_binary::( starting_indexes.height, &self.core.minimal.cap.usd.height, diff --git a/crates/brk_computer/src/distribution/metrics/relative/extended_own_market_cap.rs b/crates/brk_computer/src/distribution/metrics/relative/extended_own_market_cap.rs index 1b37cc28d..06e9920a9 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/extended_own_market_cap.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/extended_own_market_cap.rs @@ -10,12 +10,12 @@ use crate::distribution::metrics::{ImportConfig, UnrealizedCore}; /// Extended relative metrics for own market cap (extended && rel_to_all). #[derive(Traversable)] pub struct RelativeExtendedOwnMarketCap { - #[traversable(wrap = "unrealized/profit", rename = "rel_to_own_mcap")] - pub unrealized_profit_rel_to_own_mcap: PercentPerBlock, - #[traversable(wrap = "unrealized/loss", rename = "rel_to_own_mcap")] - pub unrealized_loss_rel_to_own_mcap: PercentPerBlock, - #[traversable(wrap = "unrealized/net_pnl", rename = "rel_to_own_mcap")] - pub net_unrealized_pnl_rel_to_own_mcap: PercentPerBlock, + #[traversable(wrap = "unrealized/profit", rename = "to_own_mcap")] + pub unrealized_profit_to_own_mcap: PercentPerBlock, + #[traversable(wrap = "unrealized/loss", rename = "to_own_mcap")] + pub unrealized_loss_to_own_mcap: PercentPerBlock, + #[traversable(wrap = "unrealized/net_pnl", rename = "to_own_mcap")] + pub net_unrealized_pnl_to_own_mcap: PercentPerBlock, } impl RelativeExtendedOwnMarketCap { @@ -23,12 +23,12 @@ impl RelativeExtendedOwnMarketCap { let v2 = Version::new(2); Ok(Self { - unrealized_profit_rel_to_own_mcap: cfg - .import("unrealized_profit_rel_to_own_mcap", v2)?, - unrealized_loss_rel_to_own_mcap: cfg - .import("unrealized_loss_rel_to_own_mcap", Version::new(3))?, - net_unrealized_pnl_rel_to_own_mcap: cfg - .import("net_unrealized_pnl_rel_to_own_mcap", Version::new(3))?, + unrealized_profit_to_own_mcap: cfg + .import("unrealized_profit_to_own_mcap", v2)?, + unrealized_loss_to_own_mcap: cfg + .import("unrealized_loss_to_own_mcap", Version::new(3))?, + net_unrealized_pnl_to_own_mcap: cfg + .import("net_unrealized_pnl_to_own_mcap", Version::new(3))?, }) } @@ -39,21 +39,21 @@ impl RelativeExtendedOwnMarketCap { own_market_cap: &impl ReadableVec, exit: &Exit, ) -> Result<()> { - self.unrealized_profit_rel_to_own_mcap + self.unrealized_profit_to_own_mcap .compute_binary::( max_from, &unrealized.profit.base.usd.height, own_market_cap, exit, )?; - self.unrealized_loss_rel_to_own_mcap + self.unrealized_loss_to_own_mcap .compute_binary::( max_from, &unrealized.loss.base.usd.height, own_market_cap, exit, )?; - self.net_unrealized_pnl_rel_to_own_mcap + self.net_unrealized_pnl_to_own_mcap .compute_binary::( max_from, &unrealized.net_pnl.usd.height, diff --git a/crates/brk_computer/src/distribution/metrics/relative/extended_own_pnl.rs b/crates/brk_computer/src/distribution/metrics/relative/extended_own_pnl.rs index 5f54f9400..e4a4d175e 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/extended_own_pnl.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/extended_own_pnl.rs @@ -10,12 +10,12 @@ use crate::distribution::metrics::{ImportConfig, UnrealizedCore}; /// Extended relative metrics for own total unrealized PnL (extended only). #[derive(Traversable)] pub struct RelativeExtendedOwnPnl { - #[traversable(wrap = "unrealized/profit", rename = "rel_to_own_gross")] - pub unrealized_profit_rel_to_own_gross_pnl: PercentPerBlock, - #[traversable(wrap = "unrealized/loss", rename = "rel_to_own_gross")] - pub unrealized_loss_rel_to_own_gross_pnl: PercentPerBlock, - #[traversable(wrap = "unrealized/net_pnl", rename = "rel_to_own_gross")] - pub net_unrealized_pnl_rel_to_own_gross_pnl: PercentPerBlock, + #[traversable(wrap = "unrealized/profit", rename = "to_own_gross_pnl")] + pub unrealized_profit_to_own_gross_pnl: PercentPerBlock, + #[traversable(wrap = "unrealized/loss", rename = "to_own_gross_pnl")] + pub unrealized_loss_to_own_gross_pnl: PercentPerBlock, + #[traversable(wrap = "unrealized/net_pnl", rename = "to_own_gross_pnl")] + pub net_unrealized_pnl_to_own_gross_pnl: PercentPerBlock, } @@ -24,12 +24,12 @@ impl RelativeExtendedOwnPnl { let v1 = Version::ONE; Ok(Self { - unrealized_profit_rel_to_own_gross_pnl: cfg - .import("unrealized_profit_rel_to_own_gross_pnl", v1)?, - unrealized_loss_rel_to_own_gross_pnl: cfg - .import("unrealized_loss_rel_to_own_gross_pnl", v1)?, - net_unrealized_pnl_rel_to_own_gross_pnl: cfg - .import("net_unrealized_pnl_rel_to_own_gross_pnl", Version::new(3))?, + unrealized_profit_to_own_gross_pnl: cfg + .import("unrealized_profit_to_own_gross_pnl", v1)?, + unrealized_loss_to_own_gross_pnl: cfg + .import("unrealized_loss_to_own_gross_pnl", v1)?, + net_unrealized_pnl_to_own_gross_pnl: cfg + .import("net_unrealized_pnl_to_own_gross_pnl", Version::new(3))?, }) } @@ -40,21 +40,21 @@ impl RelativeExtendedOwnPnl { gross_pnl_usd: &impl ReadableVec, exit: &Exit, ) -> Result<()> { - self.unrealized_profit_rel_to_own_gross_pnl + self.unrealized_profit_to_own_gross_pnl .compute_binary::( max_from, &unrealized.profit.base.usd.height, gross_pnl_usd, exit, )?; - self.unrealized_loss_rel_to_own_gross_pnl + self.unrealized_loss_to_own_gross_pnl .compute_binary::( max_from, &unrealized.loss.base.usd.height, gross_pnl_usd, exit, )?; - self.net_unrealized_pnl_rel_to_own_gross_pnl + self.net_unrealized_pnl_to_own_gross_pnl .compute_binary::( max_from, &unrealized.net_pnl.usd.height, diff --git a/crates/brk_computer/src/distribution/metrics/relative/full.rs b/crates/brk_computer/src/distribution/metrics/relative/full.rs index b1b5de4a4..3dd8dfc32 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/full.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/full.rs @@ -11,15 +11,15 @@ use crate::{ /// Full relative metrics (sth/lth/all tier). #[derive(Traversable)] pub struct RelativeFull { - #[traversable(wrap = "supply/in_profit", rename = "rel_to_own")] - pub supply_in_profit_rel_to_own: PercentPerBlock, - #[traversable(wrap = "supply/in_loss", rename = "rel_to_own")] - pub supply_in_loss_rel_to_own: PercentPerBlock, + #[traversable(wrap = "supply/in_profit", rename = "to_own")] + pub supply_in_profit_to_own: PercentPerBlock, + #[traversable(wrap = "supply/in_loss", rename = "to_own")] + pub supply_in_loss_to_own: PercentPerBlock, - #[traversable(wrap = "unrealized/profit", rename = "rel_to_mcap")] - pub unrealized_profit_rel_to_mcap: PercentPerBlock, - #[traversable(wrap = "unrealized/loss", rename = "rel_to_mcap")] - pub unrealized_loss_rel_to_mcap: PercentPerBlock, + #[traversable(wrap = "unrealized/profit", rename = "to_mcap")] + pub unrealized_profit_to_mcap: PercentPerBlock, + #[traversable(wrap = "unrealized/loss", rename = "to_mcap")] + pub unrealized_loss_to_mcap: PercentPerBlock, } impl RelativeFull { @@ -28,13 +28,13 @@ impl RelativeFull { let v2 = Version::new(2); Ok(Self { - supply_in_profit_rel_to_own: cfg - .import("supply_in_profit_rel_to_own", v1)?, - supply_in_loss_rel_to_own: cfg.import("supply_in_loss_rel_to_own", v1)?, - unrealized_profit_rel_to_mcap: cfg - .import("unrealized_profit_rel_to_mcap", v2)?, - unrealized_loss_rel_to_mcap: cfg - .import("unrealized_loss_rel_to_mcap", v2)?, + supply_in_profit_to_own: cfg + .import("supply_in_profit_to_own", v1)?, + supply_in_loss_to_own: cfg.import("supply_in_loss_to_own", v1)?, + unrealized_profit_to_mcap: cfg + .import("unrealized_profit_to_mcap", v2)?, + unrealized_loss_to_mcap: cfg + .import("unrealized_loss_to_mcap", v2)?, }) } @@ -46,14 +46,14 @@ impl RelativeFull { market_cap: &impl ReadableVec, exit: &Exit, ) -> Result<()> { - self.supply_in_profit_rel_to_own + self.supply_in_profit_to_own .compute_binary::( max_from, &supply.in_profit.sats.height, &supply.total.sats.height, exit, )?; - self.supply_in_loss_rel_to_own + self.supply_in_loss_to_own .compute_binary::( max_from, &supply.in_loss.sats.height, @@ -61,14 +61,14 @@ impl RelativeFull { exit, )?; - self.unrealized_profit_rel_to_mcap + self.unrealized_profit_to_mcap .compute_binary::( max_from, &unrealized.profit.base.usd.height, market_cap, exit, )?; - self.unrealized_loss_rel_to_mcap + self.unrealized_loss_to_mcap .compute_binary::( max_from, &unrealized.loss.base.usd.height, diff --git a/crates/brk_computer/src/distribution/metrics/relative/to_all.rs b/crates/brk_computer/src/distribution/metrics/relative/to_all.rs index a9d24e610..2777b0839 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/to_all.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/to_all.rs @@ -10,23 +10,23 @@ use crate::distribution::metrics::{ImportConfig, SupplyCore}; /// Relative-to-all metrics (not present for the "all" cohort itself). #[derive(Traversable)] pub struct RelativeToAll { - #[traversable(wrap = "supply", rename = "rel_to_circulating")] - pub supply_rel_to_circulating: PercentPerBlock, - #[traversable(wrap = "supply/in_profit", rename = "rel_to_circulating")] - pub supply_in_profit_rel_to_circulating: PercentPerBlock, - #[traversable(wrap = "supply/in_loss", rename = "rel_to_circulating")] - pub supply_in_loss_rel_to_circulating: PercentPerBlock, + #[traversable(wrap = "supply", rename = "to_circulating")] + pub supply_to_circulating: PercentPerBlock, + #[traversable(wrap = "supply/in_profit", rename = "to_circulating")] + pub supply_in_profit_to_circulating: PercentPerBlock, + #[traversable(wrap = "supply/in_loss", rename = "to_circulating")] + pub supply_in_loss_to_circulating: PercentPerBlock, } impl RelativeToAll { pub(crate) fn forced_import(cfg: &ImportConfig) -> Result { Ok(Self { - supply_rel_to_circulating: cfg - .import("supply_rel_to_circulating", Version::ONE)?, - supply_in_profit_rel_to_circulating: cfg - .import("supply_in_profit_rel_to_circulating", Version::ONE)?, - supply_in_loss_rel_to_circulating: cfg - .import("supply_in_loss_rel_to_circulating", Version::ONE)?, + supply_to_circulating: cfg + .import("supply_to_circulating", Version::ONE)?, + supply_in_profit_to_circulating: cfg + .import("supply_in_profit_to_circulating", Version::ONE)?, + supply_in_loss_to_circulating: cfg + .import("supply_in_loss_to_circulating", Version::ONE)?, }) } @@ -37,21 +37,21 @@ impl RelativeToAll { all_supply_sats: &impl ReadableVec, exit: &Exit, ) -> Result<()> { - self.supply_rel_to_circulating + self.supply_to_circulating .compute_binary::( max_from, &supply.total.sats.height, all_supply_sats, exit, )?; - self.supply_in_profit_rel_to_circulating + self.supply_in_profit_to_circulating .compute_binary::( max_from, &supply.in_profit.sats.height, all_supply_sats, exit, )?; - self.supply_in_loss_rel_to_circulating + self.supply_in_loss_to_circulating .compute_binary::( max_from, &supply.in_loss.sats.height, diff --git a/crates/brk_computer/src/distribution/vecs.rs b/crates/brk_computer/src/distribution/vecs.rs index 2e931a345..d1341865c 100644 --- a/crates/brk_computer/src/distribution/vecs.rs +++ b/crates/brk_computer/src/distribution/vecs.rs @@ -69,7 +69,7 @@ pub struct Vecs { pub utxo_cohorts: UTXOCohorts, #[traversable(wrap = "cohorts", rename = "address")] pub address_cohorts: AddressCohorts, - #[traversable(wrap = "cointime")] + #[traversable(wrap = "cointime/activity")] pub coinblocks_destroyed: PerBlockCumulativeWithSums, pub addresses: AddressMetricsVecs, diff --git a/crates/brk_computer/src/indicators/compute.rs b/crates/brk_computer/src/indicators/compute.rs index 823b6733c..66dbc9344 100644 --- a/crates/brk_computer/src/indicators/compute.rs +++ b/crates/brk_computer/src/indicators/compute.rs @@ -69,12 +69,12 @@ impl Vecs { .compute_binary::( starting_indexes.height, market_cap, - &transactions.volume.sent_sum.sum._24h.usd.height, + &transactions.volume.transfer_volume.sum._24h.usd.height, exit, )?; // Thermocap Multiple: market_cap / thermo_cap - self.thermocap_multiple + self.thermo_cap_multiple .bps .compute_binary::( starting_indexes.height, @@ -178,7 +178,7 @@ impl Vecs { )?; // Seller Exhaustion Constant: % supply_in_profit × 30d_volatility - self.seller_exhaustion_constant + self.seller_exhaustion .height .compute_transform3( starting_indexes.height, diff --git a/crates/brk_computer/src/indicators/import.rs b/crates/brk_computer/src/indicators/import.rs index 54e72e0f9..1af5a2f25 100644 --- a/crates/brk_computer/src/indicators/import.rs +++ b/crates/brk_computer/src/indicators/import.rs @@ -24,8 +24,8 @@ impl Vecs { let nvt = RatioPerBlock::forced_import_raw(&db, "nvt", v, indexes)?; let gini = PercentPerBlock::forced_import(&db, "gini", v, indexes)?; let rhodl_ratio = RatioPerBlock::forced_import_raw(&db, "rhodl_ratio", v, indexes)?; - let thermocap_multiple = - RatioPerBlock::forced_import_raw(&db, "thermocap_multiple", v, indexes)?; + let thermo_cap_multiple = + RatioPerBlock::forced_import_raw(&db, "thermo_cap_multiple", v, indexes)?; let coindays_destroyed_supply_adjusted = PerBlock::forced_import(&db, "coindays_destroyed_supply_adjusted", v, indexes)?; let coinyears_destroyed_supply_adjusted = @@ -35,8 +35,8 @@ impl Vecs { flow: PerBlock::forced_import(&db, "dormancy_flow", v, indexes)?, }; let stock_to_flow = PerBlock::forced_import(&db, "stock_to_flow", v, indexes)?; - let seller_exhaustion_constant = - PerBlock::forced_import(&db, "seller_exhaustion_constant", v, indexes)?; + let seller_exhaustion = + PerBlock::forced_import(&db, "seller_exhaustion", v, indexes)?; let this = Self { db, @@ -44,12 +44,12 @@ impl Vecs { nvt, gini, rhodl_ratio, - thermocap_multiple, + thermo_cap_multiple, coindays_destroyed_supply_adjusted, coinyears_destroyed_supply_adjusted, dormancy, stock_to_flow, - seller_exhaustion_constant, + seller_exhaustion, }; finalize_db(&this.db, &this)?; Ok(this) diff --git a/crates/brk_computer/src/indicators/vecs.rs b/crates/brk_computer/src/indicators/vecs.rs index e6a9cff1d..9e27b4e56 100644 --- a/crates/brk_computer/src/indicators/vecs.rs +++ b/crates/brk_computer/src/indicators/vecs.rs @@ -18,10 +18,10 @@ pub struct Vecs { pub nvt: RatioPerBlock, pub gini: PercentPerBlock, pub rhodl_ratio: RatioPerBlock, - pub thermocap_multiple: RatioPerBlock, + pub thermo_cap_multiple: RatioPerBlock, pub coindays_destroyed_supply_adjusted: PerBlock, pub coinyears_destroyed_supply_adjusted: PerBlock, pub dormancy: DormancyVecs, pub stock_to_flow: PerBlock, - pub seller_exhaustion_constant: PerBlock, + pub seller_exhaustion: PerBlock, } diff --git a/crates/brk_computer/src/internal/aggregate/distribution_full.rs b/crates/brk_computer/src/internal/aggregate/distribution_full.rs index c44cd8d38..a385e7e21 100644 --- a/crates/brk_computer/src/internal/aggregate/distribution_full.rs +++ b/crates/brk_computer/src/internal/aggregate/distribution_full.rs @@ -10,13 +10,13 @@ use crate::internal::{ComputedVecValue, algo::compute_aggregations}; use super::Distribution; -/// Full stats aggregate: distribution + sum + cumulative +/// Full stats aggregate: sum + cumulative + distribution #[derive(Traversable)] pub struct DistributionFull { - #[traversable(flatten)] - pub distribution: Distribution, pub sum: M::Stored>>, pub cumulative: M::Stored>>, + #[traversable(flatten)] + pub distribution: Distribution, } impl DistributionFull { diff --git a/crates/brk_computer/src/internal/per_block/amount/rolling_distribution.rs b/crates/brk_computer/src/internal/per_block/amount/rolling_distribution.rs index 0bab318cb..69a951dbb 100644 --- a/crates/brk_computer/src/internal/per_block/amount/rolling_distribution.rs +++ b/crates/brk_computer/src/internal/per_block/amount/rolling_distribution.rs @@ -12,75 +12,14 @@ use crate::{ }, }; -/// One window slot: 8 distribution stats, each a AmountPerBlock. +/// Rolling distribution across 4 windows, stat-first naming. /// -/// Tree: `average.sats.height`, `min.sats.height`, etc. -#[derive(Traversable)] -pub struct RollingDistributionSlot { - #[traversable(flatten)] - pub distribution: DistributionStats>, -} - -impl RollingDistributionSlot { - pub(crate) fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - ) -> Result { - Ok(Self { - distribution: DistributionStats::try_from_fn(|suffix| { - AmountPerBlock::forced_import(db, &format!("{name}_{suffix}"), version, indexes) - })?, - }) - } - - #[allow(clippy::too_many_arguments)] - pub(crate) fn compute( - &mut self, - max_from: Height, - starts: &impl ReadableVec, - sats_source: &impl ReadableVec, - cents_source: &impl ReadableVec, - exit: &Exit, - sats_cache: &mut Option<(usize, Vec)>, - cents_cache: &mut Option<(usize, Vec)>, - ) -> Result<()> { - let d = &mut self.distribution; - - macro_rules! compute_unit { - ($unit:ident, $source:expr, $cache:expr) => { - compute_rolling_distribution_from_starts( - max_from, - starts, - $source, - &mut d.average.$unit.height, - &mut d.min.$unit.height, - &mut d.max.$unit.height, - &mut d.pct10.$unit.height, - &mut d.pct25.$unit.height, - &mut d.median.$unit.height, - &mut d.pct75.$unit.height, - &mut d.pct90.$unit.height, - exit, - $cache, - )? - }; - } - compute_unit!(sats, sats_source, sats_cache); - compute_unit!(cents, cents_source, cents_cache); - - Ok(()) - } -} - -/// Rolling distribution across 4 windows, window-first. -/// -/// Tree: `_24h.average.sats.height`, `_24h.min.sats.height`, etc. +/// Tree: `average._24h.sats.height`, `max._24h.sats.height`, etc. +/// Series: `{name}_average_24h`, `{name}_max_24h`, etc. #[derive(Deref, DerefMut, Traversable)] #[traversable(transparent)] pub struct RollingDistributionAmountPerBlock( - pub Windows>, + pub DistributionStats>>, ); impl RollingDistributionAmountPerBlock { @@ -90,13 +29,15 @@ impl RollingDistributionAmountPerBlock { version: Version, indexes: &indexes::Vecs, ) -> Result { - Ok(Self(Windows::try_from_fn(|suffix| { - RollingDistributionSlot::forced_import( - db, - &format!("{name}_{suffix}"), - version, - indexes, - ) + Ok(Self(DistributionStats::try_from_fn(|stat_suffix| { + Windows::try_from_fn(|window_suffix| { + AmountPerBlock::forced_import( + db, + &format!("{name}_{stat_suffix}_{window_suffix}"), + version, + indexes, + ) + }) })?)) } @@ -110,22 +51,38 @@ impl RollingDistributionAmountPerBlock { ) -> Result<()> { let mut sats_cache = None; let mut cents_cache = None; - for (slot, starts) in self - .0 - .as_mut_array_largest_first() - .into_iter() - .zip(windows.as_array_largest_first()) - { - slot.compute( - max_from, - *starts, - sats_source, - cents_source, - exit, - &mut sats_cache, - &mut cents_cache, - )?; + + macro_rules! compute_window { + ($w:ident, $starts:expr) => {{ + macro_rules! compute_unit { + ($unit:ident, $source:expr, $cache:expr) => { + compute_rolling_distribution_from_starts( + max_from, + $starts, + $source, + &mut self.0.average.$w.$unit.height, + &mut self.0.min.$w.$unit.height, + &mut self.0.max.$w.$unit.height, + &mut self.0.pct10.$w.$unit.height, + &mut self.0.pct25.$w.$unit.height, + &mut self.0.median.$w.$unit.height, + &mut self.0.pct75.$w.$unit.height, + &mut self.0.pct90.$w.$unit.height, + exit, + $cache, + )? + }; + } + compute_unit!(sats, sats_source, &mut sats_cache); + compute_unit!(cents, cents_source, &mut cents_cache); + }}; } + // Largest window first: its cache covers all smaller windows. + compute_window!(_1y, windows._1y); + compute_window!(_1m, windows._1m); + compute_window!(_1w, windows._1w); + compute_window!(_24h, windows._24h); + Ok(()) } } diff --git a/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs b/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs index 6cae3ad6d..48b4140a0 100644 --- a/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs +++ b/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs @@ -19,7 +19,7 @@ pub struct PerBlockRollingAverage where T: NumericValue + JsonSchema, { - pub height: M::Stored>>, + pub base: M::Stored>>, #[traversable(hidden)] pub cumulative: M::Stored>>, #[traversable(flatten)] @@ -37,7 +37,7 @@ where indexes: &indexes::Vecs, cached_starts: &CachedWindowStarts, ) -> Result { - let height: EagerVec> = EagerVec::forced_import(db, name, version)?; + let base: EagerVec> = EagerVec::forced_import(db, name, version)?; let cumulative: EagerVec> = EagerVec::forced_import(db, &format!("{name}_cumulative"), version)?; let average = LazyRollingAvgsFromHeight::new( @@ -49,7 +49,7 @@ where ); Ok(Self { - height, + base, cumulative, average, }) @@ -62,14 +62,14 @@ where exit: &Exit, compute_height: impl FnOnce(&mut EagerVec>) -> Result<()>, ) -> Result<()> { - compute_height(&mut self.height)?; + compute_height(&mut self.base)?; self.compute_rest(max_from, exit) } /// Compute cumulative from already-populated height data. Rolling averages are lazy. pub(crate) fn compute_rest(&mut self, max_from: Height, exit: &Exit) -> Result<()> { self.cumulative - .compute_cumulative(max_from, &self.height, exit)?; + .compute_cumulative(max_from, &self.base, exit)?; Ok(()) } } diff --git a/crates/brk_computer/src/internal/per_block/computed/with_deltas.rs b/crates/brk_computer/src/internal/per_block/computed/with_deltas.rs index 1145651e2..7c8a96336 100644 --- a/crates/brk_computer/src/internal/per_block/computed/with_deltas.rs +++ b/crates/brk_computer/src/internal/per_block/computed/with_deltas.rs @@ -21,8 +21,7 @@ where { #[deref] #[deref_mut] - #[traversable(flatten)] - pub inner: PerBlock, + pub base: PerBlock, pub delta: LazyRollingDeltasFromHeight, } @@ -40,16 +39,16 @@ where indexes: &indexes::Vecs, cached_starts: &CachedWindowStarts, ) -> Result { - let inner = PerBlock::forced_import(db, name, version, indexes)?; + let base = PerBlock::forced_import(db, name, version, indexes)?; let delta = LazyRollingDeltasFromHeight::new( &format!("{name}_delta"), version + delta_version_offset, - &inner.height, + &base.height, cached_starts, indexes, ); - Ok(Self { inner, delta }) + Ok(Self { base, delta }) } } diff --git a/crates/brk_computer/src/internal/per_block/percent/rolling_average.rs b/crates/brk_computer/src/internal/per_block/percent/rolling_average.rs index ddfacab85..c1eff7670 100644 --- a/crates/brk_computer/src/internal/per_block/percent/rolling_average.rs +++ b/crates/brk_computer/src/internal/per_block/percent/rolling_average.rs @@ -37,14 +37,14 @@ impl PercentPerBlockRollingAverage { let ratio = LazyPerBlock::from_height_source::( &format!("{name}_ratio"), version, - bps.height.read_only_boxed_clone(), + bps.base.read_only_boxed_clone(), indexes, ); let percent = LazyPerBlock::from_height_source::( name, version, - bps.height.read_only_boxed_clone(), + bps.base.read_only_boxed_clone(), indexes, ); diff --git a/crates/brk_computer/src/market/dca/compute.rs b/crates/brk_computer/src/market/dca/compute.rs index 745edce07..03b29ab9e 100644 --- a/crates/brk_computer/src/market/dca/compute.rs +++ b/crates/brk_computer/src/market/dca/compute.rs @@ -120,7 +120,7 @@ impl Vecs { } // Lump sum by period - stack - let lookback_dca = lookback.price_lookback.as_dca_period(); + let lookback_dca = lookback.price_past.as_dca_period(); for (stack, lookback_price, days) in self.period.lump_sum_stack.zip_mut_with_days(&lookback_dca) { diff --git a/crates/brk_computer/src/market/lookback/compute.rs b/crates/brk_computer/src/market/lookback/compute.rs index 116332c9c..394aff667 100644 --- a/crates/brk_computer/src/market/lookback/compute.rs +++ b/crates/brk_computer/src/market/lookback/compute.rs @@ -15,9 +15,9 @@ impl Vecs { ) -> Result<()> { let price = &prices.spot.cents.height; - for (price_lookback, days) in self.price_lookback.iter_mut_with_days() { + for (price_past, days) in self.price_past.iter_mut_with_days() { let window_starts = blocks.lookback.start_vec(days as usize); - price_lookback.cents.height.compute_lookback( + price_past.cents.height.compute_lookback( starting_indexes.height, window_starts, price, diff --git a/crates/brk_computer/src/market/lookback/import.rs b/crates/brk_computer/src/market/lookback/import.rs index 68fb481b6..e55295be4 100644 --- a/crates/brk_computer/src/market/lookback/import.rs +++ b/crates/brk_computer/src/market/lookback/import.rs @@ -11,10 +11,10 @@ impl Vecs { version: Version, indexes: &indexes::Vecs, ) -> Result { - let price_lookback = ByLookbackPeriod::try_new(|name, _days| { - Price::forced_import(db, &format!("price_lookback_{name}"), version, indexes) + let price_past = ByLookbackPeriod::try_new(|name, _days| { + Price::forced_import(db, &format!("price_past_{name}"), version, indexes) })?; - Ok(Self { price_lookback }) + Ok(Self { price_past }) } } diff --git a/crates/brk_computer/src/market/lookback/vecs.rs b/crates/brk_computer/src/market/lookback/vecs.rs index 51edded19..1ae66c358 100644 --- a/crates/brk_computer/src/market/lookback/vecs.rs +++ b/crates/brk_computer/src/market/lookback/vecs.rs @@ -7,5 +7,5 @@ use crate::internal::{PerBlock, Price}; #[derive(Traversable)] pub struct Vecs { #[traversable(flatten)] - pub price_lookback: ByLookbackPeriod>>, + pub price_past: ByLookbackPeriod>>, } diff --git a/crates/brk_computer/src/market/returns/compute.rs b/crates/brk_computer/src/market/returns/compute.rs index ec5ed8e78..78670b9c7 100644 --- a/crates/brk_computer/src/market/returns/compute.rs +++ b/crates/brk_computer/src/market/returns/compute.rs @@ -18,7 +18,7 @@ impl Vecs { for ((returns, _), (lookback_price, _)) in self .periods .iter_mut_with_days() - .zip(lookback.price_lookback.iter_with_days()) + .zip(lookback.price_past.iter_with_days()) { returns.compute_binary::( starting_indexes.height, diff --git a/crates/brk_computer/src/market/technical/compute.rs b/crates/brk_computer/src/market/technical/compute.rs index 71b611452..7a9530b27 100644 --- a/crates/brk_computer/src/market/technical/compute.rs +++ b/crates/brk_computer/src/market/technical/compute.rs @@ -57,19 +57,13 @@ impl Vecs { &returns.periods._1m.ratio.height, &returns.periods._1y.ratio.height, ]; - for ((rsi_chain, ret), &m) in self - .rsi - .as_mut_array() - .into_iter() - .zip(return_sources) - .zip(&TF_MULTIPLIERS) - { + for (rsi_chain, ret) in self.rsi.as_mut_array().into_iter().zip(return_sources) { rsi::compute( rsi_chain, blocks, ret, - 14 * m, - 3 * m, + 14, + 3, starting_indexes, exit, )?; diff --git a/crates/brk_computer/src/market/technical/import.rs b/crates/brk_computer/src/market/technical/import.rs index 667e0840a..c171623be 100644 --- a/crates/brk_computer/src/market/technical/import.rs +++ b/crates/brk_computer/src/market/technical/import.rs @@ -106,7 +106,8 @@ impl Vecs { ) -> Result { let v = version + VERSION; - let rsi = Windows::try_from_fn(|tf| RsiChain::forced_import(db, tf, v, indexes))?; + let rsi = + Windows::try_from_fn(|tf| RsiChain::forced_import(db, tf, v + Version::ONE, indexes))?; let macd = Windows::try_from_fn(|tf| MacdChain::forced_import(db, tf, v, indexes))?; let stoch_k = PercentPerBlock::forced_import(db, "stoch_k", v, indexes)?; diff --git a/crates/brk_computer/src/mining/hashrate/compute.rs b/crates/brk_computer/src/mining/hashrate/compute.rs index ac79425a5..d959fa98f 100644 --- a/crates/brk_computer/src/mining/hashrate/compute.rs +++ b/crates/brk_computer/src/mining/hashrate/compute.rs @@ -23,7 +23,7 @@ impl Vecs { self.rate.base.height.compute_transform2( starting_indexes.height, &count_vecs.total.sum._24h.height, - &difficulty_vecs.as_hash.height, + &difficulty_vecs.hashrate.height, |(i, block_count_sum, difficulty_as_hash, ..)| { ( i, diff --git a/crates/brk_computer/src/mining/rewards/compute.rs b/crates/brk_computer/src/mining/rewards/compute.rs index d043c812b..482dba673 100644 --- a/crates/brk_computer/src/mining/rewards/compute.rs +++ b/crates/brk_computer/src/mining/rewards/compute.rs @@ -147,7 +147,7 @@ impl Vecs { exit, )?; - self.fee_ratio_multiple + self.fee_to_subsidy_ratio .compute_binary::( starting_indexes.height, self.coinbase.sum.as_array().map(|w| &w.usd.height), diff --git a/crates/brk_computer/src/mining/rewards/import.rs b/crates/brk_computer/src/mining/rewards/import.rs index f5fecdb22..38f2f694b 100644 --- a/crates/brk_computer/src/mining/rewards/import.rs +++ b/crates/brk_computer/src/mining/rewards/import.rs @@ -55,9 +55,9 @@ impl Vecs { )?, subsidy_dominance_rolling, subsidy_sma_1y: FiatPerBlock::forced_import(db, "subsidy_sma_1y", version, indexes)?, - fee_ratio_multiple: RatioRollingWindows::forced_import( + fee_to_subsidy_ratio: RatioRollingWindows::forced_import( db, - "fee_ratio_multiple", + "fee_to_subsidy_ratio", version, indexes, )?, diff --git a/crates/brk_computer/src/mining/rewards/vecs.rs b/crates/brk_computer/src/mining/rewards/vecs.rs index cb16734bd..caf4cadc6 100644 --- a/crates/brk_computer/src/mining/rewards/vecs.rs +++ b/crates/brk_computer/src/mining/rewards/vecs.rs @@ -24,6 +24,6 @@ pub struct Vecs { pub subsidy_dominance_rolling: LazyPercentRollingWindows, #[traversable(wrap = "subsidy", rename = "sma_1y")] pub subsidy_sma_1y: FiatPerBlock, - #[traversable(wrap = "fees", rename = "ratio_multiple")] - pub fee_ratio_multiple: RatioRollingWindows, + #[traversable(wrap = "fees", rename = "to_subsidy_ratio")] + pub fee_to_subsidy_ratio: RatioRollingWindows, } diff --git a/crates/brk_computer/src/pools/major.rs b/crates/brk_computer/src/pools/major.rs index d4e6a586d..37874d3e5 100644 --- a/crates/brk_computer/src/pools/major.rs +++ b/crates/brk_computer/src/pools/major.rs @@ -61,14 +61,14 @@ impl Vecs { pub(crate) fn compute( &mut self, starting_indexes: &Indexes, - height_to_pool: &impl ReadableVec, + pool: &impl ReadableVec, blocks: &blocks::Vecs, prices: &prices::Vecs, mining: &mining::Vecs, exit: &Exit, ) -> Result<()> { self.base - .compute(starting_indexes, height_to_pool, blocks, exit)?; + .compute(starting_indexes, pool, blocks, exit)?; for (dom, (mined, total)) in self.dominance_rolling.as_mut_array().into_iter().zip( self.base diff --git a/crates/brk_computer/src/pools/minor.rs b/crates/brk_computer/src/pools/minor.rs index 30544cd56..2895ec93a 100644 --- a/crates/brk_computer/src/pools/minor.rs +++ b/crates/brk_computer/src/pools/minor.rs @@ -52,7 +52,7 @@ impl Vecs { pub(crate) fn compute( &mut self, starting_indexes: &Indexes, - height_to_pool: &impl ReadableVec, + pool: &impl ReadableVec, blocks: &blocks::Vecs, exit: &Exit, ) -> Result<()> { @@ -60,7 +60,7 @@ impl Vecs { .compute(starting_indexes.height, exit, |vec| { vec.compute_transform( starting_indexes.height, - height_to_pool, + pool, |(h, id, ..)| { ( h, diff --git a/crates/brk_computer/src/pools/mod.rs b/crates/brk_computer/src/pools/mod.rs index a88f67364..00fc1b34b 100644 --- a/crates/brk_computer/src/pools/mod.rs +++ b/crates/brk_computer/src/pools/mod.rs @@ -29,7 +29,7 @@ pub struct Vecs { db: Database, pools: &'static Pools, - pub height_to_pool: M::Stored>, + pub pool: M::Stored>, pub major: BTreeMap>, pub minor: BTreeMap>, } @@ -64,7 +64,7 @@ impl Vecs { } let this = Self { - height_to_pool: BytesVec::forced_import(&db, "pool", version)?, + pool: BytesVec::forced_import(&db, "pool", version)?, major: major_map, minor: minor_map, pools, @@ -86,12 +86,12 @@ impl Vecs { starting_indexes: &Indexes, exit: &Exit, ) -> Result<()> { - self.compute_height_to_pool(indexer, indexes, starting_indexes, exit)?; + self.compute_pool(indexer, indexes, starting_indexes, exit)?; self.major.par_iter_mut().try_for_each(|(_, vecs)| { vecs.compute( starting_indexes, - &self.height_to_pool, + &self.pool, blocks, prices, mining, @@ -100,7 +100,7 @@ impl Vecs { })?; self.minor.par_iter_mut().try_for_each(|(_, vecs)| { - vecs.compute(starting_indexes, &self.height_to_pool, blocks, exit) + vecs.compute(starting_indexes, &self.pool, blocks, exit) })?; let _lock = exit.lock(); @@ -108,14 +108,14 @@ impl Vecs { Ok(()) } - fn compute_height_to_pool( + fn compute_pool( &mut self, indexer: &Indexer, indexes: &indexes::Vecs, starting_indexes: &Indexes, exit: &Exit, ) -> Result<()> { - self.height_to_pool + self.pool .validate_computed_version_or_reset(indexer.stores.height_to_coinbase_tag.version())?; let first_txout_index = indexer.vecs.transactions.first_txout_index.reader(); @@ -135,7 +135,7 @@ impl Vecs { let min = starting_indexes .height .to_usize() - .min(self.height_to_pool.len()); + .min(self.pool.len()); // Cursors avoid per-height PcoVec page decompression. // Heights are sequential, tx_index values derived from them are monotonically @@ -144,7 +144,7 @@ impl Vecs { first_tx_index_cursor.advance(min); let mut output_count_cursor = indexes.tx_index.output_count.cursor(); - self.height_to_pool.truncate_if_needed_at(min)?; + self.pool.truncate_if_needed_at(min)?; indexer .stores @@ -181,12 +181,12 @@ impl Vecs { .or_else(|| self.pools.find_from_coinbase_tag(&coinbase_tag)) .unwrap_or(unknown); - self.height_to_pool.push(pool.slug); + self.pool.push(pool.slug); Ok(()) })?; let _lock = exit.lock(); - self.height_to_pool.write()?; + self.pool.write()?; Ok(()) } } diff --git a/crates/brk_computer/src/supply/burned/compute.rs b/crates/brk_computer/src/supply/burned/compute.rs index cc841d49d..01788c406 100644 --- a/crates/brk_computer/src/supply/burned/compute.rs +++ b/crates/brk_computer/src/supply/burned/compute.rs @@ -17,7 +17,7 @@ impl Vecs { let op_return_height = &scripts.value.op_return.base.sats.height; let unclaimed_height = &mining.rewards.unclaimed.base.sats.height; - self.unspendable.compute( + self.total.compute( starting_indexes.height, prices, exit, diff --git a/crates/brk_computer/src/supply/burned/import.rs b/crates/brk_computer/src/supply/burned/import.rs index 0bdc9d520..1eb46fabd 100644 --- a/crates/brk_computer/src/supply/burned/import.rs +++ b/crates/brk_computer/src/supply/burned/import.rs @@ -13,7 +13,7 @@ impl Vecs { cached_starts: &CachedWindowStarts, ) -> Result { Ok(Self { - unspendable: AmountPerBlockCumulativeWithSums::forced_import( + total: AmountPerBlockCumulativeWithSums::forced_import( db, "unspendable_supply", version, diff --git a/crates/brk_computer/src/supply/burned/vecs.rs b/crates/brk_computer/src/supply/burned/vecs.rs index 3ecf34763..2b036c3d2 100644 --- a/crates/brk_computer/src/supply/burned/vecs.rs +++ b/crates/brk_computer/src/supply/burned/vecs.rs @@ -4,6 +4,7 @@ use vecdb::{Rw, StorageMode}; use crate::internal::AmountPerBlockCumulativeWithSums; #[derive(Traversable)] +#[traversable(transparent)] pub struct Vecs { - pub unspendable: AmountPerBlockCumulativeWithSums, + pub total: AmountPerBlockCumulativeWithSums, } diff --git a/crates/brk_computer/src/supply/import.rs b/crates/brk_computer/src/supply/import.rs index 2e7644ace..98bc17768 100644 --- a/crates/brk_computer/src/supply/import.rs +++ b/crates/brk_computer/src/supply/import.rs @@ -64,7 +64,7 @@ impl Vecs { )?; let hodled_or_lost = - LazyAmountPerBlock::identity("hodled_or_lost_coins", &cointime.supply.vaulted, version); + LazyAmountPerBlock::identity("hodled_or_lost_supply", &cointime.supply.vaulted, version); let this = Self { db, diff --git a/crates/brk_computer/src/supply/velocity/compute.rs b/crates/brk_computer/src/supply/velocity/compute.rs index b876e107b..30382e36d 100644 --- a/crates/brk_computer/src/supply/velocity/compute.rs +++ b/crates/brk_computer/src/supply/velocity/compute.rs @@ -21,7 +21,7 @@ impl Vecs { self.native.height.compute_rolling_ratio( starting_indexes.height, &blocks.lookback._1y, - &transactions.volume.sent_sum.base.sats.height, + &transactions.volume.transfer_volume.base.sats.height, &circulating_supply.sats.height, exit, )?; @@ -30,7 +30,7 @@ impl Vecs { self.fiat.height.compute_rolling_ratio( starting_indexes.height, &blocks.lookback._1y, - &transactions.volume.sent_sum.base.usd.height, + &transactions.volume.transfer_volume.base.usd.height, &circulating_supply.usd.height, exit, )?; diff --git a/crates/brk_computer/src/transactions/volume/compute.rs b/crates/brk_computer/src/transactions/volume/compute.rs index 0d038e762..4f202b403 100644 --- a/crates/brk_computer/src/transactions/volume/compute.rs +++ b/crates/brk_computer/src/transactions/volume/compute.rs @@ -25,7 +25,7 @@ impl Vecs { // sent_sum and received_sum are independent — parallelize let (r1, r2) = rayon::join( || { - self.sent_sum.compute( + self.transfer_volume.compute( starting_indexes.height, prices, exit, @@ -42,7 +42,7 @@ impl Vecs { ) }, || { - self.received_sum.compute( + self.output_volume.compute( starting_indexes.height, prices, exit, @@ -66,7 +66,7 @@ impl Vecs { .compute_binary::<_, Timestamp, PerSec>( starting_indexes.height, &count_vecs.total.base.height, - &blocks.interval.height, + &blocks.interval.base, exit, )?; self.inputs_per_sec @@ -74,7 +74,7 @@ impl Vecs { .compute_binary::<_, Timestamp, PerSec>( starting_indexes.height, &inputs_count.full.sum, - &blocks.interval.height, + &blocks.interval.base, exit, )?; self.outputs_per_sec @@ -82,7 +82,7 @@ impl Vecs { .compute_binary::<_, Timestamp, PerSec>( starting_indexes.height, &outputs_count.total.full.sum, - &blocks.interval.height, + &blocks.interval.base, exit, )?; diff --git a/crates/brk_computer/src/transactions/volume/import.rs b/crates/brk_computer/src/transactions/volume/import.rs index 6a849f971..11721626c 100644 --- a/crates/brk_computer/src/transactions/volume/import.rs +++ b/crates/brk_computer/src/transactions/volume/import.rs @@ -17,16 +17,16 @@ impl Vecs { ) -> Result { let v2 = Version::TWO; Ok(Self { - sent_sum: AmountPerBlockCumulativeWithSums::forced_import( + transfer_volume: AmountPerBlockCumulativeWithSums::forced_import( db, - "sent_sum", + "exact_transfer_volume", version, indexes, cached_starts, )?, - received_sum: AmountPerBlockCumulativeWithSums::forced_import( + output_volume: AmountPerBlockCumulativeWithSums::forced_import( db, - "received_sum", + "output_volume", version, indexes, cached_starts, diff --git a/crates/brk_computer/src/transactions/volume/vecs.rs b/crates/brk_computer/src/transactions/volume/vecs.rs index c0b904b32..271ff7b16 100644 --- a/crates/brk_computer/src/transactions/volume/vecs.rs +++ b/crates/brk_computer/src/transactions/volume/vecs.rs @@ -6,8 +6,8 @@ use crate::internal::{AmountPerBlockCumulativeWithSums, PerBlock}; #[derive(Traversable)] pub struct Vecs { - pub sent_sum: AmountPerBlockCumulativeWithSums, - pub received_sum: AmountPerBlockCumulativeWithSums, + pub transfer_volume: AmountPerBlockCumulativeWithSums, + pub output_volume: AmountPerBlockCumulativeWithSums, pub tx_per_sec: PerBlock, pub outputs_per_sec: PerBlock, pub inputs_per_sec: PerBlock, diff --git a/crates/brk_indexer/src/vecs/blocks.rs b/crates/brk_indexer/src/vecs/blocks.rs index a5fbc4978..45e00c51f 100644 --- a/crates/brk_indexer/src/vecs/blocks.rs +++ b/crates/brk_indexer/src/vecs/blocks.rs @@ -16,8 +16,9 @@ pub struct BlocksVecs { /// Doesn't guarantee continuity due to possible reorgs and more generally the nature of mining #[traversable(wrap = "time")] pub timestamp: M::Stored>, - #[traversable(wrap = "size")] + #[traversable(wrap = "size", rename = "base")] pub total: M::Stored>, + #[traversable(wrap = "weight", rename = "base")] pub weight: M::Stored>, } diff --git a/crates/brk_query/src/impl/mining/pools.rs b/crates/brk_query/src/impl/mining/pools.rs index d1d28aeb7..35cc2e4fd 100644 --- a/crates/brk_query/src/impl/mining/pools.rs +++ b/crates/brk_query/src/impl/mining/pools.rs @@ -14,7 +14,7 @@ impl Query { let end = current_height.to_usize(); // No blocks indexed yet - if computer.pools.height_to_pool.len() == 0 { + if computer.pools.pool.len() == 0 { return Ok(PoolsSummary { pools: vec![], block_count: 0, diff --git a/crates/brk_server/src/api/openapi/mod.rs b/crates/brk_server/src/api/openapi/mod.rs index 10909947f..6b3490c5c 100644 --- a/crates/brk_server/src/api/openapi/mod.rs +++ b/crates/brk_server/src/api/openapi/mod.rs @@ -112,6 +112,7 @@ All errors return structured JSON with a consistent format: description: Some( "Deprecated — use Series".to_string(), ), + extensions: [("x-deprecated".to_string(), serde_json::Value::Bool(true))].into(), ..Default::default() }, Tag { diff --git a/crates/brk_traversable/src/lib.rs b/crates/brk_traversable/src/lib.rs index 68e0cb740..e46499ca4 100644 --- a/crates/brk_traversable/src/lib.rs +++ b/crates/brk_traversable/src/lib.rs @@ -15,7 +15,12 @@ use vecdb::{ pub trait Traversable { fn to_tree_node(&self) -> TreeNode; + /// All vecs including hidden — used for disk writes, flushes, exports. fn iter_any_exportable(&self) -> impl Iterator; + /// Only non-hidden vecs — used for building the public series list. + fn iter_any_visible(&self) -> impl Iterator { + self.iter_any_exportable() + } } /// Helper to create a SeriesLeafWithSchema from a vec diff --git a/modules/brk-client/index.js b/modules/brk-client/index.js index 70de8f4df..3187ff29f 100644 --- a/modules/brk-client/index.js +++ b/modules/brk-client/index.js @@ -1776,15 +1776,15 @@ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern3(client, acc) { /** * @typedef {Object} CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern - * @property {CentsDeltaRelUsdPattern} cap + * @property {CentsDeltaToUsdPattern} cap * @property {BaseCumulativeSumPattern3} grossPnl - * @property {LowerPriceUpperPattern} investor - * @property {BaseCapitulationCumulativeNegativeRelSumValuePattern} loss + * @property {InvestorPricePattern} investor + * @property {BaseCapitulationCumulativeNegativeSumToValuePattern} loss * @property {SeriesPattern1} mvrv - * @property {BaseChangeCumulativeDeltaRelSumPattern} netPnl - * @property {BaseCumulativeRelPattern} peakRegret + * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl + * @property {BaseCumulativeToPattern} peakRegret * @property {BpsCentsPercentilesRatioSatsSmaStdUsdPattern} price - * @property {BaseCumulativeDistributionRelSumValuePattern} profit + * @property {BaseCumulativeDistributionSumToValuePattern} profit * @property {_1m1w1y24hPattern} profitToLossRatio * @property {_1m1w1y24hPattern6} sellSideRiskRatio * @property {AdjustedRatioValuePattern} sopr @@ -1828,7 +1828,7 @@ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPatter } /** - * @typedef {Object} AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern + * @typedef {Object} AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 * @property {_1m1w1y24hPattern} average * @property {SeriesPattern1} base * @property {SeriesPattern1} cumulative @@ -1843,12 +1843,12 @@ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPatter */ /** - * Create a AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern pattern node + * Create a AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} + * @returns {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} */ -function createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { +function createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, acc) { return { average: create_1m1w1y24hPattern(client, _m(acc, 'average')), base: createSeriesPattern1(client, acc), @@ -1864,6 +1864,22 @@ function createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(c }; } +/** + * @template T + * @typedef {Object} AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern + * @property {_1m1w1y24hPattern} average + * @property {SeriesPattern18} base + * @property {SeriesPattern1} cumulative + * @property {_1m1w1y24hPattern} max + * @property {_1m1w1y24hPattern} median + * @property {_1m1w1y24hPattern} min + * @property {_1m1w1y24hPattern} pct10 + * @property {_1m1w1y24hPattern} pct25 + * @property {_1m1w1y24hPattern} pct75 + * @property {_1m1w1y24hPattern} pct90 + * @property {_1m1w1y24hPattern} sum + */ + /** * @typedef {Object} AverageGainsLossesRsiStochPattern * @property {SeriesPattern1} averageGain @@ -1967,44 +1983,13 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { } /** - * @typedef {Object} AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern - * @property {BtcCentsSatsUsdPattern} average - * @property {BtcCentsSatsUsdPattern} max - * @property {BtcCentsSatsUsdPattern} median - * @property {BtcCentsSatsUsdPattern} min - * @property {BtcCentsSatsUsdPattern} pct10 - * @property {BtcCentsSatsUsdPattern} pct25 - * @property {BtcCentsSatsUsdPattern} pct75 - * @property {BtcCentsSatsUsdPattern} pct90 - */ - -/** - * Create a AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated series name - * @returns {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} - */ -function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { - return { - average: createBtcCentsSatsUsdPattern(client, _m(acc, 'average')), - max: createBtcCentsSatsUsdPattern(client, _m(acc, 'max')), - median: createBtcCentsSatsUsdPattern(client, _m(acc, 'median')), - min: createBtcCentsSatsUsdPattern(client, _m(acc, 'min')), - pct10: createBtcCentsSatsUsdPattern(client, _m(acc, 'pct10')), - pct25: createBtcCentsSatsUsdPattern(client, _m(acc, 'pct25')), - pct75: createBtcCentsSatsUsdPattern(client, _m(acc, 'pct75')), - pct90: createBtcCentsSatsUsdPattern(client, _m(acc, 'pct90')), - }; -} - -/** - * @typedef {Object} BaseCapitulationCumulativeNegativeRelSumValuePattern + * @typedef {Object} BaseCapitulationCumulativeNegativeSumToValuePattern * @property {CentsUsdPattern2} base * @property {SeriesPattern1} capitulationFlow * @property {CentsUsdPattern2} cumulative * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern4} relToRcap * @property {_1m1w1y24hPattern4} sum + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed */ @@ -2023,7 +2008,7 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { /** * @template T - * @typedef {Object} AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2 + * @typedef {Object} AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern * @property {SeriesPattern18} average * @property {SeriesPattern18} max * @property {SeriesPattern18} median @@ -2035,13 +2020,13 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { */ /** - * Create a AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2 pattern node + * Create a AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern pattern node * @template T * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2} + * @returns {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} */ -function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(client, acc) { +function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { return { average: createSeriesPattern18(client, _m(acc, 'average')), max: createSeriesPattern18(client, _m(acc, 'max')), @@ -2113,42 +2098,42 @@ function create_1m1w1y24hBpsPercentRatioPattern(client, acc) { } /** - * @typedef {Object} BaseCumulativeDistributionRelSumValuePattern + * @typedef {Object} BaseCumulativeDistributionSumToValuePattern * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {SeriesPattern1} distributionFlow - * @property {BpsPercentRatioPattern4} relToRcap * @property {_1m1w1y24hPattern4} sum + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed */ /** - * @typedef {Object} BaseCumulativeNegativeRelSumPattern2 + * @typedef {Object} BaseCumulativeNegativeSumToPattern2 * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern3} relToMcap - * @property {BpsPercentRatioPattern3} relToOwnGross - * @property {BpsPercentRatioPattern4} relToOwnMcap * @property {_1m1w1y24hPattern4} sum + * @property {BpsPercentRatioPattern3} toMcap + * @property {BpsPercentRatioPattern3} toOwnGrossPnl + * @property {BpsPercentRatioPattern4} toOwnMcap */ /** - * Create a BaseCumulativeNegativeRelSumPattern2 pattern node + * Create a BaseCumulativeNegativeSumToPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeNegativeRelSumPattern2} + * @returns {BaseCumulativeNegativeSumToPattern2} */ -function createBaseCumulativeNegativeRelSumPattern2(client, acc) { +function createBaseCumulativeNegativeSumToPattern2(client, acc) { return { base: createCentsUsdPattern2(client, _m(acc, 'unrealized_loss')), cumulative: createCentsUsdPattern2(client, _m(acc, 'unrealized_loss_cumulative')), negative: createSeriesPattern1(client, _m(acc, 'neg_unrealized_loss')), - relToMcap: createBpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_rel_to_mcap')), - relToOwnGross: createBpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_rel_to_own_gross_pnl')), - relToOwnMcap: createBpsPercentRatioPattern4(client, _m(acc, 'unrealized_loss_rel_to_own_mcap')), sum: create_1m1w1y24hPattern4(client, _m(acc, 'unrealized_loss_sum')), + toMcap: createBpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_to_mcap')), + toOwnGrossPnl: createBpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_to_own_gross_pnl')), + toOwnMcap: createBpsPercentRatioPattern4(client, _m(acc, 'unrealized_loss_to_own_mcap')), }; } @@ -2185,10 +2170,10 @@ function createCapLossMvrvNetPriceProfitSoprPattern(client, acc) { * @typedef {Object} GrossInvestedLossNetNuplProfitSentimentPattern2 * @property {CentsUsdPattern2} grossPnl * @property {InPattern} investedCapital - * @property {BaseCumulativeNegativeRelSumPattern2} loss - * @property {CentsRelUsdPattern2} netPnl + * @property {BaseCumulativeNegativeSumToPattern2} loss + * @property {CentsToUsdPattern2} netPnl * @property {BpsRatioPattern} nupl - * @property {BaseCumulativeRelSumPattern2} profit + * @property {BaseCumulativeSumToPattern2} profit * @property {GreedNetPainPattern} sentiment */ @@ -2220,56 +2205,56 @@ function create_1m1w1y2y4yAllPattern(client, acc) { } /** - * @typedef {Object} BaseChangeCumulativeDeltaRelSumPattern + * @typedef {Object} BaseChangeCumulativeDeltaSumToPattern * @property {CentsUsdPattern} base - * @property {RelPattern} change1m + * @property {ToPattern} change1m * @property {CentsUsdPattern} cumulative * @property {AbsoluteRatePattern2} delta - * @property {BpsPercentRatioPattern} relToRcap * @property {_1m1w1y24hPattern3} sum + * @property {BpsPercentRatioPattern} toRcap */ /** - * Create a BaseChangeCumulativeDeltaRelSumPattern pattern node + * Create a BaseChangeCumulativeDeltaSumToPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseChangeCumulativeDeltaRelSumPattern} + * @returns {BaseChangeCumulativeDeltaSumToPattern} */ -function createBaseChangeCumulativeDeltaRelSumPattern(client, acc) { +function createBaseChangeCumulativeDeltaSumToPattern(client, acc) { return { base: createCentsUsdPattern(client, _m(acc, 'realized_pnl')), - change1m: createRelPattern(client, _m(acc, 'pnl_change_1m_rel_to')), + change1m: createToPattern(client, _m(acc, 'pnl_change_1m_to')), cumulative: createCentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative')), delta: createAbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta')), - relToRcap: createBpsPercentRatioPattern(client, _m(acc, 'realized_pnl_rel_to_rcap')), sum: create_1m1w1y24hPattern3(client, _m(acc, 'realized_pnl_sum')), + toRcap: createBpsPercentRatioPattern(client, _m(acc, 'realized_pnl_to_rcap')), }; } /** - * @typedef {Object} BaseCumulativeRelSumPattern2 + * @typedef {Object} BaseCumulativeSumToPattern2 * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative - * @property {BpsPercentRatioPattern3} relToMcap - * @property {BpsPercentRatioPattern3} relToOwnGross - * @property {BpsPercentRatioPattern3} relToOwnMcap * @property {_1m1w1y24hPattern4} sum + * @property {BpsPercentRatioPattern3} toMcap + * @property {BpsPercentRatioPattern3} toOwnGrossPnl + * @property {BpsPercentRatioPattern3} toOwnMcap */ /** - * Create a BaseCumulativeRelSumPattern2 pattern node + * Create a BaseCumulativeSumToPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeRelSumPattern2} + * @returns {BaseCumulativeSumToPattern2} */ -function createBaseCumulativeRelSumPattern2(client, acc) { +function createBaseCumulativeSumToPattern2(client, acc) { return { base: createCentsUsdPattern2(client, acc), cumulative: createCentsUsdPattern2(client, _m(acc, 'cumulative')), - relToMcap: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_mcap')), - relToOwnGross: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_own_gross_pnl')), - relToOwnMcap: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_own_mcap')), sum: create_1m1w1y24hPattern4(client, _m(acc, 'sum')), + toMcap: createBpsPercentRatioPattern3(client, _m(acc, 'to_mcap')), + toOwnGrossPnl: createBpsPercentRatioPattern3(client, _m(acc, 'to_own_gross_pnl')), + toOwnMcap: createBpsPercentRatioPattern3(client, _m(acc, 'to_own_mcap')), }; } @@ -2301,28 +2286,28 @@ function createBpsCentsPercentilesRatioSatsUsdPattern(client, acc) { } /** - * @typedef {Object} BtcCentsRelSatsUsdPattern3 + * @typedef {Object} BtcCentsSatsToUsdPattern3 * @property {SeriesPattern1} btc * @property {SeriesPattern1} cents - * @property {BpsPercentRatioPattern3} relToCirculating - * @property {BpsPercentRatioPattern3} relToOwn * @property {SeriesPattern1} sats + * @property {BpsPercentRatioPattern3} toCirculating + * @property {BpsPercentRatioPattern3} toOwn * @property {SeriesPattern1} usd */ /** - * Create a BtcCentsRelSatsUsdPattern3 pattern node + * Create a BtcCentsSatsToUsdPattern3 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BtcCentsRelSatsUsdPattern3} + * @returns {BtcCentsSatsToUsdPattern3} */ -function createBtcCentsRelSatsUsdPattern3(client, acc) { +function createBtcCentsSatsToUsdPattern3(client, acc) { return { btc: createSeriesPattern1(client, acc), cents: createSeriesPattern1(client, _m(acc, 'cents')), - relToCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')), - relToOwn: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_own')), sats: createSeriesPattern1(client, _m(acc, 'sats')), + toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), + toOwn: createBpsPercentRatioPattern3(client, _m(acc, 'to_own')), usd: createSeriesPattern1(client, _m(acc, 'usd')), }; } @@ -2355,55 +2340,55 @@ function createCapLossMvrvPriceProfitSoprPattern(client, acc) { } /** - * @typedef {Object} DeltaHalfInRelTotalPattern + * @typedef {Object} DeltaHalfInToTotalPattern * @property {AbsoluteRatePattern} delta * @property {BtcCentsSatsUsdPattern} half - * @property {BtcCentsRelSatsUsdPattern} inLoss - * @property {BtcCentsRelSatsUsdPattern} inProfit - * @property {BpsPercentRatioPattern3} relToCirculating + * @property {BtcCentsSatsToUsdPattern} inLoss + * @property {BtcCentsSatsToUsdPattern} inProfit + * @property {BpsPercentRatioPattern3} toCirculating * @property {BtcCentsSatsUsdPattern} total */ /** - * Create a DeltaHalfInRelTotalPattern pattern node + * Create a DeltaHalfInToTotalPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {DeltaHalfInRelTotalPattern} + * @returns {DeltaHalfInToTotalPattern} */ -function createDeltaHalfInRelTotalPattern(client, acc) { +function createDeltaHalfInToTotalPattern(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), half: createBtcCentsSatsUsdPattern(client, _m(acc, 'half')), - inLoss: createBtcCentsRelSatsUsdPattern(client, _m(acc, 'in_loss')), - inProfit: createBtcCentsRelSatsUsdPattern(client, _m(acc, 'in_profit')), - relToCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')), + inLoss: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_loss')), + inProfit: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_profit')), + toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), total: createBtcCentsSatsUsdPattern(client, acc), }; } /** - * @typedef {Object} DeltaHalfInRelTotalPattern2 + * @typedef {Object} DeltaHalfInToTotalPattern2 * @property {AbsoluteRatePattern} delta * @property {BtcCentsSatsUsdPattern} half - * @property {BtcCentsRelSatsUsdPattern3} inLoss - * @property {BtcCentsRelSatsUsdPattern3} inProfit - * @property {BpsPercentRatioPattern3} relToCirculating + * @property {BtcCentsSatsToUsdPattern3} inLoss + * @property {BtcCentsSatsToUsdPattern3} inProfit + * @property {BpsPercentRatioPattern3} toCirculating * @property {BtcCentsSatsUsdPattern} total */ /** - * Create a DeltaHalfInRelTotalPattern2 pattern node + * Create a DeltaHalfInToTotalPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {DeltaHalfInRelTotalPattern2} + * @returns {DeltaHalfInToTotalPattern2} */ -function createDeltaHalfInRelTotalPattern2(client, acc) { +function createDeltaHalfInToTotalPattern2(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), half: createBtcCentsSatsUsdPattern(client, _m(acc, 'half')), - inLoss: createBtcCentsRelSatsUsdPattern3(client, _m(acc, 'in_loss')), - inProfit: createBtcCentsRelSatsUsdPattern3(client, _m(acc, 'in_profit')), - relToCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')), + inLoss: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_loss')), + inProfit: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_profit')), + toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), total: createBtcCentsSatsUsdPattern(client, acc), }; } @@ -2437,10 +2422,10 @@ function createPct1Pct2Pct5Pct95Pct98Pct99Pattern(client, acc) { /** * @typedef {Object} ActivityOutputsRealizedSupplyUnrealizedPattern - * @property {CoindaysSentPattern} activity + * @property {CoindaysTransferPattern} activity * @property {UnspentPattern} outputs * @property {CapLossMvrvNetPriceProfitSoprPattern} realized - * @property {DeltaHalfInRelTotalPattern} supply + * @property {DeltaHalfInToTotalPattern} supply * @property {LossNetNuplProfitPattern} unrealized */ @@ -2452,17 +2437,17 @@ function createPct1Pct2Pct5Pct95Pct98Pct99Pattern(client, acc) { */ function createActivityOutputsRealizedSupplyUnrealizedPattern(client, acc) { return { - activity: createCoindaysSentPattern(client, acc), + activity: createCoindaysTransferPattern(client, acc), outputs: createUnspentPattern(client, _m(acc, 'utxo_count')), realized: createCapLossMvrvNetPriceProfitSoprPattern(client, acc), - supply: createDeltaHalfInRelTotalPattern(client, _m(acc, 'supply')), + supply: createDeltaHalfInToTotalPattern(client, _m(acc, 'supply')), unrealized: createLossNetNuplProfitPattern(client, acc), }; } /** * @typedef {Object} AddressOutputsRealizedSupplyUnrealizedPattern - * @property {DeltaInnerPattern} addressCount + * @property {BaseDeltaPattern} addressCount * @property {UnspentPattern} outputs * @property {CapLossMvrvPriceProfitSoprPattern} realized * @property {DeltaHalfTotalPattern} supply @@ -2477,7 +2462,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern(client, acc) { */ function createAddressOutputsRealizedSupplyUnrealizedPattern(client, acc) { return { - addressCount: createDeltaInnerPattern(client, _m(acc, 'address_count')), + addressCount: createBaseDeltaPattern(client, _m(acc, 'address_count')), outputs: createUnspentPattern(client, _m(acc, 'utxo_count')), realized: createCapLossMvrvPriceProfitSoprPattern(client, acc), supply: createDeltaHalfTotalPattern(client, _m(acc, 'supply')), @@ -2561,51 +2546,51 @@ function createBtcCentsDeltaSatsUsdPattern(client, acc) { } /** - * @typedef {Object} BtcCentsRelSatsUsdPattern + * @typedef {Object} BtcCentsSatsToUsdPattern * @property {SeriesPattern1} btc * @property {SeriesPattern1} cents - * @property {BpsPercentRatioPattern3} relToCirculating * @property {SeriesPattern1} sats + * @property {BpsPercentRatioPattern3} toCirculating * @property {SeriesPattern1} usd */ /** - * Create a BtcCentsRelSatsUsdPattern pattern node + * Create a BtcCentsSatsToUsdPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BtcCentsRelSatsUsdPattern} + * @returns {BtcCentsSatsToUsdPattern} */ -function createBtcCentsRelSatsUsdPattern(client, acc) { +function createBtcCentsSatsToUsdPattern(client, acc) { return { btc: createSeriesPattern1(client, acc), cents: createSeriesPattern1(client, _m(acc, 'cents')), - relToCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')), sats: createSeriesPattern1(client, _m(acc, 'sats')), + toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), usd: createSeriesPattern1(client, _m(acc, 'usd')), }; } /** - * @typedef {Object} BtcCentsRelSatsUsdPattern2 + * @typedef {Object} BtcCentsSatsToUsdPattern2 * @property {SeriesPattern1} btc * @property {SeriesPattern1} cents - * @property {BpsPercentRatioPattern3} relToOwn * @property {SeriesPattern1} sats + * @property {BpsPercentRatioPattern3} toOwn * @property {SeriesPattern1} usd */ /** - * Create a BtcCentsRelSatsUsdPattern2 pattern node + * Create a BtcCentsSatsToUsdPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BtcCentsRelSatsUsdPattern2} + * @returns {BtcCentsSatsToUsdPattern2} */ -function createBtcCentsRelSatsUsdPattern2(client, acc) { +function createBtcCentsSatsToUsdPattern2(client, acc) { return { btc: createSeriesPattern1(client, acc), cents: createSeriesPattern1(client, _m(acc, 'cents')), - relToOwn: createBpsPercentRatioPattern3(client, _m(acc, 'rel_to_own')), sats: createSeriesPattern1(client, _m(acc, 'sats')), + toOwn: createBpsPercentRatioPattern3(client, _m(acc, 'to_own')), usd: createSeriesPattern1(client, _m(acc, 'usd')), }; } @@ -2680,28 +2665,28 @@ function createPhsReboundThsPattern(client, acc) { /** * @template T - * @typedef {Object} _1m1w1y24hHeightPattern + * @typedef {Object} _1m1w1y24hBasePattern * @property {SeriesPattern1} _1m * @property {SeriesPattern1} _1w * @property {SeriesPattern1} _1y * @property {SeriesPattern1} _24h - * @property {SeriesPattern18} height + * @property {SeriesPattern18} base */ /** - * Create a _1m1w1y24hHeightPattern pattern node + * Create a _1m1w1y24hBasePattern pattern node * @template T * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {_1m1w1y24hHeightPattern} + * @returns {_1m1w1y24hBasePattern} */ -function create_1m1w1y24hHeightPattern(client, acc) { +function create_1m1w1y24hBasePattern(client, acc) { return { _1m: createSeriesPattern1(client, _m(acc, 'average_1m')), _1w: createSeriesPattern1(client, _m(acc, 'average_1w')), _1y: createSeriesPattern1(client, _m(acc, 'average_1y')), _24h: createSeriesPattern1(client, _m(acc, 'average_24h')), - height: createSeriesPattern18(client, acc), + base: createSeriesPattern18(client, acc), }; } @@ -2908,10 +2893,10 @@ function createBaseCumulativeNegativeSumPattern(client, acc, disc) { /** * @typedef {Object} BothReactivatedReceivingSendingPattern - * @property {_1m1w1y24hHeightPattern} both - * @property {_1m1w1y24hHeightPattern} reactivated - * @property {_1m1w1y24hHeightPattern} receiving - * @property {_1m1w1y24hHeightPattern} sending + * @property {_1m1w1y24hBasePattern} both + * @property {_1m1w1y24hBasePattern} reactivated + * @property {_1m1w1y24hBasePattern} receiving + * @property {_1m1w1y24hBasePattern} sending */ /** @@ -2922,10 +2907,10 @@ function createBaseCumulativeNegativeSumPattern(client, acc, disc) { */ function createBothReactivatedReceivingSendingPattern(client, acc) { return { - both: create_1m1w1y24hHeightPattern(client, _m(acc, 'both')), - reactivated: create_1m1w1y24hHeightPattern(client, _m(acc, 'reactivated')), - receiving: create_1m1w1y24hHeightPattern(client, _m(acc, 'receiving')), - sending: create_1m1w1y24hHeightPattern(client, _m(acc, 'sending')), + both: create_1m1w1y24hBasePattern(client, _m(acc, 'both')), + reactivated: create_1m1w1y24hBasePattern(client, _m(acc, 'reactivated')), + receiving: create_1m1w1y24hBasePattern(client, _m(acc, 'receiving')), + sending: create_1m1w1y24hBasePattern(client, _m(acc, 'sending')), }; } @@ -2953,57 +2938,57 @@ function createBtcCentsSatsUsdPattern(client, acc) { } /** - * @typedef {Object} CentsDeltaRelUsdPattern + * @typedef {Object} CentsDeltaToUsdPattern * @property {SeriesPattern1} cents * @property {AbsoluteRatePattern2} delta - * @property {BpsPercentRatioPattern4} relToOwnMcap + * @property {BpsPercentRatioPattern4} toOwnMcap * @property {SeriesPattern1} usd */ /** - * Create a CentsDeltaRelUsdPattern pattern node + * Create a CentsDeltaToUsdPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {CentsDeltaRelUsdPattern} + * @returns {CentsDeltaToUsdPattern} */ -function createCentsDeltaRelUsdPattern(client, acc) { +function createCentsDeltaToUsdPattern(client, acc) { return { cents: createSeriesPattern1(client, _m(acc, 'cents')), delta: createAbsoluteRatePattern2(client, _m(acc, 'delta')), - relToOwnMcap: createBpsPercentRatioPattern4(client, _m(acc, 'rel_to_own_mcap')), + toOwnMcap: createBpsPercentRatioPattern4(client, _m(acc, 'to_own_mcap')), usd: createSeriesPattern1(client, acc), }; } /** - * @typedef {Object} CentsRelUsdPattern2 + * @typedef {Object} CentsToUsdPattern2 * @property {SeriesPattern1} cents - * @property {BpsPercentRatioPattern} relToOwnGross - * @property {BpsPercentRatioPattern} relToOwnMcap + * @property {BpsPercentRatioPattern} toOwnGrossPnl + * @property {BpsPercentRatioPattern} toOwnMcap * @property {SeriesPattern1} usd */ /** - * Create a CentsRelUsdPattern2 pattern node + * Create a CentsToUsdPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {CentsRelUsdPattern2} + * @returns {CentsToUsdPattern2} */ -function createCentsRelUsdPattern2(client, acc) { +function createCentsToUsdPattern2(client, acc) { return { cents: createSeriesPattern1(client, _m(acc, 'cents')), - relToOwnGross: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_gross_pnl')), - relToOwnMcap: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_mcap')), + toOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'to_own_gross_pnl')), + toOwnMcap: createBpsPercentRatioPattern(client, _m(acc, 'to_own_mcap')), usd: createSeriesPattern1(client, acc), }; } /** - * @typedef {Object} CoindaysCoinyearsDormancySentPattern + * @typedef {Object} CoindaysCoinyearsDormancyTransferPattern * @property {BaseCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {SeriesPattern1} dormancy - * @property {BaseCumulativeInSumPattern} sent + * @property {BaseCumulativeInSumPattern} transferVolume */ /** @@ -3122,23 +3107,23 @@ function createBaseCumulativeSumPattern4(client, acc) { } /** - * @typedef {Object} BaseCumulativeRelPattern + * @typedef {Object} BaseCumulativeToPattern * @property {SeriesPattern1} base * @property {SeriesPattern1} cumulative - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap */ /** - * Create a BaseCumulativeRelPattern pattern node + * Create a BaseCumulativeToPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeRelPattern} + * @returns {BaseCumulativeToPattern} */ -function createBaseCumulativeRelPattern(client, acc) { +function createBaseCumulativeToPattern(client, acc) { return { base: createSeriesPattern1(client, acc), cumulative: createSeriesPattern1(client, _m(acc, 'cumulative')), - relToRcap: createBpsPercentRatioPattern4(client, _m(acc, 'rel_to_rcap')), + toRcap: createBpsPercentRatioPattern4(client, _m(acc, 'to_rcap')), }; } @@ -3402,6 +3387,27 @@ function createDeltaHalfTotalPattern(client, acc) { * @property {CentsUsdPattern2} painIndex */ +/** + * @typedef {Object} InvestorPricePattern + * @property {CentsSatsUsdPattern} investorLowerBand + * @property {CentsSatsUsdPattern} investorUpperBand + * @property {BpsCentsPercentilesRatioSatsUsdPattern} price + */ + +/** + * Create a InvestorPricePattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {InvestorPricePattern} + */ +function createInvestorPricePattern(client, acc) { + return { + investorLowerBand: createCentsSatsUsdPattern(client, _m(acc, 'lower_band')), + investorUpperBand: createCentsSatsUsdPattern(client, _m(acc, 'upper_band')), + price: createBpsCentsPercentilesRatioSatsUsdPattern(client, _m(acc, 'price')), + }; +} + /** * @typedef {Object} LossNuplProfitPattern * @property {BaseCumulativeNegativeSumPattern} loss @@ -3423,13 +3429,6 @@ function createLossNuplProfitPattern(client, acc) { }; } -/** - * @typedef {Object} LowerPriceUpperPattern - * @property {CentsSatsUsdPattern} lowerPriceBand - * @property {BpsCentsPercentilesRatioSatsUsdPattern} price - * @property {CentsSatsUsdPattern} upperPriceBand - */ - /** * @typedef {Object} NuplRealizedSupplyPattern * @property {BpsRatioPattern} nupl @@ -3482,8 +3481,8 @@ function createRatioValuePattern(client, acc) { /** * @template T * @typedef {Object} _6bBlockTxPattern - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2} _6b - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2} block + * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _6b + * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} block * @property {SeriesPattern19} txIndex */ @@ -3496,8 +3495,8 @@ function createRatioValuePattern(client, acc) { */ function create_6bBlockTxPattern(client, acc) { return { - _6b: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(client, _m(acc, '6b')), - block: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(client, acc), + _6b: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, _m(acc, '6b')), + block: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc), txIndex: createSeriesPattern19(client, acc), }; } @@ -3601,6 +3600,25 @@ function createAllSthPattern(client, acc) { }; } +/** + * @typedef {Object} BaseDeltaPattern + * @property {SeriesPattern1} base + * @property {AbsoluteRatePattern} delta + */ + +/** + * Create a BaseDeltaPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {BaseDeltaPattern} + */ +function createBaseDeltaPattern(client, acc) { + return { + base: createSeriesPattern1(client, acc), + delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), + }; +} + /** * @typedef {Object} BlocksDominancePattern * @property {BaseCumulativeSumPattern2} blocksMined @@ -3697,40 +3715,21 @@ function createCentsUsdPattern(client, acc) { } /** - * @typedef {Object} CoindaysSentPattern + * @typedef {Object} CoindaysTransferPattern * @property {BaseCumulativeSumPattern} coindaysDestroyed - * @property {BaseCumulativeInSumPattern} sent + * @property {BaseCumulativeInSumPattern} transferVolume */ /** - * Create a CoindaysSentPattern pattern node + * Create a CoindaysTransferPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {CoindaysSentPattern} + * @returns {CoindaysTransferPattern} */ -function createCoindaysSentPattern(client, acc) { +function createCoindaysTransferPattern(client, acc) { return { coindaysDestroyed: createBaseCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')), - sent: createBaseCumulativeInSumPattern(client, _m(acc, 'sent')), - }; -} - -/** - * @typedef {Object} DeltaInnerPattern - * @property {AbsoluteRatePattern} delta - * @property {SeriesPattern1} inner - */ - -/** - * Create a DeltaInnerPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated series name - * @returns {DeltaInnerPattern} - */ -function createDeltaInnerPattern(client, acc) { - return { - delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), - inner: createSeriesPattern1(client, acc), + transferVolume: createBaseCumulativeInSumPattern(client, _m(acc, 'transfer_volume')), }; } @@ -3773,31 +3772,31 @@ function createPriceRatioPattern(client, acc, disc) { }; } -/** - * @typedef {Object} RelPattern - * @property {BpsPercentRatioPattern} relToMcap - * @property {BpsPercentRatioPattern} relToRcap - */ - -/** - * Create a RelPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated series name - * @returns {RelPattern} - */ -function createRelPattern(client, acc) { - return { - relToMcap: createBpsPercentRatioPattern(client, _m(acc, 'mcap')), - relToRcap: createBpsPercentRatioPattern(client, _m(acc, 'rcap')), - }; -} - /** * @typedef {Object} SdSmaPattern * @property {SeriesPattern1} sd * @property {SeriesPattern1} sma */ +/** + * @typedef {Object} ToPattern + * @property {BpsPercentRatioPattern} toMcap + * @property {BpsPercentRatioPattern} toRcap + */ + +/** + * Create a ToPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {ToPattern} + */ +function createToPattern(client, acc) { + return { + toMcap: createBpsPercentRatioPattern(client, _m(acc, 'mcap')), + toRcap: createBpsPercentRatioPattern(client, _m(acc, 'rcap')), + }; +} + /** * @typedef {Object} ValuePattern * @property {BaseCumulativeSumPattern} valueCreated @@ -3853,7 +3852,7 @@ function createNuplPattern(client, acc) { /** * @typedef {Object} UnspentPattern - * @property {DeltaInnerPattern} unspentCount + * @property {BaseDeltaPattern} unspentCount */ /** @@ -3864,7 +3863,7 @@ function createNuplPattern(client, acc) { */ function createUnspentPattern(client, acc) { return { - unspentCount: createDeltaInnerPattern(client, acc), + unspentCount: createBaseDeltaPattern(client, acc), }; } @@ -3899,8 +3898,8 @@ function createUnspentPattern(client, acc) { * @property {SeriesTree_Blocks_Weight} weight * @property {SeriesTree_Blocks_Count} count * @property {SeriesTree_Blocks_Lookback} lookback - * @property {_1m1w1y24hHeightPattern} interval - * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} vbytes + * @property {_1m1w1y24hBasePattern} interval + * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} vbytes * @property {SeriesTree_Blocks_Fullness} fullness * @property {SeriesTree_Blocks_Halving} halving */ @@ -3908,11 +3907,11 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Difficulty * @property {SeriesPattern1} value - * @property {SeriesPattern1} asHash + * @property {SeriesPattern1} hashrate * @property {BpsPercentRatioPattern} adjustment * @property {SeriesPattern1} epoch - * @property {SeriesPattern1} blocksBeforeNext - * @property {SeriesPattern1} daysBeforeNext + * @property {SeriesPattern1} blocksToRetarget + * @property {SeriesPattern1} daysToRetarget */ /** @@ -3924,7 +3923,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Size - * @property {SeriesPattern18} total + * @property {SeriesPattern18} base * @property {SeriesPattern1} cumulative * @property {_1m1w1y24hPattern} sum * @property {_1m1w1y24hPattern} average @@ -3939,7 +3938,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Weight - * @property {SeriesPattern18} raw + * @property {SeriesPattern18} base * @property {SeriesPattern1} cumulative * @property {_1m1w1y24hPattern} sum * @property {_1m1w1y24hPattern} average @@ -4007,7 +4006,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Fullness - * @property {_1m1w1y24hHeightPattern} bps + * @property {_1m1w1y24hBasePattern} bps * @property {SeriesPattern1} ratio * @property {SeriesPattern1} percent */ @@ -4015,8 +4014,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Halving * @property {SeriesPattern1} epoch - * @property {SeriesPattern1} blocksBeforeNext - * @property {SeriesPattern1} daysBeforeNext + * @property {SeriesPattern1} blocksToHalving + * @property {SeriesPattern1} daysToHalving */ /** @@ -4045,7 +4044,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Transactions_Count - * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} total + * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} total * @property {SeriesPattern19} isCoinbase */ @@ -4072,8 +4071,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Transactions_Volume - * @property {BaseCumulativeSumPattern4} sentSum - * @property {BaseCumulativeSumPattern4} receivedSum + * @property {BaseCumulativeSumPattern4} transferVolume + * @property {BaseCumulativeSumPattern4} outputVolume * @property {SeriesPattern1} txPerSec * @property {SeriesPattern1} outputsPerSec * @property {SeriesPattern1} inputsPerSec @@ -4355,16 +4354,20 @@ function createUnspentPattern(client, acc) { * @property {BtcCentsSatsUsdPattern} base * @property {BtcCentsSatsUsdPattern} cumulative * @property {_1m1w1y24hPattern5} sum - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _24h - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _1w - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _1m - * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _1y + * @property {_1m1w1y24hPattern5} average + * @property {_1m1w1y24hPattern5} min + * @property {_1m1w1y24hPattern5} max + * @property {_1m1w1y24hPattern5} pct10 + * @property {_1m1w1y24hPattern5} pct25 + * @property {_1m1w1y24hPattern5} median + * @property {_1m1w1y24hPattern5} pct75 + * @property {_1m1w1y24hPattern5} pct90 * @property {_1m1w1y24hBpsPercentRatioPattern} dominance - * @property {SeriesTree_Mining_Rewards_Fees_RatioMultiple} ratioMultiple + * @property {SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio} toSubsidyRatio */ /** - * @typedef {Object} SeriesTree_Mining_Rewards_Fees_RatioMultiple + * @typedef {Object} SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio * @property {BpsRatioPattern2} _24h * @property {BpsRatioPattern2} _1w * @property {BpsRatioPattern2} _1m @@ -4403,7 +4406,6 @@ function createUnspentPattern(client, acc) { * @property {SeriesTree_Cointime_Prices} prices * @property {SeriesTree_Cointime_Adjusted} adjusted * @property {SeriesTree_Cointime_ReserveRisk} reserveRisk - * @property {BaseCumulativeSumPattern} coinblocksDestroyed */ /** @@ -4413,6 +4415,7 @@ function createUnspentPattern(client, acc) { * @property {SeriesPattern1} liveliness * @property {SeriesPattern1} vaultedness * @property {SeriesPattern1} ratio + * @property {BaseCumulativeSumPattern} coinblocksDestroyed */ /** @@ -4449,7 +4452,6 @@ function createUnspentPattern(client, acc) { * @property {BpsCentsPercentilesRatioSatsUsdPattern} balanced * @property {BpsCentsPercentilesRatioSatsUsdPattern} terminal * @property {BpsCentsPercentilesRatioSatsUsdPattern} delta - * @property {SeriesPattern1} cumulativeMarketCap */ /** @@ -4739,12 +4741,12 @@ function createUnspentPattern(client, acc) { * @property {BpsRatioPattern2} nvt * @property {BpsPercentRatioPattern3} gini * @property {BpsRatioPattern2} rhodlRatio - * @property {BpsRatioPattern2} thermocapMultiple + * @property {BpsRatioPattern2} thermoCapMultiple * @property {SeriesPattern1} coindaysDestroyedSupplyAdjusted * @property {SeriesPattern1} coinyearsDestroyedSupplyAdjusted * @property {SeriesTree_Indicators_Dormancy} dormancy * @property {SeriesPattern1} stockToFlow - * @property {SeriesPattern1} sellerExhaustionConstant + * @property {SeriesPattern1} sellerExhaustion */ /** @@ -5075,7 +5077,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Pools - * @property {SeriesPattern18} heightToPool + * @property {SeriesPattern18} pool * @property {SeriesTree_Pools_Major} major * @property {SeriesTree_Pools_Minor} minor */ @@ -5283,7 +5285,7 @@ function createUnspentPattern(client, acc) { * @typedef {Object} SeriesTree_Supply * @property {SeriesPattern18} state * @property {BtcCentsSatsUsdPattern} circulating - * @property {SeriesTree_Supply_Burned} burned + * @property {BaseCumulativeSumPattern4} burned * @property {BpsPercentRatioPattern} inflationRate * @property {SeriesTree_Supply_Velocity} velocity * @property {CentsDeltaUsdPattern} marketCap @@ -5291,11 +5293,6 @@ function createUnspentPattern(client, acc) { * @property {BtcCentsSatsUsdPattern} hodledOrLost */ -/** - * @typedef {Object} SeriesTree_Supply_Burned - * @property {BaseCumulativeSumPattern4} unspendable - */ - /** * @typedef {Object} SeriesTree_Supply_Velocity * @property {SeriesPattern1} native @@ -5341,13 +5338,13 @@ function createUnspentPattern(client, acc) { * @property {BtcCentsSatsUsdPattern} total * @property {BtcCentsSatsUsdPattern} half * @property {AbsoluteRatePattern} delta - * @property {BtcCentsRelSatsUsdPattern2} inProfit - * @property {BtcCentsRelSatsUsdPattern2} inLoss + * @property {BtcCentsSatsToUsdPattern2} inProfit + * @property {BtcCentsSatsToUsdPattern2} inLoss */ /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Activity - * @property {BaseCumulativeInSumPattern} sent + * @property {BaseCumulativeInSumPattern} transferVolume * @property {BaseCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {SeriesPattern1} dormancy @@ -5355,17 +5352,17 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized - * @property {CentsDeltaRelUsdPattern} cap + * @property {CentsDeltaToUsdPattern} cap * @property {SeriesTree_Cohorts_Utxo_All_Realized_Profit} profit * @property {SeriesTree_Cohorts_Utxo_All_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_All_Realized_Price} price * @property {SeriesPattern1} mvrv * @property {SeriesTree_Cohorts_Utxo_All_Realized_Sopr} sopr - * @property {BaseChangeCumulativeDeltaRelSumPattern} netPnl + * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl * @property {BaseCumulativeSumPattern3} grossPnl * @property {_1m1w1y24hPattern6} sellSideRiskRatio - * @property {BaseCumulativeRelPattern} peakRegret - * @property {SeriesTree_Cohorts_Utxo_All_Realized_Investor} investor + * @property {BaseCumulativeToPattern} peakRegret + * @property {InvestorPricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ @@ -5374,7 +5371,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} distributionFlow @@ -5386,7 +5383,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} capitulationFlow @@ -5503,13 +5500,6 @@ function createUnspentPattern(client, acc) { * @property {BaseCumulativeSumPattern} valueDestroyed */ -/** - * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized_Investor - * @property {BpsCentsPercentilesRatioSatsUsdPattern} price - * @property {CentsSatsUsdPattern} lowerPriceBand - * @property {CentsSatsUsdPattern} upperPriceBand - */ - /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_CostBasis * @property {CentsSatsUsdPattern} min @@ -5535,8 +5525,8 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum - * @property {BpsPercentRatioPattern3} relToMcap - * @property {BpsPercentRatioPattern3} relToOwnGross + * @property {BpsPercentRatioPattern3} toMcap + * @property {BpsPercentRatioPattern3} toOwnGrossPnl */ /** @@ -5545,15 +5535,15 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern3} relToMcap - * @property {BpsPercentRatioPattern3} relToOwnGross + * @property {BpsPercentRatioPattern3} toMcap + * @property {BpsPercentRatioPattern3} toOwnGrossPnl */ /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl * @property {SeriesPattern1} usd * @property {SeriesPattern1} cents - * @property {BpsPercentRatioPattern} relToOwnGross + * @property {BpsPercentRatioPattern} toOwnGrossPnl */ /** @@ -5565,7 +5555,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth - * @property {DeltaHalfInRelTotalPattern2} supply + * @property {DeltaHalfInToTotalPattern2} supply * @property {UnspentPattern} outputs * @property {SeriesTree_Cohorts_Utxo_Sth_Activity} activity * @property {SeriesTree_Cohorts_Utxo_Sth_Realized} realized @@ -5575,7 +5565,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Activity - * @property {BaseCumulativeInSumPattern} sent + * @property {BaseCumulativeInSumPattern} transferVolume * @property {BaseCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {SeriesPattern1} dormancy @@ -5583,17 +5573,17 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized - * @property {CentsDeltaRelUsdPattern} cap + * @property {CentsDeltaToUsdPattern} cap * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Profit} profit * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Price} price * @property {SeriesPattern1} mvrv * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr} sopr - * @property {BaseChangeCumulativeDeltaRelSumPattern} netPnl + * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl * @property {BaseCumulativeSumPattern3} grossPnl * @property {_1m1w1y24hPattern6} sellSideRiskRatio - * @property {BaseCumulativeRelPattern} peakRegret - * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Investor} investor + * @property {BaseCumulativeToPattern} peakRegret + * @property {InvestorPricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ @@ -5602,7 +5592,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} distributionFlow @@ -5614,7 +5604,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} capitulationFlow @@ -5731,13 +5721,6 @@ function createUnspentPattern(client, acc) { * @property {BaseCumulativeSumPattern} valueDestroyed */ -/** - * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized_Investor - * @property {BpsCentsPercentilesRatioSatsUsdPattern} price - * @property {CentsSatsUsdPattern} lowerPriceBand - * @property {CentsSatsUsdPattern} upperPriceBand - */ - /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_CostBasis * @property {CentsSatsUsdPattern} min @@ -5750,9 +5733,9 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Unrealized * @property {BpsRatioPattern} nupl - * @property {BaseCumulativeRelSumPattern2} profit - * @property {BaseCumulativeNegativeRelSumPattern2} loss - * @property {CentsRelUsdPattern2} netPnl + * @property {BaseCumulativeSumToPattern2} profit + * @property {BaseCumulativeNegativeSumToPattern2} loss + * @property {CentsToUsdPattern2} netPnl * @property {CentsUsdPattern2} grossPnl * @property {InPattern} investedCapital * @property {SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment} sentiment @@ -5767,7 +5750,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth - * @property {DeltaHalfInRelTotalPattern2} supply + * @property {DeltaHalfInToTotalPattern2} supply * @property {UnspentPattern} outputs * @property {SeriesTree_Cohorts_Utxo_Lth_Activity} activity * @property {SeriesTree_Cohorts_Utxo_Lth_Realized} realized @@ -5777,7 +5760,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Activity - * @property {BaseCumulativeInSumPattern} sent + * @property {BaseCumulativeInSumPattern} transferVolume * @property {BaseCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {SeriesPattern1} dormancy @@ -5785,17 +5768,17 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Realized - * @property {CentsDeltaRelUsdPattern} cap + * @property {CentsDeltaToUsdPattern} cap * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Profit} profit * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Price} price * @property {SeriesPattern1} mvrv * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr} sopr - * @property {BaseChangeCumulativeDeltaRelSumPattern} netPnl + * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl * @property {BaseCumulativeSumPattern3} grossPnl * @property {_1m1w1y24hPattern6} sellSideRiskRatio - * @property {BaseCumulativeRelPattern} peakRegret - * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Investor} investor + * @property {BaseCumulativeToPattern} peakRegret + * @property {InvestorPricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ @@ -5804,7 +5787,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} base * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} distributionFlow @@ -5816,7 +5799,7 @@ function createUnspentPattern(client, acc) { * @property {CentsUsdPattern2} cumulative * @property {_1m1w1y24hPattern4} sum * @property {SeriesPattern1} negative - * @property {BpsPercentRatioPattern4} relToRcap + * @property {BpsPercentRatioPattern4} toRcap * @property {BaseCumulativeSumPattern} valueCreated * @property {BaseCumulativeSumPattern} valueDestroyed * @property {SeriesPattern1} capitulationFlow @@ -5925,13 +5908,6 @@ function createUnspentPattern(client, acc) { * @property {_1m1w1y24hPattern} ratio */ -/** - * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Realized_Investor - * @property {BpsCentsPercentilesRatioSatsUsdPattern} price - * @property {CentsSatsUsdPattern} lowerPriceBand - * @property {CentsSatsUsdPattern} upperPriceBand - */ - /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_CostBasis * @property {CentsSatsUsdPattern} min @@ -5944,9 +5920,9 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Unrealized * @property {BpsRatioPattern} nupl - * @property {BaseCumulativeRelSumPattern2} profit - * @property {BaseCumulativeNegativeRelSumPattern2} loss - * @property {CentsRelUsdPattern2} netPnl + * @property {BaseCumulativeSumToPattern2} profit + * @property {BaseCumulativeNegativeSumToPattern2} loss + * @property {CentsToUsdPattern2} netPnl * @property {CentsUsdPattern2} grossPnl * @property {InPattern} investedCapital * @property {SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment} sentiment @@ -7477,11 +7453,11 @@ class BrkClient extends BrkClientBase { blockhash: createSeriesPattern18(this, 'blockhash'), difficulty: { value: createSeriesPattern1(this, 'difficulty'), - asHash: createSeriesPattern1(this, 'difficulty_as_hash'), + hashrate: createSeriesPattern1(this, 'difficulty_hashrate'), adjustment: createBpsPercentRatioPattern(this, 'difficulty_adjustment'), epoch: createSeriesPattern1(this, 'difficulty_epoch'), - blocksBeforeNext: createSeriesPattern1(this, 'blocks_before_next_difficulty_adjustment'), - daysBeforeNext: createSeriesPattern1(this, 'days_before_next_difficulty_adjustment'), + blocksToRetarget: createSeriesPattern1(this, 'blocks_to_retarget'), + daysToRetarget: createSeriesPattern1(this, 'days_to_retarget'), }, time: { timestamp: createSeriesPattern1(this, 'timestamp'), @@ -7489,7 +7465,7 @@ class BrkClient extends BrkClientBase { timestampMonotonic: createSeriesPattern18(this, 'timestamp_monotonic'), }, size: { - total: createSeriesPattern18(this, 'total_size'), + base: createSeriesPattern18(this, 'total_size'), cumulative: createSeriesPattern1(this, 'block_size_cumulative'), sum: create_1m1w1y24hPattern(this, 'block_size_sum'), average: create_1m1w1y24hPattern(this, 'block_size_average'), @@ -7502,7 +7478,7 @@ class BrkClient extends BrkClientBase { pct90: create_1m1w1y24hPattern(this, 'block_size_pct90'), }, weight: { - raw: createSeriesPattern18(this, 'block_weight'), + base: createSeriesPattern18(this, 'block_weight'), cumulative: createSeriesPattern1(this, 'block_weight_cumulative'), sum: create_1m1w1y24hPattern(this, 'block_weight_sum'), average: create_1m1w1y24hPattern(this, 'block_weight_average'), @@ -7563,17 +7539,17 @@ class BrkClient extends BrkClientBase { _14y: createSeriesPattern18(this, 'height_14y_ago'), _26y: createSeriesPattern18(this, 'height_26y_ago'), }, - interval: create_1m1w1y24hHeightPattern(this, 'block_interval'), - vbytes: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'block_vbytes'), + interval: create_1m1w1y24hBasePattern(this, 'block_interval'), + vbytes: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(this, 'block_vbytes'), fullness: { - bps: create_1m1w1y24hHeightPattern(this, 'block_fullness_bps'), + bps: create_1m1w1y24hBasePattern(this, 'block_fullness_bps'), ratio: createSeriesPattern1(this, 'block_fullness_ratio'), percent: createSeriesPattern1(this, 'block_fullness'), }, halving: { epoch: createSeriesPattern1(this, 'halving_epoch'), - blocksBeforeNext: createSeriesPattern1(this, 'blocks_before_next_halving'), - daysBeforeNext: createSeriesPattern1(this, 'days_before_next_halving'), + blocksToHalving: createSeriesPattern1(this, 'blocks_to_halving'), + daysToHalving: createSeriesPattern1(this, 'days_to_halving'), }, }, transactions: { @@ -7590,7 +7566,7 @@ class BrkClient extends BrkClientBase { firstTxoutIndex: createSeriesPattern19(this, 'first_txout_index'), }, count: { - total: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'tx_count'), + total: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(this, 'tx_count'), isCoinbase: createSeriesPattern19(this, 'is_coinbase'), }, size: { @@ -7609,8 +7585,8 @@ class BrkClient extends BrkClientBase { v3: createBaseCumulativeSumPattern(this, 'tx_v3'), }, volume: { - sentSum: createBaseCumulativeSumPattern4(this, 'sent_sum'), - receivedSum: createBaseCumulativeSumPattern4(this, 'received_sum'), + transferVolume: createBaseCumulativeSumPattern4(this, 'exact_transfer_volume'), + outputVolume: createBaseCumulativeSumPattern4(this, 'output_volume'), txPerSec: createSeriesPattern1(this, 'tx_per_sec'), outputsPerSec: createSeriesPattern1(this, 'outputs_per_sec'), inputsPerSec: createSeriesPattern1(this, 'inputs_per_sec'), @@ -7789,16 +7765,20 @@ class BrkClient extends BrkClientBase { base: createBtcCentsSatsUsdPattern(this, 'fees'), cumulative: createBtcCentsSatsUsdPattern(this, 'fees_cumulative'), sum: create_1m1w1y24hPattern5(this, 'fees_sum'), - _24h: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'fees_24h'), - _1w: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'fees_1w'), - _1m: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'fees_1m'), - _1y: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'fees_1y'), + average: create_1m1w1y24hPattern5(this, 'fees_average'), + min: create_1m1w1y24hPattern5(this, 'fees_min'), + max: create_1m1w1y24hPattern5(this, 'fees_max'), + pct10: create_1m1w1y24hPattern5(this, 'fees_pct10'), + pct25: create_1m1w1y24hPattern5(this, 'fees_pct25'), + median: create_1m1w1y24hPattern5(this, 'fees_median'), + pct75: create_1m1w1y24hPattern5(this, 'fees_pct75'), + pct90: create_1m1w1y24hPattern5(this, 'fees_pct90'), dominance: create_1m1w1y24hBpsPercentRatioPattern(this, 'fee_dominance'), - ratioMultiple: { - _24h: createBpsRatioPattern2(this, 'fee_ratio_multiple_24h'), - _1w: createBpsRatioPattern2(this, 'fee_ratio_multiple_1w'), - _1m: createBpsRatioPattern2(this, 'fee_ratio_multiple_1m'), - _1y: createBpsRatioPattern2(this, 'fee_ratio_multiple_1y'), + toSubsidyRatio: { + _24h: createBpsRatioPattern2(this, 'fee_to_subsidy_ratio_24h'), + _1w: createBpsRatioPattern2(this, 'fee_to_subsidy_ratio_1w'), + _1m: createBpsRatioPattern2(this, 'fee_to_subsidy_ratio_1m'), + _1y: createBpsRatioPattern2(this, 'fee_to_subsidy_ratio_1y'), }, }, unclaimed: createBaseCumulativeSumPattern4(this, 'unclaimed_rewards'), @@ -7825,7 +7805,8 @@ class BrkClient extends BrkClientBase { coinblocksStored: createBaseCumulativeSumPattern(this, 'coinblocks_stored'), liveliness: createSeriesPattern1(this, 'liveliness'), vaultedness: createSeriesPattern1(this, 'vaultedness'), - ratio: createSeriesPattern1(this, 'activity_to_vaultedness_ratio'), + ratio: createSeriesPattern1(this, 'activity_to_vaultedness'), + coinblocksDestroyed: createBaseCumulativeSumPattern(this, 'coinblocks_destroyed'), }, supply: { vaulted: createBtcCentsSatsUsdPattern(this, 'vaulted_supply'), @@ -7854,7 +7835,6 @@ class BrkClient extends BrkClientBase { balanced: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'balanced_price'), terminal: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'terminal_price'), delta: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'delta_price'), - cumulativeMarketCap: createSeriesPattern1(this, 'cumulative_market_cap'), }, adjusted: { inflationRate: createBpsPercentRatioPattern(this, 'cointime_adj_inflation_rate'), @@ -7866,7 +7846,6 @@ class BrkClient extends BrkClientBase { vocddMedian1y: createSeriesPattern18(this, 'vocdd_median_1y'), hodlBank: createSeriesPattern18(this, 'hodl_bank'), }, - coinblocksDestroyed: createBaseCumulativeSumPattern(this, 'coinblocks_destroyed'), }, constants: { _0: createSeriesPattern1(this, 'constant_0'), @@ -8040,7 +8019,7 @@ class BrkClient extends BrkClientBase { nvt: createBpsRatioPattern2(this, 'nvt'), gini: createBpsPercentRatioPattern3(this, 'gini'), rhodlRatio: createBpsRatioPattern2(this, 'rhodl_ratio'), - thermocapMultiple: createBpsRatioPattern2(this, 'thermocap_multiple'), + thermoCapMultiple: createBpsRatioPattern2(this, 'thermo_cap_multiple'), coindaysDestroyedSupplyAdjusted: createSeriesPattern1(this, 'coindays_destroyed_supply_adjusted'), coinyearsDestroyedSupplyAdjusted: createSeriesPattern1(this, 'coinyears_destroyed_supply_adjusted'), dormancy: { @@ -8048,7 +8027,7 @@ class BrkClient extends BrkClientBase { flow: createSeriesPattern1(this, 'dormancy_flow'), }, stockToFlow: createSeriesPattern1(this, 'stock_to_flow'), - sellerExhaustionConstant: createSeriesPattern1(this, 'seller_exhaustion_constant'), + sellerExhaustion: createSeriesPattern1(this, 'seller_exhaustion'), }, market: { ath: { @@ -8060,19 +8039,19 @@ class BrkClient extends BrkClientBase { maxYearsBetween: createSeriesPattern1(this, 'max_years_between_price_ath'), }, lookback: { - _24h: createCentsSatsUsdPattern(this, 'price_lookback_24h'), - _1w: createCentsSatsUsdPattern(this, 'price_lookback_1w'), - _1m: createCentsSatsUsdPattern(this, 'price_lookback_1m'), - _3m: createCentsSatsUsdPattern(this, 'price_lookback_3m'), - _6m: createCentsSatsUsdPattern(this, 'price_lookback_6m'), - _1y: createCentsSatsUsdPattern(this, 'price_lookback_1y'), - _2y: createCentsSatsUsdPattern(this, 'price_lookback_2y'), - _3y: createCentsSatsUsdPattern(this, 'price_lookback_3y'), - _4y: createCentsSatsUsdPattern(this, 'price_lookback_4y'), - _5y: createCentsSatsUsdPattern(this, 'price_lookback_5y'), - _6y: createCentsSatsUsdPattern(this, 'price_lookback_6y'), - _8y: createCentsSatsUsdPattern(this, 'price_lookback_8y'), - _10y: createCentsSatsUsdPattern(this, 'price_lookback_10y'), + _24h: createCentsSatsUsdPattern(this, 'price_past_24h'), + _1w: createCentsSatsUsdPattern(this, 'price_past_1w'), + _1m: createCentsSatsUsdPattern(this, 'price_past_1m'), + _3m: createCentsSatsUsdPattern(this, 'price_past_3m'), + _6m: createCentsSatsUsdPattern(this, 'price_past_6m'), + _1y: createCentsSatsUsdPattern(this, 'price_past_1y'), + _2y: createCentsSatsUsdPattern(this, 'price_past_2y'), + _3y: createCentsSatsUsdPattern(this, 'price_past_3y'), + _4y: createCentsSatsUsdPattern(this, 'price_past_4y'), + _5y: createCentsSatsUsdPattern(this, 'price_past_5y'), + _6y: createCentsSatsUsdPattern(this, 'price_past_6y'), + _8y: createCentsSatsUsdPattern(this, 'price_past_8y'), + _10y: createCentsSatsUsdPattern(this, 'price_past_10y'), }, returns: { periods: { @@ -8282,7 +8261,7 @@ class BrkClient extends BrkClientBase { }, }, pools: { - heightToPool: createSeriesPattern18(this, 'pool'), + pool: createSeriesPattern18(this, 'pool'), major: { unknown: createBlocksDominanceRewardsPattern(this, 'unknown'), luxor: createBlocksDominanceRewardsPattern(this, 'luxor'), @@ -8471,9 +8450,7 @@ class BrkClient extends BrkClientBase { supply: { state: createSeriesPattern18(this, 'supply_state'), circulating: createBtcCentsSatsUsdPattern(this, 'circulating_supply'), - burned: { - unspendable: createBaseCumulativeSumPattern4(this, 'unspendable_supply'), - }, + burned: createBaseCumulativeSumPattern4(this, 'unspendable_supply'), inflationRate: createBpsPercentRatioPattern(this, 'inflation_rate'), velocity: { native: createSeriesPattern1(this, 'velocity'), @@ -8481,7 +8458,7 @@ class BrkClient extends BrkClientBase { }, marketCap: createCentsDeltaUsdPattern(this, 'market_cap'), marketMinusRealizedCapGrowthRate: create_1m1w1y24hPattern(this, 'market_minus_realized_cap_growth_rate'), - hodledOrLost: createBtcCentsSatsUsdPattern(this, 'hodled_or_lost_coins'), + hodledOrLost: createBtcCentsSatsUsdPattern(this, 'hodled_or_lost_supply'), }, cohorts: { utxo: { @@ -8490,23 +8467,23 @@ class BrkClient extends BrkClientBase { total: createBtcCentsSatsUsdPattern(this, 'supply'), half: createBtcCentsSatsUsdPattern(this, 'supply_half'), delta: createAbsoluteRatePattern(this, 'supply_delta'), - inProfit: createBtcCentsRelSatsUsdPattern2(this, 'supply_in_profit'), - inLoss: createBtcCentsRelSatsUsdPattern2(this, 'supply_in_loss'), + inProfit: createBtcCentsSatsToUsdPattern2(this, 'supply_in_profit'), + inLoss: createBtcCentsSatsToUsdPattern2(this, 'supply_in_loss'), }, outputs: createUnspentPattern(this, 'utxo_count'), activity: { - sent: createBaseCumulativeInSumPattern(this, 'sent'), + transferVolume: createBaseCumulativeInSumPattern(this, 'transfer_volume'), coindaysDestroyed: createBaseCumulativeSumPattern(this, 'coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'coinyears_destroyed'), dormancy: createSeriesPattern1(this, 'dormancy'), }, realized: { - cap: createCentsDeltaRelUsdPattern(this, 'realized_cap'), + cap: createCentsDeltaToUsdPattern(this, 'realized_cap'), profit: { base: createCentsUsdPattern2(this, 'realized_profit'), cumulative: createCentsUsdPattern2(this, 'realized_profit_cumulative'), sum: create_1m1w1y24hPattern4(this, 'realized_profit_sum'), - relToRcap: createBpsPercentRatioPattern4(this, 'realized_profit_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'realized_profit_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'profit_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'profit_value_destroyed'), distributionFlow: createSeriesPattern1(this, 'distribution_flow'), @@ -8516,7 +8493,7 @@ class BrkClient extends BrkClientBase { cumulative: createCentsUsdPattern2(this, 'realized_loss_cumulative'), sum: create_1m1w1y24hPattern4(this, 'realized_loss_sum'), negative: createSeriesPattern1(this, 'neg_realized_loss'), - relToRcap: createBpsPercentRatioPattern4(this, 'realized_loss_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'realized_loss_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'loss_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'loss_value_destroyed'), capitulationFlow: createSeriesPattern1(this, 'capitulation_flow'), @@ -8611,15 +8588,11 @@ class BrkClient extends BrkClientBase { valueDestroyed: createBaseCumulativeSumPattern(this, 'adj_value_destroyed'), }, }, - netPnl: createBaseChangeCumulativeDeltaRelSumPattern(this, 'net'), + netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'net'), grossPnl: createBaseCumulativeSumPattern3(this, 'realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern6(this, 'sell_side_risk_ratio'), - peakRegret: createBaseCumulativeRelPattern(this, 'realized_peak_regret'), - investor: { - price: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'investor_price'), - lowerPriceBand: createCentsSatsUsdPattern(this, 'lower_price_band'), - upperPriceBand: createCentsSatsUsdPattern(this, 'upper_price_band'), - }, + peakRegret: createBaseCumulativeToPattern(this, 'realized_peak_regret'), + investor: createInvestorPricePattern(this, 'investor'), profitToLossRatio: create_1m1w1y24hPattern(this, 'realized_profit_to_loss_ratio'), }, costBasis: { @@ -8635,21 +8608,21 @@ class BrkClient extends BrkClientBase { base: createCentsUsdPattern2(this, 'unrealized_profit'), cumulative: createCentsUsdPattern2(this, 'unrealized_profit_cumulative'), sum: create_1m1w1y24hPattern4(this, 'unrealized_profit_sum'), - relToMcap: createBpsPercentRatioPattern3(this, 'unrealized_profit_rel_to_mcap'), - relToOwnGross: createBpsPercentRatioPattern3(this, 'unrealized_profit_rel_to_own_gross_pnl'), + toMcap: createBpsPercentRatioPattern3(this, 'unrealized_profit_to_mcap'), + toOwnGrossPnl: createBpsPercentRatioPattern3(this, 'unrealized_profit_to_own_gross_pnl'), }, loss: { base: createCentsUsdPattern2(this, 'unrealized_loss'), cumulative: createCentsUsdPattern2(this, 'unrealized_loss_cumulative'), sum: create_1m1w1y24hPattern4(this, 'unrealized_loss_sum'), negative: createSeriesPattern1(this, 'neg_unrealized_loss'), - relToMcap: createBpsPercentRatioPattern3(this, 'unrealized_loss_rel_to_mcap'), - relToOwnGross: createBpsPercentRatioPattern3(this, 'unrealized_loss_rel_to_own_gross_pnl'), + toMcap: createBpsPercentRatioPattern3(this, 'unrealized_loss_to_mcap'), + toOwnGrossPnl: createBpsPercentRatioPattern3(this, 'unrealized_loss_to_own_gross_pnl'), }, netPnl: { usd: createSeriesPattern1(this, 'net_unrealized_pnl'), cents: createSeriesPattern1(this, 'net_unrealized_pnl_cents'), - relToOwnGross: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_rel_to_own_gross_pnl'), + toOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_to_own_gross_pnl'), }, grossPnl: createCentsUsdPattern2(this, 'unrealized_gross_pnl'), investedCapital: createInPattern(this, 'invested_capital_in'), @@ -8661,21 +8634,21 @@ class BrkClient extends BrkClientBase { }, }, sth: { - supply: createDeltaHalfInRelTotalPattern2(this, 'sth_supply'), + supply: createDeltaHalfInToTotalPattern2(this, 'sth_supply'), outputs: createUnspentPattern(this, 'sth_utxo_count'), activity: { - sent: createBaseCumulativeInSumPattern(this, 'sth_sent'), + transferVolume: createBaseCumulativeInSumPattern(this, 'sth_transfer_volume'), coindaysDestroyed: createBaseCumulativeSumPattern(this, 'sth_coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'sth_coinyears_destroyed'), dormancy: createSeriesPattern1(this, 'sth_dormancy'), }, realized: { - cap: createCentsDeltaRelUsdPattern(this, 'sth_realized_cap'), + cap: createCentsDeltaToUsdPattern(this, 'sth_realized_cap'), profit: { base: createCentsUsdPattern2(this, 'sth_realized_profit'), cumulative: createCentsUsdPattern2(this, 'sth_realized_profit_cumulative'), sum: create_1m1w1y24hPattern4(this, 'sth_realized_profit_sum'), - relToRcap: createBpsPercentRatioPattern4(this, 'sth_realized_profit_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'sth_realized_profit_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'sth_profit_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'sth_profit_value_destroyed'), distributionFlow: createSeriesPattern1(this, 'sth_distribution_flow'), @@ -8685,7 +8658,7 @@ class BrkClient extends BrkClientBase { cumulative: createCentsUsdPattern2(this, 'sth_realized_loss_cumulative'), sum: create_1m1w1y24hPattern4(this, 'sth_realized_loss_sum'), negative: createSeriesPattern1(this, 'sth_neg_realized_loss'), - relToRcap: createBpsPercentRatioPattern4(this, 'sth_realized_loss_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'sth_realized_loss_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'sth_loss_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'sth_loss_value_destroyed'), capitulationFlow: createSeriesPattern1(this, 'sth_capitulation_flow'), @@ -8780,15 +8753,11 @@ class BrkClient extends BrkClientBase { valueDestroyed: createBaseCumulativeSumPattern(this, 'sth_adj_value_destroyed'), }, }, - netPnl: createBaseChangeCumulativeDeltaRelSumPattern(this, 'sth_net'), + netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'sth_net'), grossPnl: createBaseCumulativeSumPattern3(this, 'sth_realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern6(this, 'sth_sell_side_risk_ratio'), - peakRegret: createBaseCumulativeRelPattern(this, 'sth_realized_peak_regret'), - investor: { - price: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'sth_investor_price'), - lowerPriceBand: createCentsSatsUsdPattern(this, 'sth_lower_price_band'), - upperPriceBand: createCentsSatsUsdPattern(this, 'sth_upper_price_band'), - }, + peakRegret: createBaseCumulativeToPattern(this, 'sth_realized_peak_regret'), + investor: createInvestorPricePattern(this, 'sth_investor'), profitToLossRatio: create_1m1w1y24hPattern(this, 'sth_realized_profit_to_loss_ratio'), }, costBasis: { @@ -8800,9 +8769,9 @@ class BrkClient extends BrkClientBase { }, unrealized: { nupl: createBpsRatioPattern(this, 'sth_nupl'), - profit: createBaseCumulativeRelSumPattern2(this, 'sth_unrealized_profit'), - loss: createBaseCumulativeNegativeRelSumPattern2(this, 'sth'), - netPnl: createCentsRelUsdPattern2(this, 'sth_net_unrealized_pnl'), + profit: createBaseCumulativeSumToPattern2(this, 'sth_unrealized_profit'), + loss: createBaseCumulativeNegativeSumToPattern2(this, 'sth'), + netPnl: createCentsToUsdPattern2(this, 'sth_net_unrealized_pnl'), grossPnl: createCentsUsdPattern2(this, 'sth_unrealized_gross_pnl'), investedCapital: createInPattern(this, 'sth_invested_capital_in'), sentiment: { @@ -8813,21 +8782,21 @@ class BrkClient extends BrkClientBase { }, }, lth: { - supply: createDeltaHalfInRelTotalPattern2(this, 'lth_supply'), + supply: createDeltaHalfInToTotalPattern2(this, 'lth_supply'), outputs: createUnspentPattern(this, 'lth_utxo_count'), activity: { - sent: createBaseCumulativeInSumPattern(this, 'lth_sent'), + transferVolume: createBaseCumulativeInSumPattern(this, 'lth_transfer_volume'), coindaysDestroyed: createBaseCumulativeSumPattern(this, 'lth_coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'lth_coinyears_destroyed'), dormancy: createSeriesPattern1(this, 'lth_dormancy'), }, realized: { - cap: createCentsDeltaRelUsdPattern(this, 'lth_realized_cap'), + cap: createCentsDeltaToUsdPattern(this, 'lth_realized_cap'), profit: { base: createCentsUsdPattern2(this, 'lth_realized_profit'), cumulative: createCentsUsdPattern2(this, 'lth_realized_profit_cumulative'), sum: create_1m1w1y24hPattern4(this, 'lth_realized_profit_sum'), - relToRcap: createBpsPercentRatioPattern4(this, 'lth_realized_profit_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'lth_realized_profit_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'lth_profit_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'lth_profit_value_destroyed'), distributionFlow: createSeriesPattern1(this, 'lth_distribution_flow'), @@ -8837,7 +8806,7 @@ class BrkClient extends BrkClientBase { cumulative: createCentsUsdPattern2(this, 'lth_realized_loss_cumulative'), sum: create_1m1w1y24hPattern4(this, 'lth_realized_loss_sum'), negative: createSeriesPattern1(this, 'lth_neg_realized_loss'), - relToRcap: createBpsPercentRatioPattern4(this, 'lth_realized_loss_rel_to_rcap'), + toRcap: createBpsPercentRatioPattern4(this, 'lth_realized_loss_to_rcap'), valueCreated: createBaseCumulativeSumPattern(this, 'lth_loss_value_created'), valueDestroyed: createBaseCumulativeSumPattern(this, 'lth_loss_value_destroyed'), capitulationFlow: createSeriesPattern1(this, 'lth_capitulation_flow'), @@ -8927,15 +8896,11 @@ class BrkClient extends BrkClientBase { valueDestroyed: createBaseCumulativeSumPattern(this, 'lth_value_destroyed'), ratio: create_1m1w1y24hPattern(this, 'lth_sopr'), }, - netPnl: createBaseChangeCumulativeDeltaRelSumPattern(this, 'lth_net'), + netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'lth_net'), grossPnl: createBaseCumulativeSumPattern3(this, 'lth_realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern6(this, 'lth_sell_side_risk_ratio'), - peakRegret: createBaseCumulativeRelPattern(this, 'lth_realized_peak_regret'), - investor: { - price: createBpsCentsPercentilesRatioSatsUsdPattern(this, 'lth_investor_price'), - lowerPriceBand: createCentsSatsUsdPattern(this, 'lth_lower_price_band'), - upperPriceBand: createCentsSatsUsdPattern(this, 'lth_upper_price_band'), - }, + peakRegret: createBaseCumulativeToPattern(this, 'lth_realized_peak_regret'), + investor: createInvestorPricePattern(this, 'lth_investor'), profitToLossRatio: create_1m1w1y24hPattern(this, 'lth_realized_profit_to_loss_ratio'), }, costBasis: { @@ -8947,9 +8912,9 @@ class BrkClient extends BrkClientBase { }, unrealized: { nupl: createBpsRatioPattern(this, 'lth_nupl'), - profit: createBaseCumulativeRelSumPattern2(this, 'lth_unrealized_profit'), - loss: createBaseCumulativeNegativeRelSumPattern2(this, 'lth'), - netPnl: createCentsRelUsdPattern2(this, 'lth_net_unrealized_pnl'), + profit: createBaseCumulativeSumToPattern2(this, 'lth_unrealized_profit'), + loss: createBaseCumulativeNegativeSumToPattern2(this, 'lth'), + netPnl: createCentsToUsdPattern2(this, 'lth_net_unrealized_pnl'), grossPnl: createCentsUsdPattern2(this, 'lth_unrealized_gross_pnl'), investedCapital: createInPattern(this, 'lth_invested_capital_in'), sentiment: { diff --git a/packages/brk_client/brk_client/__init__.py b/packages/brk_client/brk_client/__init__.py index 3fb32b499..1ded9cc86 100644 --- a/packages/brk_client/brk_client/__init__.py +++ b/packages/brk_client/brk_client/__init__.py @@ -2236,7 +2236,7 @@ class AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern: self.rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) self.sum: SeriesPattern18[StoredU64] = SeriesPattern18(client, _m(acc, 'sum')) -class AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern: +class AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2253,6 +2253,10 @@ class AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern: self.pct90: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'pct90')) self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'sum')) +class AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(Generic[T]): + """Pattern struct for repeated tree structure.""" + pass + class AverageGainsLossesRsiStochPattern: """Pattern struct for repeated tree structure.""" @@ -2299,21 +2303,7 @@ class AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern: self.pct90: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'pct90')) self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'sum')) -class AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated series name.""" - self.average: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'average')) - self.max: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'max')) - self.median: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'median')) - self.min: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'min')) - self.pct10: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'pct10')) - self.pct25: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'pct25')) - self.pct75: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'pct75')) - self.pct90: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'pct90')) - -class BaseCapitulationCumulativeNegativeRelSumValuePattern: +class BaseCapitulationCumulativeNegativeSumToValuePattern: """Pattern struct for repeated tree structure.""" pass @@ -2321,7 +2311,7 @@ class BpsCentsPercentilesRatioSatsSmaStdUsdPattern: """Pattern struct for repeated tree structure.""" pass -class AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(Generic[T]): +class AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(Generic[T]): """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2361,11 +2351,11 @@ class _1m1w1y24hBpsPercentRatioPattern: self.percent: SeriesPattern1[StoredF32] = SeriesPattern1(client, acc) self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'ratio')) -class BaseCumulativeDistributionRelSumValuePattern: +class BaseCumulativeDistributionSumToValuePattern: """Pattern struct for repeated tree structure.""" pass -class BaseCumulativeNegativeRelSumPattern2: +class BaseCumulativeNegativeSumToPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2373,10 +2363,10 @@ class BaseCumulativeNegativeRelSumPattern2: self.base: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_loss')) self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_loss_cumulative')) self.negative: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'neg_unrealized_loss')) - self.rel_to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_rel_to_mcap')) - self.rel_to_own_gross: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_rel_to_own_gross_pnl')) - self.rel_to_own_mcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'unrealized_loss_rel_to_own_mcap')) self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'unrealized_loss_sum')) + self.to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_to_mcap')) + self.to_own_gross_pnl: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'unrealized_loss_to_own_gross_pnl')) + self.to_own_mcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'unrealized_loss_to_own_mcap')) class CapLossMvrvNetPriceProfitSoprPattern: """Pattern struct for repeated tree structure.""" @@ -2407,29 +2397,29 @@ class _1m1w1y2y4yAllPattern: self._4y: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, '4y')) self.all: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, 'all')) -class BaseChangeCumulativeDeltaRelSumPattern: +class BaseChangeCumulativeDeltaSumToPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.base: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl')) - self.change_1m: RelPattern = RelPattern(client, _m(acc, 'pnl_change_1m_rel_to')) + self.change_1m: ToPattern = ToPattern(client, _m(acc, 'pnl_change_1m_to')) self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative')) self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta')) - self.rel_to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_pnl_rel_to_rcap')) self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'realized_pnl_sum')) + self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_pnl_to_rcap')) -class BaseCumulativeRelSumPattern2: +class BaseCumulativeSumToPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc) self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative')) - self.rel_to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_mcap')) - self.rel_to_own_gross: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_own_gross_pnl')) - self.rel_to_own_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_own_mcap')) self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum')) + self.to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_mcap')) + self.to_own_gross_pnl: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own_gross_pnl')) + self.to_own_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own_mcap')) class BpsCentsPercentilesRatioSatsUsdPattern: """Pattern struct for repeated tree structure.""" @@ -2443,16 +2433,16 @@ class BpsCentsPercentilesRatioSatsUsdPattern: self.sats: SeriesPattern1[SatsFract] = SeriesPattern1(client, _m(acc, 'sats')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) -class BtcCentsRelSatsUsdPattern3: +class BtcCentsSatsToUsdPattern3: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.btc: SeriesPattern1[Bitcoin] = SeriesPattern1(client, acc) self.cents: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cents')) - self.rel_to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')) - self.rel_to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_own')) self.sats: SeriesPattern1[Sats] = SeriesPattern1(client, _m(acc, 'sats')) + self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) + self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) class CapLossMvrvPriceProfitSoprPattern: @@ -2467,28 +2457,28 @@ class CapLossMvrvPriceProfitSoprPattern: self.profit: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'realized_profit')) self.sopr: ValuePattern = ValuePattern(client, _m(acc, 'value')) -class DeltaHalfInRelTotalPattern: +class DeltaHalfInToTotalPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) self.half: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'half')) - self.in_loss: BtcCentsRelSatsUsdPattern = BtcCentsRelSatsUsdPattern(client, _m(acc, 'in_loss')) - self.in_profit: BtcCentsRelSatsUsdPattern = BtcCentsRelSatsUsdPattern(client, _m(acc, 'in_profit')) - self.rel_to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')) + self.in_loss: BtcCentsSatsToUsdPattern = BtcCentsSatsToUsdPattern(client, _m(acc, 'in_loss')) + self.in_profit: BtcCentsSatsToUsdPattern = BtcCentsSatsToUsdPattern(client, _m(acc, 'in_profit')) + self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) -class DeltaHalfInRelTotalPattern2: +class DeltaHalfInToTotalPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) self.half: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'half')) - self.in_loss: BtcCentsRelSatsUsdPattern3 = BtcCentsRelSatsUsdPattern3(client, _m(acc, 'in_loss')) - self.in_profit: BtcCentsRelSatsUsdPattern3 = BtcCentsRelSatsUsdPattern3(client, _m(acc, 'in_profit')) - self.rel_to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')) + self.in_loss: BtcCentsSatsToUsdPattern3 = BtcCentsSatsToUsdPattern3(client, _m(acc, 'in_loss')) + self.in_profit: BtcCentsSatsToUsdPattern3 = BtcCentsSatsToUsdPattern3(client, _m(acc, 'in_profit')) + self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) class Pct1Pct2Pct5Pct95Pct98Pct99Pattern: @@ -2508,10 +2498,10 @@ class ActivityOutputsRealizedSupplyUnrealizedPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.activity: CoindaysSentPattern = CoindaysSentPattern(client, acc) + self.activity: CoindaysTransferPattern = CoindaysTransferPattern(client, acc) self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count')) self.realized: CapLossMvrvNetPriceProfitSoprPattern = CapLossMvrvNetPriceProfitSoprPattern(client, acc) - self.supply: DeltaHalfInRelTotalPattern = DeltaHalfInRelTotalPattern(client, _m(acc, 'supply')) + self.supply: DeltaHalfInToTotalPattern = DeltaHalfInToTotalPattern(client, _m(acc, 'supply')) self.unrealized: LossNetNuplProfitPattern = LossNetNuplProfitPattern(client, acc) class AddressOutputsRealizedSupplyUnrealizedPattern: @@ -2519,7 +2509,7 @@ class AddressOutputsRealizedSupplyUnrealizedPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.address_count: DeltaInnerPattern = DeltaInnerPattern(client, _m(acc, 'address_count')) + self.address_count: BaseDeltaPattern = BaseDeltaPattern(client, _m(acc, 'address_count')) self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count')) self.realized: CapLossMvrvPriceProfitSoprPattern = CapLossMvrvPriceProfitSoprPattern(client, acc) self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply')) @@ -2558,26 +2548,26 @@ class BtcCentsDeltaSatsUsdPattern: self.sats: SeriesPattern1[Sats] = SeriesPattern1(client, _m(acc, 'sats')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) -class BtcCentsRelSatsUsdPattern: +class BtcCentsSatsToUsdPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.btc: SeriesPattern1[Bitcoin] = SeriesPattern1(client, acc) self.cents: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cents')) - self.rel_to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_circulating')) self.sats: SeriesPattern1[Sats] = SeriesPattern1(client, _m(acc, 'sats')) + self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) -class BtcCentsRelSatsUsdPattern2: +class BtcCentsSatsToUsdPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.btc: SeriesPattern1[Bitcoin] = SeriesPattern1(client, acc) self.cents: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cents')) - self.rel_to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'rel_to_own')) self.sats: SeriesPattern1[Sats] = SeriesPattern1(client, _m(acc, 'sats')) + self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) class DeltaHalfInTotalPattern2: @@ -2610,7 +2600,7 @@ class PhsReboundThsPattern: self.ths: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'ths')) self.ths_min: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'ths_min')) -class _1m1w1y24hHeightPattern(Generic[T]): +class _1m1w1y24hBasePattern(Generic[T]): """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2619,7 +2609,7 @@ class _1m1w1y24hHeightPattern(Generic[T]): self._1w: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, 'average_1w')) self._1y: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, 'average_1y')) self._24h: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, 'average_24h')) - self.height: SeriesPattern18[T] = SeriesPattern18(client, acc) + self.base: SeriesPattern18[T] = SeriesPattern18(client, acc) class _1m1w1y24hPattern2: """Pattern struct for repeated tree structure.""" @@ -2714,10 +2704,10 @@ class BothReactivatedReceivingSendingPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.both: _1m1w1y24hHeightPattern[StoredU32] = _1m1w1y24hHeightPattern(client, _m(acc, 'both')) - self.reactivated: _1m1w1y24hHeightPattern[StoredU32] = _1m1w1y24hHeightPattern(client, _m(acc, 'reactivated')) - self.receiving: _1m1w1y24hHeightPattern[StoredU32] = _1m1w1y24hHeightPattern(client, _m(acc, 'receiving')) - self.sending: _1m1w1y24hHeightPattern[StoredU32] = _1m1w1y24hHeightPattern(client, _m(acc, 'sending')) + self.both: _1m1w1y24hBasePattern[StoredU32] = _1m1w1y24hBasePattern(client, _m(acc, 'both')) + self.reactivated: _1m1w1y24hBasePattern[StoredU32] = _1m1w1y24hBasePattern(client, _m(acc, 'reactivated')) + self.receiving: _1m1w1y24hBasePattern[StoredU32] = _1m1w1y24hBasePattern(client, _m(acc, 'receiving')) + self.sending: _1m1w1y24hBasePattern[StoredU32] = _1m1w1y24hBasePattern(client, _m(acc, 'sending')) class BtcCentsSatsUsdPattern: """Pattern struct for repeated tree structure.""" @@ -2729,27 +2719,27 @@ class BtcCentsSatsUsdPattern: self.sats: SeriesPattern1[Sats] = SeriesPattern1(client, _m(acc, 'sats')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) -class CentsDeltaRelUsdPattern: +class CentsDeltaToUsdPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.cents: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cents')) self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'delta')) - self.rel_to_own_mcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'rel_to_own_mcap')) + self.to_own_mcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'to_own_mcap')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) -class CentsRelUsdPattern2: +class CentsToUsdPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.cents: SeriesPattern1[CentsSigned] = SeriesPattern1(client, _m(acc, 'cents')) - self.rel_to_own_gross: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_gross_pnl')) - self.rel_to_own_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_mcap')) + self.to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'to_own_gross_pnl')) + self.to_own_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'to_own_mcap')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) -class CoindaysCoinyearsDormancySentPattern: +class CoindaysCoinyearsDormancyTransferPattern: """Pattern struct for repeated tree structure.""" pass @@ -2802,14 +2792,14 @@ class BaseCumulativeSumPattern4: self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum')) -class BaseCumulativeRelPattern: +class BaseCumulativeToPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.base: SeriesPattern1[Cents] = SeriesPattern1(client, acc) self.cumulative: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cumulative')) - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'rel_to_rcap')) + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'to_rcap')) class BaseCumulativeSumPattern3: """Pattern struct for repeated tree structure.""" @@ -2923,6 +2913,15 @@ class GreedNetPainPattern: """Pattern struct for repeated tree structure.""" pass +class InvestorPricePattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.investor_lower_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'lower_band')) + self.investor_upper_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'upper_band')) + self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, _m(acc, 'price')) + class LossNuplProfitPattern: """Pattern struct for repeated tree structure.""" @@ -2932,10 +2931,6 @@ class LossNuplProfitPattern: self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl')) self.profit: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'unrealized_profit')) -class LowerPriceUpperPattern: - """Pattern struct for repeated tree structure.""" - pass - class NuplRealizedSupplyPattern: """Pattern struct for repeated tree structure.""" @@ -2963,8 +2958,8 @@ class _6bBlockTxPattern(Generic[T]): def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self._6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(client, _m(acc, '6b')) - self.block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern2(client, acc) + self._6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, _m(acc, '6b')) + self.block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) self.tx_index: SeriesPattern19[T] = SeriesPattern19(client, acc) class BaseCumulativeSumPattern(Generic[T]): @@ -3008,6 +3003,14 @@ class AllSthPattern: self.all: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'realized_cap')) self.sth: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'sth_realized_cap')) +class BaseDeltaPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.base: SeriesPattern1[StoredU64] = SeriesPattern1(client, acc) + self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) + class BlocksDominancePattern: """Pattern struct for repeated tree structure.""" @@ -3048,21 +3051,13 @@ class CentsUsdPattern: self.cents: SeriesPattern1[CentsSigned] = SeriesPattern1(client, _m(acc, 'cents')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) -class CoindaysSentPattern: +class CoindaysTransferPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')) - self.sent: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, _m(acc, 'sent')) - -class DeltaInnerPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated series name.""" - self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) - self.inner: SeriesPattern1[StoredU64] = SeriesPattern1(client, acc) + self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, _m(acc, 'transfer_volume')) class InPattern: """Pattern struct for repeated tree structure.""" @@ -3080,17 +3075,17 @@ class PriceRatioPattern: self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, disc)) self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, f'ratio_{disc}')) -class RelPattern: +class SdSmaPattern: + """Pattern struct for repeated tree structure.""" + pass + +class ToPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.rel_to_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'mcap')) - self.rel_to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rcap')) - -class SdSmaPattern: - """Pattern struct for repeated tree structure.""" - pass + self.to_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'mcap')) + self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rcap')) class ValuePattern: """Pattern struct for repeated tree structure.""" @@ -3119,7 +3114,7 @@ class UnspentPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.unspent_count: DeltaInnerPattern = DeltaInnerPattern(client, acc) + self.unspent_count: BaseDeltaPattern = BaseDeltaPattern(client, acc) # Series tree classes @@ -3128,11 +3123,11 @@ class SeriesTree_Blocks_Difficulty: def __init__(self, client: BrkClientBase, base_path: str = ''): self.value: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'difficulty') - self.as_hash: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'difficulty_as_hash') + self.hashrate: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'difficulty_hashrate') self.adjustment: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'difficulty_adjustment') self.epoch: SeriesPattern1[Epoch] = SeriesPattern1(client, 'difficulty_epoch') - self.blocks_before_next: SeriesPattern1[StoredU32] = SeriesPattern1(client, 'blocks_before_next_difficulty_adjustment') - self.days_before_next: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'days_before_next_difficulty_adjustment') + self.blocks_to_retarget: SeriesPattern1[StoredU32] = SeriesPattern1(client, 'blocks_to_retarget') + self.days_to_retarget: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'days_to_retarget') class SeriesTree_Blocks_Time: """Series tree node.""" @@ -3146,7 +3141,7 @@ class SeriesTree_Blocks_Size: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.total: SeriesPattern18[StoredU64] = SeriesPattern18(client, 'total_size') + self.base: SeriesPattern18[StoredU64] = SeriesPattern18(client, 'total_size') self.cumulative: SeriesPattern1[StoredU64] = SeriesPattern1(client, 'block_size_cumulative') self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, 'block_size_sum') self.average: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, 'block_size_average') @@ -3162,7 +3157,7 @@ class SeriesTree_Blocks_Weight: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.raw: SeriesPattern18[Weight] = SeriesPattern18(client, 'block_weight') + self.base: SeriesPattern18[Weight] = SeriesPattern18(client, 'block_weight') self.cumulative: SeriesPattern1[Weight] = SeriesPattern1(client, 'block_weight_cumulative') self.sum: _1m1w1y24hPattern[Weight] = _1m1w1y24hPattern(client, 'block_weight_sum') self.average: _1m1w1y24hPattern[Weight] = _1m1w1y24hPattern(client, 'block_weight_average') @@ -3233,7 +3228,7 @@ class SeriesTree_Blocks_Fullness: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.bps: _1m1w1y24hHeightPattern[BasisPoints16] = _1m1w1y24hHeightPattern(client, 'block_fullness_bps') + self.bps: _1m1w1y24hBasePattern[BasisPoints16] = _1m1w1y24hBasePattern(client, 'block_fullness_bps') self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'block_fullness_ratio') self.percent: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'block_fullness') @@ -3242,8 +3237,8 @@ class SeriesTree_Blocks_Halving: def __init__(self, client: BrkClientBase, base_path: str = ''): self.epoch: SeriesPattern1[Halving] = SeriesPattern1(client, 'halving_epoch') - self.blocks_before_next: SeriesPattern1[StoredU32] = SeriesPattern1(client, 'blocks_before_next_halving') - self.days_before_next: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'days_before_next_halving') + self.blocks_to_halving: SeriesPattern1[StoredU32] = SeriesPattern1(client, 'blocks_to_halving') + self.days_to_halving: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'days_to_halving') class SeriesTree_Blocks: """Series tree node.""" @@ -3256,8 +3251,8 @@ class SeriesTree_Blocks: self.weight: SeriesTree_Blocks_Weight = SeriesTree_Blocks_Weight(client) self.count: SeriesTree_Blocks_Count = SeriesTree_Blocks_Count(client) self.lookback: SeriesTree_Blocks_Lookback = SeriesTree_Blocks_Lookback(client) - self.interval: _1m1w1y24hHeightPattern[Timestamp] = _1m1w1y24hHeightPattern(client, 'block_interval') - self.vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'block_vbytes') + self.interval: _1m1w1y24hBasePattern[Timestamp] = _1m1w1y24hBasePattern(client, 'block_interval') + self.vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'block_vbytes') self.fullness: SeriesTree_Blocks_Fullness = SeriesTree_Blocks_Fullness(client) self.halving: SeriesTree_Blocks_Halving = SeriesTree_Blocks_Halving(client) @@ -3280,7 +3275,7 @@ class SeriesTree_Transactions_Count: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'tx_count') + self.total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'tx_count') self.is_coinbase: SeriesPattern19[StoredBool] = SeriesPattern19(client, 'is_coinbase') class SeriesTree_Transactions_Size: @@ -3311,8 +3306,8 @@ class SeriesTree_Transactions_Volume: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.sent_sum: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'sent_sum') - self.received_sum: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'received_sum') + self.transfer_volume: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'exact_transfer_volume') + self.output_volume: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'output_volume') self.tx_per_sec: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'tx_per_sec') self.outputs_per_sec: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'outputs_per_sec') self.inputs_per_sec: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'inputs_per_sec') @@ -3617,14 +3612,14 @@ class SeriesTree_Mining_Rewards_Subsidy: self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'subsidy_dominance') self.sma_1y: CentsUsdPattern2 = CentsUsdPattern2(client, 'subsidy_sma_1y') -class SeriesTree_Mining_Rewards_Fees_RatioMultiple: +class SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._24h: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_ratio_multiple_24h') - self._1w: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_ratio_multiple_1w') - self._1m: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_ratio_multiple_1m') - self._1y: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_ratio_multiple_1y') + self._24h: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_to_subsidy_ratio_24h') + self._1w: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_to_subsidy_ratio_1w') + self._1m: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_to_subsidy_ratio_1m') + self._1y: BpsRatioPattern2 = BpsRatioPattern2(client, 'fee_to_subsidy_ratio_1y') class SeriesTree_Mining_Rewards_Fees: """Series tree node.""" @@ -3633,12 +3628,16 @@ class SeriesTree_Mining_Rewards_Fees: self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees') self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees_cumulative') self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_sum') - self._24h: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, 'fees_24h') - self._1w: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, 'fees_1w') - self._1m: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, 'fees_1m') - self._1y: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, 'fees_1y') + self.average: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_average') + self.min: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_min') + self.max: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_max') + self.pct10: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct10') + self.pct25: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct25') + self.median: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_median') + self.pct75: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct75') + self.pct90: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct90') self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'fee_dominance') - self.ratio_multiple: SeriesTree_Mining_Rewards_Fees_RatioMultiple = SeriesTree_Mining_Rewards_Fees_RatioMultiple(client) + self.to_subsidy_ratio: SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio = SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio(client) class SeriesTree_Mining_Rewards: """Series tree node.""" @@ -3690,7 +3689,8 @@ class SeriesTree_Cointime_Activity: self.coinblocks_stored: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coinblocks_stored') self.liveliness: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'liveliness') self.vaultedness: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'vaultedness') - self.ratio: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'activity_to_vaultedness_ratio') + self.ratio: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'activity_to_vaultedness') + self.coinblocks_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coinblocks_destroyed') class SeriesTree_Cointime_Supply: """Series tree node.""" @@ -3731,7 +3731,6 @@ class SeriesTree_Cointime_Prices: self.balanced: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'balanced_price') self.terminal: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'terminal_price') self.delta: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'delta_price') - self.cumulative_market_cap: SeriesPattern1[Dollars] = SeriesPattern1(client, 'cumulative_market_cap') class SeriesTree_Cointime_Adjusted: """Series tree node.""" @@ -3760,7 +3759,6 @@ class SeriesTree_Cointime: self.prices: SeriesTree_Cointime_Prices = SeriesTree_Cointime_Prices(client) self.adjusted: SeriesTree_Cointime_Adjusted = SeriesTree_Cointime_Adjusted(client) self.reserve_risk: SeriesTree_Cointime_ReserveRisk = SeriesTree_Cointime_ReserveRisk(client) - self.coinblocks_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coinblocks_destroyed') class SeriesTree_Constants: """Series tree node.""" @@ -4078,12 +4076,12 @@ class SeriesTree_Indicators: self.nvt: BpsRatioPattern2 = BpsRatioPattern2(client, 'nvt') self.gini: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'gini') self.rhodl_ratio: BpsRatioPattern2 = BpsRatioPattern2(client, 'rhodl_ratio') - self.thermocap_multiple: BpsRatioPattern2 = BpsRatioPattern2(client, 'thermocap_multiple') + self.thermo_cap_multiple: BpsRatioPattern2 = BpsRatioPattern2(client, 'thermo_cap_multiple') self.coindays_destroyed_supply_adjusted: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'coindays_destroyed_supply_adjusted') self.coinyears_destroyed_supply_adjusted: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'coinyears_destroyed_supply_adjusted') self.dormancy: SeriesTree_Indicators_Dormancy = SeriesTree_Indicators_Dormancy(client) self.stock_to_flow: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'stock_to_flow') - self.seller_exhaustion_constant: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'seller_exhaustion_constant') + self.seller_exhaustion: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'seller_exhaustion') class SeriesTree_Market_Ath: """Series tree node.""" @@ -4100,19 +4098,19 @@ class SeriesTree_Market_Lookback: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._24h: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_24h') - self._1w: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_1w') - self._1m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_1m') - self._3m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_3m') - self._6m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_6m') - self._1y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_1y') - self._2y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_2y') - self._3y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_3y') - self._4y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_4y') - self._5y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_5y') - self._6y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_6y') - self._8y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_8y') - self._10y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_lookback_10y') + self._24h: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_24h') + self._1w: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_1w') + self._1m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_1m') + self._3m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_3m') + self._6m: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_6m') + self._1y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_1y') + self._2y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_2y') + self._3y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_3y') + self._4y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_4y') + self._5y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_5y') + self._6y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_6y') + self._8y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_8y') + self._10y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'price_past_10y') class SeriesTree_Market_Returns_Periods: """Series tree node.""" @@ -4611,7 +4609,7 @@ class SeriesTree_Pools: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.height_to_pool: SeriesPattern18[PoolSlug] = SeriesPattern18(client, 'pool') + self.pool: SeriesPattern18[PoolSlug] = SeriesPattern18(client, 'pool') self.major: SeriesTree_Pools_Major = SeriesTree_Pools_Major(client) self.minor: SeriesTree_Pools_Minor = SeriesTree_Pools_Minor(client) @@ -4648,12 +4646,6 @@ class SeriesTree_Prices: self.ohlc: SeriesTree_Prices_Ohlc = SeriesTree_Prices_Ohlc(client) self.spot: SeriesTree_Prices_Spot = SeriesTree_Prices_Spot(client) -class SeriesTree_Supply_Burned: - """Series tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.unspendable: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'unspendable_supply') - class SeriesTree_Supply_Velocity: """Series tree node.""" @@ -4667,12 +4659,12 @@ class SeriesTree_Supply: def __init__(self, client: BrkClientBase, base_path: str = ''): self.state: SeriesPattern18[SupplyState] = SeriesPattern18(client, 'supply_state') self.circulating: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'circulating_supply') - self.burned: SeriesTree_Supply_Burned = SeriesTree_Supply_Burned(client) + self.burned: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'unspendable_supply') self.inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'inflation_rate') self.velocity: SeriesTree_Supply_Velocity = SeriesTree_Supply_Velocity(client) self.market_cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, 'market_cap') self.market_minus_realized_cap_growth_rate: _1m1w1y24hPattern[BasisPointsSigned32] = _1m1w1y24hPattern(client, 'market_minus_realized_cap_growth_rate') - self.hodled_or_lost: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'hodled_or_lost_coins') + self.hodled_or_lost: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'hodled_or_lost_supply') class SeriesTree_Cohorts_Utxo_All_Supply: """Series tree node.""" @@ -4681,14 +4673,14 @@ class SeriesTree_Cohorts_Utxo_All_Supply: self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'supply') self.half: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'supply_half') self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, 'supply_delta') - self.in_profit: BtcCentsRelSatsUsdPattern2 = BtcCentsRelSatsUsdPattern2(client, 'supply_in_profit') - self.in_loss: BtcCentsRelSatsUsdPattern2 = BtcCentsRelSatsUsdPattern2(client, 'supply_in_loss') + self.in_profit: BtcCentsSatsToUsdPattern2 = BtcCentsSatsToUsdPattern2(client, 'supply_in_profit') + self.in_loss: BtcCentsSatsToUsdPattern2 = BtcCentsSatsToUsdPattern2(client, 'supply_in_loss') class SeriesTree_Cohorts_Utxo_All_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.sent: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'sent') + self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'transfer_volume') self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'coinyears_destroyed') self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'dormancy') @@ -4700,7 +4692,7 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Profit: self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_profit') self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_profit_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'realized_profit_sum') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_profit_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_profit_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'profit_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'profit_value_destroyed') self.distribution_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'distribution_flow') @@ -4713,7 +4705,7 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Loss: self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'realized_loss_sum') self.negative: SeriesPattern1[Dollars] = SeriesPattern1(client, 'neg_realized_loss') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_loss_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_loss_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'loss_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'loss_value_destroyed') self.capitulation_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'capitulation_flow') @@ -4837,29 +4829,21 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Sopr: self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sopr') self.adjusted: SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted(client) -class SeriesTree_Cohorts_Utxo_All_Realized_Investor: - """Series tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'investor_price') - self.lower_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'lower_price_band') - self.upper_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'upper_price_band') - class SeriesTree_Cohorts_Utxo_All_Realized: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.cap: CentsDeltaRelUsdPattern = CentsDeltaRelUsdPattern(client, 'realized_cap') + self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'realized_cap') self.profit: SeriesTree_Cohorts_Utxo_All_Realized_Profit = SeriesTree_Cohorts_Utxo_All_Realized_Profit(client) self.loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss = SeriesTree_Cohorts_Utxo_All_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_All_Realized_Price = SeriesTree_Cohorts_Utxo_All_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'mvrv') self.sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr = SeriesTree_Cohorts_Utxo_All_Realized_Sopr(client) - self.net_pnl: BaseChangeCumulativeDeltaRelSumPattern = BaseChangeCumulativeDeltaRelSumPattern(client, 'net') + self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'net') self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sell_side_risk_ratio') - self.peak_regret: BaseCumulativeRelPattern = BaseCumulativeRelPattern(client, 'realized_peak_regret') - self.investor: SeriesTree_Cohorts_Utxo_All_Realized_Investor = SeriesTree_Cohorts_Utxo_All_Realized_Investor(client) + self.peak_regret: BaseCumulativeToPattern = BaseCumulativeToPattern(client, 'realized_peak_regret') + self.investor: InvestorPricePattern = InvestorPricePattern(client, 'investor') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'realized_profit_to_loss_ratio') class SeriesTree_Cohorts_Utxo_All_CostBasis: @@ -4879,8 +4863,8 @@ class SeriesTree_Cohorts_Utxo_All_Unrealized_Profit: self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'unrealized_profit') self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'unrealized_profit_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'unrealized_profit_sum') - self.rel_to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_profit_rel_to_mcap') - self.rel_to_own_gross: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_profit_rel_to_own_gross_pnl') + self.to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_profit_to_mcap') + self.to_own_gross_pnl: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_profit_to_own_gross_pnl') class SeriesTree_Cohorts_Utxo_All_Unrealized_Loss: """Series tree node.""" @@ -4890,8 +4874,8 @@ class SeriesTree_Cohorts_Utxo_All_Unrealized_Loss: self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'unrealized_loss_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'unrealized_loss_sum') self.negative: SeriesPattern1[Dollars] = SeriesPattern1(client, 'neg_unrealized_loss') - self.rel_to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_loss_rel_to_mcap') - self.rel_to_own_gross: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_loss_rel_to_own_gross_pnl') + self.to_mcap: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_loss_to_mcap') + self.to_own_gross_pnl: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, 'unrealized_loss_to_own_gross_pnl') class SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl: """Series tree node.""" @@ -4899,7 +4883,7 @@ class SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl: def __init__(self, client: BrkClientBase, base_path: str = ''): self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, 'net_unrealized_pnl') self.cents: SeriesPattern1[CentsSigned] = SeriesPattern1(client, 'net_unrealized_pnl_cents') - self.rel_to_own_gross: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'net_unrealized_pnl_rel_to_own_gross_pnl') + self.to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'net_unrealized_pnl_to_own_gross_pnl') class SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment: """Series tree node.""" @@ -4936,7 +4920,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.sent: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'sth_sent') + self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'sth_transfer_volume') self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'sth_coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'sth_coinyears_destroyed') self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'sth_dormancy') @@ -4948,7 +4932,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Profit: self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_profit') self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_profit_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'sth_realized_profit_sum') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_profit_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_profit_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_profit_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_profit_value_destroyed') self.distribution_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'sth_distribution_flow') @@ -4961,7 +4945,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Loss: self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'sth_realized_loss_sum') self.negative: SeriesPattern1[Dollars] = SeriesPattern1(client, 'sth_neg_realized_loss') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_loss_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_loss_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_loss_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_loss_value_destroyed') self.capitulation_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'sth_capitulation_flow') @@ -5085,29 +5069,21 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr: self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_sopr') self.adjusted: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted(client) -class SeriesTree_Cohorts_Utxo_Sth_Realized_Investor: - """Series tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'sth_investor_price') - self.lower_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'sth_lower_price_band') - self.upper_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'sth_upper_price_band') - class SeriesTree_Cohorts_Utxo_Sth_Realized: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.cap: CentsDeltaRelUsdPattern = CentsDeltaRelUsdPattern(client, 'sth_realized_cap') + self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'sth_realized_cap') self.profit: SeriesTree_Cohorts_Utxo_Sth_Realized_Profit = SeriesTree_Cohorts_Utxo_Sth_Realized_Profit(client) self.loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss = SeriesTree_Cohorts_Utxo_Sth_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price = SeriesTree_Cohorts_Utxo_Sth_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'sth_mvrv') self.sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr(client) - self.net_pnl: BaseChangeCumulativeDeltaRelSumPattern = BaseChangeCumulativeDeltaRelSumPattern(client, 'sth_net') + self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'sth_net') self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'sth_realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sth_sell_side_risk_ratio') - self.peak_regret: BaseCumulativeRelPattern = BaseCumulativeRelPattern(client, 'sth_realized_peak_regret') - self.investor: SeriesTree_Cohorts_Utxo_Sth_Realized_Investor = SeriesTree_Cohorts_Utxo_Sth_Realized_Investor(client) + self.peak_regret: BaseCumulativeToPattern = BaseCumulativeToPattern(client, 'sth_realized_peak_regret') + self.investor: InvestorPricePattern = InvestorPricePattern(client, 'sth_investor') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_realized_profit_to_loss_ratio') class SeriesTree_Cohorts_Utxo_Sth_CostBasis: @@ -5133,9 +5109,9 @@ class SeriesTree_Cohorts_Utxo_Sth_Unrealized: def __init__(self, client: BrkClientBase, base_path: str = ''): self.nupl: BpsRatioPattern = BpsRatioPattern(client, 'sth_nupl') - self.profit: BaseCumulativeRelSumPattern2 = BaseCumulativeRelSumPattern2(client, 'sth_unrealized_profit') - self.loss: BaseCumulativeNegativeRelSumPattern2 = BaseCumulativeNegativeRelSumPattern2(client, 'sth') - self.net_pnl: CentsRelUsdPattern2 = CentsRelUsdPattern2(client, 'sth_net_unrealized_pnl') + self.profit: BaseCumulativeSumToPattern2 = BaseCumulativeSumToPattern2(client, 'sth_unrealized_profit') + self.loss: BaseCumulativeNegativeSumToPattern2 = BaseCumulativeNegativeSumToPattern2(client, 'sth') + self.net_pnl: CentsToUsdPattern2 = CentsToUsdPattern2(client, 'sth_net_unrealized_pnl') self.gross_pnl: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_unrealized_gross_pnl') self.invested_capital: InPattern = InPattern(client, 'sth_invested_capital_in') self.sentiment: SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment = SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment(client) @@ -5144,7 +5120,7 @@ class SeriesTree_Cohorts_Utxo_Sth: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply: DeltaHalfInRelTotalPattern2 = DeltaHalfInRelTotalPattern2(client, 'sth_supply') + self.supply: DeltaHalfInToTotalPattern2 = DeltaHalfInToTotalPattern2(client, 'sth_supply') self.outputs: UnspentPattern = UnspentPattern(client, 'sth_utxo_count') self.activity: SeriesTree_Cohorts_Utxo_Sth_Activity = SeriesTree_Cohorts_Utxo_Sth_Activity(client) self.realized: SeriesTree_Cohorts_Utxo_Sth_Realized = SeriesTree_Cohorts_Utxo_Sth_Realized(client) @@ -5155,7 +5131,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.sent: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'lth_sent') + self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'lth_transfer_volume') self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'lth_coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'lth_coinyears_destroyed') self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'lth_dormancy') @@ -5167,7 +5143,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Profit: self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_profit') self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_profit_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'lth_realized_profit_sum') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_profit_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_profit_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_profit_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_profit_value_destroyed') self.distribution_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'lth_distribution_flow') @@ -5180,7 +5156,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Loss: self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'lth_realized_loss_sum') self.negative: SeriesPattern1[Dollars] = SeriesPattern1(client, 'lth_neg_realized_loss') - self.rel_to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_loss_rel_to_rcap') + self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_loss_to_rcap') self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_loss_value_created') self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_loss_value_destroyed') self.capitulation_flow: SeriesPattern1[Dollars] = SeriesPattern1(client, 'lth_capitulation_flow') @@ -5295,29 +5271,21 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr: self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_value_destroyed') self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_sopr') -class SeriesTree_Cohorts_Utxo_Lth_Realized_Investor: - """Series tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, 'lth_investor_price') - self.lower_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'lth_lower_price_band') - self.upper_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, 'lth_upper_price_band') - class SeriesTree_Cohorts_Utxo_Lth_Realized: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.cap: CentsDeltaRelUsdPattern = CentsDeltaRelUsdPattern(client, 'lth_realized_cap') + self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'lth_realized_cap') self.profit: SeriesTree_Cohorts_Utxo_Lth_Realized_Profit = SeriesTree_Cohorts_Utxo_Lth_Realized_Profit(client) self.loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss = SeriesTree_Cohorts_Utxo_Lth_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price = SeriesTree_Cohorts_Utxo_Lth_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'lth_mvrv') self.sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr(client) - self.net_pnl: BaseChangeCumulativeDeltaRelSumPattern = BaseChangeCumulativeDeltaRelSumPattern(client, 'lth_net') + self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'lth_net') self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'lth_realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'lth_sell_side_risk_ratio') - self.peak_regret: BaseCumulativeRelPattern = BaseCumulativeRelPattern(client, 'lth_realized_peak_regret') - self.investor: SeriesTree_Cohorts_Utxo_Lth_Realized_Investor = SeriesTree_Cohorts_Utxo_Lth_Realized_Investor(client) + self.peak_regret: BaseCumulativeToPattern = BaseCumulativeToPattern(client, 'lth_realized_peak_regret') + self.investor: InvestorPricePattern = InvestorPricePattern(client, 'lth_investor') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_realized_profit_to_loss_ratio') class SeriesTree_Cohorts_Utxo_Lth_CostBasis: @@ -5343,9 +5311,9 @@ class SeriesTree_Cohorts_Utxo_Lth_Unrealized: def __init__(self, client: BrkClientBase, base_path: str = ''): self.nupl: BpsRatioPattern = BpsRatioPattern(client, 'lth_nupl') - self.profit: BaseCumulativeRelSumPattern2 = BaseCumulativeRelSumPattern2(client, 'lth_unrealized_profit') - self.loss: BaseCumulativeNegativeRelSumPattern2 = BaseCumulativeNegativeRelSumPattern2(client, 'lth') - self.net_pnl: CentsRelUsdPattern2 = CentsRelUsdPattern2(client, 'lth_net_unrealized_pnl') + self.profit: BaseCumulativeSumToPattern2 = BaseCumulativeSumToPattern2(client, 'lth_unrealized_profit') + self.loss: BaseCumulativeNegativeSumToPattern2 = BaseCumulativeNegativeSumToPattern2(client, 'lth') + self.net_pnl: CentsToUsdPattern2 = CentsToUsdPattern2(client, 'lth_net_unrealized_pnl') self.gross_pnl: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_unrealized_gross_pnl') self.invested_capital: InPattern = InPattern(client, 'lth_invested_capital_in') self.sentiment: SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment = SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment(client) @@ -5354,7 +5322,7 @@ class SeriesTree_Cohorts_Utxo_Lth: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply: DeltaHalfInRelTotalPattern2 = DeltaHalfInRelTotalPattern2(client, 'lth_supply') + self.supply: DeltaHalfInToTotalPattern2 = DeltaHalfInToTotalPattern2(client, 'lth_supply') self.outputs: UnspentPattern = UnspentPattern(client, 'lth_utxo_count') self.activity: SeriesTree_Cohorts_Utxo_Lth_Activity = SeriesTree_Cohorts_Utxo_Lth_Activity(client) self.realized: SeriesTree_Cohorts_Utxo_Lth_Realized = SeriesTree_Cohorts_Utxo_Lth_Realized(client) diff --git a/website/scripts/options/market.js b/website/scripts/options/market.js index dcc549b8d..1f9b6fcc0 100644 --- a/website/scripts/options/market.js +++ b/website/scripts/options/market.js @@ -148,24 +148,47 @@ function returnsSubSectionWithCagr(name, periods) { name, tree: [ { - name: "Compare", - title: `${name} Returns`, - bottom: periods.flatMap((p) => - percentRatioBaseline({ - pattern: p.returns, - name: p.id, - color: p.color, - }), - ), - }, - ...periods.map((p) => ({ - name: periodIdToName(p.id, true), - title: `${periodIdToName(p.id, true)} Returns`, - bottom: [ - ...percentRatioBaseline({ pattern: p.returns, name: "Total" }), - ...percentRatioBaseline({ pattern: p.cagr, name: "annual" }), + name: "Total", + tree: [ + { + name: "Compare", + title: `${name} Total Returns`, + bottom: periods.flatMap((p) => + percentRatioBaseline({ + pattern: p.returns, + name: p.id, + color: p.color, + }), + ), + }, + ...periods.map((p) => ({ + name: periodIdToName(p.id, true), + title: `${periodIdToName(p.id, true)} Total Returns`, + bottom: percentRatioBaseline({ pattern: p.returns, name: "Total" }), + })), ], - })), + }, + { + name: "CAGR", + tree: [ + { + name: "Compare", + title: `${name} CAGR`, + bottom: periods.flatMap((p) => + percentRatioBaseline({ + pattern: p.cagr, + name: p.id, + color: p.color, + }), + ), + }, + ...periods.map((p) => ({ + name: periodIdToName(p.id, true), + title: `${periodIdToName(p.id, true)} CAGR`, + bottom: percentRatioBaseline({ pattern: p.cagr, name: "CAGR" }), + })), + ], + }, ], }; } @@ -396,20 +419,14 @@ export function createMarketSection() { name: "Capitalization", tree: [ { - name: "Market Cap", - title: "Market Capitalization", + name: "Compare", + title: "Market vs Realized Capitalization", bottom: [ line({ series: supply.marketCap.usd, name: "Market Cap", unit: Unit.usd, }), - ], - }, - { - name: "Realized Cap", - title: "Realized Capitalization", - bottom: [ line({ series: cohorts.utxo.all.realized.cap.usd, name: "Realized Cap", @@ -419,19 +436,168 @@ export function createMarketSection() { ], }, { - name: "Growth Rate", - title: "Capitalization Growth Rate", - bottom: [ - ...percentRatio({ - pattern: supply.marketCap.delta.rate._24h, - name: "Market Cap (24h)", - color: colors.bitcoin, - }), - baseline({ - series: supply.marketMinusRealizedCapGrowthRate._24h, - name: "Market - Realized", - unit: Unit.percentage, - }), + name: "Market Cap", + tree: [ + { + name: "Value", + title: "Market Capitalization", + bottom: [ + line({ + series: supply.marketCap.usd, + name: "Market Cap", + unit: Unit.usd, + }), + ], + }, + { + name: "Absolute", + tree: [ + { + name: "Compare", + title: "Market Cap Absolute Change", + bottom: ROLLING_WINDOWS.map((w) => + baseline({ + series: supply.marketCap.delta.absolute[w.key].usd, + name: w.name, + color: w.color, + unit: Unit.usd, + }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: `Market Cap Absolute Change ${w.name}`, + bottom: [ + baseline({ + series: supply.marketCap.delta.absolute[w.key].usd, + name: w.name, + unit: Unit.usd, + }), + ], + })), + ], + }, + { + name: "Rate", + tree: [ + { + name: "Compare", + title: "Market Cap Growth Rate", + bottom: ROLLING_WINDOWS.flatMap((w) => + percentRatio({ + pattern: supply.marketCap.delta.rate[w.key], + name: w.name, + color: w.color, + }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: `Market Cap Growth Rate ${w.name}`, + bottom: percentRatioBaseline({ + pattern: supply.marketCap.delta.rate[w.key], + name: w.name, + }), + })), + ], + }, + ], + }, + { + name: "Realized Cap", + tree: [ + { + name: "Value", + title: "Realized Capitalization", + bottom: [ + line({ + series: cohorts.utxo.all.realized.cap.usd, + name: "Realized Cap", + color: colors.realized, + unit: Unit.usd, + }), + ], + }, + { + name: "Absolute", + tree: [ + { + name: "Compare", + title: "Realized Cap Absolute Change", + bottom: ROLLING_WINDOWS.map((w) => + baseline({ + series: cohorts.utxo.all.realized.cap.delta.absolute[w.key].usd, + name: w.name, + color: w.color, + unit: Unit.usd, + }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: `Realized Cap Absolute Change ${w.name}`, + bottom: [ + baseline({ + series: cohorts.utxo.all.realized.cap.delta.absolute[w.key].usd, + name: w.name, + unit: Unit.usd, + }), + ], + })), + ], + }, + { + name: "Rate", + tree: [ + { + name: "Compare", + title: "Realized Cap Growth Rate", + bottom: ROLLING_WINDOWS.flatMap((w) => + percentRatio({ + pattern: cohorts.utxo.all.realized.cap.delta.rate[w.key], + name: w.name, + color: w.color, + }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: `Realized Cap Growth Rate ${w.name}`, + bottom: percentRatioBaseline({ + pattern: cohorts.utxo.all.realized.cap.delta.rate[w.key], + name: w.name, + }), + })), + ], + }, + ], + }, + { + name: "Rate Spread", + tree: [ + { + name: "Compare", + title: "Capitalization Growth Rate Spread", + bottom: ROLLING_WINDOWS.map((w) => + baseline({ + series: supply.marketMinusRealizedCapGrowthRate[w.key], + name: w.name, + color: w.color, + unit: Unit.percentage, + }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: `Capitalization Growth Rate Spread ${w.name}`, + bottom: [ + baseline({ + series: supply.marketMinusRealizedCapGrowthRate[w.key], + name: w.name, + unit: Unit.percentage, + }), + ], + })), ], }, ], @@ -681,29 +847,12 @@ export function createMarketSection() { const rsi = technical.rsi[w.key]; return { name: w.name, - tree: [ - { - name: "Value", - title: `RSI (${w.name})`, - bottom: [ - ...indexRatio({ pattern: rsi.rsi, name: "RSI", color: colors.indicator.main }), - ...indexRatio({ pattern: rsi.rsiMax, name: "Max", color: colors.stat.max, defaultActive: false }), - ...indexRatio({ pattern: rsi.rsiMin, name: "Min", color: colors.stat.min, defaultActive: false }), - priceLine({ unit: Unit.index, number: 70 }), - priceLine({ unit: Unit.index, number: 50, defaultActive: false }), - priceLine({ unit: Unit.index, number: 30 }), - ], - }, - { - name: "Components", - title: `RSI Components (${w.name})`, - bottom: [ - line({ series: rsi.averageGain, name: "Avg Gain", color: colors.profit, unit: Unit.usd }), - line({ series: rsi.averageLoss, name: "Avg Loss", color: colors.loss, unit: Unit.usd }), - line({ series: rsi.gains, name: "Gains", color: colors.profit, defaultActive: false, unit: Unit.usd }), - line({ series: rsi.losses, name: "Losses", color: colors.loss, defaultActive: false, unit: Unit.usd }), - ], - }, + title: `RSI (${w.name})`, + bottom: [ + ...indexRatio({ pattern: rsi.rsi, name: "RSI", color: colors.indicator.main }), + priceLine({ unit: Unit.index, number: 70 }), + priceLine({ unit: Unit.index, number: 50, defaultActive: false }), + priceLine({ unit: Unit.index, number: 30 }), ], }; }),