{"id":25197282,"url":"https://github.com/zaironjacobs/stock-position-calc","last_synced_at":"2025-04-04T16:27:13.349Z","repository":{"id":54602081,"uuid":"286974747","full_name":"zaironjacobs/stock-position-calc","owner":"zaironjacobs","description":"A simple program to manage risk and calculate the right amount of shares to buy.","archived":false,"fork":false,"pushed_at":"2021-11-09T21:54:48.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T09:24:34.742Z","etag":null,"topics":["buy-shares","pypi","risk","stock","stock-market"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaironjacobs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-12T09:40:09.000Z","updated_at":"2022-08-08T11:37:52.000Z","dependencies_parsed_at":"2022-08-13T21:00:57.054Z","dependency_job_id":null,"html_url":"https://github.com/zaironjacobs/stock-position-calc","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaironjacobs%2Fstock-position-calc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaironjacobs%2Fstock-position-calc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaironjacobs%2Fstock-position-calc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaironjacobs%2Fstock-position-calc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaironjacobs","download_url":"https://codeload.github.com/zaironjacobs/stock-position-calc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208498,"owners_count":20901571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buy-shares","pypi","risk","stock","stock-market"],"created_at":"2025-02-10T01:52:10.125Z","updated_at":"2025-04-04T16:27:13.325Z","avatar_url":"https://github.com/zaironjacobs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Stock Position Calculator\n=================\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/stock-position-calc?color=blue)](https://pypi.python.org/pypi/stock-position-calc)\n[![PyPI](https://img.shields.io/pypi/v/stock-position-calc?color=blue)](https://pypi.python.org/pypi/stock-position-calc)\n[![PyPI - Status](https://img.shields.io/pypi/status/stock-position-calc)](https://pypi.python.org/pypi/stock-position-calc)\n[![PyPI - License](https://img.shields.io/pypi/l/stock-position-calc)](https://pypi.python.org/pypi/stock-position-calc)\n\nA simple program to manage risk and calculate the right amount of shares to buy.\n\n## Install with pip\n\nTo install:\n```console\n$ pip install stock-position-calc\n```\n\nTo upgrade:\n```console\n$ pip install stock-position-calc --upgrade\n```\n\nFor some Linux distributions you will need to install the tkinter package:\n```console\n$ sudo apt update\n$ sudo apt install python3-tk\n```\n\nLaunch program:\n```console\n$ stock-position-calc\n```\n\n## Or create a file to run the program\n\nWindows:\n```console\n$ git clone https://github.com/zaironjacobs/stock-position-calc\n$ cd stock-position-calc\n$ pipenv install --dev\n$ pipenv run pyinstaller stock_position_calc/app.py --onefile --windowed\n```\n\nLinux:\n```console\n$ git clone https://github.com/zaironjacobs/stock-position-calc\n$ cd stock-position-calc\n$ pipenv install --dev\n$ pipenv run pyinstaller stock_position_calc/app.py --onefile --windowed\n$ sudo chmod +x dist/app\n```\n\nThe output file can be found in the dist folder.\n\n## Usage\n\n#### Fixed Cash Amount: \nWill calculate the number of shares solely based on the amount you want to invest in a trade.\nExample: 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.\nThe amount of shares you will buy will be 500 ($10,000 / $20).\n\n#### Fixed Risk:\nWill calculate the number of shares based on how much you are willing to risk.\nExample: 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.\nYou decide on a stop loss of 15% ($17) and you want to risk only 1% ($100) of your account size.\nThe amount of shares you will buy will be 33 ($100 / ($20 - $17)).\n\n\\\n\u003cimg src=\"https://i.imgur.com/ZxZ0UOu.png\" width=\"450\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaironjacobs%2Fstock-position-calc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaironjacobs%2Fstock-position-calc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaironjacobs%2Fstock-position-calc/lists"}