prettified interface for TA-Lib
Project description
pretty_talib
Description
Prettified interface for TA-Lib
Install
-
Install TA-Lib dependency
- For Mac it's easy as that
brew install ta-lib
- For other platforms, or troubleshooting please check the installation guide for TA-Lib
- For Mac it's easy as that
-
Install pretty_talib
pip install pretty_talib
# or
pip3 install pretty_talib
Usage
# System
import json
# Pip
import numpy
# Local
from pretty_talib import get_stats, ALL, FunctionName
l=50
timeperiod = 5
data = {
'open': numpy.random.random(l),
'high': numpy.random.random(l),
'low': numpy.random.random(l),
'close': numpy.random.random(l),
'volume': numpy.random.random(l)
}
stats = get_stats(data, types=ALL, timeperiod=timeperiod, use_builtin_types=False)
with open('stats.json', 'w') as file:
json.dump(stats, file, indent=4)
# BENCHMARKS
# from funcmeasure import measure
# def use_objects_false_use_builtin_types_false():
# get_stats(data, types=ALL, timeperiod=timeperiod)
# def use_objects_false_builtin_types_true():
# get_stats(data, types=ALL, timeperiod=timeperiod, use_builtin_types=True)
# def use_objects_true_use_builtin_types_true():
# get_stats(data, types=ALL, timeperiod=timeperiod, use_objects=True)
# measure(
# [
# use_objects_false_use_builtin_types_false,
# use_objects_false_builtin_types_true,
# use_objects_true_use_builtin_types_true
# ],
# times=100
# )
Credits
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
pretty_talib-0.0.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for pretty_talib-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f72d0651cf15534bb78da0c17e0906fb71ee8319ee847a14d7d00682c38baf |
|
MD5 | 7d5c5eb155ce8c782a39444f1df99480 |
|
BLAKE2b-256 | 1058cf2bbde355b78f1106dc6a70923a588479828dfd18b191917351a03bc170 |