Expose annual debt flow relation summaries
This commit is contained in:
parent
ecfc78f410
commit
4f2955093f
6 changed files with 74 additions and 7 deletions
|
|
@ -107,7 +107,9 @@ building-growth policy, and recent profit history instead of leaving that policy
|
|||
dialog notes. The same periodic service now also carries the annual bond lane's retired-versus-
|
||||
issued principal totals as first-class runtime summary state, which is the owner seam behind the
|
||||
later debt-news family, and it now carries the paired issued-share and repurchased-share counts
|
||||
behind the equity-offering and `2887` buyback news tails too. `simulation_service_periodic_boundary_work` is now beginning to use that same owner
|
||||
behind the equity-offering and `2887` buyback news tails too. Runtime summaries now also expose the
|
||||
grounded retired-versus-issued relation directly, without guessing the exact `2882..2886`
|
||||
headline selector. `simulation_service_periodic_boundary_work` is now beginning to use that same owner
|
||||
surface too: the runtime chooses one annual-finance action per active company and already commits
|
||||
the shellless creditor-pressure-bankruptcy, deep-distress-bankruptcy, dividend-adjustment,
|
||||
stock-repurchase, stock-issue, and bond-issue branches by mutating owned company activity,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ pub use runtime::{
|
|||
RuntimePlayerTarget, RuntimeSaveProfileState, RuntimeServiceState, RuntimeState,
|
||||
RuntimeTerritory, RuntimeTerritoryMetric, RuntimeTerritoryTarget, RuntimeTrackMetric,
|
||||
RuntimeTrackPieceCounts, RuntimeTrain, RuntimeWorldFinanceNeighborhoodCandidate,
|
||||
RuntimeWorldIssueState, RuntimeWorldRestoreState, runtime_company_annual_bond_policy_state,
|
||||
RuntimeWorldIssueState, RuntimeWorldRestoreState,
|
||||
runtime_annual_bond_principal_flow_relation_label, runtime_company_annual_bond_policy_state,
|
||||
runtime_company_annual_creditor_pressure_state, runtime_company_annual_deep_distress_state,
|
||||
runtime_company_annual_dividend_policy_state,
|
||||
runtime_company_annual_finance_policy_action_label,
|
||||
|
|
|
|||
|
|
@ -3620,6 +3620,35 @@ pub fn runtime_company_annual_finance_policy_action_label(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn runtime_annual_bond_principal_flow_relation_label(
|
||||
retired_principal_total: u64,
|
||||
issued_principal_total: u64,
|
||||
) -> Option<&'static str> {
|
||||
match retired_principal_total.cmp(&issued_principal_total) {
|
||||
std::cmp::Ordering::Equal => {
|
||||
if retired_principal_total == 0 {
|
||||
None
|
||||
} else {
|
||||
Some("retired_equals_issued")
|
||||
}
|
||||
}
|
||||
std::cmp::Ordering::Greater => {
|
||||
if issued_principal_total == 0 {
|
||||
Some("retired_only")
|
||||
} else {
|
||||
Some("retired_exceeds_issued")
|
||||
}
|
||||
}
|
||||
std::cmp::Ordering::Less => {
|
||||
if retired_principal_total == 0 {
|
||||
Some("issued_only")
|
||||
} else {
|
||||
Some("issued_exceeds_retired")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn runtime_company_stock_issue_price_to_book_ratio_f64(
|
||||
pressured_support_adjusted_share_price_scalar: f64,
|
||||
book_value_per_share: f64,
|
||||
|
|
@ -8359,6 +8388,30 @@ mod tests {
|
|||
assert!(bond_state.eligible_for_bond_issue_branch);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn classifies_annual_bond_principal_flow_relation() {
|
||||
assert_eq!(
|
||||
runtime_annual_bond_principal_flow_relation_label(0, 0),
|
||||
None
|
||||
);
|
||||
assert_eq!(
|
||||
runtime_annual_bond_principal_flow_relation_label(350_000, 0),
|
||||
Some("retired_only")
|
||||
);
|
||||
assert_eq!(
|
||||
runtime_annual_bond_principal_flow_relation_label(0, 500_000),
|
||||
Some("issued_only")
|
||||
);
|
||||
assert_eq!(
|
||||
runtime_annual_bond_principal_flow_relation_label(350_000, 1_000_000),
|
||||
Some("issued_exceeds_retired")
|
||||
);
|
||||
assert_eq!(
|
||||
runtime_annual_bond_principal_flow_relation_label(500_000, 500_000),
|
||||
Some("retired_equals_issued")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn annual_bond_policy_stays_eligible_for_repayment_without_new_issue() {
|
||||
let mut year_stat_family_qword_bits = vec![
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
CalendarPoint, RuntimeState, runtime_company_annual_bond_policy_state,
|
||||
runtime_company_annual_creditor_pressure_state, runtime_company_annual_deep_distress_state,
|
||||
runtime_company_annual_dividend_policy_state,
|
||||
CalendarPoint, RuntimeState, runtime_annual_bond_principal_flow_relation_label,
|
||||
runtime_company_annual_bond_policy_state, runtime_company_annual_creditor_pressure_state,
|
||||
runtime_company_annual_deep_distress_state, runtime_company_annual_dividend_policy_state,
|
||||
runtime_company_annual_finance_policy_action_label,
|
||||
runtime_company_annual_finance_policy_state, runtime_company_annual_finance_state,
|
||||
runtime_company_annual_stock_issue_state, runtime_company_annual_stock_repurchase_state,
|
||||
|
|
@ -261,6 +261,7 @@ pub struct RuntimeSummary {
|
|||
pub annual_dividend_adjustment_commit_count: u64,
|
||||
pub annual_bond_last_retired_principal_total: u64,
|
||||
pub annual_bond_last_issued_principal_total: u64,
|
||||
pub annual_bond_last_principal_flow_relation: Option<String>,
|
||||
pub annual_stock_repurchase_last_share_count: u64,
|
||||
pub annual_stock_issue_last_share_count: u64,
|
||||
pub total_trigger_dispatch_count: u64,
|
||||
|
|
@ -1391,6 +1392,12 @@ impl RuntimeSummary {
|
|||
annual_bond_last_issued_principal_total: state
|
||||
.service_state
|
||||
.annual_bond_last_issued_principal_total,
|
||||
annual_bond_last_principal_flow_relation:
|
||||
runtime_annual_bond_principal_flow_relation_label(
|
||||
state.service_state.annual_bond_last_retired_principal_total,
|
||||
state.service_state.annual_bond_last_issued_principal_total,
|
||||
)
|
||||
.map(str::to_string),
|
||||
annual_stock_repurchase_last_share_count: state
|
||||
.service_state
|
||||
.annual_stock_repurchase_last_share_count,
|
||||
|
|
|
|||
|
|
@ -158,7 +158,9 @@ The highest-value next passes are now:
|
|||
compact the table, then issue the exact staged count” path during periodic service; the same
|
||||
service surface now also carries the per-cycle retired-versus-issued principal totals that feed
|
||||
the later debt-news family plus the issued-share and repurchased-share counts behind the later
|
||||
equity-offering and buyback news tails
|
||||
equity-offering and buyback news tails; runtime summaries now also expose the grounded
|
||||
retired-versus-issued relation directly while still leaving the exact `2882..2886` selector on
|
||||
the shell-owned side
|
||||
- the project rule on the remaining closure work is now explicit too: when one runtime-facing field
|
||||
is still ambiguous, prefer rehosting the owning source state or real reader/setter family first
|
||||
instead of guessing another derived leaf field from neighboring raw offsets
|
||||
|
|
|
|||
|
|
@ -237,7 +237,9 @@ linked-transit threshold split to stage `500000` principal issue counts without
|
|||
and periodic boundary service now commits the same shellless matured-bond repay/compact/issue path instead of
|
||||
stopping at the staging reader. That same service seam now also carries the retired-versus-issued
|
||||
principal totals needed by the later debt-news tail, plus the issued-share and repurchased-share
|
||||
counts needed by the later equity-offering and buyback news tails.
|
||||
counts needed by the later equity-offering and buyback news tails. Runtime summaries also expose
|
||||
the grounded retired-versus-issued relation directly while the exact `2882..2886` selector remains
|
||||
shell-owned.
|
||||
The annual dividend-adjustment lane now rides that same seam too: the runtime now rehosts the
|
||||
shared year-or-control-transfer metric reader, the board-approved dividend ceiling helper, and the
|
||||
full annual dividend branch over owned cash, public float, current dividend, and building-growth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue