Skip to main content

Monte Carlo Stock/Crypto Price Simulation Tool

Project description

StockSim

Monte Carlo Stock & Crypto Price Simulation Tool

StockSim is a Python command-line tool for estimating the probability of gain for stocks, cryptocurrencies, or indices using Monte Carlo simulation and real historical data.


Features

  • Simulate future price paths for stocks, crypto, or indices
  • Uses real historical data via yfinance
  • Multiprocessing for fast simulations
  • Command-line interface
  • Logging to file and console

Requirements

  • Python 3.7–3.12 (not compatible with Python 3.13)
  • See requirements.txt for required packages

Installation

From PyPI (recommended)

pip install stocksim

From source

git clone https://github.com/ElementalPublishing/StockSim.git
cd StockSim
pip install -e .

Usage

After installation, run from the command line:

stocksim

Or, if running from source:

python -m stocksim.main

Command-Line Options

You can run StockSim with the following options:

  • --symbol
    Ticker symbol (e.g., BTC-USD, ETH-USD, AAPL, SPX:IND, EURUSD:CUR)

  • --years
    Investment period in years (e.g., 1)

  • --simsize
    Simulation size: small, medium, or large

Examples:

stocksim --symbol BTC-USD --years 5 --simsize large
stocksim --symbol AAPL --years 3 --simsize medium

If you omit any option, the program will prompt you for input interactively.


Build Windows Executable (Optional)

To build a Windows executable with your custom icon:

pyinstaller --icon=shaggy.ico --name=StockSim stocksim/main.py
  • The EXE will be in the dist folder as StockSim.exe.

Notes

  • Compatible with Python 3.7–3.12, PyInstaller 5.13.2, and setuptools <80 (tested with 79.0.1).
  • Log files are saved in the logs folder, with a new file for each run.
  • For issues or feature requests, please use the GitHub Issue Tracker.

License

This project is licensed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stocksim-1.2.4.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stocksim-1.2.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file stocksim-1.2.4.tar.gz.

File metadata

  • Download URL: stocksim-1.2.4.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for stocksim-1.2.4.tar.gz
Algorithm Hash digest
SHA256 e92a03d2cc28895899a43ba3cef9e2f395afd79e64897e0e3abeab5ffe1597a3
MD5 521aee63e5d4d4f63146752e1f61208a
BLAKE2b-256 31997d362a1dc485a15fcc9a4af56ebb21fd3011e26fdf06405620c0722dc08c

See more details on using hashes here.

File details

Details for the file stocksim-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: stocksim-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for stocksim-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e65cf617fe92daaa72443e2fc40b38b5d95cd56c33a214893c0357abbc67506d
MD5 346a6fd56119073aa292004d5f3e04ec
BLAKE2b-256 b05be116ad266430d2870df394370bd4d7249d17239238b1d791ca59edc57be5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page