A simple tool to calculate the right amount of shares to buy while limiting risk.
Project description
Stock Position Calculator
A simple program to manage risk and calculate the right amount of shares to buy.
Install with pip
To install:
$ pip install stock-position-calc
For some Linux distributions you will need to install the tkinter package:
$ sudo apt update
$ sudo apt install python3-tk
Launch tool:
$ stock-position-calc
Create an executable to run the program:
Windows:
$ git clone https://github.com/zaijacobs/stock-position-calc.git
$ cd stock-position-calc
$ pipenv install
$ pipenv run pyinstaller stock_position_calc/app.py --onefile --windowed
Linux:
$ git clone https://github.com/zaijacobs/stock-position-calc.git
$ cd stock-position-calc
$ pipenv install
$ pipenv run pyinstaller stock_position_calc/app.py --onefile --windowed
$ sudo chmod +x dist/app
Check for the executable in the created dist directory.
Fixed Cash Amount:
Will calculate the number of shares solely based on the amount you want to invest in a trade. Example: You have $10,000 to invest in a stock and you would like to buy shares of that stock when the price falls down to $20. The amount of shares you will buy will be 500 ($10,000 / $20).
Fixed Risk:
Will calculate the number of shares based on how much you are willing to risk. Example: You have an account size of $10,000 and you would like to buy shares of a stock when the price falls down to $20. You decide on a stop loss of 15% ($17) and you want to risk only 1% ($100) of your account size. The amount of shares you will buy will be 33 ($100 / ($20 - $17)).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for stock-position-calc-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5b6eacc874f7b3e25c5a5483beeddd202bb58ca6aa30efb9dc9f280cb0f0854 |
|
MD5 | e9e37711c68fe57bb60194858fb11a79 |
|
BLAKE2b-256 | 4a45ddc2db72796e98d497ebf62f228a55a27342bb78a1a96bd54c333cef6101 |