> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quantspace.limex.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Fama-French Replicate Server

> Official and replicated Fama-French factors plus loadings and alpha estimation.

## Overview

The Fama-French Replicate Server provides official Fama-French 5-factor daily data, replicated proxy factors from the hosted cache, and loadings / alpha estimation against factor returns.

## Connection

Add this server to your MCP client configuration.

<Tabs>
  <Tab title="Cursor">
    ```json theme={null}
    {
      "mcpServers": {
        "fama-french-replicate": {
          "url": "https://fama-french-factors-production.up.railway.app/mcp/fama_french_replicate"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Bearer auth">
    ```json theme={null}
    {
      "mcpServers": {
        "fama-french-replicate": {
          "url": "https://fama-french-factors-production.up.railway.app/mcp/fama_french_replicate",
          "headers": {
            "Authorization": "Bearer ${env:FAMA_FRENCH_REPLICATE_MCP_TOKEN}"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

Restart the client after changing MCP configuration. The server tools appear automatically after the connection is established.

## Transport

| Property         | Value                                                                             |
| ---------------- | --------------------------------------------------------------------------------- |
| Protocol         | MCP over Streamable HTTP                                                          |
| MCP URL          | `https://fama-french-factors-production.up.railway.app/mcp/fama_french_replicate` |
| Health URL       | `https://fama-french-factors-production.up.railway.app/health`                    |
| MCP path         | `/mcp/fama_french_replicate`                                                      |
| Request envelope | `{"request": {...}}`                                                              |
| Auth             | Optional bearer token when enabled for the endpoint                               |

## Best-Fit Workflows

* Fetch official Fama-French factors.
* Fetch replicated proxy factors from the hosted cache.
* Fetch the latest available proxy factor row.
* Regress returns on factor series to estimate loadings and alpha.

## Recommended Tools

* get-official-ff-factors
* get-proxy-ff-factors
* get-proxy-ff-factors-last
* get-loadings-and-alpha

## Tools

| Tool                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                             | Returns        |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| `get-official-ff-factors`   | Download and process Fama-French 5-factor research data.                                                                                                                                                                                                                                                                                                                                                                                | `pd.DataFrame` |
| `get-proxy-ff-factors`      | Fetch replicated (proxy) Fama-French 5-factor data computed by our internal methodology.                                                                                                                                                                                                                                                                                                                                                | `pd.DataFrame` |
| `get-proxy-ff-factors-last` | Fetch replicated (proxy) Fama-French 5-factor data for the latest available trading date.                                                                                                                                                                                                                                                                                                                                               | `pd.DataFrame` |
| `get-loadings-and-alpha`    | Performs time-series regression of asset or portfolio returns on factor returns to estimate factor exposures (loadings) and abnormal returns (alpha). Returns a Series containing the estimated loadings and alpha. Params: factors: pd.DataFrame of factor returns (e.g., 'MKT', 'SMB', 'HML', 'RMW', 'CMA'), rets: pd.Series of asset/portfolio excess returns, from\_date/to\_date: optional date range filters (e.g., '2020-01-01') | `pd.Series`    |

## Examples

### Fetch official factors

```json theme={null}
{
  "request": {
    "from_date": "2024-01-01",
    "to_date": "2024-12-31"
  }
}
```

### Fetch proxy factors

```json theme={null}
{
  "request": {
    "from_date": "2026-04-01",
    "to_date": "2026-04-21"
  }
}
```

### Fetch the latest proxy row

```json theme={null}
{
  "request": {}
}
```

### Estimate loadings and alpha

```json theme={null}
{
  "request": {
    "factors": "$last",
    "rets": "$prev",
    "from_date": "2024-01-01",
    "to_date": "2024-12-31"
  }
}
```

## n8n Workflow

This server is a good fit for an n8n report workflow with a Manual Trigger, Schedule Trigger, or `POST` Webhook. Use n8n to normalize portfolio input, call MCP tools, and deliver the final report as webhook JSON, an execution log, email, or chat notification.

Recommended n8n MCP chain:

1. Accept a portfolio through a Webhook or manual configuration.
2. Call `get-proxy-ff-factors` for the factor window.
3. Call `get-loadings-and-alpha` for each asset or aggregated portfolio return series.
4. If a tool returns `result_id`, call `result_get` before assembling the report.
5. Route the output to Respond to Webhook or delivery nodes.

Keep delivery credentials in n8n Credentials or environment variables. Do not export API keys, bot credentials, credential IDs, email recipients, or private webhook paths with the workflow.

See [n8n Workflows](/quantx/servers/deployed/n8n-workflows) for the shared webhook and MCP session patterns.

Available n8n templates:

* [Factor Loading Report JSON](/quantx/servers/deployed/workflows/fama-french-factor-loading-report.json) - public CSV portfolio webhook at `POST https://n8n.limex.pro/webhook/ff-factor-loading-report`.
* [Extended Factor Loading Report JSON](/quantx/servers/deployed/workflows/fama-french-factor-loading-report-extended.json) - import-only template for manual, scheduled, Lime, and delivery use cases. The live webhook is not published.

## Notes

* Proxy-factor tools read from the hosted factor cache.
* Use Dataloader when you need raw OHLCV data rather than factor data.

<CardGroup cols={3}>
  <Card title="Client setup" icon="plug" href="/quantx/servers/deployed/client-setup">
    Configure this endpoint in Cursor, Claude Desktop, or a generic MCP client.
  </Card>

  <Card title="n8n workflows" icon="workflow" href="/quantx/servers/deployed/n8n-workflows">
    Build webhook and scheduled reporting flows around this MCP endpoint.
  </Card>

  <Card title="Shared tools" icon="wrench" href="/quantx/servers/deployed/shared-tools">
    Use health, result, artifact, environment, and table helper tools.
  </Card>
</CardGroup>

## Other Servers

<CardGroup cols={3}>
  <Card title="Dataloader" icon="server" href="/quantx/servers/dataloader">
    Market-data retrieval, TA-Lib indicators, and dataframe exports.
  </Card>

  <Card title="Statistical Factor Models" icon="server" href="/quantx/servers/statistical-factor-models">
    Stock-Watson, complete-panel, and dynamic statistical factor extraction.
  </Card>

  <Card title="Jump Models" icon="server" href="/quantx/servers/jump-models">
    JumpModel and SparseJumpModel regime fitting, online prediction, and backtesting.
  </Card>

  <Card title="Wavelet Mean Reversion" icon="server" href="/quantx/servers/wavelet-mean-reversion">
    Wavelet-based mean reversion analysis for financial time series.
  </Card>

  <Card title="Parallax ExtremeHurst" icon="server" href="/quantx/servers/parallax-extreme-hurst">
    ExtremeHurst signal generation from OHLCV data.
  </Card>

  <Card title="EP Ratio Screener" icon="server" href="/quantx/servers/ep-ratio-screener">
    Fundamental stock screening based on earnings yield and balance-sheet quality.
  </Card>

  <Card title="Volatility Scaling Lab" icon="server" href="/quantx/servers/volatility-scaling-lab">
    Volatility targeting, EWMA volatility, Monte Carlo bands, and risk diagnostics.
  </Card>
</CardGroup>
