Measuring Portfolio Drift With Claude and the FMP MCP Server
A hypothetical $1M family-office portfolio is rebuilt from FMP prices to measure absolute, relative and sector drift and flag positions for analyst review.
This article is published in English.
Sources: How Family Offices Can Use Claude + FMP MCP to Detect Portfolio Drift Before Rebalancing
Why portfolios drift without any trades
Leave a portfolio alone and it still won't hold its original shape. Stocks perform differently, so position weights shift a little each day, and after a few months the allocation a family office chose can look quite different. That drift isn't automatically a problem, since small deviations are normal. The practical question is narrower: has any holding or sector strayed far enough from its target weight to deserve a closer look before anyone considers rebalancing?
Claude, linked to the Financial Modeling Prep (FMP) MCP server, is well placed to answer. Give it target weights, historical prices and company classifications, and it can replay how a portfolio with no trades would have evolved and quantify the drift that resulted.
What drift is and how it's measured
Drift appears when market moves alter individual weights although no one traded. Say a portfolio opens with Microsoft at 20%, NVIDIA at 15% and JPMorgan at 20%. Let one holding rise much faster than the rest, and its weight grows on its own while slower names shrink relatively. The investment team then faces three questions, and the measures below address them.
The first comparison is the reconstructed current weight against the original target. A position that goes from 15% to 17% has drifted by +2 percentage points, an absolute gauge of how much more of the portfolio it now represents.
Absolute drift can hide how big a move really is. Two percentage points matter far more for a position that began at 5% than for one that began at 25%. Relative drift covers that gap, and the formula is shown here:
Using both together separates harmless allocation noise from changes that genuinely alter the portfolio's design.
Individual holdings can also shift the sector mix. If a large Technology position outruns everything else, the Technology allocation can creep upward with no deliberate decision behind it. Sector drift therefore gives a second layer of review beyond single names.
Contribution matters too, because positions don't add equally to total drift. Measuring each holding's share of total absolute drift shows whether the portfolio moved because of one dominant position, a small group of holdings, or broad changes across several parts of the book. The goal still isn't to rebalance every deviation automatically. It's to pick out the changes large enough to deserve an analyst's attention.
The simulation setup
The test portfolio is a hypothetical $1 million family-office account started on January 2, 2026, shown below in its initial allocation.
After launch there are no trades, deposits, withdrawals or manual rebalancing. For every holding, Claude retrieves two kinds of data via the FMP MCP server: the company name, sector and industry, and dividend-adjusted prices for January 2 and August 26, 2026. In the real run the classifications came from FMP:company with profile-symbol, and the price series from FMP:chart with historical-price-eod-dividend-adjusted. Both dates fell on U.S. trading days, so no stand-in dates were required.
The change in dividend-adjusted price stands in as a total-return proxy. Each holding first gets a growth factor from its two prices.
Multiplying the initial allocation by that factor gives the holding's ending value.
With every ending value rebuilt, the new portfolio weight follows from each position's share of the total.
It's a deliberately simplified no-trade simulation. It makes no attempt to mirror a real brokerage account with cash dividends, taxes, transaction costs or interim activity.
Two measures then compare reconstructed weights with the original allocation. First, absolute drift, in percentage points:
Second, relative drift, as a share of the starting weight:
The same reconstructed weights get grouped by FMP sector classification, which shows whether drift is limited to individual stocks or also changing the sector allocation.
Review thresholds
With weights rebuilt, the next question is which deviations merit attention. This demonstration uses illustrative bands in place of treating every change as a rebalancing signal.
For single holdings, the status follows from the two drift measures:
- Within Range means absolute drift under 2 percentage points and relative drift under 15%.
- Monitor applies when the holding isn't already Review Required and has absolute drift of 2 to 4 points, or relative drift of 15% to 25%.
- Review Required applies when absolute drift passes 4 points, or relative drift passes 25%.
These cutoffs exist only to make the example reproducible. They aren't universal rebalancing standards.
Sector exposure uses its own bands: Within Range below 3 points, Monitor from 3 to 5 points and Review Required above 5 points. This shows whether changes in individual holdings are also bending the intended sector mix.
Two summary figures complete the toolkit. Portfolio Allocation Distance describes how far the whole portfolio has moved from its original allocation, and it's computed as half the sum of the absolute gaps between current and target weights across all holdings. It captures aggregate allocation change, and no Low, Medium or High label attaches to it because the method defines no threshold for one. Contribution to Absolute Drift divides a holding's absolute gap by the sum of all absolute gaps and scales it to 100. That separates a portfolio moved mostly by one security from one where several holdings slowly slid away from target.
Throughout, the point is to find deviations worth reviewing, and not to turn them into trading instructions.
The prompt
With allocation, drift rules and thresholds fixed, Claude can fetch the FMP data and reconstruct the portfolio. The main prompt instructs it, through the FMP MCP server, to:
- fetch dividend-adjusted prices for both dates;
- rebuild each holding's ending value and current weight;
- measure absolute and relative drift;
- roll the results up by sector;
- compute Portfolio Allocation Distance and find the top contributors to total drift;
- label every position Within Range, Monitor or Review Required.
The full prompt is a 76-line block that casts Claude as an investment-research analyst for a family office, restricts it to the FMP MCP server and lays out the hypothetical portfolio and rules:
Act as an investment-research analyst supporting a family office.
Using only the Financial Modeling Prep (FMP) MCP server, analyze how far the following hypothetical portfolio has drifted from its original target allocation.
Do not use web search or outside data.
Portfolio:
MSFT — Target Weight: 20% — Initial Allocation: $200,000
NVDA — Target Weight: 15% — Initial Allocation: $150,000
JPM — Target Weight: 20% — Initial Allocation: $200,000
GOOGL — Target Weight: 15% — Initial Allocation: $150,000
XOM — Target Weight: 15% — Initial Allocation: $150,000
JNJ — Target Weight: 15% — Initial Allocation: $150,000
Total portfolio value at inception = $1,000,000.
Assume:
- no trades occurred after the initial allocation;
- no capital was added or withdrawn;
- no manual rebalancing occurred;
- transaction costs, taxes, and cash balances are outside the scope of this demonstration.
Analysis date: August 27, 2026.
Use August 26, 2026, the last completed U.S. trading session, as the ending price date.
Retrieve for each ticker:
- company name;
- sector;
- industry;
- dividend-adjusted historical price for January 2, 2026;
- dividend-adjusted historical price for August 26, 2026.
Use the FMP dividend-adjusted historical price series if available.
If an exact date is unavailable, use the closest valid trading date and state the date actually used.
Do not estimate missing FMP values.
Reconstruct the portfolio using the dividend-adjusted price change as a total-return proxy.
Calculate for each holding:
- growth factor;
- ending value;
- current portfolio weight;
- absolute drift in percentage points;
- relative drift as a percentage of target weight.
Classify each holding using these illustrative rules:
Within Range:
- absolute drift below 2 percentage points; AND
- absolute relative drift below 15%.
Monitor:
- absolute drift between 2 and 4 percentage points inclusive; OR
- absolute relative drift between 15% and 25% inclusive;
- provided Review Required has not already been triggered.
Review Required:
- absolute drift above 4 percentage points; OR
- absolute relative drift above 25%.
Also calculate target and current sector weights using FMP sector classifications.
Classify sector drift as:
- Within Range: below 3 percentage points;
- Monitor: 3–5 percentage points inclusive;
- Review Required: above 5 percentage points.
Calculate Portfolio Allocation Distance as:
0.5 × sum of the absolute position-level weight deviations.
Do not assign a Low, Medium, or High label to this metric.
Also calculate each holding's contribution to total absolute drift.
Based strictly on the calculated evidence, identify:
- the largest overweight;
- the largest underweight;
- Monitor positions;
- Review Required positions;
- the sectors with the largest drift;
- the holdings contributing most to total drift;
- the highest-priority deviations for analyst review.
Do not recommend buying, selling, trimming, adding to, or rebalancing any security.
If important price, sector, or classification data is missing or conflicting, use Review Required rather than guessing.
Do not claim that corporate events were checked unless data capable of verifying them was actually retrieved.
Present the results clearly and concisely using tables where useful.
Include:
- methodology and actual dates used;
- reconstructed portfolio weights;
- position-level drift;
- sector-level drift;
- Portfolio Allocation Distance;
- contribution to total drift;
- key findings;
- Review Required items;
- FMP MCP tools and data types used.
What the run found
Prices came from FMP's dividend-adjusted series for January 2 and August 26, 2026, and every needed price was available.
The figure above has Claude summarizing the detected drift from FMP price and company data. One main prompt generated the whole quantitative analysis. Afterward, a narrowly scoped follow-up, with no new retrieval or calculation, only sharpened the interpretation: it dropped unsupported qualitative labels around Portfolio Allocation Distance and made clear that drift in a single-stock sector shouldn't be read as evidence of broader sector or market rotation.
Reconstructed on August 26, 2026, the portfolio was worth $1,158,925.10, a 15.89% total-return proxy gain for the no-trade simulation.
Here Claude lines up target and reconstructed weights and flags positions that crossed the monitoring thresholds. More telling is how uneven performance reshaped the intended allocation.
JNJ ended as the biggest overweight at 17.12%, +2.12 percentage points above target. XOM was close behind at 17.03%, or +2.03 points over. Both cleared the 2-point absolute-drift line and landed in Monitor. Nothing reached Review Required.
Microsoft slid from its 20% target to 18.23%, the largest underweight at -1.77 points. It stayed Within Range because the gap was under both the absolute and relative Monitor limits. That illustrates a useful point: a holding can post a positive return and still end up underweight when other positions rise faster.
Portfolio Allocation Distance came to 4.15 percentage points, summarizing how far the entire portfolio moved from target, again without a qualitative label.
Contribution figures show who was responsible for most of the change.
JNJ and XOM together made up 50% of total absolute drift, and MSFT added another 21.35%. Most of the structural change therefore came from a few holdings and not from an even spread.
At sector level, none crossed the 3-point Monitor threshold.
Technology showed the biggest sector move at -2.39 points and remained Within Range. Still, four of the five sectors hold just one stock in this sample: Energy is XOM, Healthcare is JNJ, Financial Services is JPM and Communication Services is GOOGL. Drift in those sectors mostly reflects the single stock's movement and not a wider sector effect.
The bottom line is plain. Drift was big enough to put JNJ and XOM on a watch list, but not big enough to trigger Review Required at position or sector level.
Where analyst judgment still matters
Software can measure drift, yet the numbers don't always say why a position moved, and some cases need a person's review before results feed a rebalancing process.
JNJ and XOM crossing the 2-point line tells the team they've moved far enough to warrant attention. It doesn't mean either should automatically be trimmed. An analyst still has to ask whether the deviation is temporary, expected or consistent with the current investment policy.
The run relied on company classifications and dividend-adjusted prices. It pulled no news, filings, earnings announcements or other event data, so it can't explain why JNJ or XOM outperformed. For an unusually large drift, an analyst may want to check for:
- an earnings surprise or revised guidance;
- a deal or corporate restructuring;
- splits, spin-offs or similar corporate actions;
- headlines about the company itself;
- wider market or industry moves.
Price data alone shouldn't be used to infer any of these. Single-security sectors raise a related caution. Because Healthcare is represented entirely by JNJ, the portfolio's +2.12-point Healthcare drift is mechanically identical to JNJ's own drift, so it says nothing about the Healthcare sector as a whole.
The method further assumes no trades, no contributions or withdrawals, no manual rebalancing and no separate cash allocation. If a real portfolio saw any of these, weights rebuilt from prices would no longer match the actual account, and the workflow should rely on genuine transaction and holding data and not infer evolution from prices.
When the data is missing or conflicting
In any of these situations, Claude should answer Review Required and not guess:
- the starting or ending price for a holding can't be found;
- dividend-adjusted price data has gaps;
- sector classifications from FMP are only partial;
- the target weights don't add up to 100%;
- FMP returns records that contradict each other;
- a corporate action muddies the historical comparison.
The workflow exists to make drift easier to spot and prioritize. Whether a deviation calls for rebalancing remains the investment team's decision.
Turning it into a recurring review
One-off analysis helps, but a family office gains more by repeating it while weights keep moving. The Claude and FMP MCP analysis can run on a schedule and compare the newest reconstructed weights to the original targets and to the last review. Each cycle then concentrates on changes and doesn't redo the whole picture. Worth tracking:
- names that have just stepped outside their ranges;
- holdings that slid from Within Range into Monitor;
- holdings that escalated all the way to Review Required;
- flagged names that have since moved back toward their targets;
- how sector-level drift evolved;
- the trend in Portfolio Allocation Distance;
- any change in who the biggest drift contributors are.
A short status vocabulary makes the output easy to scan: Within Range, Monitor, Review Required and Resolved. A weekly review with a deeper monthly pass is a reasonable default here, adjustable for portfolio turnover, reporting duties and how actively the team manages ranges. Comparing target allocation, the previous review and the current review side by side makes it easier to tell a temporary wobble from a pattern that's still building.
Even so, the workflow should end at prioritization. Claude can report that a holding has moved materially from target, while the investment team decides about rebalancing. This example produced no Review Required positions: JNJ and XOM were Monitor items and the rest stayed in range. That's the intended function, helping analysts see where allocation changes warrant attention ahead of a rebalancing decision, and leaving trading to people.