@extends('layouts.app') @section('title', $stock->symbol) @section('eyebrow', $stock->exchange) @section('heading', $stock->symbol.' · '.$stock->name) @section('subtitle', $stock->company ? 'Linked to '.$stock->company->name.' news' : 'Not linked to a company') @section('content')

Price history with news events

Dots mark days with news about the company.

Did the story move the price?

@forelse($impact as $row) @empty @endforelse
DateStoryToneNext closeMove
{{ $row['article']->published_at?->format('d M') }}{{ \Illuminate\Support\Str::limit($row['article']->title, 80) }} {{ $row['article']->pivot->tone }} {{ $row['price']?->close ?? '—' }} {{ $row['price'] ? $row['price']->change_pct.'%' : '—' }}
No news linked.

Add closing price

@csrf

@csrf @method('DELETE')
@endsection @push('scripts') @include('partials.charts') @php $priceData = $stock->prices->map(fn($p) => ['x' => $p->trade_date->format('d M'), 'y' => $p->close])->values(); $newsDays = $impact->map(fn($r) => $r['price']?->trade_date?->format('d M'))->filter()->unique()->values(); @endphp @endpush