Skip to content

EPOCH API

Your research. Connected to your systems.

Connect Epoch to your applications, notebooks and workflows. Use your portfolio context, execute a saved model on new data and return exposures and risk results to your existing tools.

Explore the workflow

Use your portfolio context

Load positions from your own system. Send the context and a research question to Epoch from your notebook or application.

portfolio_model.ipynbPython example · Epoch API
MULTI-ASSET PORTFOLIO · MODEL PR-018

Start with the positions you already have.

Your position store remains the source. Epoch receives the research context and returns the calculation.

[1]
positions = position_store.load("multi_asset")
positions.groupby("book").market_value()
POSITION STORE 3 books · $4,800,000
Example portfolio books from an internal position store
BookMarket valueSource
Direct equities$1,728,000Position store
Fund allocations$2,592,000Position store
Cash$480,000Position store
[2]
model = epoch.run(
    query=(
        "Measure technology exposure, including fund holdings, "
        "and stress a 20% technology sell-off."
    ),
    context=[positions],
)
model.to_dataframe()
RETURNED ANALYSIS

Look through the holdings.

In this example, direct positions account for 16% technology exposure. Fund holdings bring the total to 38%.

Direct positions16%
With fund holdings38%
Position context stays attached to the study.
Illustrative integration syntax · Python exampleFictional portfolio data

Save the model

Inspect the calculation, test an assumption and retain the study. The same method can execute against the next portfolio update.

portfolio_model.ipynbPython example · Epoch API
MULTI-ASSET PORTFOLIO · MODEL PR-018

One model, ready for the next update.

Test the scenario, retain the method and write the result back to your research system.

[1]
saved = model.save("Technology concentration model")
result = epoch.execute(
    study="PR-018",
    context=[positions],
    technology_shock=-0.20,
)
research_store.write(result.to_dataframe())
MODEL OUTPUT Run 1 · technology −20%
Example portfolio scenario calculated from displayed exposure
MeasureResult
Technology exposure38.0%
Technology −20% impact−7.6%
Scenario loss−$364,800

Example calculation: technology exposure × shock. Other assets held flat.

[2]
# Existing job runner calls this on a data update
def refresh_model(event):
    positions = position_store.load("multi_asset")
    result = epoch.execute(
        study="PR-018",
        context=[positions, event],
        technology_shock=-0.20,
    )
    research_store.write(result.to_dataframe())
    dashboard.refresh("portfolio_risk")
Saved method · updated inputs · returned results
Illustrative integration syntax · Python exampleFictional portfolio data

Refresh your existing tools

When new positions or market data become available, rerun the saved model and return exposures, scenario results and changes to your existing dashboard.

YOUR EXISTING RESEARCH DASHBOARD

Fresh portfolio inputs. The same saved model.

Open dashboard ↗
TRY A DATA UPDATE
MULTI-ASSET PORTFOLIOPortfolio risk · Internal research dashboard
Powered by Epoch
MODEL OUTPUT · PR-018

Updated exposures.
The same model.

Initial model executionSaved study · PR-018 · Method v1
Portfolio value$4,800,000Direct equities, fund allocations and cash
Technology exposure38.0%Direct holdings + underlying fund exposure
Technology −20% scenario−$364,8007.6% of portfolio value · hypothetical

The whole portfolio

Look-through exposure
Technology exposure
38.0%
Bonds
32.0%
Other equities
20.0%
Cash
10.0%

Positions from the internal store. Look-through calculations use the supplied example fund holdings.

What changed

Initial review
THE STARTING FINDING

More technology exposure than the headline allocation suggests.

Direct technology positions represent 16% of this example portfolio. Including underlying fund holdings brings the exposure to 38%.

Fresh inputs. The same saved analysis.
RESEARCH LOG

The model recalculates technology exposure and scenario sensitivity when prices or positions change. The research system retains the study ID and method version with each returned result.

Method v1 · Research context retained between executions

Refresh timing follows the connected source and your run schedule; market data may be delayed.

Prices: initial example close
Holdings: initial positions
Illustrative data · No orders placed
Scenario: technology-only shock; other assets held flat.

Initial model execution. Portfolio value $4,800,000. Technology exposure 38.0%.

Saved study PR-018 · v1Execute on available prices or holdings updatesResult delivery internal dashboard refreshed

Available portfolio data in. Updated model results back to your tools.

Marketing concept · Illustrative API syntax, fictional data and simulated updates