position-sizing-data · PyPI Skip to main content Switch to mobile version Warning Some features may not work without
JavaScript. Please try enabling it if you encounter problems. Search PyPI Search Help Docs Log in Register Help Docs Log
in Register Deutsch English español Esperanto français português (Brasil) Ελληνικά русский
українська עברית 中文 (简体) 中文 (繁體) 日本語 한국어 Search PyPI Search
position-sizing-data 0.1.1 Reference data and arithmetic for risk-based position sizing across forex, stocks and crypto
futures pip install position-sizing-data Copy PIP instructions Description Release files Release history
position-sizing-data Reference data and arithmetic for risk-based position sizing across forex, stocks and crypto
futures. The same tables are published as a citable dataset: doi:10.5281/zenodo.22840538, and used by the web calculator
at https://positionsizetool.com/. Source repository: https://github.com/tk25719/position-sizing-data. Install pip
install position-sizing-data What is in it Function Returns contract_specifications() Pip size, contract size and
minimum unit step for 131 instruments, across forex pairs, metals, energies, indices, crypto futures, stocks and ETFs.
pip_values() Pip value and the loss on a 20 pip move for standard, mini, micro and nano lots. losing_streak_equity()
Equity remaining after 1 to 20 consecutive losses at 0.5%, 1% and 2% risk per trade. drawdown_recovery() Gain required
on the reduced balance to return to the original balance, for drawdowns from 5% to 90%. position_size(...) The
risk-to-units calculation itself. Read the tables: from position_sizing_data import contract_specifications rows =
contract_specifications() print(rows[0]) Compute a size: from position_sizing_data import position_size result =
position_size( balance=10000.0, risk_percent=1.0, entry=1.1000, stop=1.0980, unit_step=1000.0, # 0.01 lot )
print(result) # {'risk_budget': 100.0, 'units': 50000.0, 'tradable_units': 50000.0, 'worst_case_loss': 100.0} The
formula units = (risk_budget - commission) / ((|entry - stop| + spread) x quote_rate) The tradable size is that number
rounded down to unit_step. position_size returns the worst-case loss recomputed from the rounded size, which is what the
account actually loses when the stop is hit. Where the numbers come from The rows in contract_specifications() are
typical retail contract specifications, not exchange-published official values. Verify the contract size and unit step
against your own broker before placing an order. The other three tables are closed-form arithmetic: losing streak:
remaining = (1 - risk)^n drawdown recovery: gain_required = 1 / (1 - drawdown) - 1 pip value: pip_value = units x
pip_size Licence MIT for the code. Data files are CC0 1.0 Universal, to the extent applicable. This is not investment
advice. Project links Data verified by PyPI on Sep 19, 2026 Data provided by the project maintainers, verified at the
time the release was uploaded to PyPI. Repository Homepage Zenodo Key dates PyPI data Data sourced directly from PyPI's
database. Released: Sep 19, 2026 Latest release 1 maintainer PyPI data Data sourced directly from PyPI's database.
eugene94 Credits Author: JUN YI GitHub Statistics Data verified by PyPI on Sep 19, 2026 The GitHub source
repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open
issues/PRs are derived from that repository and have not been independently verified. Repository Stars: Forks: Open
issues: Open PRs: License expression MIT View SPDX License List Requires Python >=3.9 Tags position sizing risk
management forex trading crypto Classifiers Development Status 4 - Beta Intended Audience Financial and Insurance
Industry Operating System OS Independent Programming Language Python :: 3 Topic Office/Business :: Financial ::
Investment Report project as malware Release files for position-sizing-data 0.1.1 For a detailed explanation of source
distributions (sdists) and built distributions (wheels), please see the package formats documentation. Source
distribution (sdist) Source distribution for position-sizing-data 0.1.1 File Size Uploaded
position_sizing_data-0.1.1.tar.gz 8.9 kB Sep 19, 2026 Details Built distribution (wheel) Table of built distributions
(wheels) for position-sizing-data 0.1.1 File Interpreter ABI Platform Reset position_sizing_data-0.1.1-py3-none-any.whl
7.8 kB Sep 19, 2026 Python 3 none any Details Total release size: 16.6 kB Release files /
position_sizing_data-0.1.1.tar.gz Download URL position_sizing_data-0.1.1.tar.gz Size 8.9 kB Tags Source SHA-256
checksum How to use checksums e754c4e89905867827fe49ac3ca1fe9f5334dd304792ec6f7df46c94c4a4aed3 BLAKE2b-256 checksum How
to use checksums 1ec81a2abb25629719bf844ad310a935a299c91078d7c3f3fd41882f10d16afb Upload date Sep 19, 2026 Uploaded
using Trusted Publishing? What is trusted publishing? Yes Uploaded via twine/7.0.0 CPython/3.13.14 Provenance Provenance
describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of
the build or publishing details. View details, limitations and caveats. PyPI Publish Attestation PyPI verified that this
artifact, at this checksum, originated from the publisher listed below. Signed by GitHub Actions, verified by PyPI on
Sep 19, 2026. Transparency log Identity Publishing platform GitHub Actions Publishing repository
github.com/tk25719/position-sizing-data Publishing commit
github.com/tk25719/position-sizing-data/tree/0cb0b4a1e689f8b5f27b61e69e18f6e133f9d435 Workflow Publishing configuration
github.com/tk25719/position-sizing-data/blob/0cb0b4a1e689f8b5f27b61e69e18f6e133f9d435/.github/workflows/publish-pypi.yml
Publishing logs github.com/tk25719/position-sizing-data/actions/runs/35444976663/attempts/1 Artifact Subject
position_sizing_data-0.1.1.tar.gz SHA-256 checksum e754c4e89905867827fe49ac3ca1fe9f5334dd304792ec6f7df46c94c4a4aed3
Verifying attestations Release files / position_sizing_data-0.1.1-py3-none-any.whl Download URL
position_sizing_data-0.1.1-py3-none-any.whl Size 7.8 kB Tags Python 3 SHA-256 checksum How to use checksums
fd9c6d50e5ff676fcc2bee121516ccbf372617cdfe852e9488046ae27a94e899 BLAKE2b-256 checksum How to use checksums
e2da20e0680fea632f22b1b5765117eab341295902fbb76d63dca81fe00bf950 Upload date Sep 19, 2026 Uploaded using Trusted
Publishing? What is trusted publishing? Yes Uploaded via twine/7.0.0 CPython/3.13.14 Provenance Provenance describes
where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build
or publishing details. View details, limitations and caveats. PyPI Publish Attestation PyPI verified that this artifact,
at this checksum, originated from the publisher listed below. Signed by GitHub Actions, verified by PyPI on Sep 19,
2026. Transparency log Identity Publishing platform GitHub Actions Publishing repository
github.com/tk25719/position-sizing-data Publishing commit
github.com/tk25719/position-sizing-data/tree/0cb0b4a1e689f8b5f27b61e69e18f6e133f9d435 Workflow Publishing configuration
github.com/tk25719/position-sizing-data/blob/0cb0b4a1e689f8b5f27b61e69e18f6e133f9d435/.github/workflows/publish-pypi.yml
Publishing logs github.com/tk25719/position-sizing-data/actions/runs/35444976663/attempts/1 Artifact Subject
position_sizing_data-0.1.1-py3-none-any.whl SHA-256 checksum
fd9c6d50e5ff676fcc2bee121516ccbf372617cdfe852e9488046ae27a94e899 Verifying attestations Release history Release
notifications | RSS feed This release 0.1.1 This release Sep 19, 2026 2 release files 0.1.0 Sep 19, 2026 2 release files
PyPI Developed and maintained by the Python Software Foundation and Python community, for the Python community. Status:
all systems operational Donate today! Help Installing packages Uploading packages User guide Project name retention FAQs
About PyPI PyPI Blog Infrastructure dashboard Statistics Logos & trademarks Our sponsors Contributing to PyPI Bugs and
feedback Contribute on GitHub Translate PyPI Sponsor PyPI Development credits Using PyPI Terms of Service Report
security issue Code of conduct Privacy Notice Acceptable Use Policy Switch to desktop version Anthropic, PBC Visionary
sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary
sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog
Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page "PyPI", "Python Package
Index", and the blocks logos are registered trademarks of the Python Software Foundation. © 2026 Python Software
Foundation Site map Deployed from 4e5b9b6
