Docs menuexpand_more
travel_exploreTry in the API Viewer

Guides

Reference

Other pages

Endpoints

search
appsAll APIs
functionHow metrics are calculated

Cookbook · Applied · Analysis 4

Track guidance revisions with an API: initial forecast, revisions and achievement rate

Turn Japanese companies' published guidance into a table per fiscal year: initial forecast, each upgrade or downgrade, the actual result and the achievement rate.
For companiesFor investors8 min read
open_in_newIllustrated series on Qiita (Japanese)The same topic is also published as an illustrated series on Qiita.

Endpoints used

When you check a customer's or competitor's outlook, do you look only at the latest guidance in the kessan tanshin (earnings summary)? Japanese companies publish full-year guidance with their annual results and revise it with each quarterly report, up or down. The latest figure alone does not tell you how far it moved from the start of the year, or how well the company has delivered on its plans in past years.

The script on this page pulls the guidance history and actual results through an API and builds one table per fiscal year: initial forecast, revisions, actual and achievement rate. The examples use data retrieved from ZENITH Code on October 29, 2026 for Toyota Motor (7203, March year-end), Fast Retailing (9983, August year-end) and Kao (4452, December year-end).

What you will get from this page

  • How to work out which fiscal year a guidance row refers to, including companies whose year does not end in March
  • How to order rows by announcement time and count revisions and their direction
  • When the achievement rate (actual ÷ latest forecast) is meaningful, and when it is not
  • How to handle the price-derived values and document links that arrive with the guidance

The job: following guidance over a year

To show how a company's plan changed, you need four sets of guidance for one fiscal year, from the annual results release through the third-quarter release. Then you add the actual result a year later to see whether the plan was met. Five competitors over five years means opening about a hundred releases.

/earnings-forecast returns the revenue, operating income, net income and EPS guidance printed in each earnings release, one row per release, for one token per call. limit=20 covers roughly five years. Actual results come from /income-statement, so each company costs two tokens.

Do not accept price-derived values or document links

Besides the forecast values, the /earnings-forecast response includes these fields.

Field Contents Handling on this page
perForecast, psrForecast, pegRatioForecast Multiples computed from guidance and the share price Not kept. Never shown on screen or in articles
archiveUrl A PDF served through ZENITH Code's delivery route (needs an API key) Not kept. Do not put filing PDFs or links in your material
sourceUrl Official viewing link; EDINET only while the filing is viewable, null for TDnet Kept for EDINET rows only

Copying only the fields you need means nothing unexpected reaches the table if the API adds fields later.

import csv, json, os, urllib.parse, urllib.request
from datetime import datetime, timedelta, timezone

BASE = "https://api.zenithcode.net/stable"
API_KEY = os.environ.get("ZENITH_API_KEY", "YOUR_API_KEY")
JST = timezone(timedelta(hours=9))

# Do not keep perForecast, psrForecast, pegRatioForecast (price-derived) or archiveUrl (filing PDF)
KEEP = ("fiscalPeriod", "period", "forecastTarget", "forecastFiscalPeriod", "accountingStandard",
        "announcedAt", "source", "docId", "revenueForecast", "operatingIncomeForecast",
        "netIncomeForecast")


def get(path, **params):
    url = f"{BASE}{path}?{urllib.parse.urlencode(params)}"
    req = urllib.request.Request(url, headers={"x-api-key": API_KEY})
    with urllib.request.urlopen(req, timeout=30) as res:
        return json.load(res)


def forecasts(symbol):
    rows = []
    for r in get("/earnings-forecast", symbol=symbol, limit=20):   # omit period to get quarterly rows too
        row = {k: r.get(k) for k in KEEP}
        if row["source"] != "edinet":
            row["docId"] = None        # keep TDnet document IDs out of the table
        rows.append(row)
    return rows

Find the fiscal year a forecast refers to

A guidance row's fiscalPeriod is the period of the release that carried the forecast, not the period being forecast. There are two kinds of rows.

Row (period) Guidance it carries forecastTarget
FY (annual results) Full-year guidance for the next fiscal year (the initial forecast) next-fiscal-year
Q1 to Q3 Full-year guidance for the current fiscal year, as of that quarter current-fiscal-year

FY rows carry the target year-end in forecastFiscalPeriod. Quarterly rows have forecastFiscalPeriod set to null, so the script adds the months left from the quarter end to the year-end.

MONTHS_TO_YEAR_END = {"Q1": 9, "Q2": 6, "Q3": 3, "FY": 0}


def add_months(ym, n):
    total = int(ym[:4]) * 12 + int(ym[5:7]) - 1 + n
    return f"{total // 12:04d}-{total % 12 + 1:02d}"


def target_period(row):
    if row.get("forecastFiscalPeriod"):
        return row["forecastFiscalPeriod"]
    months = MONTHS_TO_YEAR_END.get(row.get("period"))
    if months is None or not row.get("fiscalPeriod"):
        return None
    year_end = add_months(row["fiscalPeriod"], months)
    if row.get("forecastTarget") == "current-fiscal-year":
        return year_end
    if row.get("forecastTarget") == "next-fiscal-year":
        return add_months(year_end, 12)
    return None
Company (year-end) Row Calculation Target fiscal year
Toyota Motor (March) Q1 of 2025-06 add 9 months ending March 2026
Fast Retailing (August) Q3 of 2026-05 add 3 months ending August 2026
Kao (December) Q1 of 2026-03 add 9 months ending December 2026
Fast Retailing (August) FY of 2025-08 value of forecastFiscalPeriod ending August 2026

Hard-coding "Q1 means June" pairs the wrong year's guidance with the wrong actuals for August and December year-end companies.

Order by announcement time and label each revision

Group the rows by target fiscal year and sort by announcedAt. The first row is the initial forecast; later rows are revisions, each labeled by comparison with the previous one.

def jst_date(iso):
    return datetime.fromisoformat(iso.replace("Z", "+00:00")).astimezone(JST).date().isoformat()


def group_by_target(rows):
    groups, skipped = {}, {"no target year": 0, "no announcement time": 0}
    for r in rows:
        target = target_period(r)
        if target is None:
            skipped["no target year"] += 1
        elif not r.get("announcedAt"):
            skipped["no announcement time"] += 1   # do not guess a date
        else:
            groups.setdefault(target, []).append(r)
    for entries in groups.values():
        entries.sort(key=lambda r: r["announcedAt"])
    return groups, skipped


def direction(before, after):
    if before is None or after is None:
        return ""
    return "up" if after > before else "down" if after < before else "unchanged"

Rows the script sets aside are counted by reason and printed at the end. This matters most when a row without an announcement time is an FY row: that year then loses its initial forecast, and the Q1 guidance shows up as "initial." Printing the count lets whoever builds the deck notice.

Line up actuals and compute the achievement rate

Actual results come from the income statement row for the same fiscal year. For net income, the script prefers net income attributable to owners of the parent.

ACTUAL = {"revenue": "revenue", "operatingIncome": "operatingIncome",
          "netIncome": "netIncomeAttributableToOwners"}


def plan_vs_actual(symbol, metric="operatingIncome"):
    groups, skipped = group_by_target(forecasts(symbol))
    actuals = {y["fiscalPeriod"]: y for y in
               get("/income-statement", symbol=symbol, period="annual", limit=6)}
    out = []
    for target in sorted(groups):
        entries, prev = groups[target], None
        for i, e in enumerate(entries):
            value = e[metric + "Forecast"]
            late = jst_date(e["announcedAt"])[:7] > target     # announced after the year ended
            out.append({"target": target, "stage": "initial" if i == 0 else f"revision {i}",
                        "basis": f'{e["fiscalPeriod"]} {e["period"]}',
                        "announced": jst_date(e["announcedAt"]), "source": e["source"],
                        "docId": e["docId"], "value": value, "direction": direction(prev, value),
                        "late": late})
            prev = value if value is not None else prev
        actual_row = actuals.get(target)
        if actual_row:
            actual = actual_row.get(ACTUAL[metric])
            if metric == "netIncome" and actual is None:
                actual = actual_row.get("netIncome")
            latest = next((e for e in reversed(entries) if not (jst_date(e["announcedAt"])[:7] > target)), entries[-1])
            forecast = latest[metric + "Forecast"]
            same_std = not (latest["accountingStandard"] and actual_row["accountingStandard"]
                            and latest["accountingStandard"] != actual_row["accountingStandard"])
            rate = actual / forecast if (actual is not None and forecast and forecast > 0 and same_std) else None
            out.append({"target": target, "stage": "actual", "value": actual})
            out.append({"target": target, "stage": "achievement", "value": rate})
    return out, skipped

The achievement rate is reported only when three conditions hold.

  • The latest forecast is positive. If a company forecasts a loss and the loss comes in smaller, the ratio falls below 1 and reads backwards.
  • The denominator is guidance issued before the year ended. Guidance announced after the target year closed stays in the table but is not used. Comparing against late guidance makes the plan look closer to the actual than it was.
  • Forecast and actual use the same accounting standard. Dividing Japanese GAAP guidance into an IFRS result compares figures with different scopes.

Write the CSV

def write(symbols, metric="operatingIncome", path="plan-vs-actual.csv"):
    cols = ["symbol", "target", "stage", "basis", "announced", "source", "docId",
            "value", "direction", "late"]
    with open(path, "w", newline="", encoding="utf-8-sig") as f:
        w = csv.DictWriter(f, fieldnames=cols)
        w.writeheader()
        for s in symbols:                                     # one company at a time
            rows, skipped = plan_vs_actual(s, metric)
            for r in rows:
                w.writerow({"symbol": s, **r})
            print(s, "set aside:", skipped)


write(["7203", "9983", "4452"])

Amounts are in yen and the achievement rate is a 0–1 decimal. Missing values are blank, including guidance the company published as "undetermined."

Sample output: Toyota Motor, operating income for the year ended March 2026

Stage Basis Announced Operating income (¥100 million) Direction Source
Initial 2025-03 FY 2025-06-18 38,000.0 EDINET
Revision 1 2025-06 Q1 2025-08-07 32,000.0 down TDnet
Revision 2 2025-09 Q2 2025-11-13 34,000.0 up EDINET
Revision 3 2025-12 Q3 2026-02-06 38,000.0 up TDnet
Actual 37,662.2
Achievement 99.1%

The final guidance, ¥3.8 trillion, equals the initial forecast. Comparing only the first and last figures shows no change. In between, though, guidance was cut once and then restored. Laying out the history makes that visible in the table. In the CSV the achievement rate is 0.991; on screen it is 99.1%.

Across the fiscal years ended March 2022 through March 2026, operating income achievement was 107.0%, 113.5%, 109.2%, 102.0% and 99.1%: four of five years beat the latest guidance. For the year ending March 2027, still in progress, the initial ¥3.0 trillion forecast has been raised once to ¥3.4 trillion (+13.3% from the initial figure).

The same table works for other year-ends

For Fast Retailing's fiscal year ended August 2026, operating income guidance started at ¥610 billion, was raised three times to ¥730 billion, and the actual was ¥743.13 billion, an achievement rate of 101.8%. For Kao's fiscal year ended December 2023, the initial ¥120 billion forecast was cut to ¥60 billion in the second quarter; the actual was ¥60.04 billion, for 100.1%.

An achievement rate near 100% against the latest guidance can hide a large move from the initial plan. Show the initial forecast and the number of revisions next to the achievement rate.

Reading the numbers correctly

fiscalPeriod is when the guidance was issued

A guidance row's fiscalPeriod is the fiscal period of the release that carried it, not the year being forecast. Only FY rows fill forecastFiscalPeriod; quarterly rows leave it null. Compute the target from the quarter end as shown above, or use the FY row's value. In the transition year of a company that changed its year-end, the computed target may not match the real year-end, so cross-check against the income statement's periods.

Null means "undetermined"; no row means "no guidance"

A null forecast value means the company published its guidance as undetermined. Periods with no guidance at all have no row. Companies that do not publish guidance, such as SoftBank Group, Rakuten Group, Mitsubishi UFJ Financial Group and Nomura Holdings, return no rows. Neither case means zero.

Announcement times are UTC and can be null

announcedAt is ISO 8601 in UTC (ending in Z). Add nine hours for Japan time. Anything announced between 0:00 and 8:59 Japan time falls on the previous day in UTC, so taking the first ten characters as the date can be a day off. The script's jst_date converts to Japan time first. Rows whose source has no time are null, and the script sets them aside rather than guessing.

EDINET-sourced dates can be later than the earnings release

For rows with source set to edinet, the announcement time is that of the filing submitted to EDINET (the FSA's electronic disclosure system). The kessan tanshin is usually published earlier, on TDnet (the exchange's timely disclosure system). For example, Toyota's initial guidance row for the year ending March 2027 shares a document (S100Y8NY) and a date (June 10, 2026) with the actual row for the year ended March 2026. If you need the date guidance was first made public, confirm it against the earnings release. In the data retrieved, 15 of Toyota's 20 rows came from EDINET and 5 from TDnet.

Do not read announcement dates from TDnet document IDs

The date embedded in a TDnet row's docId is the registration date and can precede the announcement (confirmed for 6282). Order and date rows by announcedAt. The script keeps TDnet document IDs and links out of the table.

The oldest year may start partway through

Because the script requests limit=20, the oldest year may lack its initial forecast. Toyota's fiscal year ended March 2022 starts from the Q2 guidance of the period ended September 2021, which appears as "initial." Kao's fiscal year ended December 2021 has a single Q3 row. Do not trust the "initial" label alone; check the basis column.

Guidance rows do not say consolidated or parent-only

Guidance rows have no field for consolidated versus parent-only. In a kessan tanshin, companies that prepare consolidated statements give consolidated guidance. The actual rows from the income statement carry consolidation, so for parent-only companies, or companies that moved from consolidated to parent-only reporting, check the flag on the actual side.

FY rows also carry growth against the prior actual

FY rows include fields such as revenueGrowthVsActual and operatingIncomeGrowthVsActual, which compare the guidance with the full-year actual on the same row. Use them to see how much growth the initial plan assumed. Quarterly rows do not carry them.

Adapting it to your company

  • To spot revisions quickly, run the same script during earnings season and compare row counts with the previous CSV. Only companies with new rows need a look.
  • Revenue and net income work the same way: change the metric, as in plan_vs_actual(s, "revenue").
  • To view one company's plan history on a screen, try the company deep-dive template. Its saved demo opens without an API key.

Related

An illustrated series on the same material is on Qiita (in Japanese).

This page explains how to handle financial data. It is not a recommendation to buy or sell any security.

Before you read the numbers

Points about the endpoints in this article that are easy to misread as wrong data.

  • By designTDnet-derived information is returned 24 hours after disclosure

    Under Article 7(1) of the JPX TDnet API service terms, information derived from TDnet (timely disclosures) is returned by the API and MCP 24 hours after the disclosure time (from 2026-11-13). Within 24 hours, rows of timely disclosures, dividends, dividend changes, splits, delisting schedules, earnings-release periods and earnings forecasts are left out, and TDnet PDFs (filing-document) return 403 tdnet_embargo with the time they become available (availableAt). Latest values (quote, key-metrics-latest, screener and so on) have no previous value to fall back to, so for stocks with a TDnet document in the last 24 hours the fields computed from documents (PER, PBR, dividend yield, market cap and so on) are null; prices and price changes are unaffected. The response headers X-TDnet-Embargoed-Count, X-TDnet-Embargoed-Symbols and X-TDnet-Embargo-Next-Release tell what was held back and when it becomes available. The boundary is disclosure time + 24 hours <= response time, compared in absolute time rather than Japan time. For shareholder benefits and dividend policies, versions sourced from TDnet are held back for 24 hours and the previous version is returned when there is one (versions from EDINET or company IR pages are not affected). Rows whose TDnet disclosure time is unknown are not returned. Calls whose whole content is held back (a list that is empty only because of this rule, or a single stock whose affected latest fields are all null) do not use tokens; calls where only part is held back do. EDINET filings (annual, extraordinary and large-holding reports) and stock prices are not affected.

    Endpoints:/disclosures/events-feed/filing-document/dividend-changes/dividends/dividends-calendar/dividends-bulk/dividend-streaks/splits/delisting-schedule/income-statement/balance-sheet-statement/cash-flow-statement/key-metrics/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/key-metrics-short/key-metrics-bulk/financial-statement-full/earnings-forecast/sga-breakdown/valuation-history/market-cap-history/quote/key-metrics-latest/batch-quote/batch-key-metrics-latest/market-capitalization/profile/screener/rankings/peers/screener-presets/industry-benchmarks/shareholder-benefits/shareholder-benefits-list/dividend-policy/dividend-policies

  • By designTOKYO PRO Market companies have no financials

    TOKYO PRO Market (the market for professional investors) companies file no XBRL results, so their financials are not ingested; statements and the metrics and market capitalization calculated from financials or share counts are empty or null. Describe them as "financials not covered", not as missing data. Market-wide aggregates (rankings, market-breadth and so on) also exclude this market by default.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full/key-metrics/key-metrics-short/key-metrics-latest/market-capitalization/market-cap-history/valuation-history/profile

  • By designRight after listing, prior-year income and ratios can be empty

    The first earnings release after listing does not include full-year income for the prior year, so for newly listed companies the pre-listing income statement is empty and the prior-year row has only total assets and net assets. Before the first results, market cap and PER/PBR history are empty too. Describe it as "income before listing not covered".

    Endpoints:/income-statement/income-statement-short/valuation-history/market-cap-history/key-metrics-short

  • By designQuarterly income figures are year to date

    Q2 and Q3 income and cash-flow figures are cumulative from the start of the fiscal year. Listing them as single-quarter revenue makes Q3 look large. Subtract the previous quarter's cumulative value to get a single quarter, and use key-metrics for trailing-twelve-month (TTM) values.

    Endpoints:/income-statement/cash-flow-statement/income-statement-short/cash-flow-statement-short/key-metrics

  • By designPeriods before and after a switch from consolidated to standalone do not connect

    Each statement period carries a consolidation flag (consolidated or nonconsolidated). For companies that moved from consolidated to standalone reporting, or that became a different business through a share exchange, the reporting scope changes at that point, so prior-period-end values and growth rates do not connect across it. Align consolidation before comparing across periods.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full

  • By designJPY amounts and missing-field reasons in foreign-currency statements

    reportedCurrency identifies the statement currency. Available JPY amounts are returned. nullReasons identifies missing fields, including non_jpy_material for unavailable JPY amounts and source_missing:operating_income when the statement lacks operating income used for the margin. Foreign-currency rows without any JPY amount retain nullReason = non_jpy_material.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement

  • By designGross profit scope differs for companies with other operating revenue

    For companies that report operating revenue (such as retailers), revenue = net sales (netSales) + other operating revenue (otherOperatingRevenue), and whether grossProfit includes the latter depends on the company (grossProfitIncludesOtherOperatingRevenue). Use operatingGrossProfit (or grossProfit when it is null) to compare companies. Adding other operating revenue to grossProfit before subtracting SG&A can count it twice.

    Endpoints:/income-statement/income-statement-short/financial-statement-full

  • By designThe FY row in earnings-forecast is next year's forecast

    In earnings-forecast, the full-year (FY) row is the forecast for next year, while Q1–Q3 rows hold the forecast for the current full year; forecastTarget tells you which. Companies that do not publish forecasts have no rows, and forecasts marked "undecided" are null.

    Endpoints:/earnings-forecast

  • By designFor annual reports with both Japanese GAAP and IFRS statements, financial-facts and the statements can look different

    For companies whose annual report includes both Japanese GAAP and IFRS statements (2130, 436A, 4494, 6532 and others), the summary of business results in financial-facts comes from the Japanese GAAP tables, while balance-sheet-statement and the other statement endpoints use the IFRS tables the company has adopted, so totals such as total assets can look different. Both are as filed. accountingStandard in financial-facts is the standard declared for the whole document, so rows with Japanese GAAP tags also show IFRS. Check which table a value comes from by its tag name, not by accountingStandard. A trailing _notes in a tag name is added when ZENITH ingests the data and is not part of the original tag.

    Endpoints:/financial-facts/balance-sheet-statement/income-statement/cash-flow-statement

  • Easy to misreadOperating income is not always gross profit minus SG&A

    Under Japanese GAAP, operating income = (operatingGrossProfit ?? grossProfit) − SG&A − (otherOperatingExpenses ?? 0). For companies with other operating revenue or with operating-expense lines besides SG&A, computing only grossProfit − SG&A does not match and looks like an error. Use this formula when you check the numbers.

    Endpoints:/income-statement/income-statement-short/financial-statement-full

  • Easy to misreadEPS can be negative even with positive net income

    Companies that deduct dividends on class shares when computing common-share EPS can show negative EPS even with positive net income, as in their earnings releases (7412 and 8836). A sign difference between net income and EPS is not an error by itself.

    Endpoints:/income-statement/key-metrics

  • Easy to misreadThe date in a TDnet document ID is the registration date

    The date embedded in the TDnet document ID used as a forecast source is the registration date, which can be earlier than the announcement (6282). For the announcement date, use the announcement time in disclosures rather than reading it from the document ID.

    Endpoints:/earnings-forecast/disclosures

  • Easy to misreadactualEps and estimateEps in earnings-calendar are for the quarter alone, not year to date or full year

    actualEps (reported) and estimateEps (estimate) in earnings-calendar are both earnings per share (yen) for that quarter alone (three months). Rows whose fiscalPeriod is FY also cover only the fourth quarter, not the full year. estimateEps is the market consensus, not the company forecast. Quarterly EPS in income-statement is cumulative from the start of the fiscal year, so the values differ (for 6230 in Q2, actualEps is 21.16 and the year-to-date figure is 38.27). Use the same basis, single quarter or year to date and full year, when you compare. Values are null for rows before the announcement, for reported rows whose results are not in yet, and for issues or periods without an estimate.

    Endpoints:/earnings-calendar/income-statement/income-statement-short

  • FixedTimestamps are now ISO 8601 UTC

    Every field that returns a date-time now uses ISO 8601 UTC (YYYY-MM-DDTHH:MM:SSZ). Before, endpoints mixed formats such as "+00", no offset and "+09:00", and values without an offset were actually UTC. Add 9 hours for Japan time. from and to are Japan-time dates, and for extraordinary reports they changed from UTC calendar days to Japan-time calendar days.

    Fixed in: version 80 (2026-11-03)Endpoints:/disclosures/dividends/earnings-forecast/extraordinary-reports/treasury-shares/workforce/shareholder-benefits/events-feed/system-status/system-freshness/delisting-schedule/earnings-calendar/historical-price-eod/historical-price-eod-light/valuation-history

  • FixedStandalone income for periods with a first subsidiary at year end is back

    When a company acquired its first subsidiary at year end, the annual report had a consolidated balance sheet only and standalone income and cash-flow statements only, and those periods were missing entirely from the annual income and cash-flow data (12 periods, including 5572, 9262, 7370 and 3370). Those periods now return income and cash flow flagged consolidation: nonconsolidated, while the same period's balance sheet is consolidated. Mind the flag when comparing with adjacent periods.

    Fixed in: version 79 and data platform #3177 (2026-11-03)Endpoints:/income-statement/cash-flow-statement/income-statement-short/cash-flow-statement-short

  • FixedPeriods with no values are no longer returned

    Previously, rows for periods with every value null and no source could be returned (some cash-flow periods for 648A and 624A, for example). Since version 48, periods with no values are not returned (except non-yen periods, which come with nullReason). An all-null row in an older response does not mean results existed for that period.

    Fixed in: version 48 (2026-11-02)Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full

visibility_off
The screens and numbers in these articles leave out stock prices and metrics calculated from them. Before showing live data on your own screens, check what you may display. What you can display
gavel

Disclaimer

This page explains how to use a Japanese equity data API and how its data is defined. It is not a solicitation to invest or a recommendation to buy or sell any security. The content reflects information at the time of writing and is not guaranteed to be accurate or complete. Investment decisions are your own responsibility.

What you may show or provide to third parties depends on your plan and Article 8 of the Terms. Exchange data such as stock prices may not be shown to third parties on any plan. Edited or processed information from which the original stock prices or similar market data can be readily reconstructed is treated as exchange data and may not be displayed or redistributed to third parties. No plan or separate agreement with us overrides this restriction. Terms, Article 8 · Data sources and terms of use