%# locals: (investment_metrics:) %> <% if investment_metrics[:has_investments] %>
<%= format_money(investment_metrics[:portfolio_value]) %>
<%= format_money(Money.new(investment_metrics[:unrealized_trend].value, Current.family.currency)) %> (<%= investment_metrics[:unrealized_trend].percent_formatted %>)
<% else %><%= t("reports.investment_performance.no_data") %>
<% end %><%= format_money(investment_metrics[:period_contributions]) %>
<%= format_money(investment_metrics[:period_withdrawals]) %>
| <%= t("reports.investment_performance.holding") %> | <%= t("reports.investment_performance.weight") %> | <%= t("reports.investment_performance.value") %> | <%= t("reports.investment_performance.return") %> |
|---|---|---|---|
|
<% if holding.security.logo_url.present? %>
<%= holding.ticker[0..1] %>
<% end %>
<%= holding.ticker %> <%= truncate(holding.name, length: 25) %> |
<%= number_to_percentage(holding.weight || 0, precision: 1) %> | <%= format_money(holding.amount_money) %> | <% if holding.trend %> <%= holding.trend.percent_formatted %> <% else %> <%= t("reports.investment_performance.no_data") %> <% end %> |
<%= icon("alert-triangle", size: "sm") %> <%= t("reports.investment_performance.taxable_realized_note") %>
<% end %><%= t("reports.investment_performance.holdings") %>
<% data[:holdings].first(5).each do |holding| %><%= t("reports.investment_performance.and_more", count: data[:holdings].count - 5) %>
<% end %><%= t("reports.investment_performance.sell_trades") %>
<% data[:sell_trades].first(5).each do |trade| %> <% gain = trade.realized_gain_loss %><%= t("reports.investment_performance.and_more", count: data[:sell_trades].count - 5) %>
<% end %><%= account.name %>
<%= account.short_subtype_label %>
<%= format_money(account.balance_money) %>
<% end %> <% end %>