Agent skill · Audited from source
R Portfolio Analysis Optimization Workflow
skill · ECNU-ICALK/AutoSkillLicence not declaredAudited 14 Oct 2026 · source 04e912cff54b
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…
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
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
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
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
- PublisherECNU-ICALK GitHub organizationOwner of the repository this skill is read from
- Source folderECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/r_portfolio_analysis_optimization_workflowThe exact folder we audited
- LicenceNot declaredAs the repository states it
- Commit pinned for this verdict04e912cff54bA new audit runs when the source changes
- Repository statusNot archivedLast push 157 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
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 optimizationExcerpt, 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
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
- ✓SAFE B 89 / 100
first audit · source
04e912cff54b
Similar skills
All automation skills →ECNU-ICALK/AutoSkill
Executes a 1-back test by comparing the current input to the immediately preceding input in a sequence, reporting the prior item and a match indicator.
ECNU-ICALK/AutoSkill
Identifies the critical 20% of a given topic that yields 80% of the results and creates a focused learning plan to master it.
ECNU-ICALK/AutoSkill
Act as a friendly English teacher for A1 students. Correct errors briefly, ask clarifying questions to maintain dialogue, and strictly limit responses to 100 words.
ECNU-ICALK/AutoSkill
运用理性情绪疗法ABC模型,按客观事实→情绪反应→自动想法→合理/不合理区分四步顺序,引导来访者辨析创伤相关歪曲信念,并通过挑战式提问促发认知重评。
ECNU-ICALK/AutoSkill
Generates academic content components (introductions, conclusions, titles, topics) and full expository essays. Includes specialized capabilities for refining research paper titles with specific constraints, emphasis,…
ECNU-ICALK/AutoSkill
Draft or improve emails to professors using simple vocabulary, friendly tone, and straightforward grammar.
Questions about R Portfolio Analysis Optimization Workflow
What does the R Portfolio Analysis Optimization Workflow skill do?
Is R Portfolio Analysis Optimization Workflow safe to install?
What can R Portfolio Analysis Optimization Workflow access on my machine?
How current is this page?
Sources
- github.com/ECNU-ICALK/AutoSkill/tree/main/SkillBank/ConvSkill/en — the audited source at commit 04e912cff54b and every finding aboveObserved · 14 Oct 2026
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.
- What does the R Portfolio Analysis Optimization Workflow skill do?
- Is R Portfolio Analysis Optimization Workflow safe to install?
- What can R Portfolio Analysis Optimization Workflow access on my machine?