diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index 2ae734b74..331aa0093 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -1009,7 +1009,6 @@ impl CapCapitulationGrossInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSo investor_price: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "investor_price")), investor_price_ratio: BpsRatioPattern::new(client.clone(), _m(&acc, "investor_price_ratio")), investor_price_ratio_percentiles: RatioPattern::new(client.clone(), _m(&acc, "investor_price_ratio")), - investor_price_ratio_std_dev: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")), loss_value_created: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_created")), loss_value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_destroyed")), lower_price_band: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "lower_price_band")), @@ -1134,26 +1133,20 @@ pub struct GrossMvrvNegNetRealizedSentSoprValuePattern { pub mvrv: MetricPattern1, pub neg_realized_loss: MetricPattern1, pub net_realized_pnl: CumulativeHeightPattern, - pub net_realized_pnl_ema_1w: MetricPattern1, pub net_realized_pnl_rel_to_realized_cap: BpsPercentRatioPattern, pub realized_cap: MetricPattern1, pub realized_cap_cents: MetricPattern1, pub realized_cap_change_1m: MetricPattern1, pub realized_loss: CumulativeHeightPattern, - pub realized_loss_ema_1w: MetricPattern1, pub realized_loss_rel_to_realized_cap: BpsPercentRatioPattern, pub realized_price: CentsSatsUsdPattern, pub realized_price_ratio: BpsRatioPattern, pub realized_price_ratio_percentiles: RatioPattern, pub realized_profit: CumulativeHeightPattern, - pub realized_profit_ema_1w: MetricPattern1, pub realized_profit_rel_to_realized_cap: BpsPercentRatioPattern, pub sent_in_loss: BaseCumulativePattern, - pub sent_in_loss_ema: _2wPattern, pub sent_in_profit: BaseCumulativePattern, - pub sent_in_profit_ema: _2wPattern, pub sopr: _1m1w1y24hPattern, - pub sopr_24h_ema: _1m1wPattern, pub value_created: MetricPattern1, pub value_created_sum: _1m1w1y24hPattern, pub value_destroyed: MetricPattern1, @@ -1168,26 +1161,20 @@ impl GrossMvrvNegNetRealizedSentSoprValuePattern { mvrv: MetricPattern1::new(client.clone(), _m(&acc, "mvrv")), neg_realized_loss: MetricPattern1::new(client.clone(), _m(&acc, "neg_realized_loss")), net_realized_pnl: CumulativeHeightPattern::new(client.clone(), _m(&acc, "net_realized_pnl")), - net_realized_pnl_ema_1w: MetricPattern1::new(client.clone(), _m(&acc, "net_realized_pnl_ema_1w")), net_realized_pnl_rel_to_realized_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "net_realized_pnl_rel_to_realized_cap")), realized_cap: MetricPattern1::new(client.clone(), _m(&acc, "realized_cap")), realized_cap_cents: MetricPattern1::new(client.clone(), _m(&acc, "realized_cap_cents")), realized_cap_change_1m: MetricPattern1::new(client.clone(), _m(&acc, "realized_cap_change_1m")), realized_loss: CumulativeHeightPattern::new(client.clone(), _m(&acc, "realized_loss")), - realized_loss_ema_1w: MetricPattern1::new(client.clone(), _m(&acc, "realized_loss_ema_1w")), realized_loss_rel_to_realized_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "realized_loss_rel_to_realized_cap")), realized_price: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "realized_price")), realized_price_ratio: BpsRatioPattern::new(client.clone(), _m(&acc, "realized_price_ratio")), realized_price_ratio_percentiles: RatioPattern::new(client.clone(), _m(&acc, "realized_price_ratio")), realized_profit: CumulativeHeightPattern::new(client.clone(), _m(&acc, "realized_profit")), - realized_profit_ema_1w: MetricPattern1::new(client.clone(), _m(&acc, "realized_profit_ema_1w")), realized_profit_rel_to_realized_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "realized_profit_rel_to_realized_cap")), sent_in_loss: BaseCumulativePattern::new(client.clone(), _m(&acc, "sent_in_loss")), - sent_in_loss_ema: _2wPattern::new(client.clone(), _m(&acc, "sent_in_loss_ema_2w")), sent_in_profit: BaseCumulativePattern::new(client.clone(), _m(&acc, "sent_in_profit")), - sent_in_profit_ema: _2wPattern::new(client.clone(), _m(&acc, "sent_in_profit_ema_2w")), sopr: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sopr")), - sopr_24h_ema: _1m1wPattern::new(client.clone(), _m(&acc, "sopr_24h_ema")), value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")), value_created_sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "value_created")), value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")), diff --git a/crates/brk_computer/src/distribution/metrics/realized/base.rs b/crates/brk_computer/src/distribution/metrics/realized/base.rs index 5a7a5fe48..0b07d0fa1 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/base.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/base.rs @@ -16,8 +16,7 @@ use crate::{ ComputedFromHeight, ComputedFromHeightCumulative, ComputedFromHeightRatioPercentiles, FiatFromHeight, LazyFromHeight, NegCentsUnsignedToDollars, PercentFromHeight, RatioCents64, - RatioCentsBp32, RatioCentsSignedCentsBps32, RollingEmas1w1m, RollingEmas2w, - RollingWindows, ValueFromHeightCumulative, + RatioCentsBp32, RatioCentsSignedCentsBps32, RollingWindows, ValueFromHeightCumulative, }, prices, }; @@ -37,12 +36,8 @@ pub struct RealizedBase { pub neg_realized_loss: LazyFromHeight, pub net_realized_pnl: ComputedFromHeightCumulative, - pub net_realized_pnl_ema_1w: ComputedFromHeight, pub gross_pnl: FiatFromHeight, - pub realized_profit_ema_1w: ComputedFromHeight, - pub realized_loss_ema_1w: ComputedFromHeight, - pub realized_profit_rel_to_realized_cap: PercentFromHeight, pub realized_loss_rel_to_realized_cap: PercentFromHeight, pub net_realized_pnl_rel_to_realized_cap: PercentFromHeight, @@ -52,14 +47,11 @@ pub struct RealizedBase { pub value_created_sum: RollingWindows, pub value_destroyed_sum: RollingWindows, pub sopr: RollingWindows, - pub sopr_24h_ema: RollingEmas1w1m, pub realized_price_ratio_percentiles: ComputedFromHeightRatioPercentiles, pub sent_in_profit: ValueFromHeightCumulative, pub sent_in_loss: ValueFromHeightCumulative, - pub sent_in_profit_ema: RollingEmas2w, - pub sent_in_loss_ema: RollingEmas2w, } impl RealizedBase { @@ -76,11 +68,7 @@ impl RealizedBase { cfg.indexes, ); - let realized_profit_ema_1w = cfg.import("realized_profit_ema_1w", v0)?; - let realized_loss_ema_1w = cfg.import("realized_loss_ema_1w", v0)?; - let net_realized_pnl = cfg.import("net_realized_pnl", v0)?; - let net_realized_pnl_ema_1w = cfg.import("net_realized_pnl_ema_1w", v0)?; let gross_pnl = cfg.import("realized_gross_pnl", v0)?; let realized_profit_rel_to_realized_cap = @@ -95,7 +83,6 @@ impl RealizedBase { let value_created_sum = cfg.import("value_created", v1)?; let value_destroyed_sum = cfg.import("value_destroyed", v1)?; let sopr = cfg.import("sopr", v1)?; - let sopr_24h_ema = cfg.import("sopr_24h", v1)?; let realized_price_ratio_percentiles = ComputedFromHeightRatioPercentiles::forced_import( @@ -110,10 +97,7 @@ impl RealizedBase { realized_cap_change_1m: cfg.import("realized_cap_change_1m", v0)?, neg_realized_loss, net_realized_pnl, - net_realized_pnl_ema_1w, gross_pnl, - realized_profit_ema_1w, - realized_loss_ema_1w, realized_profit_rel_to_realized_cap, realized_loss_rel_to_realized_cap, net_realized_pnl_rel_to_realized_cap, @@ -122,12 +106,9 @@ impl RealizedBase { value_created_sum, value_destroyed_sum, sopr, - sopr_24h_ema, realized_price_ratio_percentiles, sent_in_profit: cfg.import("sent_in_profit", v0)?, sent_in_loss: cfg.import("sent_in_loss", v0)?, - sent_in_profit_ema: cfg.import("sent_in_profit", v0)?, - sent_in_loss_ema: cfg.import("sent_in_loss", v0)?, }) } @@ -240,25 +221,6 @@ impl RealizedBase { exit, )?; - self.realized_profit_ema_1w.height.compute_rolling_ema( - starting_indexes.height, - &blocks.count.height_1w_ago, - &self.minimal.realized_profit.height, - exit, - )?; - self.realized_loss_ema_1w.height.compute_rolling_ema( - starting_indexes.height, - &blocks.count.height_1w_ago, - &self.minimal.realized_loss.height, - exit, - )?; - self.net_realized_pnl_ema_1w.height.compute_rolling_ema( - starting_indexes.height, - &blocks.count.height_1w_ago, - &self.net_realized_pnl.height, - exit, - )?; - self.realized_profit_rel_to_realized_cap .compute_binary::( starting_indexes.height, @@ -311,14 +273,6 @@ impl RealizedBase { )?; } - self.sopr_24h_ema.compute_from_24h( - starting_indexes.height, - &blocks.count.height_1w_ago, - &blocks.count.height_1m_ago, - &self.sopr._24h.height, - exit, - )?; - // Realized price ratio percentiles self.realized_price_ratio_percentiles.compute( blocks, @@ -328,22 +282,6 @@ impl RealizedBase { &self.minimal.realized_price.cents.height, )?; - // Sent in profit/loss EMAs - self.sent_in_profit_ema.compute( - starting_indexes.height, - &blocks.count.height_2w_ago, - &self.sent_in_profit.base.sats.height, - &self.sent_in_profit.base.cents.height, - exit, - )?; - self.sent_in_loss_ema.compute( - starting_indexes.height, - &blocks.count.height_2w_ago, - &self.sent_in_loss.base.sats.height, - &self.sent_in_loss.base.cents.height, - exit, - )?; - Ok(()) } } diff --git a/crates/brk_computer/src/distribution/metrics/realized/full.rs b/crates/brk_computer/src/distribution/metrics/realized/full.rs index 8785e777f..0b0f241df 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/full.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/full.rs @@ -19,7 +19,7 @@ use crate::{ ComputedFromHeightRatioStdDevBands, LazyFromHeight, PercentFromHeight, PercentRollingEmas1w1m, PercentRollingWindows, Price, RatioCents64, RatioCentsBp32, RatioCentsSignedCentsBps32, RatioCentsSignedDollarsBps32, RatioDollarsBp32, - RollingWindows, + RollingEmas1w1m, RollingEmas2w, RollingWindows, }, prices, }; @@ -70,6 +70,15 @@ pub struct RealizedFull { pub realized_loss_sum: RollingWindows, pub realized_profit_to_loss_ratio: RollingWindows, + pub realized_profit_ema_1w: ComputedFromHeight, + pub realized_loss_ema_1w: ComputedFromHeight, + pub net_realized_pnl_ema_1w: ComputedFromHeight, + + pub sopr_24h_ema: RollingEmas1w1m, + + pub sent_in_profit_ema: RollingEmas2w, + pub sent_in_loss_ema: RollingEmas2w, + pub realized_price_ratio_std_dev: ComputedFromHeightRatioStdDevBands, pub investor_price_ratio_percentiles: ComputedFromHeightRatioPercentiles, } @@ -125,6 +134,13 @@ impl RealizedFull { let investor_price_name = cfg.name("investor_price"); let investor_price_version = cfg.version; + let realized_profit_ema_1w = cfg.import("realized_profit_ema_1w", v0)?; + let realized_loss_ema_1w = cfg.import("realized_loss_ema_1w", v0)?; + let net_realized_pnl_ema_1w = cfg.import("net_realized_pnl_ema_1w", v0)?; + let sopr_24h_ema = cfg.import("sopr_24h", v1)?; + let sent_in_profit_ema = cfg.import("sent_in_profit", v0)?; + let sent_in_loss_ema = cfg.import("sent_in_loss", v0)?; + Ok(Self { core, profit_value_created, @@ -155,6 +171,12 @@ impl RealizedFull { realized_loss_sum: cfg.import("realized_loss", v1)?, realized_profit_to_loss_ratio: cfg .import("realized_profit_to_loss_ratio", v1)?, + realized_profit_ema_1w, + realized_loss_ema_1w, + net_realized_pnl_ema_1w, + sopr_24h_ema, + sent_in_profit_ema, + sent_in_loss_ema, realized_price_ratio_std_dev: ComputedFromHeightRatioStdDevBands::forced_import( cfg.db, &realized_price_name, @@ -266,6 +288,47 @@ impl RealizedFull { exit, )?; + // EMAs + self.realized_profit_ema_1w.height.compute_rolling_ema( + starting_indexes.height, + &blocks.count.height_1w_ago, + &self.core.minimal.realized_profit.height, + exit, + )?; + self.realized_loss_ema_1w.height.compute_rolling_ema( + starting_indexes.height, + &blocks.count.height_1w_ago, + &self.core.minimal.realized_loss.height, + exit, + )?; + self.net_realized_pnl_ema_1w.height.compute_rolling_ema( + starting_indexes.height, + &blocks.count.height_1w_ago, + &self.core.net_realized_pnl.height, + exit, + )?; + self.sopr_24h_ema.compute_from_24h( + starting_indexes.height, + &blocks.count.height_1w_ago, + &blocks.count.height_1m_ago, + &self.core.sopr._24h.height, + exit, + )?; + self.sent_in_profit_ema.compute( + starting_indexes.height, + &blocks.count.height_2w_ago, + &self.core.sent_in_profit.base.sats.height, + &self.core.sent_in_profit.base.cents.height, + exit, + )?; + self.sent_in_loss_ema.compute( + starting_indexes.height, + &blocks.count.height_2w_ago, + &self.core.sent_in_loss.base.sats.height, + &self.core.sent_in_loss.base.cents.height, + exit, + )?; + // Gross PnL rolling sum let window_starts = blocks.count.window_starts(); self.gross_pnl_sum.compute_rolling_sum( diff --git a/modules/brk-client/index.js b/modules/brk-client/index.js index 7f7b4dded..35304cfc6 100644 --- a/modules/brk-client/index.js +++ b/modules/brk-client/index.js @@ -1579,7 +1579,6 @@ function createMetricPattern35(client, name) { return /** @type {MetricPattern35 * @property {CentsSatsUsdPattern} investorPrice * @property {BpsRatioPattern} investorPriceRatio * @property {RatioPattern} investorPriceRatioPercentiles - * @property {RatioPattern2} investorPriceRatioStdDev * @property {MetricPattern1} lossValueCreated * @property {MetricPattern1} lossValueDestroyed * @property {CentsSatsUsdPattern} lowerPriceBand @@ -1644,7 +1643,6 @@ function createCapCapitulationGrossInvestorLossLowerMvrvNegNetPeakProfitRealized investorPrice: createCentsSatsUsdPattern(client, _m(acc, 'investor_price')), investorPriceRatio: createBpsRatioPattern(client, _m(acc, 'investor_price_ratio')), investorPriceRatioPercentiles: createRatioPattern(client, _m(acc, 'investor_price_ratio')), - investorPriceRatioStdDev: createRatioPattern2(client, _m(acc, 'investor_price_ratio')), lossValueCreated: createMetricPattern1(client, _m(acc, 'loss_value_created')), lossValueDestroyed: createMetricPattern1(client, _m(acc, 'loss_value_destroyed')), lowerPriceBand: createCentsSatsUsdPattern(client, _m(acc, 'lower_price_band')), @@ -1771,26 +1769,20 @@ function create_0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdSmaZscorePattern(client * @property {MetricPattern1} mvrv * @property {MetricPattern1} negRealizedLoss * @property {CumulativeHeightPattern} netRealizedPnl - * @property {MetricPattern1} netRealizedPnlEma1w * @property {BpsPercentRatioPattern} netRealizedPnlRelToRealizedCap * @property {MetricPattern1} realizedCap * @property {MetricPattern1} realizedCapCents * @property {MetricPattern1} realizedCapChange1m * @property {CumulativeHeightPattern} realizedLoss - * @property {MetricPattern1} realizedLossEma1w * @property {BpsPercentRatioPattern} realizedLossRelToRealizedCap * @property {CentsSatsUsdPattern} realizedPrice * @property {BpsRatioPattern} realizedPriceRatio * @property {RatioPattern} realizedPriceRatioPercentiles * @property {CumulativeHeightPattern} realizedProfit - * @property {MetricPattern1} realizedProfitEma1w * @property {BpsPercentRatioPattern} realizedProfitRelToRealizedCap * @property {BaseCumulativePattern} sentInLoss - * @property {_2wPattern} sentInLossEma * @property {BaseCumulativePattern} sentInProfit - * @property {_2wPattern} sentInProfitEma * @property {_1m1w1y24hPattern} sopr - * @property {_1m1wPattern} sopr24hEma * @property {MetricPattern1} valueCreated * @property {_1m1w1y24hPattern} valueCreatedSum * @property {MetricPattern1} valueDestroyed @@ -1809,26 +1801,20 @@ function createGrossMvrvNegNetRealizedSentSoprValuePattern(client, acc) { mvrv: createMetricPattern1(client, _m(acc, 'mvrv')), negRealizedLoss: createMetricPattern1(client, _m(acc, 'neg_realized_loss')), netRealizedPnl: createCumulativeHeightPattern(client, _m(acc, 'net_realized_pnl')), - netRealizedPnlEma1w: createMetricPattern1(client, _m(acc, 'net_realized_pnl_ema_1w')), netRealizedPnlRelToRealizedCap: createBpsPercentRatioPattern(client, _m(acc, 'net_realized_pnl_rel_to_realized_cap')), realizedCap: createMetricPattern1(client, _m(acc, 'realized_cap')), realizedCapCents: createMetricPattern1(client, _m(acc, 'realized_cap_cents')), realizedCapChange1m: createMetricPattern1(client, _m(acc, 'realized_cap_change_1m')), realizedLoss: createCumulativeHeightPattern(client, _m(acc, 'realized_loss')), - realizedLossEma1w: createMetricPattern1(client, _m(acc, 'realized_loss_ema_1w')), realizedLossRelToRealizedCap: createBpsPercentRatioPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')), realizedPrice: createCentsSatsUsdPattern(client, _m(acc, 'realized_price')), realizedPriceRatio: createBpsRatioPattern(client, _m(acc, 'realized_price_ratio')), realizedPriceRatioPercentiles: createRatioPattern(client, _m(acc, 'realized_price_ratio')), realizedProfit: createCumulativeHeightPattern(client, _m(acc, 'realized_profit')), - realizedProfitEma1w: createMetricPattern1(client, _m(acc, 'realized_profit_ema_1w')), realizedProfitRelToRealizedCap: createBpsPercentRatioPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')), sentInLoss: createBaseCumulativePattern(client, _m(acc, 'sent_in_loss')), - sentInLossEma: create_2wPattern(client, _m(acc, 'sent_in_loss_ema_2w')), sentInProfit: createBaseCumulativePattern(client, _m(acc, 'sent_in_profit')), - sentInProfitEma: create_2wPattern(client, _m(acc, 'sent_in_profit_ema_2w')), sopr: create_1m1w1y24hPattern(client, _m(acc, 'sopr')), - sopr24hEma: create_1m1wPattern(client, _m(acc, 'sopr_24h_ema')), valueCreated: createMetricPattern1(client, _m(acc, 'value_created')), valueCreatedSum: create_1m1w1y24hPattern(client, _m(acc, 'value_created')), valueDestroyed: createMetricPattern1(client, _m(acc, 'value_destroyed')), diff --git a/packages/brk_client/brk_client/__init__.py b/packages/brk_client/brk_client/__init__.py index ab7fc0709..e4fd09e47 100644 --- a/packages/brk_client/brk_client/__init__.py +++ b/packages/brk_client/brk_client/__init__.py @@ -2077,7 +2077,6 @@ class CapCapitulationGrossInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentS self.investor_price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'investor_price')) self.investor_price_ratio: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'investor_price_ratio')) self.investor_price_ratio_percentiles: RatioPattern = RatioPattern(client, _m(acc, 'investor_price_ratio')) - self.investor_price_ratio_std_dev: RatioPattern2 = RatioPattern2(client, _m(acc, 'investor_price_ratio')) self.loss_value_created: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'loss_value_created')) self.loss_value_destroyed: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'loss_value_destroyed')) self.lower_price_band: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'lower_price_band')) @@ -2168,26 +2167,20 @@ class GrossMvrvNegNetRealizedSentSoprValuePattern: self.mvrv: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'mvrv')) self.neg_realized_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'neg_realized_loss')) self.net_realized_pnl: CumulativeHeightPattern[CentsSigned] = CumulativeHeightPattern(client, _m(acc, 'net_realized_pnl')) - self.net_realized_pnl_ema_1w: MetricPattern1[CentsSigned] = MetricPattern1(client, _m(acc, 'net_realized_pnl_ema_1w')) self.net_realized_pnl_rel_to_realized_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'net_realized_pnl_rel_to_realized_cap')) self.realized_cap: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'realized_cap')) self.realized_cap_cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'realized_cap_cents')) self.realized_cap_change_1m: MetricPattern1[CentsSigned] = MetricPattern1(client, _m(acc, 'realized_cap_change_1m')) self.realized_loss: CumulativeHeightPattern[Cents] = CumulativeHeightPattern(client, _m(acc, 'realized_loss')) - self.realized_loss_ema_1w: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'realized_loss_ema_1w')) self.realized_loss_rel_to_realized_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')) self.realized_price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'realized_price')) self.realized_price_ratio: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'realized_price_ratio')) self.realized_price_ratio_percentiles: RatioPattern = RatioPattern(client, _m(acc, 'realized_price_ratio')) self.realized_profit: CumulativeHeightPattern[Cents] = CumulativeHeightPattern(client, _m(acc, 'realized_profit')) - self.realized_profit_ema_1w: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'realized_profit_ema_1w')) self.realized_profit_rel_to_realized_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')) self.sent_in_loss: BaseCumulativePattern = BaseCumulativePattern(client, _m(acc, 'sent_in_loss')) - self.sent_in_loss_ema: _2wPattern = _2wPattern(client, _m(acc, 'sent_in_loss_ema_2w')) self.sent_in_profit: BaseCumulativePattern = BaseCumulativePattern(client, _m(acc, 'sent_in_profit')) - self.sent_in_profit_ema: _2wPattern = _2wPattern(client, _m(acc, 'sent_in_profit_ema_2w')) self.sopr: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, _m(acc, 'sopr')) - self.sopr_24h_ema: _1m1wPattern = _1m1wPattern(client, _m(acc, 'sopr_24h_ema')) self.value_created: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'value_created')) self.value_created_sum: _1m1w1y24hPattern[Cents] = _1m1w1y24hPattern(client, _m(acc, 'value_created')) self.value_destroyed: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'value_destroyed'))