mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: snapshot
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,12 +16,12 @@ impl Vecs {
|
|||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.inflation_rate.bps.height.compute_transform2(
|
self.inflation_rate.bps.height.compute_transform2(
|
||||||
starting_indexes.height,
|
starting_indexes.height,
|
||||||
&activity.liveliness.height,
|
&activity.ratio.height,
|
||||||
&supply.inflation_rate.bps.height,
|
&supply.inflation_rate.bps.height,
|
||||||
|(h, liveliness, inflation, ..)| {
|
|(h, a2vr, inflation, ..)| {
|
||||||
(
|
(
|
||||||
h,
|
h,
|
||||||
BasisPointsSigned32::from(f64::from(liveliness) * f64::from(inflation)),
|
BasisPointsSigned32::from(f64::from(a2vr) * f64::from(inflation)),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
exit,
|
exit,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ impl Vecs {
|
|||||||
inflation_rate: PercentPerBlock::forced_import(
|
inflation_rate: PercentPerBlock::forced_import(
|
||||||
db,
|
db,
|
||||||
"cointime_adj_inflation_rate",
|
"cointime_adj_inflation_rate",
|
||||||
version,
|
version + Version::ONE,
|
||||||
indexes,
|
indexes,
|
||||||
)?,
|
)?,
|
||||||
tx_velocity_native: PerBlock::forced_import(
|
tx_velocity_native: PerBlock::forced_import(
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ impl DynCohortVecs for AddrCohortVecs {
|
|||||||
.push(state.addr_count.into());
|
.push(state.addr_count.into());
|
||||||
self.metrics.supply.push_state(&state.inner);
|
self.metrics.supply.push_state(&state.inner);
|
||||||
self.metrics.outputs.push_state(&state.inner);
|
self.metrics.outputs.push_state(&state.inner);
|
||||||
|
self.metrics.activity.push_state(&state.inner);
|
||||||
self.metrics.realized.push_state(&state.inner);
|
self.metrics.realized.push_state(&state.inner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -540,8 +540,7 @@ impl UTXOCohorts<Rw> {
|
|||||||
.age_range
|
.age_range
|
||||||
.under_1h
|
.under_1h
|
||||||
.metrics
|
.metrics
|
||||||
.realized
|
.activity
|
||||||
.minimal
|
|
||||||
.transfer_volume
|
.transfer_volume
|
||||||
.base
|
.base
|
||||||
.cents
|
.cents
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ impl DynCohortVecs for UTXOCohortVecs<MinimalCohortMetrics> {
|
|||||||
if let Some(state) = self.state.as_ref() {
|
if let Some(state) = self.state.as_ref() {
|
||||||
self.metrics.supply.push_state(state);
|
self.metrics.supply.push_state(state);
|
||||||
self.metrics.outputs.push_state(state);
|
self.metrics.outputs.push_state(state);
|
||||||
|
self.metrics.activity.push_state(state);
|
||||||
self.metrics.realized.push_state(state);
|
self.metrics.realized.push_state(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ impl DynCohortVecs for UTXOCohortVecs<TypeCohortMetrics> {
|
|||||||
if let Some(state) = self.state.as_ref() {
|
if let Some(state) = self.state.as_ref() {
|
||||||
self.metrics.supply.push_state(state);
|
self.metrics.supply.push_state(state);
|
||||||
self.metrics.outputs.push_state(state);
|
self.metrics.outputs.push_state(state);
|
||||||
|
self.metrics.activity.push_state(state);
|
||||||
self.metrics.realized.push_state(state);
|
self.metrics.realized.push_state(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
use brk_error::Result;
|
use brk_error::Result;
|
||||||
use brk_traversable::Traversable;
|
use brk_traversable::Traversable;
|
||||||
use brk_types::{Bitcoin, Indexes, StoredF64, Version};
|
use brk_types::{Bitcoin, Indexes, StoredF64, Version};
|
||||||
|
use derive_more::{Deref, DerefMut};
|
||||||
use vecdb::{AnyStoredVec, AnyVec, Exit, Rw, StorageMode, WritableVec};
|
use vecdb::{AnyStoredVec, AnyVec, Exit, Rw, StorageMode, WritableVec};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -9,9 +10,15 @@ use crate::{
|
|||||||
prices,
|
prices,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Traversable)]
|
use super::ActivityMinimal;
|
||||||
|
|
||||||
|
#[derive(Deref, DerefMut, Traversable)]
|
||||||
pub struct ActivityCore<M: StorageMode = Rw> {
|
pub struct ActivityCore<M: StorageMode = Rw> {
|
||||||
pub transfer_volume: AmountPerBlockCumulativeWithSums<M>,
|
#[deref]
|
||||||
|
#[deref_mut]
|
||||||
|
#[traversable(flatten)]
|
||||||
|
pub minimal: ActivityMinimal<M>,
|
||||||
|
|
||||||
pub coindays_destroyed: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
pub coindays_destroyed: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
||||||
#[traversable(wrap = "transfer_volume", rename = "in_profit")]
|
#[traversable(wrap = "transfer_volume", rename = "in_profit")]
|
||||||
pub transfer_volume_in_profit: AmountPerBlockCumulativeWithSums<M>,
|
pub transfer_volume_in_profit: AmountPerBlockCumulativeWithSums<M>,
|
||||||
@@ -23,7 +30,7 @@ impl ActivityCore {
|
|||||||
pub(crate) fn forced_import(cfg: &ImportConfig) -> Result<Self> {
|
pub(crate) fn forced_import(cfg: &ImportConfig) -> Result<Self> {
|
||||||
let v1 = Version::ONE;
|
let v1 = Version::ONE;
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
transfer_volume: cfg.import("transfer_volume", v1)?,
|
minimal: ActivityMinimal::forced_import(cfg)?,
|
||||||
coindays_destroyed: cfg.import("coindays_destroyed", v1)?,
|
coindays_destroyed: cfg.import("coindays_destroyed", v1)?,
|
||||||
transfer_volume_in_profit: cfg.import("transfer_volume_in_profit", v1)?,
|
transfer_volume_in_profit: cfg.import("transfer_volume_in_profit", v1)?,
|
||||||
transfer_volume_in_loss: cfg.import("transfer_volume_in_loss", v1)?,
|
transfer_volume_in_loss: cfg.import("transfer_volume_in_loss", v1)?,
|
||||||
@@ -31,11 +38,8 @@ impl ActivityCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn min_len(&self) -> usize {
|
pub(crate) fn min_len(&self) -> usize {
|
||||||
self.transfer_volume
|
self.minimal
|
||||||
.base
|
.min_len()
|
||||||
.sats
|
|
||||||
.height
|
|
||||||
.len()
|
|
||||||
.min(self.coindays_destroyed.base.height.len())
|
.min(self.coindays_destroyed.base.height.len())
|
||||||
.min(self.transfer_volume_in_profit.base.sats.height.len())
|
.min(self.transfer_volume_in_profit.base.sats.height.len())
|
||||||
.min(self.transfer_volume_in_loss.base.sats.height.len())
|
.min(self.transfer_volume_in_loss.base.sats.height.len())
|
||||||
@@ -46,7 +50,7 @@ impl ActivityCore {
|
|||||||
&mut self,
|
&mut self,
|
||||||
state: &CohortState<impl RealizedOps, impl CostBasisOps>,
|
state: &CohortState<impl RealizedOps, impl CostBasisOps>,
|
||||||
) {
|
) {
|
||||||
self.transfer_volume.base.sats.height.push(state.sent);
|
self.minimal.push_state(state);
|
||||||
self.coindays_destroyed.base.height.push(
|
self.coindays_destroyed.base.height.push(
|
||||||
StoredF64::from(Bitcoin::from(state.satdays_destroyed)),
|
StoredF64::from(Bitcoin::from(state.satdays_destroyed)),
|
||||||
);
|
);
|
||||||
@@ -63,15 +67,13 @@ impl ActivityCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
||||||
vec![
|
let mut vecs = self.minimal.collect_vecs_mut();
|
||||||
&mut self.transfer_volume.base.sats.height as &mut dyn AnyStoredVec,
|
vecs.push(&mut self.coindays_destroyed.base.height);
|
||||||
&mut self.transfer_volume.base.cents.height,
|
vecs.push(&mut self.transfer_volume_in_profit.base.sats.height);
|
||||||
&mut self.coindays_destroyed.base.height,
|
vecs.push(&mut self.transfer_volume_in_profit.base.cents.height);
|
||||||
&mut self.transfer_volume_in_profit.base.sats.height,
|
vecs.push(&mut self.transfer_volume_in_loss.base.sats.height);
|
||||||
&mut self.transfer_volume_in_profit.base.cents.height,
|
vecs.push(&mut self.transfer_volume_in_loss.base.cents.height);
|
||||||
&mut self.transfer_volume_in_loss.base.sats.height,
|
vecs
|
||||||
&mut self.transfer_volume_in_loss.base.cents.height,
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn validate_computed_versions(&mut self, _base_version: Version) -> Result<()> {
|
pub(crate) fn validate_computed_versions(&mut self, _base_version: Version) -> Result<()> {
|
||||||
@@ -84,14 +86,9 @@ impl ActivityCore {
|
|||||||
others: &[&Self],
|
others: &[&Self],
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.transfer_volume.base.sats.height.compute_sum_of_others(
|
let minimal_refs: Vec<&ActivityMinimal> = others.iter().map(|o| &o.minimal).collect();
|
||||||
starting_indexes.height,
|
self.minimal
|
||||||
&others
|
.compute_from_stateful(starting_indexes, &minimal_refs, exit)?;
|
||||||
.iter()
|
|
||||||
.map(|v| &v.transfer_volume.base.sats.height)
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
exit,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
sum_others!(self, starting_indexes, others, exit; coindays_destroyed.base.height);
|
sum_others!(self, starting_indexes, others, exit; coindays_destroyed.base.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_profit.base.sats.height);
|
||||||
@@ -106,8 +103,8 @@ impl ActivityCore {
|
|||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.transfer_volume
|
self.minimal
|
||||||
.compute_rest(starting_indexes.height, prices, exit)?;
|
.compute_rest_part1(prices, starting_indexes, exit)?;
|
||||||
self.coindays_destroyed
|
self.coindays_destroyed
|
||||||
.compute_rest(starting_indexes.height, exit)?;
|
.compute_rest(starting_indexes.height, exit)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
use brk_error::Result;
|
use brk_error::Result;
|
||||||
use brk_traversable::Traversable;
|
use brk_traversable::Traversable;
|
||||||
use brk_types::{Bitcoin, Indexes, StoredF32, StoredF64, Version};
|
use brk_types::{Indexes, StoredF32, StoredF64, Version};
|
||||||
use derive_more::{Deref, DerefMut};
|
use derive_more::{Deref, DerefMut};
|
||||||
use vecdb::{AnyStoredVec, Exit, ReadableCloneableVec, Rw, StorageMode};
|
use vecdb::{AnyStoredVec, Exit, ReadableCloneableVec, Rw, StorageMode};
|
||||||
|
|
||||||
use crate::internal::{Identity, LazyPerBlock, PerBlock};
|
use crate::internal::{Identity, LazyPerBlock, PerBlock, Windows};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
distribution::{metrics::ImportConfig, state::{CohortState, CostBasisOps, RealizedOps}},
|
distribution::{metrics::ImportConfig, state::{CohortState, CostBasisOps, RealizedOps}},
|
||||||
@@ -22,7 +22,7 @@ pub struct ActivityFull<M: StorageMode = Rw> {
|
|||||||
|
|
||||||
pub coinyears_destroyed: LazyPerBlock<StoredF64, StoredF64>,
|
pub coinyears_destroyed: LazyPerBlock<StoredF64, StoredF64>,
|
||||||
|
|
||||||
pub dormancy: PerBlock<StoredF32, M>,
|
pub dormancy: Windows<PerBlock<StoredF32, M>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActivityFull {
|
impl ActivityFull {
|
||||||
@@ -37,10 +37,19 @@ impl ActivityFull {
|
|||||||
cfg.indexes,
|
cfg.indexes,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let dormancy = Windows::try_from_fn(|suffix| {
|
||||||
|
PerBlock::forced_import(
|
||||||
|
cfg.db,
|
||||||
|
&cfg.name(&format!("dormancy_{suffix}")),
|
||||||
|
cfg.version + v1,
|
||||||
|
cfg.indexes,
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
inner,
|
inner,
|
||||||
coinyears_destroyed,
|
coinyears_destroyed,
|
||||||
dormancy: cfg.import("dormancy", v1)?,
|
dormancy,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +67,9 @@ impl ActivityFull {
|
|||||||
|
|
||||||
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
||||||
let mut vecs = self.inner.collect_vecs_mut();
|
let mut vecs = self.inner.collect_vecs_mut();
|
||||||
vecs.push(&mut self.dormancy.height);
|
for d in self.dormancy.as_mut_array() {
|
||||||
|
vecs.push(&mut d.height);
|
||||||
|
}
|
||||||
vecs
|
vecs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,20 +97,28 @@ impl ActivityFull {
|
|||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.dormancy.height.compute_transform2(
|
for ((dormancy, cdd_sum), tv_sum) in self
|
||||||
|
.dormancy
|
||||||
|
.as_mut_array()
|
||||||
|
.into_iter()
|
||||||
|
.zip(self.inner.coindays_destroyed.sum.as_array())
|
||||||
|
.zip(self.inner.minimal.transfer_volume.sum.0.as_array())
|
||||||
|
{
|
||||||
|
dormancy.height.compute_transform2(
|
||||||
starting_indexes.height,
|
starting_indexes.height,
|
||||||
&self.inner.coindays_destroyed.base.height,
|
&cdd_sum.height,
|
||||||
&self.inner.transfer_volume.base.sats.height,
|
&tv_sum.btc.height,
|
||||||
|(i, cdd, sent_sats, ..)| {
|
|(i, rolling_cdd, rolling_btc, ..)| {
|
||||||
let sent_btc = f64::from(Bitcoin::from(sent_sats));
|
let btc = f64::from(rolling_btc);
|
||||||
if sent_btc == 0.0 {
|
if btc == 0.0 {
|
||||||
(i, StoredF32::from(0.0f32))
|
(i, StoredF32::from(0.0f32))
|
||||||
} else {
|
} else {
|
||||||
(i, StoredF32::from((f64::from(cdd) / sent_btc) as f32))
|
(i, StoredF32::from((f64::from(rolling_cdd) / btc) as f32))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
use brk_error::Result;
|
||||||
|
use brk_traversable::Traversable;
|
||||||
|
use brk_types::{Indexes, Version};
|
||||||
|
use vecdb::{AnyStoredVec, AnyVec, Exit, Rw, StorageMode, WritableVec};
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
distribution::{metrics::ImportConfig, state::{CohortState, CostBasisOps, RealizedOps}},
|
||||||
|
internal::AmountPerBlockCumulativeWithSums,
|
||||||
|
prices,
|
||||||
|
};
|
||||||
|
|
||||||
|
#[derive(Traversable)]
|
||||||
|
pub struct ActivityMinimal<M: StorageMode = Rw> {
|
||||||
|
pub transfer_volume: AmountPerBlockCumulativeWithSums<M>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ActivityMinimal {
|
||||||
|
pub(crate) fn forced_import(cfg: &ImportConfig) -> Result<Self> {
|
||||||
|
let v1 = Version::ONE;
|
||||||
|
Ok(Self {
|
||||||
|
transfer_volume: cfg.import("transfer_volume", v1)?,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn min_len(&self) -> usize {
|
||||||
|
self.transfer_volume
|
||||||
|
.base
|
||||||
|
.sats
|
||||||
|
.height
|
||||||
|
.len()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub(crate) fn push_state(
|
||||||
|
&mut self,
|
||||||
|
state: &CohortState<impl RealizedOps, impl CostBasisOps>,
|
||||||
|
) {
|
||||||
|
self.transfer_volume.base.sats.height.push(state.sent);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
||||||
|
vec![
|
||||||
|
&mut self.transfer_volume.base.sats.height as &mut dyn AnyStoredVec,
|
||||||
|
&mut self.transfer_volume.base.cents.height,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn compute_from_stateful(
|
||||||
|
&mut self,
|
||||||
|
starting_indexes: &Indexes,
|
||||||
|
others: &[&Self],
|
||||||
|
exit: &Exit,
|
||||||
|
) -> Result<()> {
|
||||||
|
self.transfer_volume.base.sats.height.compute_sum_of_others(
|
||||||
|
starting_indexes.height,
|
||||||
|
&others
|
||||||
|
.iter()
|
||||||
|
.map(|v| &v.transfer_volume.base.sats.height)
|
||||||
|
.collect::<Vec<_>>(),
|
||||||
|
exit,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn compute_rest_part1(
|
||||||
|
&mut self,
|
||||||
|
prices: &prices::Vecs,
|
||||||
|
starting_indexes: &Indexes,
|
||||||
|
exit: &Exit,
|
||||||
|
) -> Result<()> {
|
||||||
|
self.transfer_volume
|
||||||
|
.compute_rest(starting_indexes.height, prices, exit)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
mod core;
|
mod core;
|
||||||
mod full;
|
mod full;
|
||||||
|
mod minimal;
|
||||||
|
|
||||||
pub use self::core::ActivityCore;
|
pub use self::core::ActivityCore;
|
||||||
pub use full::ActivityFull;
|
pub use full::ActivityFull;
|
||||||
|
pub use minimal::ActivityMinimal;
|
||||||
|
|
||||||
use brk_error::Result;
|
use brk_error::Result;
|
||||||
use brk_types::{Indexes, Version};
|
use brk_types::{Indexes, Version};
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ impl AllCohortMetrics {
|
|||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.supply.total.btc.height,
|
&self.supply.total.btc.height,
|
||||||
height_to_market_cap,
|
height_to_market_cap,
|
||||||
|
&self.activity.transfer_volume,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
@@ -128,7 +129,7 @@ impl AllCohortMetrics {
|
|||||||
|
|
||||||
self.asopr.compute_rest_part2(
|
self.asopr.compute_rest_part2(
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.realized.minimal.transfer_volume.base.cents.height,
|
&self.activity.transfer_volume.base.cents.height,
|
||||||
&self.realized.core.sopr.value_destroyed.base.height,
|
&self.realized.core.sopr.value_destroyed.base.height,
|
||||||
under_1h_value_created,
|
under_1h_value_created,
|
||||||
under_1h_value_destroyed,
|
under_1h_value_destroyed,
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ impl BasicCohortMetrics {
|
|||||||
prices,
|
prices,
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.supply.total.btc.height,
|
&self.supply.total.btc.height,
|
||||||
|
&self.activity.transfer_volume.sum._24h.cents.height,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ impl CoreCohortMetrics {
|
|||||||
vecs
|
vecs
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Aggregate Core-tier fields from CohortMetricsBase sources (e.g. age_range → under_age/over_age).
|
/// Aggregate Core-tier fields from CohortMetricsBase sources (e.g. age_range -> under_age/over_age).
|
||||||
pub(crate) fn compute_from_base_sources<T: CohortMetricsBase>(
|
pub(crate) fn compute_from_base_sources<T: CohortMetricsBase>(
|
||||||
&mut self,
|
&mut self,
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
@@ -114,7 +114,7 @@ impl CoreCohortMetrics {
|
|||||||
.compute_sent_profitability(prices, starting_indexes, exit)?;
|
.compute_sent_profitability(prices, starting_indexes, exit)?;
|
||||||
|
|
||||||
self.realized
|
self.realized
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
.compute_rest_part1(starting_indexes, exit)?;
|
||||||
|
|
||||||
self.unrealized.compute_rest(starting_indexes, exit)?;
|
self.unrealized.compute_rest(starting_indexes, exit)?;
|
||||||
|
|
||||||
@@ -132,6 +132,7 @@ impl CoreCohortMetrics {
|
|||||||
prices,
|
prices,
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.supply.total.btc.height,
|
&self.supply.total.btc.height,
|
||||||
|
&self.activity.transfer_volume.sum._24h.cents.height,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ impl ExtendedCohortMetrics {
|
|||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.supply.total.btc.height,
|
&self.supply.total.btc.height,
|
||||||
height_to_market_cap,
|
height_to_market_cap,
|
||||||
|
&self.activity.transfer_volume,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ impl ExtendedAdjustedCohortMetrics {
|
|||||||
|
|
||||||
self.asopr.compute_rest_part2(
|
self.asopr.compute_rest_part2(
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
&self.inner.realized.minimal.transfer_volume.base.cents.height,
|
&self.inner.activity.transfer_volume.base.cents.height,
|
||||||
&self.inner.realized.core.sopr.value_destroyed.base.height,
|
&self.inner.realized.core.sopr.value_destroyed.base.height,
|
||||||
under_1h_value_created,
|
under_1h_value_created,
|
||||||
under_1h_value_destroyed,
|
under_1h_value_destroyed,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use vecdb::{AnyStoredVec, Exit, Rw, StorageMode};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
distribution::metrics::{
|
distribution::metrics::{
|
||||||
ImportConfig, OutputsBase, RealizedMinimal, SupplyBase, UnrealizedMinimal,
|
ActivityMinimal, ImportConfig, OutputsBase, RealizedMinimal, SupplyBase, UnrealizedMinimal,
|
||||||
},
|
},
|
||||||
prices,
|
prices,
|
||||||
};
|
};
|
||||||
@@ -21,6 +21,7 @@ pub struct MinimalCohortMetrics<M: StorageMode = Rw> {
|
|||||||
pub filter: Filter,
|
pub filter: Filter,
|
||||||
pub supply: Box<SupplyBase<M>>,
|
pub supply: Box<SupplyBase<M>>,
|
||||||
pub outputs: Box<OutputsBase<M>>,
|
pub outputs: Box<OutputsBase<M>>,
|
||||||
|
pub activity: Box<ActivityMinimal<M>>,
|
||||||
pub realized: Box<RealizedMinimal<M>>,
|
pub realized: Box<RealizedMinimal<M>>,
|
||||||
pub unrealized: Box<UnrealizedMinimal<M>>,
|
pub unrealized: Box<UnrealizedMinimal<M>>,
|
||||||
}
|
}
|
||||||
@@ -31,6 +32,7 @@ impl MinimalCohortMetrics {
|
|||||||
filter: cfg.filter.clone(),
|
filter: cfg.filter.clone(),
|
||||||
supply: Box::new(SupplyBase::forced_import(cfg)?),
|
supply: Box::new(SupplyBase::forced_import(cfg)?),
|
||||||
outputs: Box::new(OutputsBase::forced_import(cfg)?),
|
outputs: Box::new(OutputsBase::forced_import(cfg)?),
|
||||||
|
activity: Box::new(ActivityMinimal::forced_import(cfg)?),
|
||||||
realized: Box::new(RealizedMinimal::forced_import(cfg)?),
|
realized: Box::new(RealizedMinimal::forced_import(cfg)?),
|
||||||
unrealized: Box::new(UnrealizedMinimal::forced_import(cfg)?),
|
unrealized: Box::new(UnrealizedMinimal::forced_import(cfg)?),
|
||||||
})
|
})
|
||||||
@@ -40,6 +42,7 @@ impl MinimalCohortMetrics {
|
|||||||
self.supply
|
self.supply
|
||||||
.min_len()
|
.min_len()
|
||||||
.min(self.outputs.min_len())
|
.min(self.outputs.min_len())
|
||||||
|
.min(self.activity.min_len())
|
||||||
.min(self.realized.min_stateful_len())
|
.min(self.realized.min_stateful_len())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +50,7 @@ impl MinimalCohortMetrics {
|
|||||||
let mut vecs: Vec<&mut dyn AnyStoredVec> = Vec::new();
|
let mut vecs: Vec<&mut dyn AnyStoredVec> = Vec::new();
|
||||||
vecs.extend(self.supply.collect_vecs_mut());
|
vecs.extend(self.supply.collect_vecs_mut());
|
||||||
vecs.extend(self.outputs.collect_vecs_mut());
|
vecs.extend(self.outputs.collect_vecs_mut());
|
||||||
|
vecs.extend(self.activity.collect_vecs_mut());
|
||||||
vecs.extend(self.realized.collect_vecs_mut());
|
vecs.extend(self.realized.collect_vecs_mut());
|
||||||
vecs
|
vecs
|
||||||
}
|
}
|
||||||
@@ -71,6 +75,14 @@ impl MinimalCohortMetrics {
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
self.activity.compute_from_stateful(
|
||||||
|
starting_indexes,
|
||||||
|
&others
|
||||||
|
.iter()
|
||||||
|
.map(|v| v.activity.as_ref())
|
||||||
|
.collect::<Vec<_>>(),
|
||||||
|
exit,
|
||||||
|
)?;
|
||||||
self.realized.compute_from_stateful(
|
self.realized.compute_from_stateful(
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
&others
|
&others
|
||||||
@@ -89,8 +101,10 @@ impl MinimalCohortMetrics {
|
|||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.supply.compute(prices, starting_indexes.height, exit)?;
|
self.supply.compute(prices, starting_indexes.height, exit)?;
|
||||||
self.realized
|
self.activity
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
.compute_rest_part1(prices, starting_indexes, exit)?;
|
||||||
|
self.realized
|
||||||
|
.compute_rest_part1(starting_indexes, exit)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use vecdb::{AnyStoredVec, Exit, Rw, StorageMode};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
distribution::metrics::{
|
distribution::metrics::{
|
||||||
ImportConfig, OutputsBase, RealizedMinimal, SupplyCore, UnrealizedBasic,
|
ActivityMinimal, ImportConfig, OutputsBase, RealizedMinimal, SupplyCore, UnrealizedBasic,
|
||||||
},
|
},
|
||||||
prices,
|
prices,
|
||||||
};
|
};
|
||||||
@@ -20,6 +20,7 @@ pub struct TypeCohortMetrics<M: StorageMode = Rw> {
|
|||||||
pub filter: Filter,
|
pub filter: Filter,
|
||||||
pub supply: Box<SupplyCore<M>>,
|
pub supply: Box<SupplyCore<M>>,
|
||||||
pub outputs: Box<OutputsBase<M>>,
|
pub outputs: Box<OutputsBase<M>>,
|
||||||
|
pub activity: Box<ActivityMinimal<M>>,
|
||||||
pub realized: Box<RealizedMinimal<M>>,
|
pub realized: Box<RealizedMinimal<M>>,
|
||||||
pub unrealized: Box<UnrealizedBasic<M>>,
|
pub unrealized: Box<UnrealizedBasic<M>>,
|
||||||
}
|
}
|
||||||
@@ -30,6 +31,7 @@ impl TypeCohortMetrics {
|
|||||||
filter: cfg.filter.clone(),
|
filter: cfg.filter.clone(),
|
||||||
supply: Box::new(SupplyCore::forced_import(cfg)?),
|
supply: Box::new(SupplyCore::forced_import(cfg)?),
|
||||||
outputs: Box::new(OutputsBase::forced_import(cfg)?),
|
outputs: Box::new(OutputsBase::forced_import(cfg)?),
|
||||||
|
activity: Box::new(ActivityMinimal::forced_import(cfg)?),
|
||||||
realized: Box::new(RealizedMinimal::forced_import(cfg)?),
|
realized: Box::new(RealizedMinimal::forced_import(cfg)?),
|
||||||
unrealized: Box::new(UnrealizedBasic::forced_import(cfg)?),
|
unrealized: Box::new(UnrealizedBasic::forced_import(cfg)?),
|
||||||
})
|
})
|
||||||
@@ -39,6 +41,7 @@ impl TypeCohortMetrics {
|
|||||||
self.supply
|
self.supply
|
||||||
.min_len()
|
.min_len()
|
||||||
.min(self.outputs.min_len())
|
.min(self.outputs.min_len())
|
||||||
|
.min(self.activity.min_len())
|
||||||
.min(self.realized.min_stateful_len())
|
.min(self.realized.min_stateful_len())
|
||||||
.min(self.unrealized.min_stateful_len())
|
.min(self.unrealized.min_stateful_len())
|
||||||
}
|
}
|
||||||
@@ -47,6 +50,7 @@ impl TypeCohortMetrics {
|
|||||||
let mut vecs: Vec<&mut dyn AnyStoredVec> = Vec::new();
|
let mut vecs: Vec<&mut dyn AnyStoredVec> = Vec::new();
|
||||||
vecs.extend(self.supply.collect_vecs_mut());
|
vecs.extend(self.supply.collect_vecs_mut());
|
||||||
vecs.extend(self.outputs.collect_vecs_mut());
|
vecs.extend(self.outputs.collect_vecs_mut());
|
||||||
|
vecs.extend(self.activity.collect_vecs_mut());
|
||||||
vecs.extend(self.realized.collect_vecs_mut());
|
vecs.extend(self.realized.collect_vecs_mut());
|
||||||
vecs.extend(self.unrealized.collect_vecs_mut());
|
vecs.extend(self.unrealized.collect_vecs_mut());
|
||||||
vecs
|
vecs
|
||||||
@@ -59,8 +63,10 @@ impl TypeCohortMetrics {
|
|||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.supply.compute(prices, starting_indexes.height, exit)?;
|
self.supply.compute(prices, starting_indexes.height, exit)?;
|
||||||
self.realized
|
self.activity
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
.compute_rest_part1(prices, starting_indexes, exit)?;
|
||||||
|
self.realized
|
||||||
|
.compute_rest_part1(starting_indexes, exit)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ mod relative;
|
|||||||
mod supply;
|
mod supply;
|
||||||
mod unrealized;
|
mod unrealized;
|
||||||
|
|
||||||
pub use activity::{ActivityCore, ActivityFull, ActivityLike};
|
pub use activity::{ActivityCore, ActivityFull, ActivityLike, ActivityMinimal};
|
||||||
pub use cohort::{
|
pub use cohort::{
|
||||||
AllCohortMetrics, BasicCohortMetrics, CoreCohortMetrics, ExtendedAdjustedCohortMetrics,
|
AllCohortMetrics, BasicCohortMetrics, CoreCohortMetrics, ExtendedAdjustedCohortMetrics,
|
||||||
ExtendedCohortMetrics, MinimalCohortMetrics, TypeCohortMetrics,
|
ExtendedCohortMetrics, MinimalCohortMetrics, TypeCohortMetrics,
|
||||||
@@ -228,7 +228,7 @@ pub trait CohortMetricsBase:
|
|||||||
.compute_sent_profitability(prices, starting_indexes, exit)?;
|
.compute_sent_profitability(prices, starting_indexes, exit)?;
|
||||||
|
|
||||||
self.realized_mut()
|
self.realized_mut()
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
.compute_rest_part1(starting_indexes, exit)?;
|
||||||
|
|
||||||
self.unrealized_mut()
|
self.unrealized_mut()
|
||||||
.compute_rest(prices, starting_indexes, exit)?;
|
.compute_rest(prices, starting_indexes, exit)?;
|
||||||
|
|||||||
@@ -132,12 +132,11 @@ impl RealizedCore {
|
|||||||
|
|
||||||
pub(crate) fn compute_rest_part1(
|
pub(crate) fn compute_rest_part1(
|
||||||
&mut self,
|
&mut self,
|
||||||
prices: &prices::Vecs,
|
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.minimal
|
self.minimal
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
.compute_rest_part1(starting_indexes, exit)?;
|
||||||
|
|
||||||
self.sopr
|
self.sopr
|
||||||
.value_destroyed
|
.value_destroyed
|
||||||
@@ -164,6 +163,7 @@ impl RealizedCore {
|
|||||||
prices: &prices::Vecs,
|
prices: &prices::Vecs,
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
height_to_supply: &impl ReadableVec<Height, Bitcoin>,
|
height_to_supply: &impl ReadableVec<Height, Bitcoin>,
|
||||||
|
transfer_volume_sum_24h_cents: &impl ReadableVec<Height, Cents>,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.minimal
|
self.minimal
|
||||||
@@ -177,7 +177,7 @@ impl RealizedCore {
|
|||||||
._24h
|
._24h
|
||||||
.compute_binary::<Cents, Cents, RatioCents64>(
|
.compute_binary::<Cents, Cents, RatioCents64>(
|
||||||
starting_indexes.height,
|
starting_indexes.height,
|
||||||
&self.minimal.transfer_volume.sum._24h.cents.height,
|
transfer_volume_sum_24h_cents,
|
||||||
&self.sopr.value_destroyed.sum._24h.height,
|
&self.sopr.value_destroyed.sum._24h.height,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|||||||
@@ -5,18 +5,14 @@ use brk_types::{
|
|||||||
Dollars, Height, Indexes, StoredF64, Version,
|
Dollars, Height, Indexes, StoredF64, Version,
|
||||||
};
|
};
|
||||||
use derive_more::{Deref, DerefMut};
|
use derive_more::{Deref, DerefMut};
|
||||||
use vecdb::{
|
use vecdb::{AnyStoredVec, AnyVec, BytesVec, Exit, ReadableVec, Rw, StorageMode, WritableVec};
|
||||||
AnyStoredVec, AnyVec, BytesVec, Exit, ReadableVec, Rw, StorageMode,
|
|
||||||
WritableVec,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
blocks,
|
blocks,
|
||||||
distribution::state::{WithCapital, CohortState, CostBasisData, RealizedState},
|
distribution::state::{CohortState, CostBasisData, RealizedState, WithCapital},
|
||||||
internal::{
|
internal::{
|
||||||
FiatPerBlockCumulativeWithSums,
|
AmountPerBlockCumulativeWithSums, FiatPerBlockCumulativeWithSums, PercentPerBlock,
|
||||||
PercentPerBlock, PercentRollingWindows,
|
PercentRollingWindows, PriceWithRatioExtendedPerBlock, RatioCents64, RatioCentsBp32,
|
||||||
PriceWithRatioExtendedPerBlock, RatioCents64, RatioCentsBp32,
|
|
||||||
RatioCentsSignedCentsBps32, RatioCentsSignedDollarsBps32, RatioDollarsBp32,
|
RatioCentsSignedCentsBps32, RatioCentsSignedDollarsBps32, RatioDollarsBp32,
|
||||||
RatioPerBlockPercentiles, RatioPerBlockStdDevBands, RatioSma, RollingWindows,
|
RatioPerBlockPercentiles, RatioPerBlockStdDevBands, RatioSma, RollingWindows,
|
||||||
RollingWindowsFrom1w,
|
RollingWindowsFrom1w,
|
||||||
@@ -119,12 +115,9 @@ impl RealizedFull {
|
|||||||
|
|
||||||
// Net PnL
|
// Net PnL
|
||||||
let net_pnl = RealizedNetPnl {
|
let net_pnl = RealizedNetPnl {
|
||||||
to_rcap: cfg
|
to_rcap: cfg.import("net_realized_pnl_to_rcap", Version::new(2))?,
|
||||||
.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_rcap: cfg
|
change_1m_to_mcap: cfg.import("net_pnl_change_1m_to_mcap", Version::new(4))?,
|
||||||
.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
|
// SOPR
|
||||||
@@ -135,8 +128,7 @@ impl RealizedFull {
|
|||||||
// Peak regret
|
// Peak regret
|
||||||
let peak_regret = RealizedPeakRegret {
|
let peak_regret = RealizedPeakRegret {
|
||||||
value: cfg.import("realized_peak_regret", Version::new(2))?,
|
value: cfg.import("realized_peak_regret", Version::new(2))?,
|
||||||
to_rcap: cfg
|
to_rcap: cfg.import("realized_peak_regret_to_rcap", Version::new(2))?,
|
||||||
.import("realized_peak_regret_to_rcap", Version::new(2))?,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Investor
|
// Investor
|
||||||
@@ -184,7 +176,11 @@ impl RealizedFull {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn min_stateful_len(&self) -> usize {
|
pub(crate) fn min_stateful_len(&self) -> usize {
|
||||||
self.investor.price.cents.height.len()
|
self.investor
|
||||||
|
.price
|
||||||
|
.cents
|
||||||
|
.height
|
||||||
|
.len()
|
||||||
.min(self.cap_raw.len())
|
.min(self.cap_raw.len())
|
||||||
.min(self.investor.cap_raw.len())
|
.min(self.investor.cap_raw.len())
|
||||||
.min(self.peak_regret.value.base.cents.height.len())
|
.min(self.peak_regret.value.base.cents.height.len())
|
||||||
@@ -201,8 +197,7 @@ impl RealizedFull {
|
|||||||
.cents
|
.cents
|
||||||
.height
|
.height
|
||||||
.push(state.realized.investor_price());
|
.push(state.realized.investor_price());
|
||||||
self.cap_raw
|
self.cap_raw.push(state.realized.cap_raw());
|
||||||
.push(state.realized.cap_raw());
|
|
||||||
self.investor
|
self.investor
|
||||||
.cap_raw
|
.cap_raw
|
||||||
.push(state.realized.investor_cap_raw());
|
.push(state.realized.investor_cap_raw());
|
||||||
@@ -236,15 +231,9 @@ impl RealizedFull {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub(crate) fn push_accum(
|
pub(crate) fn push_accum(&mut self, accum: &RealizedFullAccum) {
|
||||||
&mut self,
|
self.cap_raw.push(accum.cap_raw);
|
||||||
accum: &RealizedFullAccum,
|
self.investor.cap_raw.push(accum.investor_cap_raw);
|
||||||
) {
|
|
||||||
self.cap_raw
|
|
||||||
.push(accum.cap_raw);
|
|
||||||
self.investor
|
|
||||||
.cap_raw
|
|
||||||
.push(accum.investor_cap_raw);
|
|
||||||
|
|
||||||
let investor_price = {
|
let investor_price = {
|
||||||
let cap = accum.cap_raw.as_u128();
|
let cap = accum.cap_raw.as_u128();
|
||||||
@@ -254,11 +243,7 @@ impl RealizedFull {
|
|||||||
Cents::new((accum.investor_cap_raw / cap) as u64)
|
Cents::new((accum.investor_cap_raw / cap) as u64)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.investor
|
self.investor.price.cents.height.push(investor_price);
|
||||||
.price
|
|
||||||
.cents
|
|
||||||
.height
|
|
||||||
.push(investor_price);
|
|
||||||
|
|
||||||
self.peak_regret
|
self.peak_regret
|
||||||
.value
|
.value
|
||||||
@@ -270,12 +255,10 @@ impl RealizedFull {
|
|||||||
|
|
||||||
pub(crate) fn compute_rest_part1(
|
pub(crate) fn compute_rest_part1(
|
||||||
&mut self,
|
&mut self,
|
||||||
prices: &prices::Vecs,
|
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.core
|
self.core.compute_rest_part1(starting_indexes, exit)?;
|
||||||
.compute_rest_part1(prices, starting_indexes, exit)?;
|
|
||||||
|
|
||||||
self.peak_regret
|
self.peak_regret
|
||||||
.value
|
.value
|
||||||
@@ -283,6 +266,7 @@ impl RealizedFull {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub(crate) fn compute_rest_part2(
|
pub(crate) fn compute_rest_part2(
|
||||||
&mut self,
|
&mut self,
|
||||||
blocks: &blocks::Vecs,
|
blocks: &blocks::Vecs,
|
||||||
@@ -290,22 +274,24 @@ impl RealizedFull {
|
|||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
height_to_supply: &impl ReadableVec<Height, Bitcoin>,
|
height_to_supply: &impl ReadableVec<Height, Bitcoin>,
|
||||||
height_to_market_cap: &impl ReadableVec<Height, Dollars>,
|
height_to_market_cap: &impl ReadableVec<Height, Dollars>,
|
||||||
|
activity_transfer_volume: &AmountPerBlockCumulativeWithSums,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.core.compute_rest_part2(
|
self.core.compute_rest_part2(
|
||||||
prices,
|
prices,
|
||||||
starting_indexes,
|
starting_indexes,
|
||||||
height_to_supply,
|
height_to_supply,
|
||||||
|
&activity_transfer_volume.sum._24h.cents.height,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// SOPR ratios from lazy rolling sums
|
// SOPR ratios from lazy rolling sums (1w, 1m, 1y)
|
||||||
for ((sopr, vc), vd) in self
|
for ((sopr, vc), vd) in self
|
||||||
.sopr
|
.sopr
|
||||||
.ratio_extended
|
.ratio_extended
|
||||||
.as_mut_array()
|
.as_mut_array()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.zip(self.core.minimal.transfer_volume.sum.0.as_array()[1..].iter())
|
.zip(activity_transfer_volume.sum.0.as_array()[1..].iter())
|
||||||
.zip(self.core.sopr.value_destroyed.sum.as_array()[1..].iter())
|
.zip(self.core.sopr.value_destroyed.sum.as_array()[1..].iter())
|
||||||
{
|
{
|
||||||
sopr.compute_binary::<Cents, Cents, RatioCents64>(
|
sopr.compute_binary::<Cents, Cents, RatioCents64>(
|
||||||
@@ -349,8 +335,7 @@ impl RealizedFull {
|
|||||||
&self.core.minimal.loss.base.cents.height,
|
&self.core.minimal.loss.base.cents.height,
|
||||||
exit,
|
exit,
|
||||||
)?;
|
)?;
|
||||||
self.gross_pnl
|
self.gross_pnl.compute_rest(starting_indexes.height, exit)?;
|
||||||
.compute_rest(starting_indexes.height, exit)?;
|
|
||||||
|
|
||||||
// Net PnL 1m change relative to rcap and mcap
|
// Net PnL 1m change relative to rcap and mcap
|
||||||
self.net_pnl
|
self.net_pnl
|
||||||
@@ -381,11 +366,9 @@ impl RealizedFull {
|
|||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Investor price ratio, percentiles and bands
|
// Investor price ratio, percentiles and bands
|
||||||
self.investor.price.compute_rest(
|
self.investor
|
||||||
prices,
|
.price
|
||||||
starting_indexes,
|
.compute_rest(prices, starting_indexes, exit)?;
|
||||||
exit,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
// Sell-side risk ratios
|
// Sell-side risk ratios
|
||||||
for (ssrr, rv) in self
|
for (ssrr, rv) in self
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use vecdb::{
|
|||||||
use crate::{
|
use crate::{
|
||||||
distribution::state::{CohortState, CostBasisOps, RealizedOps},
|
distribution::state::{CohortState, CostBasisOps, RealizedOps},
|
||||||
internal::{
|
internal::{
|
||||||
AmountPerBlockCumulativeWithSums, FiatPerBlockCumulativeWithSums,
|
FiatPerBlockCumulativeWithSums,
|
||||||
FiatPerBlockWithDeltas, Identity, LazyPerBlock, PriceWithRatioPerBlock,
|
FiatPerBlockWithDeltas, Identity, LazyPerBlock, PriceWithRatioPerBlock,
|
||||||
},
|
},
|
||||||
prices,
|
prices,
|
||||||
@@ -26,8 +26,6 @@ pub struct RealizedMinimal<M: StorageMode = Rw> {
|
|||||||
pub loss: FiatPerBlockCumulativeWithSums<Cents, M>,
|
pub loss: FiatPerBlockCumulativeWithSums<Cents, M>,
|
||||||
pub price: PriceWithRatioPerBlock<M>,
|
pub price: PriceWithRatioPerBlock<M>,
|
||||||
pub mvrv: LazyPerBlock<StoredF32>,
|
pub mvrv: LazyPerBlock<StoredF32>,
|
||||||
|
|
||||||
pub transfer_volume: AmountPerBlockCumulativeWithSums<M>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RealizedMinimal {
|
impl RealizedMinimal {
|
||||||
@@ -50,21 +48,12 @@ impl RealizedMinimal {
|
|||||||
&price.ratio,
|
&price.ratio,
|
||||||
);
|
);
|
||||||
|
|
||||||
let transfer_volume = AmountPerBlockCumulativeWithSums::forced_import(
|
|
||||||
cfg.db,
|
|
||||||
&cfg.name("transfer_volume"),
|
|
||||||
cfg.version,
|
|
||||||
cfg.indexes,
|
|
||||||
cfg.cached_starts,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
cap,
|
cap,
|
||||||
profit: cfg.import("realized_profit", v1)?,
|
profit: cfg.import("realized_profit", v1)?,
|
||||||
loss: cfg.import("realized_loss", v1)?,
|
loss: cfg.import("realized_loss", v1)?,
|
||||||
price,
|
price,
|
||||||
mvrv,
|
mvrv,
|
||||||
transfer_volume,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +64,6 @@ impl RealizedMinimal {
|
|||||||
.len()
|
.len()
|
||||||
.min(self.profit.base.cents.height.len())
|
.min(self.profit.base.cents.height.len())
|
||||||
.min(self.loss.base.cents.height.len())
|
.min(self.loss.base.cents.height.len())
|
||||||
.min(self.transfer_volume.base.sats.height.len())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@@ -83,7 +71,6 @@ impl RealizedMinimal {
|
|||||||
self.cap.cents.height.push(state.realized.cap());
|
self.cap.cents.height.push(state.realized.cap());
|
||||||
self.profit.base.cents.height.push(state.realized.profit());
|
self.profit.base.cents.height.push(state.realized.profit());
|
||||||
self.loss.base.cents.height.push(state.realized.loss());
|
self.loss.base.cents.height.push(state.realized.loss());
|
||||||
self.transfer_volume.base.sats.height.push(state.sent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
pub(crate) fn collect_vecs_mut(&mut self) -> Vec<&mut dyn AnyStoredVec> {
|
||||||
@@ -91,7 +78,6 @@ impl RealizedMinimal {
|
|||||||
&mut self.cap.cents.height as &mut dyn AnyStoredVec,
|
&mut self.cap.cents.height as &mut dyn AnyStoredVec,
|
||||||
&mut self.profit.base.cents.height,
|
&mut self.profit.base.cents.height,
|
||||||
&mut self.loss.base.cents.height,
|
&mut self.loss.base.cents.height,
|
||||||
&mut self.transfer_volume.base.sats.height,
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,20 +90,16 @@ impl RealizedMinimal {
|
|||||||
sum_others!(self, starting_indexes, others, exit; cap.cents.height);
|
sum_others!(self, starting_indexes, others, exit; cap.cents.height);
|
||||||
sum_others!(self, starting_indexes, others, exit; profit.base.cents.height);
|
sum_others!(self, starting_indexes, others, exit; profit.base.cents.height);
|
||||||
sum_others!(self, starting_indexes, others, exit; loss.base.cents.height);
|
sum_others!(self, starting_indexes, others, exit; loss.base.cents.height);
|
||||||
sum_others!(self, starting_indexes, others, exit; transfer_volume.base.sats.height);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn compute_rest_part1(
|
pub(crate) fn compute_rest_part1(
|
||||||
&mut self,
|
&mut self,
|
||||||
prices: &prices::Vecs,
|
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
exit: &Exit,
|
exit: &Exit,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.profit.compute_rest(starting_indexes.height, exit)?;
|
self.profit.compute_rest(starting_indexes.height, exit)?;
|
||||||
self.loss.compute_rest(starting_indexes.height, exit)?;
|
self.loss.compute_rest(starting_indexes.height, exit)?;
|
||||||
self.transfer_volume
|
|
||||||
.compute_rest(starting_indexes.height, prices, exit)?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ use brk_error::Result;
|
|||||||
use brk_types::Indexes;
|
use brk_types::Indexes;
|
||||||
use vecdb::Exit;
|
use vecdb::Exit;
|
||||||
|
|
||||||
use crate::{distribution::state::{WithCapital, CohortState, CostBasisData, RealizedState}, prices};
|
use crate::distribution::state::{WithCapital, CohortState, CostBasisData, RealizedState};
|
||||||
|
|
||||||
pub trait RealizedLike: Send + Sync {
|
pub trait RealizedLike: Send + Sync {
|
||||||
fn as_core(&self) -> &RealizedCore;
|
fn as_core(&self) -> &RealizedCore;
|
||||||
fn as_core_mut(&mut self) -> &mut RealizedCore;
|
fn as_core_mut(&mut self) -> &mut RealizedCore;
|
||||||
fn min_stateful_len(&self) -> usize;
|
fn min_stateful_len(&self) -> usize;
|
||||||
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>);
|
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>);
|
||||||
fn compute_rest_part1(&mut self, prices: &prices::Vecs, starting_indexes: &Indexes, exit: &Exit) -> Result<()>;
|
fn compute_rest_part1(&mut self, starting_indexes: &Indexes, exit: &Exit) -> Result<()>;
|
||||||
fn compute_from_stateful(
|
fn compute_from_stateful(
|
||||||
&mut self,
|
&mut self,
|
||||||
starting_indexes: &Indexes,
|
starting_indexes: &Indexes,
|
||||||
@@ -36,8 +36,8 @@ impl RealizedLike for RealizedCore {
|
|||||||
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>) {
|
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>) {
|
||||||
self.push_state(state)
|
self.push_state(state)
|
||||||
}
|
}
|
||||||
fn compute_rest_part1(&mut self, prices: &prices::Vecs, starting_indexes: &Indexes, exit: &Exit) -> Result<()> {
|
fn compute_rest_part1(&mut self, starting_indexes: &Indexes, exit: &Exit) -> Result<()> {
|
||||||
self.compute_rest_part1(prices, starting_indexes, exit)
|
self.compute_rest_part1(starting_indexes, exit)
|
||||||
}
|
}
|
||||||
fn compute_from_stateful(&mut self, starting_indexes: &Indexes, others: &[&RealizedCore], exit: &Exit) -> Result<()> {
|
fn compute_from_stateful(&mut self, starting_indexes: &Indexes, others: &[&RealizedCore], exit: &Exit) -> Result<()> {
|
||||||
self.compute_from_stateful(starting_indexes, others, exit)
|
self.compute_from_stateful(starting_indexes, others, exit)
|
||||||
@@ -52,8 +52,8 @@ impl RealizedLike for RealizedFull {
|
|||||||
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>) {
|
fn push_state(&mut self, state: &CohortState<RealizedState, CostBasisData<WithCapital>>) {
|
||||||
self.push_state(state)
|
self.push_state(state)
|
||||||
}
|
}
|
||||||
fn compute_rest_part1(&mut self, prices: &prices::Vecs, starting_indexes: &Indexes, exit: &Exit) -> Result<()> {
|
fn compute_rest_part1(&mut self, starting_indexes: &Indexes, exit: &Exit) -> Result<()> {
|
||||||
self.compute_rest_part1(prices, starting_indexes, exit)
|
self.compute_rest_part1(starting_indexes, exit)
|
||||||
}
|
}
|
||||||
fn compute_from_stateful(&mut self, starting_indexes: &Indexes, others: &[&RealizedCore], exit: &Exit) -> Result<()> {
|
fn compute_from_stateful(&mut self, starting_indexes: &Indexes, others: &[&RealizedCore], exit: &Exit) -> Result<()> {
|
||||||
self.compute_from_stateful(starting_indexes, others, exit)
|
self.compute_from_stateful(starting_indexes, others, exit)
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ impl RealizedOps for MinimalRealizedState {
|
|||||||
Cents::new((self.loss_raw / Sats::ONE_BTC_U128) as u64)
|
Cents::new((self.loss_raw / Sats::ONE_BTC_U128) as u64)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn value_destroyed(&self) -> Cents {
|
fn value_destroyed(&self) -> Cents {
|
||||||
if self.value_destroyed_raw == 0 {
|
if self.value_destroyed_raw == 0 {
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ impl Vecs {
|
|||||||
.height
|
.height
|
||||||
.compute_transform2(
|
.compute_transform2(
|
||||||
starting_indexes.height,
|
starting_indexes.height,
|
||||||
&all_activity.dormancy.height,
|
&all_activity.dormancy._24h.height,
|
||||||
supply_total_sats,
|
supply_total_sats,
|
||||||
|(i, dormancy, supply_sats, ..)| {
|
|(i, dormancy, supply_sats, ..)| {
|
||||||
let supply = f64::from(Bitcoin::from(supply_sats));
|
let supply = f64::from(Bitcoin::from(supply_sats));
|
||||||
@@ -164,7 +164,7 @@ impl Vecs {
|
|||||||
self.dormancy.flow.height.compute_transform2(
|
self.dormancy.flow.height.compute_transform2(
|
||||||
starting_indexes.height,
|
starting_indexes.height,
|
||||||
supply_total_sats,
|
supply_total_sats,
|
||||||
&all_activity.dormancy.height,
|
&all_activity.dormancy._24h.height,
|
||||||
|(i, supply_sats, dormancy, ..)| {
|
|(i, supply_sats, dormancy, ..)| {
|
||||||
let d = f64::from(dormancy);
|
let d = f64::from(dormancy);
|
||||||
if d == 0.0 {
|
if d == 0.0 {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2360,7 +2360,7 @@ class CapLossMvrvNetPriceProfitSoprPattern:
|
|||||||
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv'))
|
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv'))
|
||||||
self.net_pnl: BaseCumulativeDeltaSumPattern = BaseCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl'))
|
self.net_pnl: BaseCumulativeDeltaSumPattern = BaseCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl'))
|
||||||
self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price'))
|
self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price'))
|
||||||
self.profit: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'realized_profit'))
|
self.profit: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'realized_profit'))
|
||||||
self.sopr: RatioValuePattern = RatioValuePattern(client, acc)
|
self.sopr: RatioValuePattern = RatioValuePattern(client, acc)
|
||||||
|
|
||||||
class GrossInvestedLossNetNuplProfitSentimentPattern2:
|
class GrossInvestedLossNetNuplProfitSentimentPattern2:
|
||||||
@@ -2379,6 +2379,18 @@ class _1m1w1y2y4yAllPattern:
|
|||||||
self._4y: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, '4y'))
|
self._4y: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, '4y'))
|
||||||
self.all: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, 'all'))
|
self.all: BpsRatioPattern2 = BpsRatioPattern2(client, _m(acc, 'all'))
|
||||||
|
|
||||||
|
class ActivityAddrOutputsRealizedSupplyUnrealizedPattern:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.activity: TransferPattern = TransferPattern(client, _m(acc, 'transfer_volume'))
|
||||||
|
self.addr_count: BaseDeltaPattern = BaseDeltaPattern(client, _m(acc, 'addr_count'))
|
||||||
|
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
||||||
|
self.realized: CapLossMvrvPriceProfitPattern = CapLossMvrvPriceProfitPattern(client, acc)
|
||||||
|
self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply'))
|
||||||
|
self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl'))
|
||||||
|
|
||||||
class BaseChangeCumulativeDeltaSumToPattern:
|
class BaseChangeCumulativeDeltaSumToPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2388,7 +2400,7 @@ class BaseChangeCumulativeDeltaSumToPattern:
|
|||||||
self.change_1m: ToPattern = ToPattern(client, _m(acc, 'pnl_change_1m_to'))
|
self.change_1m: ToPattern = ToPattern(client, _m(acc, 'pnl_change_1m_to'))
|
||||||
self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative'))
|
self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative'))
|
||||||
self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta'))
|
self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta'))
|
||||||
self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'realized_pnl_sum'))
|
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'realized_pnl_sum'))
|
||||||
self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_pnl_to_rcap'))
|
self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_pnl_to_rcap'))
|
||||||
|
|
||||||
class BpsCentsPercentilesRatioSatsUsdPattern:
|
class BpsCentsPercentilesRatioSatsUsdPattern:
|
||||||
@@ -2415,18 +2427,6 @@ class BtcCentsSatsToUsdPattern3:
|
|||||||
self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own'))
|
self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own'))
|
||||||
self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd'))
|
self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd'))
|
||||||
|
|
||||||
class CapLossMvrvPriceProfitSoprPattern:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, _m(acc, 'realized_cap'))
|
|
||||||
self.loss: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'realized_loss'))
|
|
||||||
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv'))
|
|
||||||
self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price'))
|
|
||||||
self.profit: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'realized_profit'))
|
|
||||||
self.sopr: ValuePattern = ValuePattern(client, _m(acc, 'value'))
|
|
||||||
|
|
||||||
class CentsNegativeToUsdPattern2:
|
class CentsNegativeToUsdPattern2:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2486,14 +2486,25 @@ class ActivityOutputsRealizedSupplyUnrealizedPattern:
|
|||||||
self.supply: DeltaHalfInToTotalPattern = DeltaHalfInToTotalPattern(client, _m(acc, 'supply'))
|
self.supply: DeltaHalfInToTotalPattern = DeltaHalfInToTotalPattern(client, _m(acc, 'supply'))
|
||||||
self.unrealized: LossNetNuplProfitPattern = LossNetNuplProfitPattern(client, acc)
|
self.unrealized: LossNetNuplProfitPattern = LossNetNuplProfitPattern(client, acc)
|
||||||
|
|
||||||
class AddrOutputsRealizedSupplyUnrealizedPattern:
|
class ActivityOutputsRealizedSupplyUnrealizedPattern3:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.addr_count: BaseDeltaPattern = BaseDeltaPattern(client, _m(acc, 'addr_count'))
|
self.activity: TransferPattern = TransferPattern(client, _m(acc, 'transfer_volume'))
|
||||||
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
||||||
self.realized: CapLossMvrvPriceProfitSoprPattern = CapLossMvrvPriceProfitSoprPattern(client, acc)
|
self.realized: CapLossMvrvPriceProfitPattern = CapLossMvrvPriceProfitPattern(client, acc)
|
||||||
|
self.supply: DeltaHalfInTotalPattern2 = DeltaHalfInTotalPattern2(client, _m(acc, 'supply'))
|
||||||
|
self.unrealized: LossNuplProfitPattern = LossNuplProfitPattern(client, acc)
|
||||||
|
|
||||||
|
class ActivityOutputsRealizedSupplyUnrealizedPattern2:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.activity: TransferPattern = TransferPattern(client, _m(acc, 'transfer_volume'))
|
||||||
|
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
||||||
|
self.realized: CapLossMvrvPriceProfitPattern = CapLossMvrvPriceProfitPattern(client, acc)
|
||||||
self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply'))
|
self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply'))
|
||||||
self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl'))
|
self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl'))
|
||||||
|
|
||||||
@@ -2504,9 +2515,9 @@ class BaseCumulativeInSumPattern:
|
|||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc)
|
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc)
|
||||||
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'cumulative'))
|
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'cumulative'))
|
||||||
self.in_loss: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'in_loss'))
|
self.in_loss: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'in_loss'))
|
||||||
self.in_profit: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'in_profit'))
|
self.in_profit: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'in_profit'))
|
||||||
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum'))
|
self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'sum'))
|
||||||
|
|
||||||
class BaseCumulativeNegativeSumToPattern:
|
class BaseCumulativeNegativeSumToPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
@@ -2556,6 +2567,17 @@ class BtcCentsSatsToUsdPattern2:
|
|||||||
self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own'))
|
self.to_own: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_own'))
|
||||||
self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd'))
|
self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd'))
|
||||||
|
|
||||||
|
class CapLossMvrvPriceProfitPattern:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, _m(acc, 'realized_cap'))
|
||||||
|
self.loss: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'realized_loss'))
|
||||||
|
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv'))
|
||||||
|
self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price'))
|
||||||
|
self.profit: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'realized_profit'))
|
||||||
|
|
||||||
class CentsToUsdPattern4:
|
class CentsToUsdPattern4:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2628,7 +2650,7 @@ class _1m1w1y24hPattern6:
|
|||||||
self._1y: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, '1y'))
|
self._1y: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, '1y'))
|
||||||
self._24h: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, '24h'))
|
self._24h: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, '24h'))
|
||||||
|
|
||||||
class _1m1w1y24hPattern5:
|
class _1m1w1y24hPattern3:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
@@ -2648,7 +2670,7 @@ class _1m1w1y2wPattern:
|
|||||||
self._1y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, '1y'))
|
self._1y: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, '1y'))
|
||||||
self._2w: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, '2w'))
|
self._2w: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, '2w'))
|
||||||
|
|
||||||
class _1m1w1y24hPattern3:
|
class _1m1w1y24hPattern4:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
@@ -2658,7 +2680,7 @@ class _1m1w1y24hPattern3:
|
|||||||
self._1y: CentsUsdPattern = CentsUsdPattern(client, _m(acc, '1y'))
|
self._1y: CentsUsdPattern = CentsUsdPattern(client, _m(acc, '1y'))
|
||||||
self._24h: CentsUsdPattern = CentsUsdPattern(client, _m(acc, '24h'))
|
self._24h: CentsUsdPattern = CentsUsdPattern(client, _m(acc, '24h'))
|
||||||
|
|
||||||
class _1m1w1y24hPattern4:
|
class _1m1w1y24hPattern5:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
@@ -2672,10 +2694,6 @@ class _1y2y4yAllPattern:
|
|||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class AdjustedRatioValuePattern:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
class BaseCumulativeDeltaSumPattern:
|
class BaseCumulativeDeltaSumPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2684,7 +2702,7 @@ class BaseCumulativeDeltaSumPattern:
|
|||||||
self.base: CentsUsdPattern = CentsUsdPattern(client, acc)
|
self.base: CentsUsdPattern = CentsUsdPattern(client, acc)
|
||||||
self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'cumulative'))
|
self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'cumulative'))
|
||||||
self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'delta'))
|
self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'delta'))
|
||||||
self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'sum'))
|
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum'))
|
||||||
|
|
||||||
class BaseCumulativeNegativeSumPattern:
|
class BaseCumulativeNegativeSumPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
@@ -2694,7 +2712,7 @@ class BaseCumulativeNegativeSumPattern:
|
|||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss'))
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss'))
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss_cumulative'))
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss_cumulative'))
|
||||||
self.negative: BaseSumPattern = BaseSumPattern(client, _m(acc, 'neg_realized_loss'))
|
self.negative: BaseSumPattern = BaseSumPattern(client, _m(acc, 'neg_realized_loss'))
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'realized_loss_sum'))
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'realized_loss_sum'))
|
||||||
|
|
||||||
class BaseCumulativeSumToPattern:
|
class BaseCumulativeSumToPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
@@ -2703,7 +2721,7 @@ class BaseCumulativeSumToPattern:
|
|||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc)
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc)
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative'))
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative'))
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum'))
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum'))
|
||||||
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'to_rcap'))
|
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'to_rcap'))
|
||||||
|
|
||||||
class BothReactivatedReceivingSendingPattern:
|
class BothReactivatedReceivingSendingPattern:
|
||||||
@@ -2760,26 +2778,6 @@ class LossNetNuplProfitPattern:
|
|||||||
self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl'))
|
self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl'))
|
||||||
self.profit: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_profit'))
|
self.profit: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_profit'))
|
||||||
|
|
||||||
class OutputsRealizedSupplyUnrealizedPattern2:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
|
||||||
self.realized: CapLossMvrvPriceProfitSoprPattern = CapLossMvrvPriceProfitSoprPattern(client, acc)
|
|
||||||
self.supply: DeltaHalfInTotalPattern2 = DeltaHalfInTotalPattern2(client, _m(acc, 'supply'))
|
|
||||||
self.unrealized: LossNuplProfitPattern = LossNuplProfitPattern(client, acc)
|
|
||||||
|
|
||||||
class OutputsRealizedSupplyUnrealizedPattern:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.outputs: UnspentPattern = UnspentPattern(client, _m(acc, 'utxo_count'))
|
|
||||||
self.realized: CapLossMvrvPriceProfitSoprPattern = CapLossMvrvPriceProfitSoprPattern(client, acc)
|
|
||||||
self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply'))
|
|
||||||
self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl'))
|
|
||||||
|
|
||||||
class _1m1w1y24hPattern(Generic[T]):
|
class _1m1w1y24hPattern(Generic[T]):
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2790,23 +2788,27 @@ class _1m1w1y24hPattern(Generic[T]):
|
|||||||
self._1y: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '1y'))
|
self._1y: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '1y'))
|
||||||
self._24h: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '24h'))
|
self._24h: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '24h'))
|
||||||
|
|
||||||
class BaseCumulativeSumPattern4:
|
class AdjustedRatioValuePattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
pass
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc)
|
|
||||||
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'cumulative'))
|
|
||||||
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum'))
|
|
||||||
|
|
||||||
class BaseCumulativeSumPattern3:
|
class BaseCumulativeSumPattern3:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc)
|
||||||
|
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'cumulative'))
|
||||||
|
self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'sum'))
|
||||||
|
|
||||||
|
class BaseCumulativeSumPattern4:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc)
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc)
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative'))
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative'))
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum'))
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum'))
|
||||||
|
|
||||||
class BaseCumulativeSumPattern2:
|
class BaseCumulativeSumPattern2:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
@@ -2824,7 +2826,7 @@ class BlocksDominanceRewardsPattern:
|
|||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.blocks_mined: BaseCumulativeSumPattern2 = BaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined'))
|
self.blocks_mined: BaseCumulativeSumPattern2 = BaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined'))
|
||||||
self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance'))
|
self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance'))
|
||||||
self.rewards: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, _m(acc, 'rewards'))
|
self.rewards: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, _m(acc, 'rewards'))
|
||||||
|
|
||||||
class BpsPercentRatioPattern3:
|
class BpsPercentRatioPattern3:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
@@ -2947,19 +2949,10 @@ class NuplRealizedSupplyPattern:
|
|||||||
self.realized_cap: AllSthPattern = AllSthPattern(client, acc)
|
self.realized_cap: AllSthPattern = AllSthPattern(client, acc)
|
||||||
self.supply: AllSthPattern2 = AllSthPattern2(client, acc)
|
self.supply: AllSthPattern2 = AllSthPattern2(client, acc)
|
||||||
|
|
||||||
class RatioValuePattern2:
|
class RatioTransferValuePattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class RatioValuePattern:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.ratio: _24hPattern = _24hPattern(client, _m(acc, 'sopr_24h'))
|
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, _m(acc, 'value_created'))
|
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, _m(acc, 'value_destroyed'))
|
|
||||||
|
|
||||||
class _6bBlockTxPattern(Generic[T]):
|
class _6bBlockTxPattern(Generic[T]):
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -2991,7 +2984,7 @@ class AbsoluteRatePattern2:
|
|||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.absolute: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, acc)
|
self.absolute: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, acc)
|
||||||
self.rate: _1m1w1y24hPattern2 = _1m1w1y24hPattern2(client, acc)
|
self.rate: _1m1w1y24hPattern2 = _1m1w1y24hPattern2(client, acc)
|
||||||
|
|
||||||
class AllSthPattern2:
|
class AllSthPattern2:
|
||||||
@@ -3090,6 +3083,14 @@ class PriceRatioPattern:
|
|||||||
self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, disc))
|
self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, disc))
|
||||||
self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, f'ratio_{disc}'))
|
self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, f'ratio_{disc}'))
|
||||||
|
|
||||||
|
class RatioValuePattern:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.ratio: _24hPattern = _24hPattern(client, _m(acc, 'sopr_24h'))
|
||||||
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, _m(acc, 'value_destroyed'))
|
||||||
|
|
||||||
class SdSmaPattern:
|
class SdSmaPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
pass
|
pass
|
||||||
@@ -3102,14 +3103,6 @@ class ToPattern:
|
|||||||
self.to_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'mcap'))
|
self.to_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'mcap'))
|
||||||
self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rcap'))
|
self.to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rcap'))
|
||||||
|
|
||||||
class ValuePattern:
|
|
||||||
"""Pattern struct for repeated tree structure."""
|
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, acc: str):
|
|
||||||
"""Create pattern node with accumulated series name."""
|
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, _m(acc, 'created'))
|
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, _m(acc, 'destroyed'))
|
|
||||||
|
|
||||||
class _24hPattern:
|
class _24hPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -3131,6 +3124,13 @@ class PricePattern:
|
|||||||
"""Create pattern node with accumulated series name."""
|
"""Create pattern node with accumulated series name."""
|
||||||
self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, acc)
|
self.price: BpsCentsPercentilesRatioSatsUsdPattern = BpsCentsPercentilesRatioSatsUsdPattern(client, acc)
|
||||||
|
|
||||||
|
class TransferPattern:
|
||||||
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
|
def __init__(self, client: BrkClientBase, acc: str):
|
||||||
|
"""Create pattern node with accumulated series name."""
|
||||||
|
self.transfer_volume: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, acc)
|
||||||
|
|
||||||
class UnspentPattern:
|
class UnspentPattern:
|
||||||
"""Pattern struct for repeated tree structure."""
|
"""Pattern struct for repeated tree structure."""
|
||||||
|
|
||||||
@@ -3336,7 +3336,7 @@ class SeriesTree_Transactions_Volume:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.transfer_volume: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'transfer_volume_bis')
|
self.transfer_volume: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'transfer_volume_bis')
|
||||||
self.tx_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'tx_per_sec')
|
self.tx_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'tx_per_sec')
|
||||||
self.outputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'outputs_per_sec')
|
self.outputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'outputs_per_sec')
|
||||||
self.inputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'inputs_per_sec')
|
self.inputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'inputs_per_sec')
|
||||||
@@ -3613,7 +3613,7 @@ class SeriesTree_Scripts_Value:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.op_return: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'op_return_value')
|
self.op_return: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'op_return_value')
|
||||||
|
|
||||||
class SeriesTree_Scripts:
|
class SeriesTree_Scripts:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -3647,15 +3647,15 @@ class SeriesTree_Mining_Rewards_Fees:
|
|||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees')
|
self.base: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees')
|
||||||
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees_cumulative')
|
self.cumulative: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'fees_cumulative')
|
||||||
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_sum')
|
self.sum: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_sum')
|
||||||
self.average: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_average')
|
self.average: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_average')
|
||||||
self.min: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_min')
|
self.min: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_min')
|
||||||
self.max: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_max')
|
self.max: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_max')
|
||||||
self.pct10: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct10')
|
self.pct10: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_pct10')
|
||||||
self.pct25: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct25')
|
self.pct25: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_pct25')
|
||||||
self.median: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_median')
|
self.median: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_median')
|
||||||
self.pct75: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct75')
|
self.pct75: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_pct75')
|
||||||
self.pct90: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'fees_pct90')
|
self.pct90: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_pct90')
|
||||||
self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'fee_dominance')
|
self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'fee_dominance')
|
||||||
self.to_subsidy_ratio: SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio = SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio(client)
|
self.to_subsidy_ratio: SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio = SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio(client)
|
||||||
|
|
||||||
@@ -3670,7 +3670,7 @@ class SeriesTree_Mining_Rewards:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.coinbase: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'coinbase')
|
self.coinbase: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'coinbase')
|
||||||
self.subsidy: SeriesTree_Mining_Rewards_Subsidy = SeriesTree_Mining_Rewards_Subsidy(client)
|
self.subsidy: SeriesTree_Mining_Rewards_Subsidy = SeriesTree_Mining_Rewards_Subsidy(client)
|
||||||
self.fees: SeriesTree_Mining_Rewards_Fees = SeriesTree_Mining_Rewards_Fees(client)
|
self.fees: SeriesTree_Mining_Rewards_Fees = SeriesTree_Mining_Rewards_Fees(client)
|
||||||
self.unclaimed: SeriesTree_Mining_Rewards_Unclaimed = SeriesTree_Mining_Rewards_Unclaimed(client)
|
self.unclaimed: SeriesTree_Mining_Rewards_Unclaimed = SeriesTree_Mining_Rewards_Unclaimed(client)
|
||||||
@@ -4677,7 +4677,7 @@ class SeriesTree_Supply:
|
|||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.state: SeriesPattern18[SupplyState] = SeriesPattern18(client, 'supply_state')
|
self.state: SeriesPattern18[SupplyState] = SeriesPattern18(client, 'supply_state')
|
||||||
self.circulating: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'circulating_supply')
|
self.circulating: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'circulating_supply')
|
||||||
self.burned: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'unspendable_supply')
|
self.burned: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'unspendable_supply')
|
||||||
self.inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'inflation_rate')
|
self.inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'inflation_rate')
|
||||||
self.velocity: SeriesTree_Supply_Velocity = SeriesTree_Supply_Velocity(client)
|
self.velocity: SeriesTree_Supply_Velocity = SeriesTree_Supply_Velocity(client)
|
||||||
self.market_cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, 'market_cap')
|
self.market_cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, 'market_cap')
|
||||||
@@ -4701,7 +4701,7 @@ class SeriesTree_Cohorts_Utxo_All_Activity:
|
|||||||
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'transfer_volume')
|
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'transfer_volume')
|
||||||
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coindays_destroyed')
|
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'coindays_destroyed')
|
||||||
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'coinyears_destroyed')
|
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'coinyears_destroyed')
|
||||||
self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'dormancy')
|
self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'dormancy')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_All_Realized_Loss:
|
class SeriesTree_Cohorts_Utxo_All_Realized_Loss:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -4709,7 +4709,7 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Loss:
|
|||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss')
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss')
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss_cumulative')
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss_cumulative')
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'realized_loss_sum')
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'realized_loss_sum')
|
||||||
self.negative: BaseSumPattern = BaseSumPattern(client, 'neg_realized_loss')
|
self.negative: BaseSumPattern = BaseSumPattern(client, 'neg_realized_loss')
|
||||||
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_loss_to_rcap')
|
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_loss_to_rcap')
|
||||||
|
|
||||||
@@ -4820,14 +4820,13 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted:
|
|||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'asopr')
|
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'asopr')
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'adj_value_created')
|
self.transfer_volume: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'adj_value_created')
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'adj_value_destroyed')
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'adj_value_destroyed')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_All_Realized_Sopr:
|
class SeriesTree_Cohorts_Utxo_All_Realized_Sopr:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'value_created')
|
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'value_destroyed')
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'value_destroyed')
|
||||||
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, '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)
|
self.adjusted: SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted(client)
|
||||||
@@ -4841,9 +4840,9 @@ class SeriesTree_Cohorts_Utxo_All_Realized:
|
|||||||
self.loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss = SeriesTree_Cohorts_Utxo_All_Realized_Loss(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.price: SeriesTree_Cohorts_Utxo_All_Realized_Price = SeriesTree_Cohorts_Utxo_All_Realized_Price(client)
|
||||||
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'mvrv')
|
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: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'net')
|
self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'net')
|
||||||
self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'realized_gross_pnl')
|
self.sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr = SeriesTree_Cohorts_Utxo_All_Realized_Sopr(client)
|
||||||
|
self.gross_pnl: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'realized_gross_pnl')
|
||||||
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sell_side_risk_ratio')
|
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sell_side_risk_ratio')
|
||||||
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'realized_peak_regret')
|
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'realized_peak_regret')
|
||||||
self.investor: PricePattern = PricePattern(client, 'investor_price')
|
self.investor: PricePattern = PricePattern(client, 'investor_price')
|
||||||
@@ -4924,7 +4923,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Activity:
|
|||||||
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'sth_transfer_volume')
|
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'sth_transfer_volume')
|
||||||
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'sth_coindays_destroyed')
|
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'sth_coindays_destroyed')
|
||||||
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'sth_coinyears_destroyed')
|
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'sth_coinyears_destroyed')
|
||||||
self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'sth_dormancy')
|
self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'sth_dormancy')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_Sth_Realized_Loss:
|
class SeriesTree_Cohorts_Utxo_Sth_Realized_Loss:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -4932,7 +4931,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Loss:
|
|||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss')
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss')
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss_cumulative')
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss_cumulative')
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'sth_realized_loss_sum')
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'sth_realized_loss_sum')
|
||||||
self.negative: BaseSumPattern = BaseSumPattern(client, 'sth_neg_realized_loss')
|
self.negative: BaseSumPattern = BaseSumPattern(client, 'sth_neg_realized_loss')
|
||||||
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_loss_to_rcap')
|
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_loss_to_rcap')
|
||||||
|
|
||||||
@@ -5043,14 +5042,13 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted:
|
|||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_asopr')
|
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_asopr')
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_adj_value_created')
|
self.transfer_volume: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_adj_value_created')
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_adj_value_destroyed')
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_adj_value_destroyed')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr:
|
class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_value_created')
|
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_value_destroyed')
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'sth_value_destroyed')
|
||||||
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_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)
|
self.adjusted: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted(client)
|
||||||
@@ -5064,9 +5062,9 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized:
|
|||||||
self.loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss = SeriesTree_Cohorts_Utxo_Sth_Realized_Loss(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.price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price = SeriesTree_Cohorts_Utxo_Sth_Realized_Price(client)
|
||||||
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'sth_mvrv')
|
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: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'sth_net')
|
self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'sth_net')
|
||||||
self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'sth_realized_gross_pnl')
|
self.sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr(client)
|
||||||
|
self.gross_pnl: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'sth_realized_gross_pnl')
|
||||||
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sth_sell_side_risk_ratio')
|
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sth_sell_side_risk_ratio')
|
||||||
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'sth_realized_peak_regret')
|
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'sth_realized_peak_regret')
|
||||||
self.investor: PricePattern = PricePattern(client, 'sth_investor_price')
|
self.investor: PricePattern = PricePattern(client, 'sth_investor_price')
|
||||||
@@ -5120,7 +5118,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Activity:
|
|||||||
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'lth_transfer_volume')
|
self.transfer_volume: BaseCumulativeInSumPattern = BaseCumulativeInSumPattern(client, 'lth_transfer_volume')
|
||||||
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'lth_coindays_destroyed')
|
self.coindays_destroyed: BaseCumulativeSumPattern[StoredF64] = BaseCumulativeSumPattern(client, 'lth_coindays_destroyed')
|
||||||
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'lth_coinyears_destroyed')
|
self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'lth_coinyears_destroyed')
|
||||||
self.dormancy: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'lth_dormancy')
|
self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'lth_dormancy')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_Lth_Realized_Loss:
|
class SeriesTree_Cohorts_Utxo_Lth_Realized_Loss:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -5128,7 +5126,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Loss:
|
|||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss')
|
self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss')
|
||||||
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss_cumulative')
|
self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss_cumulative')
|
||||||
self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'lth_realized_loss_sum')
|
self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, 'lth_realized_loss_sum')
|
||||||
self.negative: BaseSumPattern = BaseSumPattern(client, 'lth_neg_realized_loss')
|
self.negative: BaseSumPattern = BaseSumPattern(client, 'lth_neg_realized_loss')
|
||||||
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_loss_to_rcap')
|
self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_loss_to_rcap')
|
||||||
|
|
||||||
@@ -5238,7 +5236,6 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.value_created: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_value_created')
|
|
||||||
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_value_destroyed')
|
self.value_destroyed: BaseCumulativeSumPattern[Cents] = BaseCumulativeSumPattern(client, 'lth_value_destroyed')
|
||||||
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_sopr')
|
self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_sopr')
|
||||||
|
|
||||||
@@ -5251,9 +5248,9 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized:
|
|||||||
self.loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss = SeriesTree_Cohorts_Utxo_Lth_Realized_Loss(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.price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price = SeriesTree_Cohorts_Utxo_Lth_Realized_Price(client)
|
||||||
self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'lth_mvrv')
|
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: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'lth_net')
|
self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'lth_net')
|
||||||
self.gross_pnl: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'lth_realized_gross_pnl')
|
self.sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr(client)
|
||||||
|
self.gross_pnl: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'lth_realized_gross_pnl')
|
||||||
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'lth_sell_side_risk_ratio')
|
self.sell_side_risk_ratio: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'lth_sell_side_risk_ratio')
|
||||||
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'lth_realized_peak_regret')
|
self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'lth_realized_peak_regret')
|
||||||
self.investor: PricePattern = PricePattern(client, 'lth_investor_price')
|
self.investor: PricePattern = PricePattern(client, 'lth_investor_price')
|
||||||
@@ -5409,73 +5406,73 @@ class SeriesTree_Cohorts_Utxo_OverAmount:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._1sat: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_1sat')
|
self._1sat: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1sat')
|
||||||
self._10sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_10sats')
|
self._10sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10sats')
|
||||||
self._100sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_100sats')
|
self._100sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_100sats')
|
||||||
self._1k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_1k_sats')
|
self._1k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1k_sats')
|
||||||
self._10k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_10k_sats')
|
self._10k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10k_sats')
|
||||||
self._100k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_100k_sats')
|
self._100k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_100k_sats')
|
||||||
self._1m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_1m_sats')
|
self._1m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1m_sats')
|
||||||
self._10m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_10m_sats')
|
self._10m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10m_sats')
|
||||||
self._1btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_1btc')
|
self._1btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1btc')
|
||||||
self._10btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_10btc')
|
self._10btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10btc')
|
||||||
self._100btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_100btc')
|
self._100btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_100btc')
|
||||||
self._1k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_1k_btc')
|
self._1k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1k_btc')
|
||||||
self._10k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_10k_btc')
|
self._10k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_AmountRange:
|
class SeriesTree_Cohorts_Utxo_AmountRange:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._0sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_0sats')
|
self._0sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_0sats')
|
||||||
self._1sat_to_10sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1sat_to_10sats')
|
self._1sat_to_10sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_1sat_to_10sats')
|
||||||
self._10sats_to_100sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10sats_to_100sats')
|
self._10sats_to_100sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_10sats_to_100sats')
|
||||||
self._100sats_to_1k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_100sats_to_1k_sats')
|
self._100sats_to_1k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_100sats_to_1k_sats')
|
||||||
self._1k_sats_to_10k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1k_sats_to_10k_sats')
|
self._1k_sats_to_10k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_1k_sats_to_10k_sats')
|
||||||
self._10k_sats_to_100k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10k_sats_to_100k_sats')
|
self._10k_sats_to_100k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_10k_sats_to_100k_sats')
|
||||||
self._100k_sats_to_1m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_100k_sats_to_1m_sats')
|
self._100k_sats_to_1m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_100k_sats_to_1m_sats')
|
||||||
self._1m_sats_to_10m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1m_sats_to_10m_sats')
|
self._1m_sats_to_10m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_1m_sats_to_10m_sats')
|
||||||
self._10m_sats_to_1btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10m_sats_to_1btc')
|
self._10m_sats_to_1btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_10m_sats_to_1btc')
|
||||||
self._1btc_to_10btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1btc_to_10btc')
|
self._1btc_to_10btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_1btc_to_10btc')
|
||||||
self._10btc_to_100btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10btc_to_100btc')
|
self._10btc_to_100btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_10btc_to_100btc')
|
||||||
self._100btc_to_1k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_100btc_to_1k_btc')
|
self._100btc_to_1k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_100btc_to_1k_btc')
|
||||||
self._1k_btc_to_10k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1k_btc_to_10k_btc')
|
self._1k_btc_to_10k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_1k_btc_to_10k_btc')
|
||||||
self._10k_btc_to_100k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10k_btc_to_100k_btc')
|
self._10k_btc_to_100k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_10k_btc_to_100k_btc')
|
||||||
self.over_100k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_100k_btc')
|
self.over_100k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_100k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_UnderAmount:
|
class SeriesTree_Cohorts_Utxo_UnderAmount:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._10sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_10sats')
|
self._10sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10sats')
|
||||||
self._100sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_100sats')
|
self._100sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_100sats')
|
||||||
self._1k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_1k_sats')
|
self._1k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1k_sats')
|
||||||
self._10k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_10k_sats')
|
self._10k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10k_sats')
|
||||||
self._100k_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_100k_sats')
|
self._100k_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_100k_sats')
|
||||||
self._1m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_1m_sats')
|
self._1m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1m_sats')
|
||||||
self._10m_sats: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_10m_sats')
|
self._10m_sats: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10m_sats')
|
||||||
self._1btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_1btc')
|
self._1btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1btc')
|
||||||
self._10btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_10btc')
|
self._10btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10btc')
|
||||||
self._100btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_100btc')
|
self._100btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_100btc')
|
||||||
self._1k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_1k_btc')
|
self._1k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1k_btc')
|
||||||
self._10k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_10k_btc')
|
self._10k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10k_btc')
|
||||||
self._100k_btc: OutputsRealizedSupplyUnrealizedPattern = OutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_100k_btc')
|
self._100k_btc: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_100k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_Type:
|
class SeriesTree_Cohorts_Utxo_Type:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.p2pk65: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2pk65')
|
self.p2pk65: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2pk65')
|
||||||
self.p2pk33: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2pk33')
|
self.p2pk33: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2pk33')
|
||||||
self.p2pkh: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2pkh')
|
self.p2pkh: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2pkh')
|
||||||
self.p2ms: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2ms')
|
self.p2ms: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2ms')
|
||||||
self.p2sh: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2sh')
|
self.p2sh: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2sh')
|
||||||
self.p2wpkh: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2wpkh')
|
self.p2wpkh: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2wpkh')
|
||||||
self.p2wsh: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2wsh')
|
self.p2wsh: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2wsh')
|
||||||
self.p2tr: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2tr')
|
self.p2tr: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2tr')
|
||||||
self.p2a: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'p2a')
|
self.p2a: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'p2a')
|
||||||
self.unknown: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'unknown_outputs')
|
self.unknown: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'unknown_outputs')
|
||||||
self.empty: OutputsRealizedSupplyUnrealizedPattern2 = OutputsRealizedSupplyUnrealizedPattern2(client, 'empty_outputs')
|
self.empty: ActivityOutputsRealizedSupplyUnrealizedPattern3 = ActivityOutputsRealizedSupplyUnrealizedPattern3(client, 'empty_outputs')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo_Profitability_Range:
|
class SeriesTree_Cohorts_Utxo_Profitability_Range:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -5552,27 +5549,27 @@ class SeriesTree_Cohorts_Utxo_Matured:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self.under_1h: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_under_1h_old_matured_supply')
|
self.under_1h: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_under_1h_old_matured_supply')
|
||||||
self._1h_to_1d: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_1h_to_1d_old_matured_supply')
|
self._1h_to_1d: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_1h_to_1d_old_matured_supply')
|
||||||
self._1d_to_1w: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_1d_to_1w_old_matured_supply')
|
self._1d_to_1w: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_1d_to_1w_old_matured_supply')
|
||||||
self._1w_to_1m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_1w_to_1m_old_matured_supply')
|
self._1w_to_1m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_1w_to_1m_old_matured_supply')
|
||||||
self._1m_to_2m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_1m_to_2m_old_matured_supply')
|
self._1m_to_2m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_1m_to_2m_old_matured_supply')
|
||||||
self._2m_to_3m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_2m_to_3m_old_matured_supply')
|
self._2m_to_3m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_2m_to_3m_old_matured_supply')
|
||||||
self._3m_to_4m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_3m_to_4m_old_matured_supply')
|
self._3m_to_4m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_3m_to_4m_old_matured_supply')
|
||||||
self._4m_to_5m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_4m_to_5m_old_matured_supply')
|
self._4m_to_5m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_4m_to_5m_old_matured_supply')
|
||||||
self._5m_to_6m: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_5m_to_6m_old_matured_supply')
|
self._5m_to_6m: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_5m_to_6m_old_matured_supply')
|
||||||
self._6m_to_1y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_6m_to_1y_old_matured_supply')
|
self._6m_to_1y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_6m_to_1y_old_matured_supply')
|
||||||
self._1y_to_2y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_1y_to_2y_old_matured_supply')
|
self._1y_to_2y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_1y_to_2y_old_matured_supply')
|
||||||
self._2y_to_3y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_2y_to_3y_old_matured_supply')
|
self._2y_to_3y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_2y_to_3y_old_matured_supply')
|
||||||
self._3y_to_4y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_3y_to_4y_old_matured_supply')
|
self._3y_to_4y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_3y_to_4y_old_matured_supply')
|
||||||
self._4y_to_5y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_4y_to_5y_old_matured_supply')
|
self._4y_to_5y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_4y_to_5y_old_matured_supply')
|
||||||
self._5y_to_6y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_5y_to_6y_old_matured_supply')
|
self._5y_to_6y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_5y_to_6y_old_matured_supply')
|
||||||
self._6y_to_7y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_6y_to_7y_old_matured_supply')
|
self._6y_to_7y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_6y_to_7y_old_matured_supply')
|
||||||
self._7y_to_8y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_7y_to_8y_old_matured_supply')
|
self._7y_to_8y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_7y_to_8y_old_matured_supply')
|
||||||
self._8y_to_10y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_8y_to_10y_old_matured_supply')
|
self._8y_to_10y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_8y_to_10y_old_matured_supply')
|
||||||
self._10y_to_12y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_10y_to_12y_old_matured_supply')
|
self._10y_to_12y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_10y_to_12y_old_matured_supply')
|
||||||
self._12y_to_15y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_12y_to_15y_old_matured_supply')
|
self._12y_to_15y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_12y_to_15y_old_matured_supply')
|
||||||
self.over_15y: BaseCumulativeSumPattern4 = BaseCumulativeSumPattern4(client, 'utxos_over_15y_old_matured_supply')
|
self.over_15y: BaseCumulativeSumPattern3 = BaseCumulativeSumPattern3(client, 'utxos_over_15y_old_matured_supply')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Utxo:
|
class SeriesTree_Cohorts_Utxo:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
@@ -5597,57 +5594,57 @@ class SeriesTree_Cohorts_Addr_OverAmount:
|
|||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._1sat: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1sat')
|
self._1sat: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1sat')
|
||||||
self._10sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10sats')
|
self._10sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10sats')
|
||||||
self._100sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100sats')
|
self._100sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100sats')
|
||||||
self._1k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1k_sats')
|
self._1k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1k_sats')
|
||||||
self._10k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10k_sats')
|
self._10k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10k_sats')
|
||||||
self._100k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100k_sats')
|
self._100k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100k_sats')
|
||||||
self._1m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1m_sats')
|
self._1m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1m_sats')
|
||||||
self._10m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10m_sats')
|
self._10m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10m_sats')
|
||||||
self._1btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1btc')
|
self._1btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1btc')
|
||||||
self._10btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10btc')
|
self._10btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10btc')
|
||||||
self._100btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100btc')
|
self._100btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100btc')
|
||||||
self._1k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1k_btc')
|
self._1k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_1k_btc')
|
||||||
self._10k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10k_btc')
|
self._10k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_10k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Addr_AmountRange:
|
class SeriesTree_Cohorts_Addr_AmountRange:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._0sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_0sats')
|
self._0sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_0sats')
|
||||||
self._1sat_to_10sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1sat_to_10sats')
|
self._1sat_to_10sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1sat_to_10sats')
|
||||||
self._10sats_to_100sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10sats_to_100sats')
|
self._10sats_to_100sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10sats_to_100sats')
|
||||||
self._100sats_to_1k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100sats_to_1k_sats')
|
self._100sats_to_1k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100sats_to_1k_sats')
|
||||||
self._1k_sats_to_10k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1k_sats_to_10k_sats')
|
self._1k_sats_to_10k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1k_sats_to_10k_sats')
|
||||||
self._10k_sats_to_100k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10k_sats_to_100k_sats')
|
self._10k_sats_to_100k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10k_sats_to_100k_sats')
|
||||||
self._100k_sats_to_1m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100k_sats_to_1m_sats')
|
self._100k_sats_to_1m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100k_sats_to_1m_sats')
|
||||||
self._1m_sats_to_10m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1m_sats_to_10m_sats')
|
self._1m_sats_to_10m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1m_sats_to_10m_sats')
|
||||||
self._10m_sats_to_1btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10m_sats_to_1btc')
|
self._10m_sats_to_1btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10m_sats_to_1btc')
|
||||||
self._1btc_to_10btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1btc_to_10btc')
|
self._1btc_to_10btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1btc_to_10btc')
|
||||||
self._10btc_to_100btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10btc_to_100btc')
|
self._10btc_to_100btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10btc_to_100btc')
|
||||||
self._100btc_to_1k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100btc_to_1k_btc')
|
self._100btc_to_1k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_100btc_to_1k_btc')
|
||||||
self._1k_btc_to_10k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1k_btc_to_10k_btc')
|
self._1k_btc_to_10k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_1k_btc_to_10k_btc')
|
||||||
self._10k_btc_to_100k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10k_btc_to_100k_btc')
|
self._10k_btc_to_100k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_10k_btc_to_100k_btc')
|
||||||
self.over_100k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100k_btc')
|
self.over_100k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_over_100k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Addr_UnderAmount:
|
class SeriesTree_Cohorts_Addr_UnderAmount:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|
||||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||||
self._10sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10sats')
|
self._10sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10sats')
|
||||||
self._100sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100sats')
|
self._100sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100sats')
|
||||||
self._1k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1k_sats')
|
self._1k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1k_sats')
|
||||||
self._10k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10k_sats')
|
self._10k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10k_sats')
|
||||||
self._100k_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100k_sats')
|
self._100k_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100k_sats')
|
||||||
self._1m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1m_sats')
|
self._1m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1m_sats')
|
||||||
self._10m_sats: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10m_sats')
|
self._10m_sats: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10m_sats')
|
||||||
self._1btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1btc')
|
self._1btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1btc')
|
||||||
self._10btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10btc')
|
self._10btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10btc')
|
||||||
self._100btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100btc')
|
self._100btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100btc')
|
||||||
self._1k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1k_btc')
|
self._1k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_1k_btc')
|
||||||
self._10k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10k_btc')
|
self._10k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_10k_btc')
|
||||||
self._100k_btc: AddrOutputsRealizedSupplyUnrealizedPattern = AddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100k_btc')
|
self._100k_btc: ActivityAddrOutputsRealizedSupplyUnrealizedPattern = ActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, 'addrs_under_100k_btc')
|
||||||
|
|
||||||
class SeriesTree_Cohorts_Addr:
|
class SeriesTree_Cohorts_Addr:
|
||||||
"""Series tree node."""
|
"""Series tree node."""
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Unit } from "../../utils/units.js";
|
import { Unit } from "../../utils/units.js";
|
||||||
import { line, baseline, dotsBaseline, percentRatio, chartsFromCount, ROLLING_WINDOWS } from "../series.js";
|
import { line, baseline, dotsBaseline, percentRatio, chartsFromCount, averagesTree, ROLLING_WINDOWS } from "../series.js";
|
||||||
import {
|
import {
|
||||||
satsBtcUsdFullTree,
|
satsBtcUsdFullTree,
|
||||||
mapCohortsWithAll,
|
mapCohortsWithAll,
|
||||||
@@ -90,11 +90,7 @@ function fullVolumeTree(activity, color, title) {
|
|||||||
return [
|
return [
|
||||||
...volumeAndCoinsTree(activity, color, title),
|
...volumeAndCoinsTree(activity, color, title),
|
||||||
...sentProfitLossTree(activity.transferVolume, title),
|
...sentProfitLossTree(activity.transferVolume, title),
|
||||||
{
|
averagesTree({ windows: activity.dormancy, title: title("Dormancy"), unit: Unit.days, name: "Dormancy" }),
|
||||||
name: "Dormancy",
|
|
||||||
title: title("Dormancy"),
|
|
||||||
bottom: [line({ series: activity.dormancy, name: "Dormancy", color, unit: Unit.days })],
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,10 +235,10 @@ export function createActivitySectionWithActivity({ cohort, title }) {
|
|||||||
export function createActivitySectionMinimal({ cohort, title }) {
|
export function createActivitySectionMinimal({ cohort, title }) {
|
||||||
return {
|
return {
|
||||||
name: "Activity",
|
name: "Activity",
|
||||||
tree: chartsFromCount({
|
tree: satsBtcUsdFullTree({
|
||||||
pattern: cohort.tree.realized.sopr.valueCreated,
|
pattern: cohort.tree.activity.transferVolume,
|
||||||
|
name: "Volume",
|
||||||
title: title("Volume"),
|
title: title("Volume"),
|
||||||
unit: Unit.usd,
|
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -259,7 +255,7 @@ export function createGroupedActivitySectionMinimal({ list, all, title }) {
|
|||||||
name: w.name,
|
name: w.name,
|
||||||
title: title(`Volume (${w.title})`),
|
title: title(`Volume (${w.title})`),
|
||||||
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
|
||||||
line({ series: tree.realized.sopr.valueCreated.sum[w.key], name, color, unit: Unit.usd }),
|
line({ series: tree.activity.transferVolume.sum[w.key].sats, name, color, unit: Unit.sats }),
|
||||||
),
|
),
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -887,41 +887,6 @@ export function simpleDeltaTree({ delta, title, unit }) {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// These split patterns into separate Sum/Distribution/Cumulative charts
|
// These split patterns into separate Sum/Distribution/Cumulative charts
|
||||||
|
|
||||||
/**
|
|
||||||
* Create btc/sats/usd series from patterns
|
|
||||||
* @param {Object} args
|
|
||||||
* @param {{ btc: AnySeriesPattern, sats: AnySeriesPattern, usd: AnySeriesPattern }} args.patterns
|
|
||||||
* @param {string} args.name
|
|
||||||
* @param {Color} [args.color]
|
|
||||||
* @param {boolean} [args.defaultActive]
|
|
||||||
* @returns {AnyFetchedSeriesBlueprint[]}
|
|
||||||
*/
|
|
||||||
function btcSatsUsdSeries({ patterns, name, color, defaultActive }) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
series: patterns.btc,
|
|
||||||
title: name,
|
|
||||||
color,
|
|
||||||
unit: Unit.btc,
|
|
||||||
defaultActive,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
series: patterns.sats,
|
|
||||||
title: name,
|
|
||||||
color,
|
|
||||||
unit: Unit.sats,
|
|
||||||
defaultActive,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
series: patterns.usd,
|
|
||||||
title: name,
|
|
||||||
color,
|
|
||||||
unit: Unit.usd,
|
|
||||||
defaultActive,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Split flat per-block pattern into charts (Sum/Rolling/Distribution/Cumulative)
|
* Split flat per-block pattern into charts (Sum/Rolling/Distribution/Cumulative)
|
||||||
* Pattern has: .height, .cumulative, .sum (windowed), .average/.pct10/... (windowed, flat)
|
* Pattern has: .height, .cumulative, .sum (windowed), .average/.pct10/... (windowed, flat)
|
||||||
@@ -1137,34 +1102,3 @@ export function multiSeriesTree({ entries, title, unit }) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Split BaseCumulativeRollingPattern into 3 charts (Sum/Distribution/Cumulative)
|
|
||||||
* @param {Object} args
|
|
||||||
* @param {CoinbasePattern} args.pattern
|
|
||||||
* @param {string} args.title
|
|
||||||
* @returns {PartialOptionsTree}
|
|
||||||
*/
|
|
||||||
export function chartsFromValueFull({ pattern, title }) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
name: "Sum",
|
|
||||||
title,
|
|
||||||
bottom: [
|
|
||||||
...btcSatsUsdSeries({ patterns: pattern.base, name: "sum" }),
|
|
||||||
...btcSatsUsdSeries({
|
|
||||||
patterns: pattern.sum._24h,
|
|
||||||
name: "24h sum",
|
|
||||||
defaultActive: false,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Cumulative",
|
|
||||||
title: `${title} (Total)`,
|
|
||||||
bottom: btcSatsUsdSeries({
|
|
||||||
patterns: pattern.cumulative,
|
|
||||||
name: "all-time",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -45,23 +45,21 @@
|
|||||||
* Brk pattern types (using new pattern names)
|
* Brk pattern types (using new pattern names)
|
||||||
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} MaxAgePattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} MaxAgePattern
|
||||||
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} AgeRangePattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} AgeRangePattern
|
||||||
* @typedef {Brk.OutputsRealizedSupplyUnrealizedPattern} UtxoAmountPattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern2} UtxoAmountPattern
|
||||||
* @typedef {Brk.AddrOutputsRealizedSupplyUnrealizedPattern} AddrAmountPattern
|
* @typedef {Brk.ActivityAddrOutputsRealizedSupplyUnrealizedPattern} AddrAmountPattern
|
||||||
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} BasicUtxoPattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} BasicUtxoPattern
|
||||||
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} EpochPattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern} EpochPattern
|
||||||
* @typedef {Brk.OutputsRealizedSupplyUnrealizedPattern2} EmptyPattern
|
* @typedef {Brk.ActivityOutputsRealizedSupplyUnrealizedPattern3} EmptyPattern
|
||||||
* @typedef {Brk._0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdZscorePattern} Ratio1ySdPattern
|
* @typedef {Brk._0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdZscorePattern} Ratio1ySdPattern
|
||||||
* @typedef {Brk.Dollars} Dollars
|
* @typedef {Brk.Dollars} Dollars
|
||||||
* CoinbasePattern: base + cumulative + rolling windows (flattened)
|
|
||||||
* @typedef {Brk.BaseCumulativeSumPattern4} CoinbasePattern
|
|
||||||
* ActivePriceRatioPattern: ratio pattern with price (extended)
|
* ActivePriceRatioPattern: ratio pattern with price (extended)
|
||||||
* @typedef {Brk.BpsPriceRatioPattern} ActivePriceRatioPattern
|
* @typedef {Brk.BpsPriceRatioPattern} ActivePriceRatioPattern
|
||||||
* PriceRatioPercentilesPattern: price pattern with ratio + percentiles (no SMAs/stdDev)
|
* PriceRatioPercentilesPattern: price pattern with ratio + percentiles (no SMAs/stdDev)
|
||||||
* @typedef {Brk.BpsCentsPercentilesRatioSatsUsdPattern} PriceRatioPercentilesPattern
|
* @typedef {Brk.BpsCentsPercentilesRatioSatsUsdPattern} PriceRatioPercentilesPattern
|
||||||
* AnyRatioPattern: full ratio pattern with percentiles, SMAs, and std dev bands
|
* AnyRatioPattern: full ratio pattern with percentiles, SMAs, and std dev bands
|
||||||
* @typedef {Brk.BpsCentsPercentilesRatioSatsSmaStdUsdPattern} AnyRatioPattern
|
* @typedef {Brk.BpsCentsPercentilesRatioSatsSmaStdUsdPattern} AnyRatioPattern
|
||||||
* FullValuePattern: base + cumulative + rolling windows (flattened)
|
* FullValuePattern: base + cumulative + rolling windows (sats/btc/cents/usd)
|
||||||
* @typedef {Brk.BaseCumulativeSumPattern4} FullValuePattern
|
* @typedef {Brk.BaseCumulativeSumPattern3} FullValuePattern
|
||||||
* RollingWindowSlot: a single rolling window with stats (average, pct10, pct25, median, pct75, pct90, max, min) per unit
|
* RollingWindowSlot: a single rolling window with stats (average, pct10, pct25, median, pct75, pct90, max, min) per unit
|
||||||
* @typedef {Brk.AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern<number>} RollingWindowSlot
|
* @typedef {Brk.AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern<number>} RollingWindowSlot
|
||||||
* @typedef {Brk.AnySeriesPattern} AnySeriesPattern
|
* @typedef {Brk.AnySeriesPattern} AnySeriesPattern
|
||||||
@@ -91,8 +89,8 @@
|
|||||||
* Transfer volume pattern (base + cumulative + inProfit/inLoss + sum windows)
|
* Transfer volume pattern (base + cumulative + inProfit/inLoss + sum windows)
|
||||||
* @typedef {Brk.BaseCumulativeInSumPattern} TransferVolumePattern
|
* @typedef {Brk.BaseCumulativeInSumPattern} TransferVolumePattern
|
||||||
*
|
*
|
||||||
* Realized profit/loss pattern (base + cumulative + sum windows)
|
* Realized profit/loss pattern (base + cumulative + sum windows, cents/usd)
|
||||||
* @typedef {Brk.BaseCumulativeSumPattern3} RealizedProfitLossPattern
|
* @typedef {Brk.BaseCumulativeSumPattern4} RealizedProfitLossPattern
|
||||||
*
|
*
|
||||||
* Full activity pattern (coindays, coinyears, dormancy, transfer volume)
|
* Full activity pattern (coindays, coinyears, dormancy, transfer volume)
|
||||||
* @typedef {Brk.CoindaysCoinyearsDormancyTransferPattern} FullActivityPattern
|
* @typedef {Brk.CoindaysCoinyearsDormancyTransferPattern} FullActivityPattern
|
||||||
@@ -113,8 +111,8 @@
|
|||||||
* Mid realized pattern (cap + loss + MVRV + net + price + profit + SOPR)
|
* Mid realized pattern (cap + loss + MVRV + net + price + profit + SOPR)
|
||||||
* @typedef {Brk.CapLossMvrvNetPriceProfitSoprPattern} MidRealizedPattern
|
* @typedef {Brk.CapLossMvrvNetPriceProfitSoprPattern} MidRealizedPattern
|
||||||
*
|
*
|
||||||
* Basic realized pattern (cap + loss + MVRV + price + profit + SOPR, no net)
|
* Basic realized pattern (cap + loss + MVRV + price + profit, no net/sopr)
|
||||||
* @typedef {Brk.CapLossMvrvPriceProfitSoprPattern} BasicRealizedPattern
|
* @typedef {Brk.CapLossMvrvPriceProfitPattern} BasicRealizedPattern
|
||||||
*
|
*
|
||||||
* Moving average price ratio pattern (bps + cents + ratio + sats + usd)
|
* Moving average price ratio pattern (bps + cents + ratio + sats + usd)
|
||||||
* @typedef {Brk.BpsCentsRatioSatsUsdPattern} MaPriceRatioPattern
|
* @typedef {Brk.BpsCentsRatioSatsUsdPattern} MaPriceRatioPattern
|
||||||
|
|||||||
Reference in New Issue
Block a user