SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.17515 · NeurIPS · 2024

From News to Forecast: Integrating Event Analysis in LLM-Based Time Series Forecasting with Reflection

Jinjin Gu, Xinlei Wang, Maike Feng, Jing Qiu, Junhua Zhao

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 10 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2409.17515.json · badge: /api/ran/2409.17515.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ameliawong1996/From_News_to_Forecast canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
DAMO-DI-ML/NeurIPS2023-One-Fits-All canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
categorize_state Ran
ran; our contract draft was wrong, not the code
ameliawong1996/From_News_to_Forecast/Agent/code/AU_LF_dataload_final.py
code served (permissive licence) · get_code("8c62102c18d2d432")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def categorize_state(region):
    """Categorizes a region entry into Australian state(s) based on known names, abbreviations, and cities."""
    state_patterns = {'NSW': '\\b(NSW|New South Wales|Sydney|Newcastle|Wollongong|East Coast|Eastern Australia|East Coast of Australia)\\b', 'VIC': '\\b(VIC|Victoria|Melbourne|East Coast|Eastern Australia|East Coast of Australia)\\b', 'QLD': '\\b(QLD|Queensland|Brisbane|Gold Coast|Sunshine Coast|Eastern Australia|East Coast of Australia)\\b', 'SA': '\\b(SA|South Australia|Adelaide|Southern States)\\b', 'TAS': '\\b(TAS|Tasmania|Hobart)\\b', 'WA': '\\b(WA|Western Australia|Perth)\\b', 'NT': '\\b(NT|Northern Territory|Darwin)\\b', 'ACT': '\\b(ACT|Australian Capital Territory|Canberra)\\b'}
    matched_states = ''
    region_str = str(region)
    i = 0
    for state, pattern in state_patterns.items():
        if re.search(pattern, region_str, re.IGNORECASE):
            if i == 0:
                matched_states += state
            else:
                matched_states += ',' + state
            i = i + 1
    if not matched_states:
        if 'AUS' in region_str or 'Australia' in region_str or 'National' in region_str or ('General' in region_str) or ('multiple' in region_str) or ('Various' in region_str):
            return 'National'
        elif 'Global' in region_str or 'International' in region_str or 'Asia Pacific' in region_str or ('US' in region_str) or ('NZ' in region_str) or ('New Zealand' in region_str):
            return 'Global'
        else:
            return 'Unknown'
    return matched_states


ARGS = {
    'region': 'Sydney, NSW'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_weekday_or_weekend Ran
ran; our contract draft was wrong, not the code
ameliawong1996/From_News_to_Forecast/Agent/code/AU_LF_dataload_final.py
code served (permissive licence) · get_code("85901905d82ce6f9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from datetime import datetime

ARGS = {
    'date': datetime(2024, 1, 15)  # Monday, a weekday
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_metrics_per_batch_to_per_sample Ran
ran; our contract draft was wrong, not the code
DAMO-DI-ML/NeurIPS2023-One-Fits-All/Classification/src/running.py
pointer only (licence: NONE); the stored copy get_code serves, from DAMO-DI-ML/One_Fits_All, is pointer only (licence: NONE) · get_code("f79cf1a40c083fee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DAMO-DI-ML/NeurIPS2023-One-Fits-All when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

divide_no_nan Ran
ran, honoured the contract we drafted
DAMO-DI-ML/NeurIPS2023-One-Fits-All/Anomaly_Detection/utils/losses.py
pointer only (licence: NONE); the stored copy get_code serves, from seungyoon-Choi/CoSPOT, is pointer only (licence: NONE) · get_code("bdc787c888ab83a2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DAMO-DI-ML/NeurIPS2023-One-Fits-All when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_numeric Ran
ran; our contract draft was wrong, not the code
ameliawong1996/From_News_to_Forecast/accuracy-ts.py
code served (permissive licence) · get_code("ffdca11a645038ed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def extract_numeric(value):
    match = re.match('([-+]?\\d*\\.?\\d+)', value)
    return match.group(0) if match else None

ARGS = {
    'value': '42.5'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_optimizer Ran
ran; our contract draft was wrong, not the code
DAMO-DI-ML/NeurIPS2023-One-Fits-All/Classification/src/optimizers.py
pointer only (licence: NONE); the stored copy get_code serves, from DAMO-DI-ML/One_Fits_All, is pointer only (licence: NONE) · get_code("b8f656bc0425d825")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DAMO-DI-ML/NeurIPS2023-One-Fits-All when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

l2norm Ran
ran; our contract draft was wrong, not the code
DAMO-DI-ML/NeurIPS2023-One-Fits-All/Few-shot_Learning/models/PatchTST.py
pointer only (licence: NONE); the stored copy get_code serves, from tmlresearchgroup-cas/clipure, is pointer only (licence: NONE) · get_code("3eb58dae620046d3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DAMO-DI-ML/NeurIPS2023-One-Fits-All when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

process_news_section Ran
ran; our contract draft was wrong, not the code
ameliawong1996/From_News_to_Forecast/Agent/code/justify_news_format_final.py
code served (permissive licence) · get_code("a7d7c1ad819ea986")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Setup for process_news_section function
news_json = {
    'breaking_news': [
        {
            'news': 'Market reaches new high',
            'rationality': 'Strong economic indicators',
            'time': '2024-01-15 10:30',
            'region': 'US'
        },
        {
            'news': 'Tech stocks surge',
            'rationality': 'Positive earnings reports',
            'time': '2024-01-15 11:45',
            'region': 'Global'
        }
    ],
    'regional_news': [
        {
            'news': 'Local infrastructure project starts',
            'rationality': 'Government initiative',
            'time': '2024-01-15 09:00',
            'region': 'Europe'
        }
    ],
    'empty_section': []
}

section_key = 'breaking_news'

ARGS = {
    'news_json': news_json,
    'section_key': section_key
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
replace_in_text Ran
ran; our contract draft was wrong, not the code
ameliawong1996/From_News_to_Forecast/Agent/code/justify_news_format_final.py
code served (permissive licence) · get_code("f1f0516a780f8f51")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "text": "```json example: no test ** data```"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_list_by_markers Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliawong1996/From_News_to_Forecast/accuracy-ts.py
code served (permissive licence) · get_code("629d7705ab5051c9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    "input_list": [1, 3, 5, 2, 7, 9, 1, 11, 2],
    "start_marker": 1,
    "end_marker": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_list_by_number Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliawong1996/From_News_to_Forecast/accuracy-ts.py
code served (permissive licence) · get_code("7393024cf8a2a0a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def split_list_by_number(lst, number, n):
    result = []
    i = 0
    while i < len(lst):
        if lst[i] == number:
            sub_list = lst[i:i + n + 1]
            result.append(sub_list)
            i += n
        else:
            i += 1
    return result

# Construct arguments
lst = [1, 2, 5, 3, 5, 4, 5, 6, 7]
number = 5
n = 2

ARGS = {
    'lst': lst,
    'number': number,
    'n': n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
download_model_retry Not yet run
unverified (harvested, no recorded run)
ameliawong1996/From_News_to_Forecast/model_download.py
code served (permissive licence) · get_code("29e31466888b16c0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 4 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
l2norm 16 other papers
13 dated earlier, 3 later · 4 only as an assembly brick
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.07852 (2022-03)
Block-Recurrent Transformers
and 13 more not named here
divide_no_nan 14 other papers
6 dated earlier, 8 later
2401.09093 (2024-01)
RWKV-TS: Beyond Traditional Recurrent Neural Network for Time Series Tasks
2402.04852 (2024-02)
Multi-Patch Prediction: Adapting LLMs for Time Series Representation Learning
2403.01493 (2024-03)
ConvTimeNet: A Deep Hierarchical Fully Convolutional Model for Multivariate Time Series Analysis
and 11 more not named here
convert_metrics_per_batch_to_per_sample 3 other papers
2 dated earlier, 1 later
2010.02803 (2020-10)
A Transformer-based Framework for Multivariate Time Series Representation Learning
2308.08241 (2023-08)
TEST: Text Prototype Aligned Embedding to Activate LLM's Ability for Time Series
2510.19710 (2025-10)
SEMPO: Lightweight Foundation Models for Time Series Forecasting
get_optimizer 3 other papers
2 dated earlier, 1 later
2308.08241 (2023-08)
TEST: Text Prototype Aligned Embedding to Activate LLM's Ability for Time Series
2401.09093 (2024-01)
RWKV-TS: Beyond Traditional Recurrent Neural Network for Time Series Tasks
2510.19710 (2025-10)
SEMPO: Lightweight Foundation Models for Time Series Forecasting
download_model_retry 1 other paper
1 dated earlier
2403.15268 (2024-03)
Awakening Augmented Generation: Learning to Awaken Internal Knowledge of Large Language Models for Question Answering

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This paper introduces a novel approach that leverages Large Language Models (LLMs) and Generative Agents to enhance time series forecasting by reasoning across both text and time series data. With language as a medium, our method adaptively integrates social events into forecasting models, aligning news content with time series fluctuations to provide richer insights. Specifically, we utilize LLM-based agents to iteratively filter out irrelevant news and employ human-like reasoning to evaluate predictions. This enables the model to analyze complex events, such as unexpected incidents and shifts in social behavior, and continuously refine the selection logic of news and the robustness of the agent's output. By integrating selected news events with time series data, we fine-tune a pre-trained LLM to predict sequences of digits in time series. The results demonstrate significant improvements in forecasting accuracy, suggesting a potential paradigm shift in time series forecasting through the effective utilization of unstructured news data.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2409.17515")
get_code_for_paper("2409.17515")
have("2409.17515")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2409.17515.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2409.17515.svg)](https://syntology.ai/paper/2409.17515)

Connect an agent — have() is free.