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.0 Reference data and arithmetic for risk-based position sizing across forex, stocks and crypto
futures pip install position-sizing-data==0.1.0 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 Newer release available (0.1.1) 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.0 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.0 File Size Uploaded
position_sizing_data-0.1.0.tar.gz 7.0 kB Sep 19, 2026 Details Built distribution (wheel) Table of built distributions
(wheels) for position-sizing-data 0.1.0 File Interpreter ABI Platform Reset position_sizing_data-0.1.0-py3-none-any.whl
7.4 kB Sep 19, 2026 Python 3 none any Details Total release size: 14.4 kB Release files /
position_sizing_data-0.1.0.tar.gz Download URL position_sizing_data-0.1.0.tar.gz Size 7.0 kB Tags Source SHA-256
checksum How to use checksums e95e647e688c99d0662d5946449e0c0b828c2e65d7e8e00f0a7c2ed82abdef63 BLAKE2b-256 checksum How
to use checksums daa3abb3658eb8ad8690345db5ea9ed18040270af88757589368f12ce3abb350 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/5027f3485f9e8539436f367c8982559d0c57bd03 Workflow Publishing configuration
github.com/tk25719/position-sizing-data/blob/5027f3485f9e8539436f367c8982559d0c57bd03/.github/workflows/publish-pypi.yml
Publishing logs github.com/tk25719/position-sizing-data/actions/runs/35424495918/attempts/1 Artifact Subject
position_sizing_data-0.1.0.tar.gz SHA-256 checksum e95e647e688c99d0662d5946449e0c0b828c2e65d7e8e00f0a7c2ed82abdef63
Verifying attestations Release files / position_sizing_data-0.1.0-py3-none-any.whl Download URL
position_sizing_data-0.1.0-py3-none-any.whl Size 7.4 kB Tags Python 3 SHA-256 checksum How to use checksums
25edd2347a490cdb790cea5ae47e383c7a7a28ec3f41692f6afba7714021285b BLAKE2b-256 checksum How to use checksums
3d43041077727b292650d40d5dd84e3eaeffd688755f6eb382ca459299ea2474 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/5027f3485f9e8539436f367c8982559d0c57bd03 Workflow Publishing configuration
github.com/tk25719/position-sizing-data/blob/5027f3485f9e8539436f367c8982559d0c57bd03/.github/workflows/publish-pypi.yml
Publishing logs github.com/tk25719/position-sizing-data/actions/runs/35424495918/attempts/1 Artifact Subject
position_sizing_data-0.1.0-py3-none-any.whl SHA-256 checksum
25edd2347a490cdb790cea5ae47e383c7a7a28ec3f41692f6afba7714021285b Verifying attestations Release history Release
notifications | RSS feed 0.1.1 Sep 19, 2026 2 release files This release 0.1.0 This release 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
