<%= admin_breadcrumbs(@breadcrumbs) %>

<%= @stock.ticker %>

<%= link_to edit_admin_stock_path(@stock), class: "inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" do %> Edit <% end %> <%= link_to admin_stock_path(@stock), data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete this stock?" }, class: "inline-flex items-center px-4 py-2 border border-red-300 shadow-sm text-sm font-medium rounded-md text-red-700 bg-white hover:bg-red-50" do %> Delete <% end %>
<%= admin_show_attributes( @stock, attributes: %i[id ticker company_name company_website stock_exchange archived created_at updated_at] ) %> <% if @stock.description.present? %>

Description

<%= @stock.description %>

<% end %>

Price Information

Current Price
<%= number_to_currency(@stock.current_price) %>
Yesterday's Price
<%= number_to_currency(@stock.yesterday_price) %>
Percentage Change
<%= @stock.percentage_change_formatted %>

Company Information

Employees
<%= @stock.employees || "—" %>
Industry
<%= @stock.industry || "—" %>

Financial Metrics

Cash Flow
<%= @stock.cash_flow || "—" %>
Debt
<%= @stock.debt || "—" %>
Debt to Equity
<%= @stock.debt_to_equity || "—" %>
Profit Margin
<%= @stock.profit_margin || "—" %>
Sales Growth
<%= @stock.sales_growth || "—" %>

Industry Averages

Avg Debt to Equity
<%= @stock.industry_avg_debt_to_equity || "—" %>
Avg Profit Margin
<%= @stock.industry_avg_profit_margin || "—" %>
Avg Sales Growth
<%= @stock.industry_avg_sales_growth || "—" %>
<% if @stock.management.present? %>

Management

<%= @stock.management %>

<% end %> <% if @stock.competitor_names.present? %>

Competitor Names

<%= @stock.competitor_names %>

<% end %> <% if @stock.portfolio_stocks.any? %>

Portfolio Stocks (<%= @stock.portfolio_stocks.count %>)

This stock is held in <%= @stock.portfolio_stocks.count %> portfolio(s)

<% end %>
<%= link_to "Back to Stocks", admin_stocks_path, class: "inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" %>