broke: a private money app that runs on your own accounts and your own AI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minimus7andClaude Opus 5.5 committed 2026-11-04 10:53:45 -06:00
commit f550865e93
359 files changed
+34290

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { money0 } from "@/lib/format";
import { EXPENSE_RATIO, feeCost30, INDEX_RATIO } from "@/lib/invest";
// A holding's expense ratio and its 30-year cost against a 0.03% index fund. Cash and money market rows show nothing.
export function HoldingFee({ ticker, type, value }: { ticker: string | null; type: string | null; value: number | null }) {
if (type === "cash" || !ticker || /^(CASH|CUR:)/.test(ticker)) return null;
const ratio = EXPENSE_RATIO[ticker.toUpperCase()];
if (ratio == null) return <span>fee unknown</span>;
const cost = feeCost30(Number(value ?? 0), ratio);
return (
<span title={`${ratio}% a year. Over 30 years at 7% growth, ${money0(cost)} more in fees than a ${INDEX_RATIO}% index fund on today's value.`}>
fee {ratio}%{cost >= 1 && <> · <span className={cost >= 1000 ? "text-bad" : ""}>about {money0(cost)} more over 30 years</span></>}
</span>
);
}