trading-risk-portfolio

Automate risk analysis, position sizing, and stress testing for MetaTrader 5 Expert Advisor portfolios.

1|2|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/anhnguyen123312/skill-trader --skill trading-risk-portfolio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trading-risk-portfolio
Source: https://github.com/anhnguyen123312/skill-trader/tree/main/.agents/skills/trading-risk-portfolio
Command: npx skills add https://github.com/anhnguyen123312/skill-trader --skill trading-risk-portfolio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires MetaTrader 5, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the complex process of analyzing risk, calculating position sizing, and stress-testing Expert Advisor (EA) portfolios, simplifying risk management in trading.

Core Features & Use Cases

  • Portfolio Risk Analysis: Analyze portfolio risk across multiple running EAs.
  • Position Sizing: Calculate position sizing based on account equity, risk preferences, and market conditions.
  • Stress Testing: Test EA performance across different market regimes (trending, ranging, high volatility, crisis).
  • Use Case: A user with multiple EA portfolios can use this Skill to ensure they are adhering to risk management strategies without manual calculations.

Quick Start

Run the skill with the following command: skill trading-risk-portfolio --account-equity 10000 --ea-name MyEA

Frequently Asked Questions about trading-risk-portfolio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate risk analysis and position sizing for an EA portfolio on MetaTrader 5?

You can automate risk analysis and position sizing for an EA portfolio by running a command that passes your account equity and EA name to calculate exposure based on fixed fractional, Kelly criterion, or ATR-based methods.

What is stress testing for Expert Advisor portfolios and how does it handle market regimes?

Stress testing for EA portfolios evaluates automated trading performance across different market regimes like trending, ranging, high volatility, and crisis states. It applies regime-aware adjustments to simulate how strategies respond to changing conditions.

Does MetaTrader 5 support correlation-based exposure management for multiple running EAs?

Yes, MetaTrader 5 supports correlation-based exposure management for multiple running EAs. This Skill collects statistics from active EAs and manages exposure to prevent over-concentration in correlated positions across the portfolio.

Can I calculate position sizing using the Kelly criterion and ATR-based methods for my trading account?

Yes, you can calculate position sizing using both the Kelly criterion and ATR-based methods. The tool applies these sizing techniques based on your account equity, risk preferences, and current market conditions to determine trade volumes.

What's the best way to run stress tests on my EA portfolio without manual calculations?

The best way to run stress tests without manual calculations is to execute the tool via command line with your account equity and EA name. It automates the collection of EA statistics and applies regime-aware adjustments for comprehensive risk evaluation.

Do I need MetaTrader 5 installed to use automated position sizing and stress testing scripts?

Yes, you need MetaTrader 5 and its associated environment installed for EA execution. The automated position sizing and stress testing scripts depend on the MetaTrader 5 platform to collect statistics and apply risk management calculations.