<?php

namespace App\Services\Forecasting\Models;

use App\Services\Forecasting\Contracts\WeeklyForecastModel;
use App\Services\Forecasting\FeatureSpec;
use App\Services\Forecasting\WeeklyPrediction;
use Carbon\CarbonInterface;

/**
 * Predicts ΔULSP[t+1] = 0 for every week. Direction = 'flat'.
 *
 * The floor any future model must beat. Per Alquist/Kilian, the
 * no-change benchmark is hard to beat for short-horizon oil/fuel
 * forecasts — if the ridge model can't beat this, the features are wrong.
 */
final class NaiveZeroChangeModel implements WeeklyForecastModel
{
    public function featureSpec(): FeatureSpec
    {
        return new FeatureSpec(modelLabel: 'naive-zero', features: []);
    }

    public function train(array $trainingMondays): void {}

    public function predict(CarbonInterface $targetMonday): WeeklyPrediction
    {
        return new WeeklyPrediction(
            targetMonday: $targetMonday,
            magnitudePence: 0.0,
            direction: 'flat',
        );
    }

    public function coefficients(): ?array
    {
        return null;
    }
}
