ArcheAI quick start — executive monitoring (self-baseline departures)¶

What this does: pulls one company's per-executive behavioral history, computes each executive's departure from their own prior quarters (the same 8-quarter self-baseline construction the published event study uses), and reads out the quarters where someone did not sound like themselves.

What this is — and is not. ArcheAI models behavioral change as departure from the speaker's own reference (their own prior quarters here; their own session or own baseline in the audio lines), designed to be read together with the text fraud-language signal — it pairs with the text fraud-language line and is not a lie detector, never a standalone "listen to a clip, get a lie probability" verdict. A flagged quarter means this person departed from their own norm on these dimensions; it says nothing about the facts of the business, and it is not an accusation. Research signals that focus professional judgment — never the sole basis for any decision about a person.

0. Install and authenticate¶

pip install "archeai-sdk[quant]>=1.1"

Put your key in ARCHE_API_KEY. A trial key works (ticker allow-list, history window and daily caps are reported back by the API). behavioral_history() costs 5 credits per call.

In [1]:
import os
import numpy as np
import pandas as pd
from arche_ai import ArcheClient, ArcheAPIError
from arche_ai import event_study as es

API_KEY = os.environ.get("ARCHE_API_KEY") or input("ArcheAI API key: ")
BASE = os.environ.get("ARCHE_BASE_URL", "https://api.arche-ai.com")
client = ArcheClient(api_key=API_KEY, base_url=BASE)
acct = client.account()
print(f"credits: {acct['credits']}" + (f"  (trial: {acct['trial'].get('label')})" if acct.get("trial") else ""))
credits: 1436  (trial: 1b quant-demo pilot (stage))

1. Pull the history for one company¶

One row per (executive, quarter): seven communication-style dimensions and Big Five estimates, computed only from that quarter's calls (point-in-time — a row never sees a later quarter). n_words tells you how much speech the quarter's scores rest on.

In [2]:
TICKER = os.environ.get("ARCHE_DEMO_TICKER", "AAPL")
hist = client.behavioral_history(TICKER)
hist = pd.DataFrame(hist) if not isinstance(hist, pd.DataFrame) else hist
print(f"{TICKER}: {len(hist)} executive-quarters, {hist['speaker_id'].nunique()} executives, "
      f"{hist['quarter'].min()} → {hist['quarter'].max()}")
hist[["executive", "quarter", "n_calls", "n_words"] + [c for c in hist.columns if c.startswith("style_")][:3]].head(8)
AAPL: 47 executive-quarters, 7 executives, 2023Q4 → 2026Q3
Out[2]:
executive quarter n_calls n_words style_intellectual_colloquial style_concrete_abstract style_tentative_assertive
0 Timothy Cook 2023Q4 4 5588 0.490 -0.478 -0.111
1 Timothy Cook 2024Q1 2 3029 0.348 0.129 -0.525
2 Timothy Cook 2024Q2 1 1170 0.325 -0.008 -0.130
3 Timothy Cook 2024Q3 3 4255 0.130 0.402 0.021
4 Timothy Cook 2024Q4 2 2885 0.129 0.210 -0.192
5 Timothy Cook 2025Q1 3 4877 0.275 -0.018 -0.096
6 Timothy Cook 2025Q2 2 4087 0.087 -0.474 -0.122
7 Timothy Cook 2025Q3 2 3351 0.142 -0.343 -0.099

2. What the scores are¶

  • style_<dimension> — seven bipolar communication-style dimensions, as z-scores against executive-register norms (built from 1.1 million executive-quarters of earnings-call Q&A). The name reads pole A → pole B; a positive value leans toward the second pole (style_tentative_assertive = +1.2 means more assertive than the typical executive).
  • big5_<trait> — Big Five estimates from the same text (openness, conscientiousness, extraversion, agreeableness, neuroticism), z-scored the same way.
  • These are levels: where the executive sits relative to all executives. The monitoring read below is about departures: where the executive sits relative to themselves.

3. Self-baseline departures (the construction the published study uses)¶

For each executive-quarter, event_study.point_in_time_features takes the executive's previous 8 quarters (at least 4 must exist), computes their own mean and standard deviation on each dimension, and z-scores the current quarter against that — the dev_* columns. No future quarter ever enters a row. A dev_* of +2.0 means "two of this executive's own standard deviations above their own recent norm."

On the research panel (55,228 executive-quarters), |dev| ≥ 1 on a dimension occurs on 36 % of rows, ≥ 2 on 10 %, ≥ 3 on 3 % — so "notable" starts around 2, and a quarter where several dimensions move together is rarer than any single one.

Two filters before computing anything, both visible in the data above: drop the unmapped bucket (executive is None / "Unknown Executive" — every speaker the pipeline could not attribute, pooled; its word counts are enormous and it is not a person), and require a minimum of words per quarter (an executive who spoke 200 words in a quarter has a tiny own standard deviation, so any change looks like a huge departure; the published study scores only a call's primary executive with ≥ 300 words — this notebook uses ≥ 1,000 per quarter, stricter because quarters pool several calls). Both filters are reported, not hidden.

In [3]:
MIN_WORDS = 1000
named = hist[hist["executive"].notna() & ~hist["executive"].astype(str).str.lower().str.contains("unknown")]
enough = named[named["n_words"] >= MIN_WORDS]
print(f"{len(hist)} rows → {len(named)} named executives' rows → {len(enough)} with ≥ {MIN_WORDS} words "
      f"(dropped: {len(hist)-len(named)} unmapped, {len(named)-len(enough)} thin quarters)")
feat = es.point_in_time_features(enough)
dev_cols = [c for c in feat.columns if c.startswith("dev_")]
print(f"{int(feat[dev_cols[0]].notna().sum())} executive-quarters with ≥ {es.MIN_HISTORY} prior quarters of own history (window {es.HISTORY_QUARTERS})")
feat[["executive", "quarter", "n_words"] + dev_cols[:3]].dropna(subset=dev_cols[:1]).tail(6)
47 rows → 35 named executives' rows → 21 with ≥ 1000 words (dropped: 12 unmapped, 14 thin quarters)
9 executive-quarters with ≥ 4 prior quarters of own history (window 8)
Out[3]:
executive quarter n_words dev_style_intellectual_colloquial dev_style_concrete_abstract dev_style_tentative_assertive
7 Timothy Cook 2025Q3 3351 -0.769981 -0.926593 0.385712
8 Timothy Cook 2025Q4 3823 -0.429501 -0.413548 1.078822
9 Timothy Cook 2026Q1 4572 1.775130 -0.823145 0.840279
10 Timothy Cook 2026Q2 5046 2.469210 -0.051869 0.721309
15 Luca Maestri 2024Q4 1919 4.505851 1.126338 -0.044419
20 Kevan Parekh 2026Q2 2348 -4.853007 -1.863179 -0.384720

4. The "unusual quarters" read¶

Two summaries per executive-quarter: max |dev| (the single largest departure) and n_dims ≥ 2 (how many dimensions moved by ≥ 2 own-SDs at once). We list the quarters where at least one dimension departed by ≥ 2 and name the dimensions — a where to look list, not a verdict.

In [4]:
feat = feat.dropna(subset=dev_cols, how="all").copy()      # quarters without enough own history carry no departure
D = feat[dev_cols].abs()
feat["max_abs_dev"] = D.max(axis=1)
feat["n_dims_ge2"] = (D >= 2).sum(axis=1)
feat["dims_ge2"] = D.apply(lambda r: ", ".join(c.replace("dev_style_", "").replace("dev_big5_", "big5:") for c in r.index[r >= 2]), axis=1)
unusual = feat[feat.n_dims_ge2 >= 1].sort_values(["n_dims_ge2", "max_abs_dev"], ascending=False)
print(f"{len(unusual)} of {len(feat)} executive-quarters have ≥ 1 dimension at ≥ 2 own-SDs "
      f"({len(unusual)/max(len(feat),1):.0%}); {int((feat.n_dims_ge2 >= 3).sum())} have ≥ 3 dimensions moving together")
unusual[["executive", "quarter", "n_words", "max_abs_dev", "n_dims_ge2", "dims_ge2"]].head(12)
7 of 9 executive-quarters have ≥ 1 dimension at ≥ 2 own-SDs (78%); 0 have ≥ 3 dimensions moving together
Out[4]:
executive quarter n_words max_abs_dev n_dims_ge2 dims_ge2
20 Kevan Parekh 2026Q2 2348 4.853007 2 intellectual_colloquial, uncertain_certain
15 Luca Maestri 2024Q4 1919 4.505851 2 intellectual_colloquial, big5:consc
8 Timothy Cook 2025Q4 3823 3.329245 2 authority_people, pessimistic_optimistic
6 Timothy Cook 2025Q2 4087 2.169127 2 authority_people, big5:extra
10 Timothy Cook 2026Q2 5046 2.469210 1 intellectual_colloquial
9 Timothy Cook 2026Q1 4572 2.460257 1 big5:extra
5 Timothy Cook 2025Q1 4877 2.290038 1 uncertain_certain

Read the flag rate against the window. On a trial key the history floor is 24 months, so most executives have only 4–8 prior quarters and their own standard deviation is estimated from very few points — single-dimension flags are then common (on the research panel, with full histories, |dev| ≥ 2 on a given dimension is a 10 % event). The multi-dimension flags (n_dims_ge2 ≥ 2) and the largest departures are the ones worth a look first; with a full history (an unscoped key, or export_history() on a pilot workspace) the rate settles toward the panel's.

5. One executive's trajectory¶

The same thing as a time series for the executive with the most flagged quarters: which quarters departed, on which dimensions, with the word count beside it (a flagged quarter with few words is weaker evidence than one with many).

In [5]:
if len(unusual):
    who = unusual.groupby("executive").size().idxmax()
    one = feat[feat.executive == who].sort_values("quarter")
    print(f"{who} — {len(one)} quarters with history; flagged: {int((one.n_dims_ge2 >= 1).sum())}")
    show = one[["quarter", "n_words", "max_abs_dev", "n_dims_ge2", "dims_ge2"]].copy()
    show["flag"] = np.where(show.n_dims_ge2 >= 1, "◆", "")
    show
else:
    print("no flagged quarters for this ticker — try another, or widen the window")
Timothy Cook — 7 quarters with history; flagged: 5

6. How to read this — and how to pair it¶

  • A flag is a departure from the person's own norm, on the dimensions named. It is the starting point for a question ("what was different that quarter?"), not an answer.
  • Pair it with the text fraud-language line. client.analyze_fraud_language(transcript) scores a transcript against patterns that historically appeared in accounting-fraud periods (companies the model never saw: AUC 0.74 on a single transcript, 0.87 with the speaker's history). A quarter that is both a self-departure and fraud-language-elevated is a much stronger "look here" than either alone. The two are designed to be read together.
  • What this cannot tell you: whether anything was true or false; whether a departure was stress, strategy, a new role, or a new CFO's first call. Chronic patterns are not departures — if someone has always sounded this way, this read will not flag it.
  • Costs: one behavioral_history() call per ticker (5 credits). For many tickers, use client.export_history() (pilot workspaces; priced before it runs with dry_run=True).

Full interpretation guide: docs/interpreting-scores.md · the published event-study recipe: examples/quant_demo.ipynb.