Skip to content

feat: portfolio risk score from bond ratings mix #302 - #333

Open
laurentketterle-hub wants to merge 2 commits into
Heliobond:mainfrom
laurentketterle-hub:feat/risk-score-302
Open

feat: portfolio risk score from bond ratings mix #302#333
laurentketterle-hub wants to merge 2 commits into
Heliobond:mainfrom
laurentketterle-hub:feat/risk-score-302

Conversation

@laurentketterle-hub

Copy link
Copy Markdown

Portfolio Risk Score from Bond Ratings Mix

Closes #302

Changes

  • PortfolioRiskScore component: Weighted risk algorithm from bond portfolio ratings (AAA→D)
  • 5-tier risk scale: Very Low → High Risk with color-coded badge
  • Per-holding breakdown: Symbol, rating, weight, risk contribution
  • Memoized computation: useMemo for optimal performance
  • Tests: Mixed portfolio, empty state, all-AAA, edge cases

Algorithm

Score = sum(rating_score[rating] × weight%) / total_weight% × 100
Tiers: ≤5 Very Low | ≤12 Low | ≤25 Moderate | ≤50 Elevated | >50 High

Test

npm test -- PortfolioRiskScore

CI

Requires first-time contributor approval.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@laurentketterle-hub is attempting to deploy a commit to the David Dada's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement: Show portfolio risk score based on bond ratings mix

1 participant