eugene9099's picture
Add dataset card: links, formulas, provenance, licence
203bb2d verified
|
Raw History Blame Contribute Delete
2.88 kB
---
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.