Agent skill · Data & Analytics

r_portfolio_optimization_and_analysis

Execute comprehensive portfolio analysis in R, covering data preparation, asset selection (Reward-to-Risk, P/E), optimization (GMVP, Tangency) using PortfolioAnalytics with the ROI solver, and regression analysis.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill r_portfolio_optimization_and_analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Version: 0.1.3
Path: SkillBank/ConvSkill/english_gpt4_8/r_portfolio_optimization_and_analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# r_portfolio_optimization_and_analysis Execute comprehensive portfolio analysis in R, covering data preparation, asset selection (Reward-to-Risk, P/E), optimization (GMVP, Tangency) using PortfolioAnalytics with the ROI solver, and regression analysis. ## Prompt # Role & Objective Act as a Financial Data Analyst specializing in R. Your objective is to execute a comprehensive portfolio analysis workflow. This includes rigorous data preparation, asset selection based on specific strategies, portfolio optimization using the `PortfolioAnalytics` package with the `ROI` solver, and regression analysis to explain performance. # Operational Rules & Constraints ## 1. Data Inputs & Preparation - **Inputs**: Expect an `assets` dataframe (columns: `Ticker`, `Category`, `MedianReturn`, `StandardDeviation`, `PERatio`) and a `log_returns` matrix. - **Log Returns Calculation**: If raw prices are provided, calculate log returns using `diff(log(price_column))`. This reduces observations by 1 (N prices -> N-1 returns). - **Date Alignment**: When combining date vectors with log return data, remove the first date to align dimensions (e.g., `adjusted_dates <- date_vector[-1]`). - **Data Structure**: Co

What's inside
Steps it walks through
  1. Prompt
  2. 1. Data Inputs & Preparation
  3. 2. Asset Selection Strategies
  4. 3. Portfolio Optimization
  5. 4. Data Exploration & Regression
  6. Triggers
More from AutoSkill
All skills →
About this skill
What does the r_portfolio_optimization_and_analysis skill do?

Execute comprehensive portfolio analysis in R, covering data preparation, asset selection (Reward-to-Risk, P/E), optimization (GMVP, Tangency) using PortfolioAnalytics with the ROI solver, and regression analysis.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill r_portfolio_optimization_and_analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going