PositionSizeTool
Forex · Stocks · Crypto — size every trade from your risk, not from hope

Position Sizing Reference Data

Published 19 September 2026 · CC0 1.0 · DOI 10.5281/zenodo.22840538

What this is

Position sizing is usually explained with screenshots and half-remembered broker numbers. This dataset puts the inputs in plain CSV so the arithmetic can be re-run and checked instead of trusted. Four small files, no dependencies, no API keys.

units = (risk_budget - commission) / ((|entry - stop| + spread) x quote_to_account_rate)

The tradable size is that result rounded down to the broker's unit step. Rounding up raises risk without saying so.

Files

The four CSV files, with the row count and the formula behind each.
FileRowsWhat is in it
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 and 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.

Every file is served as plain text/csv from this domain, so it can be read straight into a spreadsheet, a notebook or a script without an account.

Where the numbers come from

Worked example

Account 10,000 USD, risk 1% (100 USD), EUR/USD at 1.1000, stop at 1.0980, no spread and 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)

The same calculation, with spread, commission and quote-currency conversion, is what the position size calculator runs in your browser.

Other places to get it

How to 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

The data files are released under CC0 1.0 Universal. The code and documentation in the linked repository are MIT. Not investment advice: nothing here recommends a trade, a size or a broker.