SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.11327 · 2026

Long-Horizon Forecasting of Complete Financial Statements with Forma

Yihao Chen, Soumyabrata Chaudhuri, Travis Johnson, Jiannan Jiang, Lauren Falvey, Donal O'cofaigh

arXiv · PDF

Code that ran

34 of 46 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; 4 honoured the contract we drafted, 3 violated it and 1 has no contract verdict; 26 failures of our instrument; 12 no recorded run), measured 2026-11-23; 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/2608.11327.json · badge: /api/ran/2608.11327.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
forma-lab-mccombs/proforma-20q canonical (classifier label)
classifier basis: census
23 ran · 10 no recorded run
forma-lab-mccombs/forma-release canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
canon_firm_ids Ran
ran, honoured the contract we drafted
forma-lab-mccombs/forma-release/src/forma/scoring/eval_cache.py
code served (permissive licence) · get_code("9a2e329955bc07b5")
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 Series. 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 pandas as pd

# Test case 1: numeric firm_ids that can be losslessly converted to Int64
s_numeric = pd.Series(['001004', '000042', '010203'])

# Test case 2: non-numeric firm_ids that should pass through unchanged
s_non_numeric = pd.Series(['F1', 'firm_0000', 'ABC'])

# Test case 3: mixed with some nulls (but all non-null values are convertible)
s_with_nulls = pd.Series(['001', '002', None, '003'])

# Test case 4: mixed numeric strings and non-numeric that can't be losslessly converted
s_mixed = pd.Series(['001', 'F1', '002'])

ARGS = {
    's': s_numeric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 and dtype family int 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
canon_firm_ids Ran
ran, honoured the contract we drafted
forma-lab-mccombs/proforma-20q/src/proforma20q/truth_grid.py
code served (permissive licence) · get_code("301947e878db8b85")
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 Series. 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 pandas as pd
import numpy as np

# Create test data for canon_firm_ids
# Test case 1: Series with numeric values as strings and integers
s = pd.Series(['001', '002', 1, 2, np.nan, '005'])

ARGS = {
    's': s
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
canon_origin Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/truth_grid.py
code served (permissive licence) · get_code("a78efa7957303097")
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 Series. 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 pandas as pd
import numpy as np

# Create test data for the function
# Test case 1: PeriodIndex with Q-DEC frequency
s_period_dec = pd.Series(
    [1, 2],
    index=pd.period_range('2023Q1', periods=2, freq='Q-DEC'),
    dtype='int64'
)
s_period_dec.index.name = None
s_period_dec = s_period_dec.reset_index(drop=True)
# Create a proper period series
s_period_dec = pd.Series(
    pd.period_range('2023Q1', periods=2, freq='Q-DEC')
)

# Test case 2: datetime Series
s_datetime = pd.Series(
    pd.date_range('2023-01-01', periods=2, freq='D')
)

# Test case 3: PeriodIndex with non-DEC frequency
s_period_other = pd.Series(
    pd.period_range('2023Q1', periods=2, freq='Q-MAR')
)

ARGS = {
    's': s_datetime
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
coerce_declared_dtypes Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/download.py
code served (permissive licence) · get_code("da0e01698bd93b38")
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 DataFrame. 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 numpy as np
import pandas as pd

# Create a sample DataFrame with mixed dtypes
df = pd.DataFrame({
    'id': [1, 2, 3, 4],
    'price': ['10.5', '20.3', None, '30.1'],
    'quantity': [100, 200, 300, 400],
    'date_col': ['2023-01-01', '2023-01-02', '2023-01-03', None],
    'name': ['A', 'B', 'C', 'D']
})

# Create declared dtypes mapping from Postgres type names
declared = {
    'id': 'integer',
    'price': 'numeric',
    'quantity': 'bigint',
    'date_col': 'timestamp without time zone',
    'name': 'text'
}

ARGS = {
    'df': df,
    'declared': declared
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
column_hashes Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/checksums.py
code served (permissive licence) · get_code("2a66bf767312634b")
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 dict. 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 hashlib
import numpy as np
import pandas as pd

# Create a sample DataFrame with the expected columns
# The function looks for columns that:
# 1. Don't start with 'indff48_'
# 2. Contain '_level_' or '_yoy_' or match the target pattern (_t followed by digits)

df = pd.DataFrame({
    'indff48_ignore_this': [1.0, 2.0, 3.0],
    'feature_level_1': [1.234567, 2.345678, 3.456789],
    'feature_yoy_growth': [0.05, 0.06, 0.07],
    'target_t0': [10.111111, 20.222222, 30.333333],
    'target_t1': [11.444444, 21.555555, 31.666666],
    'not_regularized': [100.0, 200.0, 300.0],
    'indff48_level_skip': [5.0, 6.0, 7.0],
})

ARGS = {
    'df': df,
    'decimals': 6,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
column_stats Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/checksums.py
code served (permissive licence) · get_code("bb0cbbaa5075af5c")
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 dict. 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 numpy as np
import pandas as pd

# Create a sample DataFrame with columns that match the filtering logic
# The function looks for columns with '_level_' or '_yoy_' or target columns (_t followed by digits)
# and excludes columns starting with 'indff48_'

np.random.seed(0)

# Create a DataFrame with regularized values (roughly in the |z| <= 6 space)
data = {
    'price_level_usd': np.random.randn(100) * 2,
    'sales_yoy_pct': np.random.randn(100) * 1.5,
    'revenue_t1': np.random.randn(100) * 2.3,
    'revenue_t2': np.random.randn(100) * 1.8,
    'indff48_sector': np.random.randn(100) * 2,  # Should be excluded
    'earnings_level_usd': np.random.randn(100) * 3,
    'margin_yoy_bps': np.random.randn(100) * 1.2,
    'other_column': np.random.randn(100) * 2,  # Should be excluded (no _level_, _yoy_, or _t)
}

# Add some NaN values to test coverage calculation
data['price_level_usd'][10:15] = np.nan
data['revenue_t1'][0:5] = np.inf

df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'decimals': 6,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
crps_per_entry Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
forma-lab-mccombs/proforma-20q/src/proforma20q/evaluate.py
code served (permissive licence) · get_code("a76eb758aeb383af")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np
import math

# Test case 1: gaussian family
res_gaussian = np.array([0.5, -0.3, 1.2, -0.1])
sigma_gaussian = np.array([0.8, 1.0, 0.5, 1.5])

# Test case 2: laplace family
res_laplace = np.array([0.2, -0.5, 0.8])
sigma_laplace = np.array([0.6, 0.9, 1.2])

# Test case 3: student_t family
res_student = np.array([0.1, -0.4, 0.6, 0.2])
sigma_student = np.array([0.7, 1.1, 0.9, 0.8])

# Using gaussian as the primary test case
ARGS = {
    'res': res_gaussian,
    'sigma': sigma_gaussian,
    'family': 'gaussian',
    'df': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
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
dataset_suffix Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/build.py
code served (permissive licence) · get_code("1ff0b04199cec615")
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

ARGS = {
    'feature_set': 'embeddings',
    'dataset_tag': 'mnist'
}
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
de_regularize Ran
ran, violated the contract we drafted
forma-lab-mccombs/proforma-20q/src/proforma20q/transforms.py
code served (permissive licence) · get_code("b6b31a46d62faab7")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

ARGS = {
    "x": np.array([0.5, 1.2, -0.3, 2.1]),
    "k": 2.5,
    "mu": 0.1,
    "sigma": 0.8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
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
discover_feature_sets Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/scoring/evaluate.py
code served (permissive licence) · get_code("c5693488b4bc49d5")
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 tempfile
from pathlib import Path
import os

# Create a temporary directory with mock forecast files
temp_dir = tempfile.mkdtemp()
forecasts_dir = Path(temp_dir)

# Create sample forecast files matching the naming patterns
# 3-segment legacy: {model}__{feature_set}__predictions.parquet
(forecasts_dir / "model1__features_a__predictions.parquet").touch()
(forecasts_dir / "model2__features_b__predictions.parquet").touch()

# 4-segment current: {model}__{feature_set}__{split}__predictions.parquet
(forecasts_dir / "model3__features_a__train__predictions.parquet").touch()
(forecasts_dir / "model4__features_b__val__predictions.parquet").touch()
(forecasts_dir / "model5__features_c__test__predictions.parquet").touch()

# 5-segment seeded: {model}__{feature_set}__{seed}__{split}__predictions.parquet
(forecasts_dir / "model6__features_a__42__train__predictions.parquet").touch()
(forecasts_dir / "model7__features_b__123__val__predictions.parquet").touch()

# Complex model name with __ in it
(forecasts_dir / "llm_v1__gpt2__features_a__test__predictions.parquet").touch()
(forecasts_dir / "llm_v2__gpt2__features_b__99__val__predictions.parquet").touch()

ARGS = {
    "forecasts_dir": forecasts_dir,
    "feature_set_filter": None,
    "splits": ["train", "val", "test"],
}
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 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
discover_forecast_files Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/scoring/evaluate.py
code served (permissive licence) · get_code("0d7dad9545ad421f")
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 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.

from pathlib import Path
import tempfile
import os

# Create a temporary directory with test prediction files
temp_dir = tempfile.mkdtemp()
forecasts_dir = Path(temp_dir)

# Create some test files matching the different naming patterns
# 3-segment legacy format
(forecasts_dir / "model_v1__features_basic__predictions.parquet").touch()

# 4-segment current format
(forecasts_dir / "model_v2__features_advanced__train__predictions.parquet").touch()
(forecasts_dir / "model_v2__features_advanced__test__predictions.parquet").touch()

# 5-segment seeded format
(forecasts_dir / "model_v3__features_premium__42__val__predictions.parquet").touch()
(forecasts_dir / "model_v3__features_premium__99__test__predictions.parquet").touch()

# Model with __ in its name (complex case)
(forecasts_dir / "llm_prompt_v1__gpt2__features_basic__train__predictions.parquet").touch()

# File that doesn't match pattern (should be skipped)
(forecasts_dir / "not_a_predictions.parquet").touch()
(forecasts_dir / "broken__file.txt").touch()

ARGS = {
    "forecasts_dir": forecasts_dir,
    "feature_set": None,
    "split": None,
}
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 list, ndim 2, 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
discover_targets Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/truth_grid.py
code served (permissive licence) · get_code("afcac8a20985153e")
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 tuple. 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 pandas as pd
import re

LEVEL0_SUFFIX = '_level_0'

_HORIZON_RE = re.compile('(.+)_t(\\d+)$')

def discover_targets(truth_df: pd.DataFrame) -> tuple[list[str], dict[str, list[tuple[str, int]]]]:
    """Find ``(target, [(col, h)])`` pairs that also carry a ``{target}_level_0``
    baseline column."""
    per_target: dict[str, list[tuple[str, int]]] = {}
    for col in truth_df.columns:
        m = _HORIZON_RE.match(col)
        if not m:
            continue
        per_target.setdefault(m.group(1), []).append((col, int(m.group(2))))
    targets = sorted((t for t in per_target if f'{t}{LEVEL0_SUFFIX}' in truth_df.columns))
    for t in per_target:
        per_target[t].sort(key=lambda kv: kv[1])
    return (targets, per_target)

# Construct a DataFrame with columns matching the expected pattern
# Pattern is: {target}_t{horizon}
# And baseline columns: {target}_level_0

data = {
    'metric_a_t1': [1.0, 2.0],
    'metric_a_t2': [3.0, 4.0],
    'metric_a_t3': [5.0, 6.0],
    'metric_a_level_0': [0.5, 0.6],
    'metric_b_t1': [7.0, 8.0],
    'metric_b_t2': [9.0, 10.0],
    'metric_b_level_0': [1.1, 1.2],
    'metric_c_t1': [11.0, 12.0],
    # Note: metric_c has no level_0, so should not appear in targets
    'other_column': [100, 200],
}

truth_df = pd.DataFrame(data)

ARGS = {
    'truth_df': truth_df,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
discover_targets Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/common.py
code served (permissive licence) · get_code("0ca2d63496710dd4")
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 pandas as pd

# The function discover_targets expects a df parameter
# It calls _colnames(df) which checks for a 'columns' attribute
# Then it uses regex matching on column names to find targets and baselines

# Create a minimal DataFrame with the required column patterns
df = pd.DataFrame({
    'item1_level_0': [1, 2],
    'item1_t1': [3, 4],
    'item1_t2': [5, 6],
    'item2_level_0': [7, 8],
    'item2_t1': [9, 10],
    'other_column': [11, 12],
    'item3_t5': [13, 14],  # has target but no level_0, should not match
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
feature_columns Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/common.py
code served (permissive licence) · get_code("bda3b8cd54df0aa7")
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 pandas as pd

class MockDataFrame:
    """Mock object that behaves like a pandas DataFrame for column access."""
    def __init__(self, columns):
        self.columns = columns

# Create a mock dataframe with various column types
columns = [
    'price_level_t0',
    'volume_yoy_t0',
    'indff48_sector1',
    'indff48_sector2',
    'momentum_level_t1',
    'returns_yoy_t1',
    'target_t1',
    'target_t5',
    'other_feature_t0',
    'metadata_key'
]

mock_df = MockDataFrame(columns)

ARGS = {
    'df': mock_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
file_fingerprint Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/scoring/eval_cache.py
code served (permissive licence) · get_code("dfd2a41a71fd5d10")
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 dict. 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 tempfile
from pathlib import Path

# Create a temporary file to use for the fingerprint function
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as tmp:
    tmp.write('test content for fingerprinting')
    tmp_path = tmp.name

ARGS = {
    'path': tmp_path
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
finalize_forecast_frame Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/models/forecast_io.py
code served (permissive licence) · get_code("75c0f05939196a6e")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a sample forecast dataframe with all canonical columns plus some extras
forecasts_df = pd.DataFrame({
    'firm_id': [1, 2, 3, 4],
    'target': ['revenue', 'revenue', 'earnings', 'earnings'],
    'quarter': ['Q1_2023', 'Q1_2023', 'Q2_2023', 'Q2_2023'],
    'forecast_horizon': [1, 1, 2, 2],
    'prediction': np.array([100.5, 200.3, 150.7, 250.2], dtype='float64'),
    'sigma': np.array([10.1, 20.2, 15.5, 25.3], dtype='float64'),
    'model': ['model_v1', 'model_v2', 'model_v1', 'model_v2'],
    'diagnostic_col_1': ['extra', 'data', 'here', 'too'],
    'diagnostic_col_2': [1.0, 2.0, 3.0, 4.0],
})

ARGS = {
    'forecasts_df': forecasts_df,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
firm_ff48_map Ran
ran on a synthesized input
forma-lab-mccombs/proforma-20q/src/proforma20q/build.py
code served (permissive licence) · get_code("5e4ca8cc3c6957dd")
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 dict. 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 numpy as np
import pandas as pd

# Mock load_ff48_ranges to provide test data
def load_ff48_ranges():
    return {
        'industries': [
            {
                'id': 1,
                'name': 'Agriculture',
                'sic_ranges': [(100, 199), (200, 299)]
            },
            {
                'id': 2,
                'name': 'Mining',
                'sic_ranges': [(1000, 1499)]
            },
            {
                'id': 48,
                'name': 'Other',
                'sic_ranges': [(9900, 9999)]
            }
        ],
        'unknown_id': 48
    }

# Replace the import in the module
import sys
from types import ModuleType
mock_module = ModuleType('mock_ff48')
mock_module.load_ff48_ranges = load_ff48_ranges
sys.modules['ff48_module'] = mock_module

# Now define the functions with the mock
def _ff48_flat() -> tuple[list[tuple[int, int, int]], int, dict[int, str]]:
    cfg = load_ff48_ranges()
    ranges: list[tuple[int, int, int]] = []
    id_to_name: dict[int, str] = {}
    for ind in cfg['industries']:
        id_to_name[ind['id']] = ind['name']
        for lo, hi in ind['sic_ranges']:
            ranges.append((int(lo), int(hi), int(ind['id'])))
    ranges.sort(key=lambda t: t[0])
    unknown_id = int(cfg.get('unknown_id', 48))
    return (ranges, unknown_id, id_to_name)

def sic_to_ff48(sich: pd.Series) -> pd.Series:
    """Map a SIC-code series to FF48 industry ids (first matching range wins;
    NaN / out-of-range -> unknown_id)."""
    ranges, unknown_id, _ = _ff48_flat()
    out = pd.Series(unknown_id, index=sich.index, dtype='int64')
    s = pd.to_numeric(sich, errors='coerce')
    for lo, hi, fid in ranges:
        m = s.between(lo, hi) & (out == unknown_id)
        out[m] = fid
    out[s.isna()] = unknown_id
    return out

def firm_ff48_map(raw_df: pd.DataFrame, firm_col: str='firm_id') -> dict:
    """Firm -> FF48 id from each firm's MODAL ``sich``."""
    if 'sich' not in raw_df.columns:
        return {}
    modal = raw_df.groupby(firm_col)['sich'].agg(lambda s: s.mode().iloc[0] if not s.mode().empty else np.nan)
    ff = sic_to_ff48(modal)
    return dict(zip(modal.index, ff))

# Create test data
raw_df = pd.DataFrame({
    'firm_id': ['F1', 'F1', 'F2', 'F2', 'F3'],
    'sich': [150, 150, 1200, 1200, 9950]
})

ARGS = {
    'raw_df': raw_df,
    'firm_col': 'firm_id'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
forecast_warnings Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/schema.py
code served (permissive licence) · get_code("7dfe133fa504f9d1")
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 numpy as np
import pandas as pd

# Create a valid DataFrame with predictions that will trigger some warnings
df = pd.DataFrame({
    'prediction': [0.5, 1.2, np.nan, 2.3, 65.0, -70.0, 0.1, np.inf]
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
hash_file Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/checksums.py
code served (permissive licence) · get_code("9ee1a6d2b43a7d73")
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 tempfile
import os

# Create a temporary file with some content to hash
temp_dir = tempfile.mkdtemp()
temp_file_path = os.path.join(temp_dir, "test_file.txt")

# Write some test data to the file
with open(temp_file_path, 'w') as f:
    f.write("This is test content for hashing.\n" * 100)

ARGS = {
    "path": temp_file_path
}
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
level_group_vals Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/scoring/evaluate.py
code served (permissive licence) · get_code("d2e26630e38ad032")
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 tuple, 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

torch.manual_seed(0)

ARGS = {
    "level_name": "by_target_horizon",
    "target": "price",
    "horizon": 10
}
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 tuple, ndim 1, dtype family float — a tuple 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
masked_mse_loss Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/models/ffnn.py
code served (permissive licence) · get_code("253b6e5cb59c7135")
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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Construct arguments for masked_mse_loss
# pred: (B, T) predictions
# y: (B, T) targets with NaN marking absent observations
# normalization: 'global' or 'per_target'

batch_size = 2
time_steps = 4

pred = torch.randn(batch_size, time_steps)
y = torch.randn(batch_size, time_steps)

# Introduce some NaN values to test masking
y[0, 1] = float('nan')
y[1, 3] = float('nan')

normalization = 'global'

ARGS = {
    'pred': pred,
    'y': y,
    'normalization': normalization
}
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 Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
masked_nll_loss Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/models/ffnn.py
code served (permissive licence) · get_code("422231df525f5469")
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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Construct tensors with distinct dimensions for clarity
batch_size = 2
num_targets = 4

# mu: predicted means, shape (batch_size, num_targets)
mu = torch.randn(batch_size, num_targets)

# log_sigma_sq: log of variance, shape (batch_size, num_targets)
log_sigma_sq = torch.randn(batch_size, num_targets)

# y: target values, some may be NaN to test masking
y = torch.randn(batch_size, num_targets)
y[0, 1] = float('nan')  # Introduce a NaN to test masking

ARGS = {
    'mu': mu,
    'log_sigma_sq': log_sigma_sq,
    'y': y,
    'loss_type': 'gaussian',
    'student_t_df': 6.0,
    'log_sigma_sq_min': -10.0,
    'log_sigma_sq_max': 10.0,
    'normalization': 'global',
    'beta_nll': 0.0
}
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 Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
md5sum Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/gated.py
code served (permissive licence) · get_code("bbf363b68f36e91f")
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 tempfile
import os

# Create a temporary file with some content to compute md5sum
temp_file = tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.bin')
temp_file.write(b'Hello, this is test content for md5sum calculation.')
temp_file.close()
temp_path = temp_file.name

ARGS = {
    'path': temp_path,
    'chunk': 1 << 22
}
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
nll_per_entry Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
forma-lab-mccombs/proforma-20q/src/proforma20q/evaluate.py
code served (permissive licence) · get_code("95c7b7683a4e2768")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math
import numpy as np

# Create small numpy arrays for residuals and sigma
np.random.seed(0)

res = np.array([0.5, -0.3, 0.1, 0.2])
sigma = np.array([0.8, 1.2, 0.6, 0.9])

# Test with 'gaussian' family (df not needed)
ARGS = {
    'res': res,
    'sigma': sigma,
    'family': 'gaussian',
    'df': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
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
normalize_columns Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/schema.py
code served (permissive licence) · get_code("4e410c00366e3314")
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 DataFrame. 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 pandas as pd

# Create a simple DataFrame with one of the aliased columns
df = pd.DataFrame({
    'firm_id': [1, 2, 3],
    'data': [10, 20, 30]
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family int 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
quantile_col Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/models/chronos_ts.py
code served (permissive licence) · get_code("0ea2bc04ab003a55")
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
import numpy as np

torch.manual_seed(0)

# The function quantile_col takes a single parameter: level (float)
# It formats the level as a string using the :g format specifier
# No complex objects needed - just a simple float value

ARGS = {
    "level": 0.05
}
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 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
regularize Ran
ran, violated the contract we drafted
forma-lab-mccombs/proforma-20q/src/proforma20q/transforms.py
code served (permissive licence) · get_code("e30d565ae03f1693")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

# Construct valid arguments for regularize(v, k, mu, sigma)
# The function expects:
# - v: scalar or numpy array (the raw value)
# - k: scalar or array broadcastable against v (reciprocal firm-size proxy)
# - mu: scalar or array (mean in transformed space)
# - sigma: scalar or array (standard deviation in transformed space)

# Create distinct-sized test data
v = np.array([1.5, 2.3, 0.8, 3.1])  # shape (4,)
k = np.array([0.5, 0.6, 0.7, 0.8])  # shape (4,) - broadcastable
mu = np.array([0.1, 0.2, 0.15, 0.25])  # shape (4,) - mean values
sigma = np.array([0.5, 0.6, 0.55, 0.65])  # shape (4,) - std dev values

ARGS = {
    "v": v,
    "k": k,
    "mu": mu,
    "sigma": sigma
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
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
repo_url Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/gated.py
code served (permissive licence) · get_code("9f9f17bb754a92af")
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

ARGS = {
    'repo_id': 'forma-lab-mccombs/forma',
    'repo_type': 'model'
}
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
seasonal_lag Ran
ran, honoured the contract we drafted
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/naive.py
code served (permissive licence) · get_code("d3ef37b65cee0533")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 = {
    'horizon': 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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
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
sic_to_ff48 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
forma-lab-mccombs/proforma-20q/src/proforma20q/build.py
code served (permissive licence) · get_code("22a49639552b5660")
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 Series. 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 pandas as pd

# Mock the load_ff48_ranges function that _ff48_flat depends on
def load_ff48_ranges():
    return {
        'industries': [
            {
                'id': 1,
                'name': 'Agriculture',
                'sic_ranges': [(100, 199)]
            },
            {
                'id': 2,
                'name': 'Mining',
                'sic_ranges': [(1000, 1099), (1200, 1299)]
            },
            {
                'id': 48,
                'name': 'Other',
                'sic_ranges': [(9900, 9999)]
            }
        ],
        'unknown_id': 48
    }

# Inject the mock function into the module namespace
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'load_ff48_ranges', load_ff48_ranges)

# Create test data for sic_to_ff48
sich_data = pd.Series([150, 1050, 1250, 9950, None, 5000, 100, 1000], name='sic_code')

ARGS = {
    'sich': sich_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 and dtype family int 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
target_columns Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/common.py
code served (permissive licence) · get_code("fd688ce01b5d2cde")
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 re
import pandas as pd

_TARGET_RE = re.compile('(.+)_t(\\d+)$')

def _colnames(obj) -> list[str]:
    """Column names of a frame, or the sequence itself.

    Accepting a bare name list lets the driver decide which columns to *read*
    before paying for them -- a tabular split is ~2,547 columns and several GB.
    """
    return list(obj.columns) if hasattr(obj, 'columns') else list(obj)

def target_columns(df, targets: list[str] | None=None) -> list[str]:
    """Sorted ``{item}_t{h}`` target columns, optionally restricted to ``targets``."""
    out = []
    for c in _colnames(df):
        m = _TARGET_RE.match(c)
        if not m:
            continue
        if targets is None or m.group(1) in targets:
            out.append(c)
    return sorted(out, key=lambda c: (_TARGET_RE.match(c).group(1), int(_TARGET_RE.match(c).group(2))))


# Create a test DataFrame with target columns
df = pd.DataFrame({
    'item_a_t0': [1, 2],
    'item_a_t1': [3, 4],
    'item_b_t0': [5, 6],
    'item_b_t2': [7, 8],
    'other_col': [9, 10],
    'item_c_t1': [11, 12]
})

# Test with targets=None (all matching columns)
targets_none = None

# Test with specific targets
targets_list = ['item_a', 'item_b']

ARGS = {
    'df': df,
    'targets': targets_none
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
transform Ran
ran, honoured the contract we drafted
forma-lab-mccombs/proforma-20q/src/proforma20q/transforms.py
code served (permissive licence) · get_code("c132b630ab682403")
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 float64, ndim 0, 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 numpy as np

# Construct arguments for transform(v, k)
# v can be a scalar or numpy array
# k can be a scalar or array broadcastable against v

# Test case 1: scalar v and scalar k
v_scalar = 0.5
k_scalar = 2.0

# Test case 2: numpy array v and scalar k
v_array = np.array([0.1, 0.5, 1.0, 2.0])
k_array_scalar = 1.5

# Test case 3: numpy array v and broadcastable array k
v_array_2d = np.array([[0.1, 0.2, 0.3, 0.4],
                        [0.5, 0.6, 0.7, 0.8]])
k_array_broadcast = np.array([1.0, 2.0, 0.5, 1.5])

# Use the simplest case: scalar v and scalar k
ARGS = {
    "v": v_scalar,
    "k": k_scalar
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
warn_if_missing Ran
ran, violated the contract we drafted
forma-lab-mccombs/forma-release/src/forma/_deps.py
code served (permissive licence) · get_code("40250448ed22b573")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 sys
from io import StringIO

# The function only has one parameter: feature (which has a default value)
# Looking at the function body, it:
# 1. Calls proforma20q_available() - which just tries to import a module
# 2. Prints to stderr if not available
# 3. Returns a boolean
# The feature parameter is used in an f-string for the warning message
# We can pass any string value for feature

ARGS = {
    'feature': 'scoring'
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
wide_forecasts_to_tall Ran
ran; our contract draft was wrong, not the code
forma-lab-mccombs/forma-release/src/forma/models/baselines.py
code served (permissive licence) · get_code("e29052aecf3560cc")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a small forecast_wide DataFrame
# Needs columns: firm_id, quarter, model, and target columns like 'niq_t1', 'niq_t2', etc.
forecast_wide = pd.DataFrame({
    'firm_id': [1, 2],
    'quarter': ['Q1', 'Q2'],
    'model': ['model_a', 'model_b'],
    'niq_t1': [10.5, 20.3],
    'niq_t2': [11.2, 21.1],
    'ltq_t1': [100.0, 200.5],
    'ltq_t2': [105.3, 210.2],
})

# Define target columns to melt
target_columns = ['niq_t1', 'niq_t2', 'ltq_t1', 'ltq_t2']

# Create sigma_wide with same index and target_columns
sigma_wide = pd.DataFrame({
    'niq_t1': [0.5, 0.3],
    'niq_t2': [0.6, 0.4],
    'ltq_t1': [1.5, 2.0],
    'ltq_t2': [1.8, 2.2],
}, index=forecast_wide.index)

ARGS = {
    'forecast_wide': forecast_wide,
    'target_columns': target_columns,
    'sigma_wide': sigma_wide,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
canon_quarters Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/forma-release/src/forma/scoring/eval_cache.py
code served (permissive licence) · get_code("83b192c3d523d761")
How it ran

no invocation recorded.

canonical_id_map_path Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/config.py
code served (permissive licence) · get_code("f6f6c1c151f75660")
How it ran

no invocation recorded.

canonical_reg_stats_path Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/config.py
code served (permissive licence) · get_code("cfeb85cf2fdf33ad")
How it ran

no invocation recorded.

download Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/download.py
code served (permissive licence) · get_code("544c8030719e72aa")
How it ran

no invocation recorded.

ensure_canonical_reg_stats Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/config.py
code served (permissive licence) · get_code("2cdf157d2a39a5f0")
How it ran

no invocation recorded.

fit_predict_sklearn Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/sklearn_models.py
code served (permissive licence) · get_code("7c0e589892b7b9a6")
How it ran

no invocation recorded.

fundq_projection Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/download.py
code served (permissive licence) · get_code("05916d507e4c68d1")
How it ran

no invocation recorded.

hf_download Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/gated.py
code served (permissive licence) · get_code("297e695e02aa59bd")
How it ran

no invocation recorded.

predict_fade Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/naive.py
code served (permissive licence) · get_code("fa8232f82d95fe27")
How it ran

no invocation recorded.

predict_naive Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/baselines/naive.py
code served (permissive licence) · get_code("e0de3c23ec909c8b")
How it ran

no invocation recorded.

require_proforma20q Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/forma-release/src/forma/_deps.py
code served (permissive licence) · get_code("57403bcfbb636aa9")
How it ran

no invocation recorded.

validate_forecast Not yet run
unverified (harvested, no recorded run)
forma-lab-mccombs/proforma-20q/src/proforma20q/schema.py
code served (permissive licence) · get_code("66af5735d4ffc9e8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 46 samples lifted from this paper's linked repositories, 46 carry a function identity and 0 do not. Of the 45 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 45 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.

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

Specialist training beats generalist scale when forecasting financial statements. To our knowledge, no prior work jointly forecasts complete financial statements beyond one year, yet in a discounted-cash-flow valuation most firm value sits past that window. We release ProForma-20Q, a reproducible benchmark for forecasting 78 statement line items 1-20 quarters ahead, for anonymized firms, from past statements and an industry code, scored by change-space 𝑅 2 . On it, Forma, a transformer that reads statements as sets of (account, quarter, value) tuples and maximizes a masked-tuple Gaussian likelihood, beats every competitor we field: classical machine learning, chained gradient boosting, a zero-shot time-series foundation model, and frontier large language models. Its lead widens with horizon, where valuation needs accuracy most, and its Gaussian predictive intervals never under-cover. Forma's forecasts nearly satisfy accounting identities; exact coherence is recoverable at no statistically significant accuracy cost. Its tuple interface supports scenario analysis without retraining, and we show that pinning future revenue paths sharpens the rest of the statement.

For agents

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

get_harvested_code_for_paper("2608.11327")
get_code_for_paper("2608.11327")
have("2608.11327")

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

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

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

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

Connect an agent — have() is free.