@livewire('manage-transaction-form', [ 'portfolio' => $portfolio, 'symbol' => $holding->market_data->symbol, ]) @livewire('holding-options-form', [ 'holding' => $holding ]) {{ $portfolio->title }} ยป {{ $holding->market_data->symbol }} @can('fullAccess', $portfolio) @endcan @can('fullAccess', $portfolio) @endcan
{{ $holding->market_data->symbol }} {{ $holding->market_data->name }} @livewire('holding-market-data', ['holding' => $holding])

{{ __('Market Cap') }}: ${{ Number::forHumans($holding->market_data->market_cap ?? 0) }}

{{ __('Forward PE') }}: {{ $holding->market_data->forward_pe }}

{{ __('Trailing PE') }}: {{ $holding->market_data->trailing_pe }}

{{ __('Book Value') }}: {{ $holding->market_data->book_value }}

{{ __('52 week') }}:

{{ __('Dividend Yield') }}: {{ Number::percentage( $holding->market_data->dividend_yield ?? 0, $holding->market_data->dividend_yield < 1 ? 2 : 0 ) }}

{{ __('Last Dividend Paid') }}: {{ $holding->market_data?->last_dividend_date?->format('F d, Y') ?? '' }}

@livewire('transactions-list', [ 'portfolio' => $holding->portfolio, 'transactions' => $holding->transactions, 'shouldGoToHolding' => false ]) @if($holding->dividends->isEmpty())
{{ __('No dividends for :symbol yet', ['symbol' => $holding->symbol]) }}
@endif @livewire('holding-dividends-list', ['holding' => $holding])
@if($holding->splits->isEmpty())
{{ __('No splits for :symbol yet', ['symbol' => $holding->symbol]) }}
@endif @foreach ($holding->splits->take(5) as $split) 1:{{ $split->split_amount }} {{ $split->date->format('F d, Y') }} @endforeach
@if(config('services.ai_chat_enabled')) {{-- // TODO: add to system prompt: // Additionally, here is some recent news about {$this->holding->symbol}: // And their latest SEC filings: --}} @livewire('ai-chat-window', [ 'chatable' => $holding, 'suggested_prompts' => [ [ 'text' => 'What are the key risks?', 'value' => 'What are the key risks for the company?' ], [ 'text' => 'Should I invest more?', 'value' => 'Is it worthwhile to invest more?' ], [ 'text' => 'Should I sell?', 'value' => 'When is a good time for me to sell?' ], [ 'text' => 'What are the key strengths?', 'value' => 'What are the key strengths for this company?' ], [ 'text' => 'Is this a successful position?', 'value' => 'Is this a successful holding in my portfolio?' ] ], 'system_prompt' => " You are an investment portfolio assistant providing advice to an investor. Use the following information to provide relevant recommendations. Use the words 'likely' or 'may' instead of concrete statements (except for obvious statements of fact or common sense): The investor owns ". ($holding->quantity > 0 ? 'a total of '.$holding->quantity : 'ZERO') ." shares of {$holding->market_data->name} (ticker: {$holding->symbol}) with an average cost basis of {$holding->average_cost_basis}. Here are the relevant transactions - sales and purchases of {$holding->symbol}: {$formattedTransactions} This investor has earned $ {$holding->dividends_earned} in dividends so far and earned {$holding->realized_gains_dollars} in realized gains (sales) from {$holding->symbol} in this portfolio. The current market price for {$holding->symbol} is {$holding->market_data->market_value}. Additionally, here's other critical fundamentals for {$holding->market_data->name} that might help: * Market cap: {$holding->market_data->market_cap} * Forward PE: {$holding->market_data->forward_pe} * Trailing PE: {$holding->market_data->trailing_pe} * Book value: {$holding->market_data->book_value} * 52 week low: {$holding->market_data->fifty_two_week_low} * 52 week high: {$holding->market_data->fifty_two_week_high} * Dividend yield: {$holding->market_data->dividend_yield} This data is current as of today's date: " . now()->format('Y-m-d') . ". Based on this current market data, quantity owned, and average cost basis, you should determine if the {$holding->symbol} holding is making or losing money. Below is the question from the investor. Considering these facts, provide a concise response to the following question (give a direct response). Limit your response to no more than 75 words and consider using a common decision framework. Use github style markdown for any formatting:" ]) @endif