Rerun a stock strategy without its largest contributors
When a stock strategy’s development profit depends on one or two securities, remove them under a declared rule and rerun the remaining portfolio. Subtracting the winner’s original contribution does not reproduce the changed experiment: freed capital changes allocations, quantities, cash and later trading. The useful comparison is between two complete account paths with a documented redistribution policy.
This guide performs that intervention on three invented stock paths. It is a fragility check using already seen development results, not an independent holdout or a new stock-picking recommendation. Use one market and currency. CoTrading support remains planned or unverified; the calculation is a standalone research extension.
Reconcile contributions before choosing exclusions
Start from a frozen candidate with complete positions, fills, valuation marks and costs. Define contribution in the same units as portfolio performance. A currency-profit contribution, a weighted percentage contribution and a security’s own return are different quantities. Verify that contributions and cash effects reconcile to the original portfolio before ranking names.
Specify whether realized and unrealized results, dividends and costs are included. Retain losing contributors and inactive securities, not just winners. A large reported contribution can result from a large allocation rather than unusual standalone performance; the intervention should be interpreted with that exposure visible.
The FINRA discussion of concentration risk explains that concentration can arise from asset performance and correlated holdings. Our contributor-exclusion rerun is an original sensitivity exercise. The source does not prescribe this algorithm or certify that removing a profitable stock creates a safer or superior strategy.
Freeze the rule and redistribution policy
Choose the development observation interval, contributor metric, number of names removed, tie rule and minimum remaining universe before performing the intervention. Here we remove exactly the largest first-period profit contributor, breaking a tie by security identifier. Do not keep deleting names until the residual result supports a preferred conclusion.
Decide what freed capital does. It can remain cash, redistribute across eligible securities under the original sizing rule or follow another explicitly frozen policy. These are different research questions. This example rebalances equally across the remaining names at each period boundary, so the residual stocks receive larger allocations than before.
Keep signal logic and all other execution assumptions fixed. If exclusion changes the signal universe used by rankings, regenerate those signals as well. A ranking strategy cannot generally retain its old target weights after its top-ranked security disappears. The account must follow the changed eligible universe from the initial state onward.
Build the synthetic original portfolio
Initial capital is 300. Three stocks begin at price 100. Their subsequent paths are A [100,120,120], B [100,100,110] and C [100,90,90]. Rebalance to equal value at each of two period openings. Costs are zero, shares may be fractional and there are no missing or rejected trades.
At the first opening, each stock receives 100, giving one share each. First-period profit contributions are A +20, B 0 and C −10. Equity becomes 310. The frozen rule removes A because +20 is the largest first-period contribution. This choice uses observed development information and cannot be described as unseen evidence.
Without exclusion, the second opening redistributes 310 equally, or approximately 103.333333 per stock. Only B changes during the second period, rising 10%, so the original ending value is approximately 320.333333. The code preserves target quantities and actual quantity changes at both rebalances.
Rerun the residual account from the original start
Remove A before the rerun begins, restore capital 300 and apply equal weights to B and C. Each now receives 150, giving 1.5 shares rather than the original one. First-period profit is 0 from B and −15 from C, leaving 285. This is already different from simply deleting A’s +20 from 310, which would leave 290.
At the second opening, allocate 142.5 to each remaining stock. B gains 14.25 and C remains unchanged, so residual ending equity is 299.25. The calculation reconstructs both allocation decisions; it does not reuse the old trade list with A’s rows removed.
| Account path | First-period equity | Ending equity |
|---|---|---|
| Original A/B/C, rebalanced | 310 | 320.333333 |
| B/C rerun, capital redistributed | 285 | 299.250000 |
| Original ending value minus A’s +20 | not a rerun | 300.333333 |
The subtraction shortcut differs by approximately 1.083333 at the end. The residual portfolio is not simply “original minus winner,” because its remaining exposures changed throughout the path. Choosing to leave A’s former capital in cash would produce another result and require a separate labeled account simulation.
Record targets, fills and contribution bridges
The core per-period operation is:
target = {s: equity / len(universe) / prices[s][t]
for s in universe}
fills = {s: target[s] - shares[s] for s in universe}
contributions = {s: target[s] * (prices[s][t+1] - prices[s][t])
for s in universe}
equity += sum(contributions.values())
The full sample saves targets and fills with each period’s ending equity. Under its zero-cost, immediate-fill assumptions, reallocating target value spends the available capital and the profit bridge reconciles. A real engine needs explicit sells, buys, cash sequencing, lots, charges and rejected orders. Fractional toy quantities do not verify any market’s trading-unit rules.
Compare numeric results using an explicit tolerance. The script uses Python isclose for floating arithmetic checks, while identifiers and exclusion membership are exact. Rounding every quantity before calculation merely to match a displayed number would silently change the model.
Exercise the different failure mechanisms
The first counterexample is arithmetic subtraction: original ending equity minus the removed contributor’s original profit is approximately 300.333333, not the rerun’s 299.25. The sample explicitly asserts that they differ. This catches a plausible-looking shortcut that can survive a superficial chart review.
The second boundary is an empty residual universe. If a removal rule deletes every eligible security, equal-weight allocation has no denominator. The sample rejects an empty list rather than dividing by zero or silently returning an unchanged profitable curve. A real policy could define cash-only behavior, but it must be chosen before interpreting the intervention.
Also retain stocks whose data or execution fail after removal. Exclusion can change cash timing and feasibility; it does not license omitting remaining failures. Report unavailable results instead of assigning zero contribution to a stock that never completed the new run.
Interpret what the intervention establishes
The original path ends above 300, while the redistributed residual path ends slightly below it. That shows sensitivity to excluding A under this specific allocation policy. It does not establish that A caused all economic value, that A should be avoided or that the residual rule predicts future losses.
The removal rule itself used development outcomes. Calling the rerun out of sample would conceal that selection. Preserve it as a candidate fragility diagnostic and decide whether further independent evidence is needed. Changing the exclusion count, contributor horizon or redistribution policy adds exploratory variants that should all remain in the ledger.
Execute and accept the comparison
Download the complete example. Use Python 3.12 or later and run python R614.py. It uses only standard-library arithmetic and synthetic paths. Assertions verify A’s selection, first residual quantities of 1.5 shares, residual ending equity 299.25, disagreement with subtraction and rejection of an empty universe.
Archive the original contributor table, frozen removal rule, full residual universe, capital policy, target/fill ledgers and both run references. Reconcile first-period contributions and second-period reallocations before accepting the ending comparison. A result without its changed weights does not explain the intervention.
Rerun when the contribution definition, data snapshot, candidate, costs or redistribution policy changes. Preserve the earlier comparison as a separate version. The example verifies an account transformation under simplified assumptions; it supplies no real historical performance evidence and does not validate an automated product feature.
FAQ
Can I remove winner rows from the old trade export?
That does not regenerate allocations and account state. It only works for a separately justified fixed-exposure calculation, not this redistributed rerun.
Is this an independent test of the strategy?
No. The exclusion uses observed development contributions and is an exploratory fragility check.