Skip to main content

Compose foundation models into corporate decision agents

Project description

Mimic

Compose foundation models into corporate decision agents.

Mimic lets you spin up an LLM-based digital twin of any public company, then simulate how it would respond to real-world events — validated against what companies actually did.

import mimic

twin = mimic.Twin.from_ticker("WMT")
result = twin.simulate("China port closes for 30 days")
print(result.pretty())
EVENT: China port closes for 30 days
────────────────────────────────────────
0-24h:  Activate Vietnam + Mexico supplier tier, alert logistics team
1-7d:   Pre-build 45-day inventory buffer on top 200 SKUs
8-30d:  Temporary pricing adjustment on affected categories (+2-4%)

Financial impact (P10/P50/P90): -$800M / -$1.4B / -$2.1B
Confidence: 73%

How It Works

Mimic composes three things that already exist — foundation models, free public data, and textbook economic formulas — into something that doesn't: validated company behavior simulation.

SEC EDGAR (free)     →
yfinance (free)      →  CompanyContext  →  Economic Formulas  →  LLM Orchestrator  →  Decision
FRED / news (free)   →
                            ↑
                    TimesFM / Chronos (plug-and-play)

You swap any component in one line. Don't want TimesFM? Use Chronos. Don't want GPT-4? Use Claude. Don't want the default COGS formula? Override it.


Install

pip install mimic-framework

Requires Python 3.11+. Set OPENAI_API_KEY in your env.


Quick Start

1. Build a twin from any ticker

from mimic import Twin

# Auto-pulls from SEC EDGAR + yfinance
twin = Twin.from_ticker("AAPL")

2. Simulate an event

result = twin.simulate(
    event="Taiwan Strait closes for 6 weeks",
    severity=0.85,
)

print(result.immediate_action_0_24h)
print(result.financial_impact_mid)   # $M, P50 estimate
print(result.confidence)

3. Swap foundation models (plug-and-play)

import mimic

twin = Twin.from_ticker("JPM")
result = twin.simulate("Fed raises rates 100bps", model="claude-opus-4-5")

4. Run the benchmark

from mimic.benchmark import run_benchmark

results = run_benchmark(
    tickers=["WMT", "AAPL", "JPM", "XOM", "MSFT"],
    event_set="crisis_2015_2024",
)
print(results.summary())
# Average fidelity: 0.71 across 2,847 labeled (event, company) pairs

Economic Formulas Library

Mimic ships 10 textbook economic primitives that feed into every simulation. Each is a pure Python function and fully overridable:

Formula What It Computes
dcf_impact EV change from a cash flow shock
altman_z Bankruptcy risk score
cogs_sensitivity Input cost shock → margin impact
fx_passthrough Currency moves → P&L impact
inventory_burn Days of buffer remaining
bayes_update Probability updating from new evidence
capm_response Stock reaction to market move
operating_leverage Margin elasticity to revenue
supplier_hhi Supply concentration risk (HHI)
cascade_propagate Supply chain shock propagation
from mimic.formulas import cogs_sensitivity

result = cogs_sensitivity(
    revenue=650_000,   # $M
    cogs=490_000,
    input_shock_pct=0.15,   # 15% cost spike
    passthrough_rate=0.40,
)
# {'margin_compression': 0.031, 'annual_ebitda_impact_usdM': -4410.0}

Benchmark

Mimic ships a benchmark of 200 historical events × 50 companies, with ~2,800 ground-truth-labeled (event, company) response pairs extracted from actual earnings calls and 8-K filings.

Metric v0.1
Average fidelity score 0.71
Companies covered 50 (S&P 500)
Historical events 200 (2010–2024)
Labeled pairs ~2,847

Roadmap

  • SEC EDGAR ingestion
  • 10 economic formulas
  • LLM orchestrator (GPT-4o + Claude)
  • Benchmark v1 (200 events × 50 companies)
  • TimesFM + Chronos integration (v0.2)
  • FinBERT2 sentiment layer (v0.2)
  • Multi-company simulation (v0.3)
  • REST API + hosted version

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimic_framework-0.1.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mimic_framework-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file mimic_framework-0.1.0.tar.gz.

File metadata

  • Download URL: mimic_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mimic_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c45c8d14f21efec7ebe2a33cee4762dc86417ddcdbf336afae271c32f4ffc29e
MD5 0a80cc58fe5c737f182ce4d2d2eb0b4d
BLAKE2b-256 266b205ef3e9fc98a598ee1c100cd7ab63e6233104428c0ba24220daca87fb52

See more details on using hashes here.

File details

Details for the file mimic_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mimic_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecaae475b1553c4eb2758716e9b01488d57f0405f597b31a24bd50dee0c07547
MD5 4c181bb6fb240e12ef3acb47060dee3c
BLAKE2b-256 c555c0e987485ba9b89c48762d5308cc1201c81e77bc5335d7a273665487a2c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page