Skip to main content

A collection of investment tools used by the Turtle Traders.

Project description

turtle-trading

A Python Package of a collection Turtle Trading investing tools. All code is based on the ideas presented in The Original Turtle Trading Rules. Page numbers are referenced in the code.

The package, currently, contains only one module: position_sizing.

Download using pip:

pip install turtle-trading

Examples using the position_sizing module:

from turtle_trading.position_sizing import getn, getunit

# your account value
account = 1_000_000.00

# Chapter 3: Position Sizing
""" Get 'N' of an asset. """
asset = getn(asset="AAPL")
print(asset.N) # e.g. returns.. > 2.19987

""" Find the Unit Size of an asset. """
unit = getunit(asset="AAPL", N=asset.N, account_size=account)
print(unit.UNIT) # e.g. returns.. > 2334

More will be published soon.

For issues, look here.

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

turtle_trading-1.1.2.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

turtle_trading-1.1.2-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

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