Expected-return estimator: "empirical", "ew", or "custom" (ML/DL predictions as μ).
Auto-default: "empirical" on data_extraction input; "custom" on ml/nn engine input.
On data_extraction, "custom" is overridden to "empirical" (no ML predictions available).
Per-asset lower bound, within [-1, 1]. Default: 0.
A negative value allows shorts — -0.2 permits shorting up to 20% per name. The 0
default means long-only by default, not that shorts are unsupported.
Rolling covariance window in trading days. Default: 40.
It is also the warmup when you do not set an explicit split: the first n days estimate
covariance and everything after them is evaluated.
For DCC, estimation still uses the full train sample; the window mainly controls that warmup split.
Caps the backtest end date, YYYY-MM-DD. Omit it to use all available data.
Dates normally come from the data you already extracted: name the sample start and end there, and
let the first covariance_window days serve as warmup. Set Backtest params only when you want a
specific split or a shorter evaluation window than the data allows.
Full HTTPS URL to the output blob — pass to run_trading_job
output_name
Blob filename
execution_name
Job execution ID for audit/debugging
effective_params
The settings the run actually used, after defaults and any remapping
coercions
Values the job changed for you, such as mu_mode custom → empirical
warnings
Anything else worth knowing about the run
fallback_used, fallback_steps, fallback_days
Whether some rebalance dates fell back to equal weights, and which
A run stays Succeeded when knobs are remapped or some dates fall back to equal weights. Read
effective_params, coercions and warnings before treating the result as the portfolio you
asked for.
The blob contains Weights, Prices, and Meta (includes fallback flags if optimization falls back to equal weights).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"QuantSpace","description":"The unified AI-native platform for quantitative finance professionals — QCA, QuantLab, QuantX","colors":{"primary":"#0078D4","light":"#50B4FF","dark":"#005A9E"},"logo":{"light":"https://mintcdn.com/limeltc/4Yf0UOt6QHQAVi0u/logo/light.svg?fit=max\u0026auto=format\u0026n=4Yf0UOt6QHQAVi0u\u0026q=85\u0026s=1060912e71e53b700533ba46684b557d","dark":"https://mintcdn.com/limeltc/4Yf0UOt6QHQAVi0u/logo/dark.svg?fit=max\u0026auto=format\u0026n=4Yf0UOt6QHQAVi0u\u0026q=85\u0026s=f9a138a181962459b4023a84d09a1b94"},"favicon":"https://mintcdn.com/limeltc/4Yf0UOt6QHQAVi0u/favicon.svg?fit=max\u0026auto=format\u0026n=4Yf0UOt6QHQAVi0u\u0026q=85\u0026s=7071b7225f806fc8fa2f3fcf6dc77a99","navbar":{"links":[],"primary":{"type":"button","label":"Open QuantSpace","href":"https://quantspace.limex.pro"}},"footer":{},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"limeltc","hasAudioNarration":false,"actualSubdomain":"limeltc","customDomains":["docs.quantspace.limex.pro"],"gitSource":{"type":"github","owner":"quantspace-mcp","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9afcc5a00c3a5615c6f83","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"QuantLab","count":15},{"language":"default","tag":"QuantX","count":12},{"language":"default","tag":"Tools description","count":11},{"language":"default","tag":"Overview","count":5},{"language":"default","tag":"MCP Setup","count":3},{"language":"default","tag":"QCA","count":2},{"language":"default","tag":"Home","count":1},{"language":"default","tag":"Welcome","count":1},{"language":"default","tag":"Dataloader Server","count":1},{"language":"default","tag":"EP Ratio Screener Server","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"tools/po-job","slug":"/tools/po-job","pageMetadata":{"title":"run_po_job","description":"Optimize portfolio weights from price data or ML/DL predictions","href":"/tools/po-job"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Optimize portfolio weights from price data or ML/DL predictions\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`run_po_job`}),` builds portfolio weights with `,_jsx(_components.a,{href:`https://skfolio.org`,children:`skfolio`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Default:`}),` `,_jsx(_components.code,{children:`data_extractor_*.json`}),` — no ML needed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`With forecasts:`}),` `,_jsx(_components.code,{children:`ml_engine_*.json`}),` / `,_jsx(_components.code,{children:`nn_engine_*.json`}),` — use predicted returns as μ (`,_jsx(_components.code,{children:`mu_mode: custom`}),`)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Ask for a method (equal weight, HRP, max Sharpe, DCC, …); skills fill the rest.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(ParamField,{body:`input_url`,type:`string`,required:true,id:`param-input-url`,children:[_jsx(_components.p,{children:`Blob storage URL pointing to one of:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data_extractor_*.json`}),` — output of `,_jsx(_components.code,{children:`run_data_extraction`}),` (default path)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ml_engine_*.json`}),` — output of `,_jsx(_components.code,{children:`run_ml_job`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`nn_engine_*.json`}),` — output of `,_jsx(_components.code,{children:`run_dl_job`})]}),`\n`]})]}),`\n`,_jsxs(ParamField,{body:`config`,type:`object`,required:true,id:`param-config`,children:[_jsx(_components.p,{children:`Portfolio optimization configuration.`}),_jsxs(Expandable,{title:`config fields`,children:[_jsxs(ParamField,{body:`Optimization params`,type:`object`,required:true,id:`param-optimization-params`,children:[_jsx(_components.p,{children:`Method and estimation knobs.`}),_jsxs(Expandable,{title:`Optimization params fields`,children:[_jsxs(ParamField,{body:`method`,type:`string`,required:true,id:`param-method`,children:[_jsxs(_components.p,{children:[`Optimization method (case-insensitive). Default when omitted: `,_jsx(_components.code,{children:`\"maxsharpe\"`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`No-covariance`}),` (no `,_jsx(_components.code,{children:`covariance_mode`}),` / `,_jsx(_components.code,{children:`mu_mode`}),` knobs):`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Strategy`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"equal_weighted\"`})}),_jsx(_components.td,{children:`Equal weight`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"inverse_volatility\"`})}),_jsx(_components.td,{children:`Inverse volatility`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"random\"`})}),_jsx(_components.td,{children:`Random portfolio`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Covariance-based`}),` (support `,_jsx(_components.code,{children:`covariance_mode`}),` + `,_jsx(_components.code,{children:`mu_mode`}),`):`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Strategy`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"maxsharpe\"`})}),_jsx(_components.td,{children:`Mean-Risk — maximize Sharpe`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"minvol\"`}),` / `,_jsx(_components.code,{children:`\"minimize_volatility\"`})]}),_jsx(_components.td,{children:`Mean-Risk — minimize volatility`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"hrp\"`})}),_jsx(_components.td,{children:`Hierarchical Risk Parity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"herc\"`})}),_jsx(_components.td,{children:`Hierarchical Equal Risk Contribution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"risk_budgeting\"`})}),_jsx(_components.td,{children:`Risk Budgeting`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`\"max_diversification\"`})}),_jsx(_components.td,{children:`Maximum Diversification`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"distributionally_robust_cvar\"`}),` / `,_jsx(_components.code,{children:`\"robust_cvar\"`})]}),_jsx(_components.td,{children:`Distributionally Robust CVaR`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`DCC aliases`}),` (auto-set `,_jsx(_components.code,{children:`covariance_mode`}),` to `,_jsx(_components.code,{children:`\"dcc\"`}),`):`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"dcc_maxsharpe\"`}),`, `,_jsx(_components.code,{children:`\"dcc_minvol\"`}),`, `,_jsx(_components.code,{children:`\"dcc_hrp\"`}),`, `,_jsx(_components.code,{children:`\"dcc_herc\"`}),`, `,_jsx(_components.code,{children:`\"dcc_risk_budgeting\"`}),`, `,_jsx(_components.code,{children:`\"dcc_max_diversification\"`}),`, `,_jsx(_components.code,{children:`\"dcc_robust_cvar\"`})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Retired aliases — do `,_jsx(_components.strong,{children:`not`}),` use: `,_jsx(_components.code,{children:`meanvariance`}),`, `,_jsx(_components.code,{children:`mean_variance`}),`, `,_jsx(_components.code,{children:`sharpe`}),`, `,_jsx(_components.code,{children:`maximize_sharpe`}),`, `,_jsx(_components.code,{children:`dcc_sharpe`}),`, `,_jsx(_components.code,{children:`MeanVariance`}),`, `,_jsx(_components.code,{children:`markowitz`}),`.\nUse `,_jsx(_components.code,{children:`\"maxsharpe\"`}),` / `,_jsx(_components.code,{children:`\"dcc_maxsharpe\"`}),` instead.`]})})]}),_jsx(ParamField,{body:`covariance_mode`,type:`string`,id:`param-covariance-mode`,children:_jsxs(_components.p,{children:[`Covariance estimator for covariance-based methods. Default: `,_jsx(_components.code,{children:`\"empirical\"`}),`.\nValues: `,_jsx(_components.code,{children:`\"empirical\"`}),`, `,_jsx(_components.code,{children:`\"ew\"`}),`, `,_jsx(_components.code,{children:`\"ledoit_wolf\"`}),`, `,_jsx(_components.code,{children:`\"oas\"`}),`, `,_jsx(_components.code,{children:`\"denoise\"`}),`, `,_jsx(_components.code,{children:`\"detone\"`}),`, `,_jsx(_components.code,{children:`\"gerber\"`}),`, `,_jsx(_components.code,{children:`\"shrunk\"`}),`, `,_jsx(_components.code,{children:`\"graphical_lasso\"`}),`, `,_jsx(_components.code,{children:`\"dcc\"`}),`.\nDCC aliases force `,_jsx(_components.code,{children:`\"dcc\"`}),`.`]})}),_jsx(ParamField,{body:`mu_mode`,type:`string`,id:`param-mu-mode`,children:_jsxs(_components.p,{children:[`Expected-return estimator: `,_jsx(_components.code,{children:`\"empirical\"`}),`, `,_jsx(_components.code,{children:`\"ew\"`}),`, or `,_jsx(_components.code,{children:`\"custom\"`}),` (ML/DL predictions as μ).\nAuto-default: `,_jsx(_components.code,{children:`\"empirical\"`}),` on data_extraction input; `,_jsx(_components.code,{children:`\"custom\"`}),` on ml/nn engine input.\nOn data_extraction, `,_jsx(_components.code,{children:`\"custom\"`}),` is overridden to `,_jsx(_components.code,{children:`\"empirical\"`}),` (no ML predictions available).`]})}),_jsx(ParamField,{body:`min_weights`,type:`number`,id:`param-min-weights`,children:_jsxs(_components.p,{children:[`Per-asset lower bound, within `,_jsx(_components.code,{children:`[-1, 1]`}),`. Default: `,_jsx(_components.code,{children:`0`}),`.\nA negative value allows shorts — `,_jsx(_components.code,{children:`-0.2`}),` permits shorting up to 20% per name. The `,_jsx(_components.code,{children:`0`}),`\ndefault means long-only by default, not that shorts are unsupported.`]})}),_jsx(ParamField,{body:`max_weights`,type:`number`,id:`param-max-weights`,children:_jsxs(_components.p,{children:[`Per-asset upper bound, within `,_jsx(_components.code,{children:`[-1, 1]`}),`. Default: `,_jsx(_components.code,{children:`1`}),`.\nLeverage is not supported: do not set it above `,_jsx(_components.code,{children:`1`}),`.`]})}),_jsx(ParamField,{body:`covariance_window`,type:`integer`,id:`param-covariance-window`,children:_jsxs(_components.p,{children:[`Rolling covariance window in trading days. Default: `,_jsx(_components.code,{children:`40`}),`.\nIt is also the warmup when you do not set an explicit split: the first `,_jsx(_components.code,{children:`n`}),` days estimate\ncovariance and everything after them is evaluated.\nFor DCC, estimation still uses the full train sample; the window mainly controls that warmup split.`]})}),_jsx(ParamField,{body:`rebalance_frequency`,type:`integer`,id:`param-rebalance-frequency`,children:_jsxs(_components.p,{children:[`Rebalance every N trading days. Default: `,_jsx(_components.code,{children:`1`}),` (daily). Example: `,_jsx(_components.code,{children:`5`}),` ≈ weekly, `,_jsx(_components.code,{children:`21`}),` ≈ monthly.`]})})]})]}),_jsxs(ParamField,{body:`Backtest params`,type:`object`,id:`param-backtest-params`,children:[_jsxs(_components.p,{children:[`Optional, next to `,_jsx(_components.code,{children:`Optimization params`}),`.`]}),_jsxs(Expandable,{title:`Backtest params fields`,children:[_jsx(ParamField,{body:`Learning_end`,type:`string`,id:`param-learning-end`,children:_jsxs(_components.p,{children:[`Explicit train/test split date, `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. Omit it and the split is derived\nautomatically from `,_jsx(_components.code,{children:`covariance_window`}),`.`]})}),_jsx(ParamField,{body:`Testing_end`,type:`string`,id:`param-testing-end`,children:_jsxs(_components.p,{children:[`Caps the backtest end date, `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. Omit it to use all available data.`]})})]})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Dates normally come from the data you already extracted: name the sample start and end there, and\nlet the first `,_jsx(_components.code,{children:`covariance_window`}),` days serve as warmup. Set `,_jsx(_components.code,{children:`Backtest params`}),` only when you want a\nspecific split or a shorter evaluation window than the data allows.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`returns`,children:`Returns`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Succeeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://stqsnpprod.blob.core.windows.net/data/portfolio_optimization_35c1b5239d23.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"portfolio_optimization_35c1b5239d23.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"execution_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"po-job-abc123xyz\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"effective_params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hierarchical_risk_parity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"min_weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"covariance_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"empirical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"covariance_window\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mu_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"empirical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rebalance_frequency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"coercions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"warnings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fallback_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fallback_steps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fallback_days\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[`Job terminal status (`,_jsx(_components.code,{children:`Succeeded`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_url`})}),_jsxs(_components.td,{children:[`Full HTTPS URL to the output blob — pass to `,_jsx(_components.code,{children:`run_trading_job`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_name`})}),_jsx(_components.td,{children:`Blob filename`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`execution_name`})}),_jsx(_components.td,{children:`Job execution ID for audit/debugging`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`effective_params`})}),_jsx(_components.td,{children:`The settings the run actually used, after defaults and any remapping`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`coercions`})}),_jsxs(_components.td,{children:[`Values the job changed for you, such as `,_jsx(_components.code,{children:`mu_mode`}),` custom → empirical`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`warnings`})}),_jsx(_components.td,{children:`Anything else worth knowing about the run`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fallback_used`}),`, `,_jsx(_components.code,{children:`fallback_steps`}),`, `,_jsx(_components.code,{children:`fallback_days`})]}),_jsx(_components.td,{children:`Whether some rebalance dates fell back to equal weights, and which`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A run stays `,_jsx(_components.code,{children:`Succeeded`}),` when knobs are remapped or some dates fall back to equal weights. Read\n`,_jsx(_components.code,{children:`effective_params`}),`, `,_jsx(_components.code,{children:`coercions`}),` and `,_jsx(_components.code,{children:`warnings`}),` before treating the result as the portfolio you\nasked for.`]})}),`\n`,_jsxs(_components.p,{children:[`The blob contains `,_jsx(_components.code,{children:`Weights`}),`, `,_jsx(_components.code,{children:`Prices`}),`, and `,_jsx(_components.code,{children:`Meta`}),` (includes fallback flags if optimization falls back to equal weights).`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`example-—-default-path-data-→-po`,children:`Example — default path (data → PO)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://stqsnpprod.blob.core.windows.net/data/data_extractor_2b510101b9b7.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Optimization params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"equal_weighted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rebalance_frequency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`21`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-—-hrp-with-covariance-mode`,children:`Example — HRP with covariance mode`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://stqsnpprod.blob.core.windows.net/data/data_extractor_2b510101b9b7.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Optimization params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hrp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"covariance_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"empirical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mu_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"empirical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"covariance_window\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rebalance_frequency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-—-ml-enhanced-path`,children:`Example — ML-enhanced path`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://stqsnpprod.blob.core.windows.net/data/ml_engine_7d4e2a91c0bf.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Optimization params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"maxsharpe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mu_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"custom\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`next-step`,children:`Next Step`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`output_url`}),` to `,_jsx(_components.a,{href:`/tools/trading-job`,children:_jsx(_components.code,{children:`run_trading_job`})}),` as `,_jsx(_components.code,{children:`input_url`}),`.\nOptional: `,_jsx(_components.a,{href:`/tools/plot-job`,children:_jsx(_components.code,{children:`run_plot_job`})}),`, `,_jsx(_components.a,{href:`/tools/st-job`,children:_jsx(_components.code,{children:`run_st_job`})}),`, `,_jsx(_components.a,{href:`/tools/risk-job`,children:_jsx(_components.code,{children:`run_risk_job`})}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"run_po_job","description":"Optimize portfolio weights from price data or ML/DL predictions","href":"/tools/po-job"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Returns","slug":"returns","depth":2,"children":[]},{"title":"Example — default path (data → PO)","slug":"example-—-default-path-data-→-po","depth":2,"children":[]},{"title":"Example — HRP with covariance mode","slug":"example-—-hrp-with-covariance-mode","depth":2,"children":[]},{"title":"Example — ML-enhanced path","slug":"example-—-ml-enhanced-path","depth":2,"children":[]},{"title":"Next Step","slug":"next-step","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"limeltc","siteName":"QuantSpace","title":"run_po_job - QuantSpace","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T12:47:52.334Z","originalFileLocation":"tools/po-job.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Optimize portfolio weights from price data or ML/DL predictions\">\u003cmeta data-mint-head name=\"application-name\" content=\"QuantSpace\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"run_po_job - QuantSpace\">\u003cmeta data-mint-head property=\"og:description\" content=\"Optimize portfolio weights from price data or ML/DL predictions\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"QuantSpace\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.quantspace.limex.pro/tools/po-job\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://limeltc.mintlify.site/_mintlify/api/og/v2?division=Tools+description\u0026amp;title=run_po_job\u0026amp;description=Optimize+portfolio+weights+from+price+data+or+ML%2FDL+predictions\u0026amp;theme=12f4f15ec1c6d1ab388789ef\u0026amp;signature=d4642541ff636f3f7f16aa58c4c815025f510f17286c1b2f991dc9101d230406\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"run_po_job - QuantSpace\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Optimize portfolio weights from price data or ML/DL predictions\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://limeltc.mintlify.site/_mintlify/api/og/v2?division=Tools+description\u0026amp;title=run_po_job\u0026amp;description=Optimize+portfolio+weights+from+price+data+or+ML%2FDL+predictions\u0026amp;theme=12f4f15ec1c6d1ab388789ef\u0026amp;signature=d4642541ff636f3f7f16aa58c4c815025f510f17286c1b2f991dc9101d230406\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/limeltc/s6AQRj7rQVvkjTb4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"QuantSpace\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0078D4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.quantspace.limex.pro/tools/po-job\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/tools/po-job.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.quantspace.limex.pro/#organization\",\"name\":\"QuantSpace\",\"url\":\"https://docs.quantspace.limex.pro\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/limeltc/4Yf0UOt6QHQAVi0u/logo/light.svg?fit=max\u0026auto=format\u0026n=4Yf0UOt6QHQAVi0u\u0026q=85\u0026s=1060912e71e53b700533ba46684b557d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.quantspace.limex.pro#website\",\"name\":\"QuantSpace\",\"url\":\"https://docs.quantspace.limex.pro\",\"publisher\":{\"@id\":\"https://docs.quantspace.limex.pro/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.quantspace.limex.pro/tools/po-job#webpage\",\"url\":\"https://docs.quantspace.limex.pro/tools/po-job\",\"name\":\"run_po_job\",\"description\":\"Optimize portfolio weights from price data or ML/DL predictions\",\"dateModified\":\"2026-09-15T12:47:52.334Z\",\"isPartOf\":{\"@id\":\"https://docs.quantspace.limex.pro#website\"},\"breadcrumb\":{\"@id\":\"https://docs.quantspace.limex.pro/tools/po-job#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.quantspace.limex.pro/tools/po-job#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools description\",\"item\":\"https://docs.quantspace.limex.pro/tools/data-extraction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"run_po_job\",\"item\":\"https://docs.quantspace.limex.pro/tools/po-job\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.quantspace.limex.pro/tools/po-job#article\",\"headline\":\"run_po_job\",\"name\":\"run_po_job\",\"description\":\"Optimize portfolio weights from price data or ML/DL predictions\",\"url\":\"https://docs.quantspace.limex.pro/tools/po-job\",\"mainEntityOfPage\":{\"@id\":\"https://docs.quantspace.limex.pro/tools/po-job#webpage\"},\"dateModified\":\"2026-09-15T12:47:52.334Z\",\"publisher\":{\"@id\":\"https://docs.quantspace.limex.pro/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.quantspace.limex.pro#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"QuantSpace\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"QuantSpace","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"QuantLab","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Pipeline","href":"/pipeline"},{"title":"Example prompts","href":"/best-practices"}]},{"group":"How To","pages":[{"title":"Quickstart","href":"/quickstart"}]},{"group":"Tools description","pages":[{"title":"run_data_extraction","href":"/tools/data-extraction"},{"title":"run_feature_worker","href":"/tools/feature-worker"},{"title":"run_ml_job","href":"/tools/ml-job"},{"title":"run_dl_job","description":"Train a PyTorch neural network and generate return predictions","href":"/tools/dl-job"},{"title":"run_po_job","href":"/tools/po-job"},{"title":"run_trading_job","description":"Run a VectorBT backtesting simulation using portfolio weights","href":"/tools/trading-job"},{"title":"run_grid_job","href":"/tools/grid-job"},{"title":"run_ptl_job","href":"/tools/ptl-job"},{"title":"run_plot_job","href":"/tools/plot-job"},{"title":"run_st_job","href":"/tools/st-job"},{"title":"run_risk_job","href":"/tools/risk-job"}]}]},{"tab":"QCA","pages":[{"title":"QCA","href":"/qca"}]},{"tab":"QuantX","pages":[{"title":"QuantX","href":"/quantx"}]}]},"basePath":"","title":"run_po_job - QuantSpace","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}