Download the PHP package tk25719/position-sizing-data without Composer

On this page you can find all versions of the php package tk25719/position-sizing-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package position-sizing-data

position-sizing-data

DOI PyPI npm Go Reference Packagist

Reference data and arithmetic for position sizing across forex, stocks and crypto futures.

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.

An interactive implementation of the same calculation lives at https://positionsizetool.com/.

An archival copy of this dataset is deposited at Zenodo: doi:10.5281/zenodo.22840538. Use that DOI to cite the data in anything that outlives the repository.

The same tables and formulas are published as installable packages, so the arithmetic can be checked from a REPL instead of a spreadsheet: position-sizing-data on PyPI (source in pypi/), position-sizing-data on npm (source in npm/), and the Go module in this repository, which embeds the CSV files so go get github.com/tk25719/position-sizing-data needs nothing else. PHP users can composer require tk25719/position-sizing-data; that package ships in composer.json and src/.

The four data files are also mirrored on data platforms, each with the same provenance note attached: the canonical landing page is positionsizetool.com/reference-data.html, and the mirrors are Kaggle and Hugging Face.

Contents

File What is in it
data/contract-specifications.csv Default contract size, pip size and unit step per instrument, for 131 symbols across forex, metals, energies, indices and crypto.
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.
data/losing-streak-equity.csv Equity remaining after 1 to 20 consecutive losses at 0.5%, 1% and 2% risk per trade.
data/drawdown-recovery.csv Gain required on the reduced balance to return to the original balance, for drawdowns from 5% to 90%.
checklists/pre-trade-risk-checklist.md What to confirm before an order goes in.
docs/position-sizing-formulas.md The formulas, why each term sits where it does, and a worked example.

The formula in one line

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

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.

Where the numbers come from

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

Code and documentation: MIT. Data files in data/: CC0 1.0 Universal, to the extent applicable.

The Zenodo deposit of this dataset carries its own licence, CC BY 4.0, chosen at deposit time; refer to the record for the terms that apply to the archived copy.

This is not investment advice. Nothing here recommends a trade, a size or a broker.


All versions of position-sizing-data with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tk25719/position-sizing-data contains the following files

Loading the files please wait ...