# quant risk engine

> Institutional-grade risk engine for precision lot-sizing and prop firm drawdown protection.

quant risk engine is a paid AI agent skill on Agensi by Abdulla Thaslim, in Trading & Investing. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Abdulla Thaslim](https://www.agensi.io/creators/mt-abdulla-it)
- Category: [Trading & Investing](https://www.agensi.io/skills/trading-investing)
- Version: 1.0
- Last updated: 2026-11-24
- Security: scan passed (2026-11-24); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/quant-risk-engine
- Tags: trading, risk-management, forex, crypto, ftmo, prop-firm, lot-calculator

## About this skill

Manual position sizing leads to blown accounts and prop firm disqualifications. This skill provides an institutional-grade risk engine for Forex, Metals, and Crypto to ensure every trade fits within strict mathematical and firm-specific constraints.

### What it does
- **Position Sizing**: Calculates exact lot sizes for Forex pairs, Gold/Silver, and major Cryptocurrencies based on entry and stop loss.
- **Prop Firm Guardrails**: Enforces drawdown limits (e.g., 5% daily/10% total) specifically tuned for FTMO and FundedNext rules.
- **Kelly Criterion Integration**: Computes optimal half-Kelly sizing based on historical win rates to manage long-term equity growth.
- **Risk Projection**: Generates precise monetary gains for 1:1.5 and 1:2.0 risk-to-reward targets.
- **Agent-Ready Output**: Delivers structured JSON or CLI results designed for integration into trading agent pipelines.

### How it works
1. **Define Parameters**: Provide account balance, asset symbol, entry price, and stop loss.
2. **Apply Constraints**: Set risk percentage or fixed dollar amounts, and toggle the `--prop-firm` flag for drawdown protection.
3. **Execute Calculation**: Run the `risk_engine.py` script via CLI to process the math.
4. **Parse Results**: Use the `--json` flag to receive structured data for downstream execution by your trading bot or agent.

### Frameworks & tools
The engine is a Python-based utility (`risk_engine.py`) designed for CLI environments and AI agents like Claude Code, Cursor, or custom algorithmic pipelines.

### Why this beats prompting it yourself
LLMs frequently hallucinate pip values and contract sizes for non-standard assets like Gold or Crypto. This skill uses hard-coded financial logic to ensure lot sizes are mathematically perfect, preventing catastrophic sizing errors that prompts alone cannot avoid.

### Use cases
- Enforcing 1% risk rules on XAUUSD scalps for a funded account.
- Automating position sizing for a BTCUSD breakout strategy.
- Calculating Kelly-optimal bet sizes for high-frequency Forex strategies.
- Protecting prop firm capital by applying a 35% single-trade safety cushion.

### Known limitations
Requires manual input of entry and stop loss prices as it does not fetch real-time market data. Requires a Python 3 environment to execute the core logic.

## Requires

- Python

## Known limitations

Requires Python 3 environment. Does not fetch real-time price feeds; entry and exit prices must be provided as arguments.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the quant risk engine skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does the Quant Risk Engine prevent me from failing a prop firm challenge?

This skill eliminates the risk of account blowouts and 'fat-finger' errors by calculating mathematically precise lot sizes for Forex, Metals, and Crypto based on your specific risk parameters and prop firm drawdown rules.

### Which AI agents or development environments is this skill compatible with?

The skill is delivered as a standalone Python utility (`risk_engine.py`) designed to be called by agentic IDEs like Claude Code and Cursor, or integrated directly into custom Python-based trading bot pipelines via JSON output.

### Why should I use this instead of just asking an LLM to calculate my position size?

Unlike LLMs, which often struggle with the complex pip math for Gold (XAUUSD) or varying contract sizes in Crypto, this engine uses hard-coded financial logic to ensure 100% mathematical accuracy every time.

### What exactly is included in the purchase of this skill?

You will receive the core `risk_engine.py` script, a comprehensive README with CLI command examples, and documentation on integrating the JSON output into your existing trading agent workflows.

### Does this engine support non-Forex assets like Commodities and Bitcoin?

The engine currently supports major Forex pairs, Gold (XAUUSD), Silver (XAGUSD), and high-liquidity Cryptocurrencies like BTC and ETH; additional assets can be configured within the script's parameter settings.

### Does the engine require an active API connection to a broker or market data provider?

To maintain maximum security and minimize latency, the engine requires you to provide the entry and stop-loss prices as inputs; it does not connect to external broker APIs or live price feeds.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
