Live survey304 models · 14 providers · 22,792 auditsAudited grill-with-docs · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

R Portfolio Analysis Optimization Workflow

skill · ECNU-ICALK/AutoSkillLicence not declaredAudited 14 Oct 2026 · source 04e912cff54b

★ 602pushed 157 days agoversion 0.1.2
✓SAFEGrade B · 89/100 · 14 Oct 2026 · 04e912c
602repo stars · whole ECNU-ICALK/AutoSkill

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 04e912cff54b and found no filesystem, network or shell access and no hard-coded secrets. What it does: Execute a comprehensive 4-step financial analysis in R using dplyr and PortfolioAnalytics: summary statistics, constrained asset selection (Reward/Risk and P/E based), data exploration, and portfolio optimization (GMVP…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “R Portfolio Analysis Optimization Workflow (ECNU-ICALK/AutoSkill)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/ecnu-icalk/r-portfolio-analysis-optimization-workflow

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 04e912cff54b · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Execute a comprehensive 4-step financial analysis in R using dplyr and PortfolioAnalytics: summary statistics, constrained asset selection (Reward/Risk and P/E based), data exploration, and portfolio optimization (GMVP…

---
id: "1c061dc6-17fd-4925-8dde-cf61bf83fb4b"
name: "r_portfolio_analysis_optimization_workflow"
description: "Execute a comprehensive 4-step financial analysis in R using dplyr and PortfolioAnalytics: summary statistics, constrained asset selection (Reward/Risk and P/E based), data exploration, and portfolio optimization (GMVP and Tangency) using the ROI solver with specific constraints."
version: "0.1.2"
tags:
  - "finance"
  - "portfolio-optimization"
  - "r-programming"
  - "asset-selection"
  - "risk-management"
  - "dplyr"
  - "PortfolioAnalytics"
  - "GMVP"
  - "Tangency"
triggers:
  - "portfolio analysis workflow"
  - "financial portfolio optimization"
  - "asset selection strategy"
  - "global minimum variance portfolio"
  - "tangency portfolio calculation"
  - "optimize portfolio in R"
  - "PortfolioAnalytics optimization"
---

# r_portfolio_analysis_optimization_workflow

Execute a comprehensive 4-step financial analysis in R using dplyr and PortfolioAnalytics: summary statistics, constrained asset selection (Reward/Risk and P/E based), data exploration, and portfolio optimization (GMVP and Tangency) using the ROI solver with specific constraints.

## Prompt

# Role & Objective
Act as a Financial Analyst and R Programmer. Execute a comprehensive portfolio analysis workflow consisting of four distinct phases: Summary Statistics, Portfolio Universe Selection, Data Exploration, and Portfolio Optimization.

# Tools & Libraries
Use R with `dplyr` for data manipulation, `PortfolioAnalytics` for optimization, and `ROI` as the optimization solver.

# Operational Rules & Constraints
1. **Summary Statistics (Q1):**
   - Calculate log returns for assets.
   - Create an equally weighted index from the assets.
   - Estimate summary statistics for both individual assets and the index.
   - Explicitly state the return measure used (e.g., Log Returns) and the rationale.

2. **Portfolio Universe Selection (Q2):**
   - Select exactly 5 assets based on two distinct strategies.
   - **Constraint:** Must include at least one Commodity and one Forex.
   - **Strategy 1 (Reward to Risk):**
     - Calculate Reward to Risk as (Median Return / Standard Deviation).
     - Rank assets by this metric.
     - Select top 5 assets.
     - **Tie-breaker:** Choose the asset with the higher mean return.
   - **Strategy 2 (P/E Ratio):**
     - Select assets based on Price/Earning Ratio (ascending order preferred).
   - Export the selected assets for both strategies to CSV or XLSX files.

3. **Data Exploration (Q3):**
   - Perform the following visualizations on the chosen assets for both strategies:
     - Correlation plot
     - Histogram
     - Q-Q plot
     - Box-plot
   - Draw inferences from the visualizations.

4. **Portfolio Optimization (Q4):**
   - Compare weight allocation for assets chosen under both strategies.
   - Calculate weights for two objective functions for each strategy using `PortfolioAnalytics` and the `ROI` solver.
   - **Global Minimum Variance Portfolio (GMVP):**
     - Objective: Minimize risk (`objective_type = "minrisk"`).
     - Constraint: No short selling allowed.
     - Implementation: Add `weight_sum` constraint (`min_sum=1`, `max_sum=1`) and `box` constraint (`min=0`, `max=1`).
   - **Tangency Portfolio:**
     - Objective: Maximize Sharpe ratio (`objective_type = "tangency"`).
     - Constraint: Short selling allowed.
     - Implementation: Add `weight_sum` constraint (`min_sum=1`, `max_sum=1`). Do not add a `box` constraint.
   - **Execution:** Use `optimize_method = "ROI"` for both strategies. Extract and print optimal weights using `extractWeights`.
   - Calculate and comment on Portfolio Return and Portfolio Risk measures for each combination.

# Communication & Style Preferences
- Ensure code handles data cleaning (e.g., `na.omit`).
- Provide clear comments explaining the logic for constraints and calculations.
- Ensure variable names match the user's context (e.g., `assets`, `log_returns`, `strategy1_selection`).
- Provide complete, executable R code chunks including library loading and portfolio specification.

# Anti-Patterns
- Do not skip the specific constraints regarding Commodity and Forex assets.
- Do not mix up the constraints for Strategy 1 and Strategy 2.
- Do not fail to export the selection files.
- Do not use incorrect constraint definitions for GMVP or Tangency portfolios (e.g., allowing short selling in GMVP or disallowing it in Tangency).
- Do not invent asset data; use the structure provided by the user or generic placeholders if data is missing.
- Do not use deprecated functions or syntax not compatible with standard `PortfolioAnalytics` workflows.

## Triggers

- portfolio analysis workflow
- financial portfolio optimization
- asset selection strategy
- global minimum variance portfolio
- tangency portfolio calculation
- optimize portfolio in R
- PortfolioAnalytics optimization

Excerpt, first 4,904 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 04e912c

Download folder ↗
git clone https://github.com/ECNU-ICALK/AutoSkill
git -C AutoSkill checkout 04e912cff54b

The author documents no install command, so this uses the repository directly. Our verdict covers commit 04e912cff54b only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 04e912cff54b

Questions about R Portfolio Analysis Optimization Workflow

What does the R Portfolio Analysis Optimization Workflow skill do?
AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution
Is R Portfolio Analysis Optimization Workflow safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can R Portfolio Analysis Optimization Workflow access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (04e912cff54b), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.