Generated banner for Portfolio Optimization
Generated logo for Portfolio Optimization

Portfolio Optimization

NVIDIAOfficialCreated by Jake GoldbergDistributed by NVIDIA

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • Medium risk

From the author

Use when a user asks to build, optimize, backtest, rebalance, or analyze a stock portfolio with Mean-CVaR, Mean-Variance/SOCP variance caps, efficient frontiers, scenario generation, or NVIDIA cuOpt.
— the description by Jake Goldberg

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides an interface to the portfolio_optimization package, enabling users to build, backtest, and rebalance investment portfolios. It leverages NVIDIA cuOpt for solving complex optimization problems, including Mean-CVaR and Mean-Variance allocations with variance caps. The skill supports generating efficient frontiers, scenario generation via GPU-accelerated KDE, and performance evaluation against benchmarks.

What it does

  • Constructs Mean-CVaR and Mean-Variance portfolios using NVIDIA cuOpt solvers.
  • Generates efficient frontiers to visualize risk-return trade-offs.
  • Performs backtesting of optimized portfolios against equal-weight benchmarks.
  • Executes portfolio rebalancing based on drift triggers or schedules.
  • Computes portfolio metrics including Sharpe, Sortino, and maximum drawdown.
  • Validates input price data and handles ticker filtering for quantitative analysis.

When to use it

  • When you need to optimize asset weights under specific risk constraints like CVaR or variance caps.
  • When you want to visualize the efficient frontier for a set of financial assets.
  • When you need to backtest a specific portfolio allocation strategy against historical data.
  • When you require a rebalancing workflow for an existing portfolio.
  • When you need to assess downside risk exposure using scenario generation.

Advantages

  • Integrates directly with NVIDIA cuOpt for solving SOCP/QCQP optimization problems.
  • Supports GPU-accelerated scenario generation for robust risk modeling.
  • Provides standardized workflows for common quantitative finance tasks.
  • Includes built-in validation for financial data inputs.

Usage examples

“Optimize my portfolio of AAPL, MSFT, and GOOGL using Mean-CVaR.”
The agent loads price data, computes log returns, generates GPU-based scenarios, and solves for optimal weights using the cuOpt solver.
“Plot the efficient frontier for these tickers.”
The agent calculates the efficient frontier across 25 points and returns the resulting figure and data table.
“Backtest my current allocation against an equal-weight benchmark.”
The agent runs a historical backtest and reports performance metrics including Sharpe ratio, Sortino ratio, and max drawdown.
“Solve a variance-cap portfolio with a 0.05 limit.”
The agent configures a Mean-Variance model with a variance cap and solves it using the cuOpt Python API.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/portfolio-optimization/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip portfolio-optimization.zip -d .agents/skills

Documentation by Jake Goldberg

Portfolio Optimization with NVIDIA cuOpt

<!-- SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 -->

Purpose

Build and analyze quantitative portfolios with NVIDIA-accelerated Mean-CVaR and Mean-Variance optimization. Use the portfolio_optimization package to compute returns, generate KDE scenarios for CVaR, solve variance-cap Markowitz allocations as SOCP/QCQP problems with the cuOpt GPU solver, trace an efficient frontier, backtest portfolios, and run rebalancing workflows from price data.

When to Use

Use this skill when the task is to:

  • Build or optimize a Mean-CVaR portfolio from stock prices.

  • Allocate weights across tickers while controlling downside CVaR risk.

  • Solve Mean-Variance or Markowitz allocations with a hard variance or volatility cap using cuOpt SOCP/QCQP support.

  • Plot or inspect an efficient frontier for a portfolio universe.

  • Produce a weights-by-risk-aversion table.

  • Backtest an optimized portfolio against benchmarks.

  • Rebalance a portfolio on a schedule or drift trigger.

  • Run workflows on an S&P 500, S&P 100, Dow 30, or user-supplied price dataset.

Common trigger phrases include "optimize my portfolio", "build a CVaR portfolio", "use cuOpt to optimize these tickers", "solve with cuOpt", "plot the efficient frontier", "show weights by risk aversion", "backtest this allocation", "rebalance monthly", "analyze my holdings with CVaR", "compare allocations", "reduce downside risk", "construct an allocation", "assess allocation options", "stress-test my holdings", "evaluate downside-risk exposure", "review my holdings under weight caps", "compare benchmark portfolios", "simulate CVaR scenarios", "screen portfolio risk", "optimize holdings under constraints", "solve a variance-cap portfolio", "use SOCP", "set a volatility cap", and "find a lower-risk allocation".

Do not use it for generic finance summaries, price forecasting, neural-network training, vehicle routing, or non-portfolio optimization.

Prerequisites

  • Python environment with the installed portfolio_optimization package.

  • NVIDIA GPU runtime with cuOpt and cuML installed. Mean-Variance SOCP workflows require a cuOpt build with QCQP/SOCP support, such as the 26.06 line or newer.

  • CUDA extra matching the host and workflow: uv sync --extra cuda12 for full cuOpt/cuML 26.06 on CUDA 12, uv sync --extra cuda13 for the current full CUDA 13 stack, or uv sync --extra cuda13-socp for CUDA 13 SOCP-only validation with cuOpt 26.06.

  • cvxpy exposing cp.CUOPT.

  • Network access on first run if the default price CSV must be downloaded.

Setup

This skill drives the installed portfolio_optimization package. A ready environment can come from the Brev launchable or from the NVIDIA-AI-Blueprints/portfolio-optimization repository after installing the matching CUDA extra.

In packaged agent/eval sandboxes, portfolio_optimization may be available through PYTHONPATH rather than as a separately published wheel. Verify the local package with python -c "import portfolio_optimization" before declaring it missing. Do not pip install portfolio_optimization; do not reimplement the example workflows from scratch, and do not replace the package APIs with generic pandas/scipy/cvxpy portfolio code.

For concrete implementation details, use references/workflows/agent_recipes.md as the source of truth. It contains exact working shapes for loading prices, preparing returns, solving with cuOpt, building a 25-point frontier, backtesting against equal weight, and calling the rebalancer.

The default dataset is data/stock_data/sp500.csv. It is gitignored. Before a first-run download, tell the user this fetches public market data through the package's yfinance data helper and ask them to confirm:

import cvxpy as cp
from portfolio_optimization.cvar_parameters import CvarParameters
from portfolio_optimization.utils import download_data

download_data("data/stock_data", datasets=["sp500"])
CVAR_SOLVER_SETTINGS = {"solver": cp.CUOPT, "verbose": False, "solver_method": "PDLP"}
cvar_params = CvarParameters(
    w_min=0.0, w_max=1.0,
    c_min=0.0, c_max=0.0,
    risk_aversion=1.0, confidence=0.95,
)

Instructions

Briefly state the defaults being applied before execution, then use these guardrails:

  1. Load data/stock_data/sp500.csv; if it is missing, ask before downloading sp500 with portfolio_optimization.utils.download_data. Do not glob, substitute, or fabricate price data.

  2. Validate user CSVs before solving: require a date-like index or first date column, numeric ticker columns, at least 60 rows after date filtering, and at least one requested ticker. If the user gives start/end dates, slice the price DataFrame before returns computation and report the retained date range. Filter tickers on the price DataFrame before returns are computed. regime_dict does not take a ticker field.

  3. Compute LOG returns with utils.calculate_returns(...).

  4. For Mean-CVaR tasks, generate scenarios with cvar_utils.generate_cvar_data(...), KDE, and KDESettings(device="GPU"). For Mean-Variance SOCP variance-cap tasks, do not generate CVaR scenarios; use the returns_dict directly after LOG return computation.

  5. For ordinary Mean-CVaR portfolio requests, define CvarParameters with explicit w_min and w_max, and set c_min=0.0 and c_max=0.0 so the result is fully invested instead of 100 percent cash.

  6. For variance-cap, volatility-cap, Markowitz, SOCP, or QCQP requests, define MeanVarianceParameters with var_limit set to a positive variance bound, c_min=0.0, c_max=0.0, and L_tar=1.0 for long-only fully invested allocations. If the user gives a volatility cap, square it before assigning var_limit.

  7. Build cvar_optimizer.CVaR(returns_dict, cvar_params) for Mean-CVaR tasks. Build mean_variance_optimizer.MeanVariance(returns_dict, mean_variance_params, api_settings=ApiSettings(api="cuopt_python")) for direct cuOpt Mean-Variance SOCP tasks.

  8. Solve with NVIDIA cuOpt only. For CVaR, verify hasattr(cp, "CUOPT") and str(cp.CUOPT) in {str(s) for s in cp.installed_solvers()}, then pass CVAR_SOLVER_SETTINGS to every single-shot solve or looped frontier solve. For direct Mean-Variance SOCP, verify the cuopt Python package is importable and call the optimizer with api="cuopt_python"; cuOpt auto-selects the barrier method for quadratic constraints. Never fall back to CLARABEL, SCS, ECOS, or another CPU solver. If cuOpt is absent, finish validation/setup and report that the GPU/cuOpt runtime is missing instead of fabricating a CPU result.

  9. For custom constraints, map user requests to the appropriate parameter model: CVaR risk controls to CvarParameters, variance or volatility caps to MeanVarianceParameters.var_limit, weight caps to w_min/w_max, risk appetite to risk_aversion, confidence level to confidence, and cash allowance to c_max. Treat cardinality plus SOCP as unsupported unless the package exposes explicit mixed-integer conic support.

  10. If the user omits a benchmark for backtesting, use an equal-weight portfolio over the same tickers. If the user omits a constraint, keep the defaults table values and briefly restate consequential assumptions before solving.

  11. Deliver weights sorted by allocation, cash weight, expected return, solver label (cuOpt GPU), and the risk metric used: CVaR for Mean-CVaR or realized variance plus var_limit for SOCP. Include any requested frontier figure, weights table, backtest metrics, or rebalancing schedule. For tables, include tickers as columns or rows with decimal weights and percentages; for plots, preserve the figure returned by the package instead of redrawing from scratch.

  12. For report-grade answers, include evidence that the requested workflow actually ran. For an efficient frontier, state len(results_df) and use the requested ra_num (25 unless the user specifies otherwise). For a variance-cap SOCP solve, report result_row["solver"], realized variance, the requested var_limit, and confirm realized variance is at or below the cap. For a weights table, expand results_df["weights"] into ticker columns and include cash plus risk_aversion. For a backtest, include mean portfolio return, sharpe, sortino, and max drawdown for both optimized and benchmark portfolios. For rebalancing, include results_dataframe, re_optimize_dates, and the tail of cumulative_portfolio_value.

Canonical Workflow Skeleton

Start applicable portfolio optimization tasks from this shape and adapt only the requested output. For complete copyable functions, read references/workflows/agent_recipes.md before writing custom code.

Mean-CVaR workflow
import cvxpy as cp
import pandas as pd

from portfolio_optimization import backtest, cvar_optimizer, cvar_utils, rebalance, utils
from portfolio_optimization.cvar_parameters import CvarParameters
from portfolio_optimization.portfolio import Portfolio
from portfolio_optimization.settings import KDESettings, ReturnsComputeSettings, ScenarioGenerationSettings

if not hasattr(cp, "CUOPT") or str(cp.CUOPT) not in {str(s) for s in cp.installed_solvers()}:
    raise RuntimeError("cuOpt GPU solver is required; do not substitute a CPU solver.")

CVAR_SOLVER_SETTINGS = {"solver": cp.CUOPT, "verbose": False, "solver_method": "PDLP"}

prices = utils.get_input_data("data/stock_data/sp500.csv")
returns_dict = utils.calculate_returns(
    prices,
    regime_dict=None,
    returns_compute_settings=ReturnsComputeSettings(return_type="LOG"),
)
returns_dict = cvar_utils.generate_cvar_data(
    returns_dict,
    ScenarioGenerationSettings(
        fit_type="kde",
        kde_settings=KDESettings(device="GPU"),
    ),
)
cvar_params = CvarParameters(
    w_min=0.0,
    w_max=1.0,
    c_min=0.0,
    c_max=0.0,
    risk_aversion=1.0,
    confidence=0.95,
)
optimizer = cvar_optimizer.CVaR(returns_dict, cvar_params)
result, optimal_portfolio = optimizer.solve_optimization_problem(
    solver_settings=CVAR_SOLVER_SETTINGS,
    print_results=False,
)
Mean-Variance SOCP workflow
import importlib.util
import numpy as np

from portfolio_optimization import mean_variance_optimizer, utils
from portfolio_optimization.mean_variance_parameters import MeanVarianceParameters
from portfolio_optimization.settings import ApiSettings, ReturnsComputeSettings

if importlib.util.find_spec("cuopt") is None:
    raise RuntimeError("cuOpt Python API is required; do not substitute a CPU solver.")

prices = utils.get_input_data("data/stock_data/sp500.csv")
returns_dict = utils.calculate_returns(
    prices,
    regime_dict=None,
    returns_compute_settings=ReturnsComputeSettings(return_type="LOG"),
)
weights = np.ones(len(returns_dict["tickers"])) / len(returns_dict["tickers"])
var_limit = float(weights @ returns_dict["covariance"] @ weights) * 1.05
mean_variance_params = MeanVarianceParameters(
    w_min=0.0,
    w_max=1.0,
    c_min=0.0,
    c_max=0.0,
    L_tar=1.0,
    var_limit=var_limit,
)
optimizer = mean_variance_optimizer.MeanVariance(
    returns_dict,
    mean_variance_params,
    api_settings=ApiSettings(api="cuopt_python"),
)
result, optimal_portfolio = optimizer.solve_optimization_problem(print_results=False)
realized_variance = float(
    optimal_portfolio.weights @ returns_dict["covariance"] @ optimal_portfolio.weights
)

For an efficient frontier or weights table, call:

results_df, fig, ax = cvar_utils.create_efficient_frontier(
    returns_dict,
    cvar_params,
    CVAR_SOLVER_SETTINGS,
    ra_num=25,
    show_plot=False,
    show_discretized_portfolios=False,
    benchmark_portfolios=False,
    print_portfolio_results=False,
)
weights_table = pd.DataFrame(results_df["weights"].tolist(), index=results_df.index)

For a benchmark backtest, wrap the solved allocation in Portfolio(name="cuOpt Optimal", tickers=returns_dict["tickers"], weights=optimal_portfolio.weights, cash=optimal_portfolio.cash), create an equal-weight Portfolio over the same returns_dict["tickers"], then use backtest.portfolio_backtester(..., test_method="historical").backtest_against_benchmarks(...). The backtester returns (backtest_results, ax).

For monthly rebalancing, write the price DataFrame to a CSV path first. Instantiate rebalance.rebalance_portfolio(dataset_directory=<csv_path>, ...) with re_optimize_criteria={"type": "drift_from_optimal", "threshold": 0, "norm": 1} and call re_optimize(transaction_cost_factor=..., plot_title="Monthly Rebalancing"). The rebalancer returns (results_dataframe, re_optimize_dates, cumulative_portfolio_value).

Data and Defaults

SettingDefault
Datasetdata/stock_data/sp500.csv
Date rangeFull available range
Portfolio typeLong-only
Max weightNone unless specified
Risk aversion1.0
Confidence0.95
Scenario methodKDE on GPU
SolverCVaR: cuOpt GPU with PDLP; Mean-Variance SOCP: direct cuOpt Python API with barrier auto-selected
RebalancingNone unless requested

The default S&P 500 file is a historical snapshot and can omit current constituents. User-supplied CSVs should be date-indexed price tables with ticker columns, compatible with utils.get_input_data. If requested tickers are absent, drop them, report the omissions, and continue with available columns unless the user explicitly asks you to fetch other data.

Key APIs

Use the package APIs instead of reimplementing portfolio math or simulation loops. portfolio_optimization helpers return flat objects: returns_dict has keys such as returns, mean, covariance, and tickers; do not index it as returns_dict["regime_1"]. solve_optimization_problem(...) returns (result_row, portfolio), not a nested result dictionary.

  • Returns: utils.calculate_returns(input_dataset, regime_dict, returns_compute_settings).

  • Regime filter: regime_dict is None or {"name": "...", "range": ("YYYY-MM-DD", "YYYY-MM-DD")}; it is not keyed by regime name and does not contain tickers.

  • Scenarios: cvar_utils.generate_cvar_data(returns_dict, scenario_generation_settings) for Mean-CVaR only.

  • CVaR optimizer: cvar_optimizer.CVaR(returns_dict, cvar_params).

  • Mean-Variance SOCP optimizer: mean_variance_optimizer.MeanVariance(returns_dict, mean_variance_params, api_settings=ApiSettings(api="cuopt_python")).

  • CVaR solve: result_row, portfolio = cvar_problem.solve_optimization_problem(solver_settings=CVAR_SOLVER_SETTINGS, print_results=False).

  • SOCP solve: result_row, portfolio = mean_variance_problem.solve_optimization_problem(print_results=False).

  • Efficient frontier: cvar_utils.create_efficient_frontier(returns_dict, cvar_params, solver_settings=CVAR_SOLVER_SETTINGS, ra_num=25). The returned results_df includes metrics, a weights dict column, and cash.

  • Portfolio: Portfolio(name="", tickers=None, weights=None, cash=0.0, time_range=None); pass tickers and a flat array-like weights aligned to those tickers.

  • Backtest: create portfolio.Portfolio objects for the optimized allocation and each benchmark; for an equal-weight benchmark, use weights of 1 / len(tickers) and cash=0.0, then call backtest.portfolio_backtester(test_portfolio, returns_dict, risk_free_rate=0.0, test_method="historical", benchmark_portfolios=[...]).backtest_against_benchmarks(...).

  • Rebalance: rebalance.rebalance_portfolio(...) requires dataset_directory to be a CSV path, not a DataFrame. Call re_optimize(...); it returns (results_dataframe, re_optimize_dates, cumulative_portfolio_value).

  • Settings models: ReturnsComputeSettings, ScenarioGenerationSettings, KDESettings, ApiSettings, CvarParameters, and MeanVarianceParameters.

Examples

  • "Build the optimal portfolio from the S&P 500": load prices, compute LOG returns, generate GPU KDE scenarios, set long-only fully invested CvarParameters, solve with cuOpt, and report diversified weights plus return/CVaR.

  • "Solve a variance-cap portfolio with SOCP": load prices, compute LOG returns, set MeanVarianceParameters(var_limit=...), solve with direct api="cuopt_python", and report expected return, realized variance, var_limit, and weights.

  • "Plot the efficient frontier": call create_efficient_frontier(...), return results_df, and show or save the figure as requested.

  • "Give me weights by risk aversion": expand results_df["weights"] into a per-asset table.

  • "Backtest against equal weight": build the optimized and equal-weight Portfolio objects, then use the package backtester and report Sharpe, Sortino, and max drawdown.

  • "Backtest monthly rebalancing": configure rebalance_portfolio with the drift trigger above and run re_optimize(transaction_cost_factor=...).

Limitations

  • Requires an NVIDIA GPU with cuOpt and cuML; CPU solvers are intentionally disallowed.

  • Mean-Variance SOCP variance caps require cuOpt QCQP/SOCP support. Use the 26.06 line or newer when installing CUDA extras.

  • cuda13-socp intentionally installs cuOpt without cuML because cuml-cu13 26.06 is not published yet; use it for direct SOCP/QCQP validation, not GPU KDE CVaR workflows.

  • Cardinality plus SOCP is treated as unsupported unless the package exposes explicit mixed-integer conic support.

  • CPU-only eval containers can still validate routing, data handling, and reporting behavior, but they cannot produce a valid cuOpt solve. In that case, report the missing GPU/cuOpt runtime explicitly.

  • Default price data is a historical snapshot and may omit current constituents.

  • First-run dataset download depends on network access unless the user supplies a CSV.

Troubleshooting

  • Missing default CSV or FileNotFoundError: explain that the package will fetch public market data with download_data("data/stock_data", datasets=["sp500"]); run it only after user confirmation.

  • SolverError or missing cp.CUOPT: install the CUDA extra matching the host and verify with python -c "import cvxpy as cp; print(hasattr(cp, 'CUOPT'), cp.installed_solvers())".

  • ImportError for cuml or GPU KDE failures: confirm cuML is present with python -c "import cuml" and keep KDESettings(device="GPU"). If using cuda13-socp, this is expected for CVaR/KDE; switch to cuda12 or cuda13 for cuML workflows.

  • SOCP setup fails before solving: verify the installed cuopt package is on the 26.06 line or newer and that MeanVarianceParameters.var_limit is positive.

  • Ordinary optimization returns all cash: set c_max=0.0 in CvarParameters.

  • Solver reports infeasible or no solution: check for contradictory bounds, too few tickers for the requested caps/cardinality, or a date filter that leaves too little data; report the smallest constraint change that would make the request feasible.

  • Requested tickers are absent from the default CSV: report them and proceed with the remaining requested tickers.

  • User CSV fails validation: ask for a date-indexed price table or a CSV whose first column is dates and remaining columns are numeric ticker prices; mention the minimum 60-row post-filter requirement.

Files

LICENSE

Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Jake Goldberg
Publisher
NVIDIA (Official)
Distributed by
NVIDIA
Source
NVIDIA/skills · skills/portfolio-optimization · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Jake Goldberg or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download portfolio-optimization.zip