<feed xmlns='http://www.w3.org/2005/Atom'>
<title>strategy-lab.git/frontend/src/lib/capitalMetrics.ts, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://git.somhairle.bid/strategy-lab.git/atom?h=main</id>
<link rel='self' href='http://git.somhairle.bid/strategy-lab.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/'/>
<updated>2026-09-18T02:36:09+00:00</updated>
<entry>
<title>feat(frontend): 投入口径 reporting 推导函数（资本三件套：投入/持仓估值/回报率）</title>
<updated>2026-09-18T02:36:09+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T02:36:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=f3831e6cc62938c94b398e93e9f25e6f22164266'/>
<id>urn:sha1:f3831e6cc62938c94b398e93e9f25e6f22164266</id>
<content type='text'>
[变更性质] 新增纯函数推导层，任务 A3。
[新增功能] capitalReporting：累计投入=首日cash−末日cash（2位）；持仓估值=Σ末日positions×closes；投入回报率=估值/投入−1（带正负号百分号）；未投入/无数据返回 null 不除零。
[实现方案] 纯前端推导，零后端改动；测试锚点取现网 run 26e9c9ab（投入 12029.09 / 估值 10846.00 / -9.84%）真实账目，另有多 symbol/未建仓/空数据等 9 用例。
[影响范围] frontend/src/lib/capitalMetrics.ts + 新增测试，vitest 84/84。
</content>
</entry>
</feed>
