- Home
- Skills
- Trading & Investing
- risk based position sizing builder
risk based position sizing builder
Converts risk parameters into deterministic position-sizing logic and code for systematic trading.
$5
Works with the AI Agents you already use
risk based position sizing builder
Example session with this skill installed
Calculate the position size for a stock trade. Equity is 50,000 USD, risk 1%, entry 150.00, stop 145.00. Give me a Python function.
- Read your context and instructions
- Compiled the risk based position
Risk Amount: 500 USD
Stop Distance: 5.00
Position Size: 100 shares
def get_size(entry=150.0, stop=145.0, equity=50000, risk_pct=1.0):
risk_amt = equity * (risk_pct / 100)
size = risk_amt / abs(entry - stop)
return int(size)
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Traders often struggle to translate abstract risk management rules into precise, executable position sizes across different asset classes. Manual calculations for futures multipliers or forex pip values are prone to human error, leading to over-leveraged accounts or broken strategy logic.
What it does
- Calculates exact position sizes for stocks, futures, forex, and crypto based on account equity and stop loss distance.
- Generates reusable Excel/Google Sheets formulas for dynamic sizing models.
- Outputs production-ready Python or JavaScript functions for automated trading bots.
- Applies strategy-specific constraints like max exposure caps, pyramiding rules, and correlation filters.
- Validates inputs to ensure stop distances are non-zero and risk percentages are positive.
Frameworks & tools
Python, JavaScript, Excel, Google Sheets.
Why this beats prompting it yourself
General LLMs often forget to account for contract multipliers in futures or specific lot step rounding in forex. This skill uses deterministic formulas to ensure financial accuracy, preventing the "hallucinated" math that ruins trading accounts.
Use cases
- Building a risk management module for a Python-based algorithmic trading bot.
- Creating a dynamic position-sizing calculator in a Google Sheets trading journal.
- Auditing existing strategy code to ensure it respects portfolio-wide risk limits.
- Converting complex pyramiding rules into code-based execution logic.
Known limitations
Does not handle nonlinear payoffs for options without delta-adjustment inputs. Requires manual entry of current account equity and instrument-specific values like pip cost.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.
Requires manual input for contract multipliers and pip values. Sizing for options is linearized and assumes delta-adjustment is provided by the user.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
No special permissions declared or detected