Make portfolio factor neutral
SEC API agent skills for source-cited filing research with hosted API and MCP workflows
npx -y skills add secapi-ai/secapi-skills --skill make-portfolio-factor-neutralAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Measures factor exposure in a weighted portfolio and tests a constrained adjustment under stated scenarios. Use when you need to understand concentration or a proposed hedge's trade-offs.
SKILL.md
1.9 KB, as published. Nobody here has run it
Make Portfolio Factor Neutral
Measure the portfolio before optimizing it. Require holdings with weights, state the country and lookback, then evaluate a proposed adjustment under explicit constraints and scenarios.
First Read
curl --fail --silent --show-error https://api.secapi.ai/v1/portfolio/analyze \
-H "x-api-key: $SECAPI_API_KEY" \
-H "content-type: application/json" \
-d '{"country":"US","lookback":"6m","holdings":[{"symbol":"AAPL","weight":0.5},{"symbol":"MSFT","weight":0.5}]}'
holdings is required; each holding has a symbol and weight. The portfolio routes also support country, lookback, category, and factor-key controls.
What to provide
Give the agent the holdings and weights, country, lookback, objective, and constraints. Weights should represent the portfolio you want analyzed; an optimizer cannot infer omitted holdings, taxes, liquidity, or trading costs.
Research path
- Submit the actual or proposed book to
POST /v1/portfolio/analyze. - Use
POST /v1/portfolio/optimizewith the stated objective.factor_neutral,min_drawdown, andregime_awareare the published objective values. - Test the resulting holdings with
POST /v1/portfolio/stress-test. Name the historical, named, or custom scenario used. - Keep the returned analysis and stress-test records with the proposed holdings so another reviewer can reproduce the scenario.
Expected result
Show the largest exposures, proposed changes, remaining concentration, and scenario results. State the weights, country, lookback, objective, and constraints. An optimized output is scenario analysis, not a trade instruction or a promise of neutrality.