Skip to main content

papertrades

papertrades is a package to simulate and analyze paper trades in Python.

Many tools exist online for simulation paper trading. However, users may not find them to be up to their standards. papertrades changes this by allowing full customization.

PyPI Downloads PyPI version

Author: Kevin Zhu

THIS IS NOT FINANCIAL ADVICE; papertrades IS A TOOL TO SIMULATE THE MARKET FOR EDUCATIONAL PURPOSES.

Features

  • multiple portfolios
  • automatic asset price calculation based on your last trade
  • plotting of the value of your portfolio
  • remaining cash (balance) calculation & value calculation
  • asset breakdown

Installation

To install papertrades, use pip: pip install papertrades.

However, many prefer to use a virtual environment (or any of their preferred choice).

macOS / Linux:

# make your desired directory
mkdir /path/to/your/directory
cd /path/to/your/directory

# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv

# install papertrades
source .venv/bin/activate
pip install papertrades

deactivate # when you are completely done

Windows CMD:

# make your desired directory
mkdir C:path\to\your\directory
cd C:path\to\your\directory

# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv

# install papertrades
.venv\Scripts\activate
pip install papertrades

deactivate # when you are completely done

Usage

Create a portfolio with a starting balance and a path for its trades. Once you make trades, you make save the trades to use later, and load them from the portfolio. See the example for complete functionality with all methods!

After a lot of time,

License

The License is an MIT License found in the LICENSE file.

Metadata

Release files for papertrades 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for papertrades 1.0.7
File Size Uploaded
papertrades-1.0.7.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for papertrades 1.0.7
File Interpreter ABI Platform
papertrades-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / papertrades-1.0.7.tar.gz

Download URL papertrades-1.0.7.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6a1783762e36e040b7c6f4b6303c255d0adbf693c2caa6692702701967a626ee
BLAKE2b-256 checksum
How to use checksums
c5a967283e294a27c339ea7b2d8c8dbad2e90c8509e6c9734f2391e24986a21e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / papertrades-1.0.7-py3-none-any.whl

Download URL papertrades-1.0.7-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d73d3f835293e6feb57efca0b92b084b0551552204096cd877f6f2a79aae9877
BLAKE2b-256 checksum
How to use checksums
59d39ba90fc8983df67a2928518a5b78bf10647dbe5cdeb4001a65a7daf8e4e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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