README.md
Browse files---
license: cc0-1.0
task_categories:
- tabular-classification
- other
language:
- en
tags:
- finance
- risk-management
- forex
- trading
- position-sizing
- reference-data
size_categories:
- n<1K
pretty_name: Position Sizing Reference Data
---
# Position Sizing Reference Data
Interactive calculator: [positionsizetool.com](https://positionsizetool.com/) · Source and formulas: [GitHub](https://github.com/tk25719/position-sizing-data) · Citable archive: [doi:10.5281/zenodo.22840538](https://doi.org/10.5281/zenodo.22840538) · Packages: [PyPI](https://pypi.org/project/position-sizing-data/) · [npm](https://www.npmjs.com/package/position-sizing-data)
Four small CSVs behind the question "how many units should I trade?", with the formulas that generate them. No dependencies, no API keys.
## Formula
```
units = (risk_budget - commission) / ((|entry - stop| + spread) x quote_to_account_rate)
```
Tradable size is that result rounded **down** to the broker's unit step. Rounding up raises risk without saying so.
## Files
| File | Rows | Description |
| --- | --- | --- |
| `contract-specifications.csv` | 131 | Contract size, pip size and unit step per instrument across forex, metals, energies, indices and crypto futures. Columns: `symbol, asset_class, quote_currency, pip_size, contract_size, unit_step`. |
| `pip-value-by-lot-size.csv` | 4 | Pip value per standard / mini / micro / nano lot on a USD-denominated account, plus the cost of a 20-pip move and of a 1-pip spread. |
| `losing-streak-equity.csv` | 20 | Equity remaining after 1 to 20 consecutive losses at 0.5%, 1% and 2% risk per trade. Generated by `remaining = (1 - risk%)^n`. |
| `drawdown-recovery.csv` | 12 | Gain required on the reduced balance to return to the original balance, for drawdowns from 5% to 90%. Generated by `gain_required = 1 / (1 - drawdown) - 1`. |
## Provenance
The instrument rows are the built-in defaults of an interactive calculator — typical retail contract specifications, **not exchange-published official values**. Verify contract size and unit step against your own broker before placing an order. Every other table is computed from the formula stated above, not copied. No price history, no tick data, no returns series.
## Worked example
Account 10,000 USD, risk 1% (100 USD), EUR/USD at 1.1000, stop at 1.0980, no spread, no commission:
```
stop distance = |1.1000 - 1.0980| = 0.0020
units = 100 / 0.0020 = 50,000
unit step = 1,000 -> tradable size = 50,000 (0.50 standard lot)
```
## Cite
YI, JUN (2026). *Position sizing reference data and worked arithmetic for forex, stocks and crypto futures* [Data set]. Zenodo. https://doi.org/10.5281/zenodo.22840538
## Licence
Data files: CC0 1.0 Universal. Code and documentation in the linked repository: MIT.
Not investment advice. Nothing here recommends a trade, a size or a broker.
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
# position-sizing-data
|
| 2 |
-
|
| 3 |
-
Reference data and arithmetic for position sizing across forex, stocks and crypto futures.
|
| 4 |
-
|
| 5 |
-
This repository exists because the numbers behind "how many units should I trade" are usually scattered across broker pages, forum posts and screenshots. Here they are in plain CSV and Markdown, with the formula written out, so anyone can check the arithmetic instead of trusting it.
|
| 6 |
-
|
| 7 |
-
An interactive implementation of the same calculation lives at [https://positionsizetool.com/](https://positionsizetool.com/).
|
| 8 |
-
|
| 9 |
-
## Contents
|
| 10 |
-
|
| 11 |
-
| File | What is in it |
|
| 12 |
-
| --- | --- |
|
| 13 |
-
| `data/contract-specifications.csv` | Default contract size, pip size and unit step per instrument, for 131 symbols across forex, metals, energies, indices and crypto. |
|
| 14 |
-
| `data/pip-value-by-lot-size.csv` | Pip value per standard, mini, micro and nano lot, on a USD-denominated account, plus the cost of a 20-pip move and of a 1-pip spread. |
|
| 15 |
-
| `data/losing-streak-equity.csv` | Equity remaining after 1 to 20 consecutive losses at 0.5%, 1% and 2% risk per trade. |
|
| 16 |
-
| `data/drawdown-recovery.csv` | Gain required on the reduced balance to return to the original balance, for drawdowns from 5% to 90%. |
|
| 17 |
-
| `checklists/pre-trade-risk-checklist.md` | What to confirm before an order goes in. |
|
| 18 |
-
| `docs/position-sizing-formulas.md` | The formulas, why each term sits where it does, and a worked example. |
|
| 19 |
-
|
| 20 |
-
## The formula in one line
|
| 21 |
-
|
| 22 |
-
```
|
| 23 |
-
units = (risk_budget - commission) / ((|entry - stop| + spread) x quote_to_account_rate)
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
The tradable size is that number rounded **down** to the broker's unit step. Rounding up increases risk without saying so.
|
| 27 |
-
|
| 28 |
-
The full derivation, including why the spread is added to the stop distance while the commission is subtracted from the budget, is in `docs/position-sizing-formulas.md`.
|
| 29 |
-
|
| 30 |
-
## Where the numbers come from
|
| 31 |
-
|
| 32 |
-
- **Instrument rows** are the built-in defaults of the calculator linked above. They are typical retail contract specifications, not exchange-published official values, and several are editable by design. Verify the contract size and unit step of your own instrument against your broker before placing an order.
|
| 33 |
-
- **Everything else in `data/` is computed, not copied.** Each table has its generating formula stated at the top of this table's entry below:
|
| 34 |
-
- `losing-streak-equity.csv`: `remaining = (1 - risk%)^n`
|
| 35 |
-
- `drawdown-recovery.csv`: `gain_required = 1 / (1 - drawdown) - 1`
|
| 36 |
-
- `pip-value-by-lot-size.csv`: `pip_value = units x pip_size`, converted to USD at the stated rate
|
| 37 |
-
|
| 38 |
-
## Licence
|
| 39 |
-
|
| 40 |
-
Code and documentation: MIT. Data files in `data/`: CC0 1.0 Universal, to the extent applicable.
|
| 41 |
-
|
| 42 |
-
This is not investment advice. Nothing here recommends a trade, a size or a broker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|