Skip to content

Conversation

Copy link

Copilot AI commented Jan 10, 2026

Adds targeted annual return percentage display for assets based on standard finance formula combining risk-free rate, equity risk premium, and expected growth.

Changes

Database

  • Added risk_free_rate, risk_premium, expected_growth_rate decimal fields to assets table

Backend

  • Asset#targeted_annual_return calculates return as sum of three rate components
  • Exposed via JSON serialization

Frontend

  • AssetCard shows return percentage in card details
  • Asset detail page displays return with explanatory context

Example

asset = Asset.create(
  risk_free_rate: 4.5,      # T-bill baseline
  risk_premium: 8.0,         # Equity risk
  expected_growth_rate: 15.0 # Growth projection
)

asset.targeted_annual_return # => 27.5

Seeds updated with realistic values. Unit tests cover calculation edge cases.

Original prompt

This section details on the original issue you should resolve

<issue_title>display a targeted annual return (percentage) for each asset</issue_title>
<issue_description>the targeted annual return should be based on a real formula using estimated real-world parameters. add fields to the asset model as required by the formula</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 10, 2026 05:13
Co-authored-by: buhrmi <51177+buhrmi@users.noreply.github.com>
Co-authored-by: buhrmi <51177+buhrmi@users.noreply.github.com>
Co-authored-by: buhrmi <51177+buhrmi@users.noreply.github.com>
Copilot AI changed the title [WIP] Display targeted annual return for each asset Add targeted annual return calculation and display for assets Jan 10, 2026
Copilot AI requested a review from buhrmi January 10, 2026 05:17
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.

display a targeted annual return (percentage) for each asset

2 participants