总资产公式修复+数据模型文档

bugfix: price_monitor写total_assets时漏算frozen_cash
  公式修正: total_assets = market_value + cash + frozen_cash
  影响: price_monitor两处公式 + stale_push_wlin fallback路径

docs: portfolio-data-model.md 新增
  数据模型字段说明
  现金流更新规则
  常见错误清单
This commit is contained in:
知微
2026-06-29 22:35:07 +08:00
parent 5a2d616dfd
commit 7d49470aeb
3 changed files with 139 additions and 9 deletions
+14 -6
View File
@@ -651,15 +651,15 @@
],
"cash": 92678.85,
"total_market_value": 835552.6,
"total_assets": 928231.45,
"total_assets": 967712.85,
"total_pl": 0,
"position_pct": 90.02,
"updated_at": "2026-06-29 22:23:47",
"updated_at": "2026-06-29 22:28",
"source": "/home/hmo/stocks/holding.xls",
"frozen_cash": 39481.4,
"available_cash": 92678.85,
"frozen": 39481.4,
"total_cash": 132145.6,
"total_cash": 132160.25,
"cash_updated_at": "2026-06-29 12:34",
"recent_trades": [
{
@@ -675,10 +675,10 @@
"total_mv": 835552.6,
"note": "cash fixed from screenshot 6/29, prices=CNY",
"currency": "CNY",
"last_verified_at": "2026-06-29 22:20",
"last_verified_at": "2026-06-29 22:28",
"_total_mv": 835552.6,
"_total_cash": 113240.25,
"_total_assets": 948792.85,
"_total_cash": 132160.25,
"_total_assets": 967712.85,
"cash_history": [
{
"time": "2026-06-29 22:23:47",
@@ -686,6 +686,14 @@
"frozen": 39481.4,
"source": "manual:post-法拉电子-sell-100shares@189.2",
"formula": "初始可用73758.85+法拉电子18920"
},
{
"time": "2026-06-29 22:28",
"cash": 92678.85,
"frozen": 39481.4,
"total_mv": 835552.6,
"total_assets": 967712.85,
"source": "price_monitor_auto"
}
]
}