Resampled Efficient Frontier
Install and import#
npm install fintech-algorithmsimport { resampledEfficientFrontier } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/resampled-efficient-frontier";Signature#
resampledEfficientFrontier(returns, resampleIndices, ranks)Averages optimizer weights across seeded bootstrap resamples at matching return rank, so the reported allocation reflects estimation noise rather than one sample.
Parameters#
| Name | Type | Notes |
|---|---|---|
returns | `T x n` matrix | decimal simple return/period |
resampleIndices | number[][] | |
ranks | vector | [0,1] |
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
[
[0.2, 0.1],
[0, 0.1],
[0.1, 0.2]
]Showing 3 of 4 elements.
[
[0, 1, 2, 3]
][0, 0.5, 1]Call#
resampledEfficientFrontier(returns, resampleIndices, ranks)Returns#
object with 4 fields: ranks, averagedWeights, replicates, status
{
"ranks": [0, 0.5, 1],
"averagedWeights": [
[0.5, 0.5],
[0.5, 0.5],
[0.5, 0.5]
],
"replicates": [
{
"indices": [0, 1, 2, 3],
"mean": [0.1, 0.1],
"covariance": [
[0.005000000000000001, 0],
[0, 0.005000000000000001]
],
"gmvReturn": 0.1,
"maxReturn": 0.1,
"weightsByRank": [
[0.5, 0.5],
[0.5, 0.5],
[0.5, 0.5]
]
}
],
"status": "optimal"
}Other exports#
This module also exports
seededBootstrapIndices. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
Calculation flow#
Diagram
flowchart TB
N0[Select aligned rows] --> N1
N1[Estimate moments] --> N2
N2[Map common ranks] --> N3
N3[Solve each frontier] --> N4
N4[Average matching ranks]
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Portfolio optimization by means of resampled efficient frontiers — US patent record; inventors Richard O. Michaud and Robert Michaud.
- Resampled optimization — MOSEK ApS.
- Efficient Asset Management — Richard O. Michaud.