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 units, adjusting_size, risk_management
# your account value
account = 1_000_000.00
""" Create a Unit instance. """
unit = units.Unit(asset="AAPL", account_size=account)
""" See N: the underlying volatility of a particular market
Pg. 12
"""
print(unit.N) # returns.. > 2.19987
""" See Volatility Adjusted Position Units
Pg. 18
"""
print(unit.get_unit) # returns.. > 20
# or
print(unit.unit) # returns.. > AAPL: 20
""" Adjusting Trading Size
pg. 21
"""
print(adjusting_size.decrease_size(account)) # returns.. > 800_000
More will be published soon.
For issues, look here.
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
turtle_trading-1.0.1.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for turtle_trading-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59f9fac50bc56dd61ec502cf88d5b43141e38bcd985d1ad23e94b1b3067b157f |
|
MD5 | ab9f82f5b1c17feb02f0a56bc293a917 |
|
BLAKE2b-256 | 4524b424b307dc89bed6dded9146de4e5fdc8009b5de247e7755d0b7dffdcf94 |