mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-06-27 16:10:07 +08:00
DOC watchlist edit TST strategy analysis
This commit is contained in:
+13
-9
@@ -50,20 +50,24 @@ def colors(colors: str = None, default: str = "GrRd"):
|
||||
|
||||
|
||||
class Watchlist(object):
|
||||
"""Watchlist Class (** This is subject to change! **)
|
||||
============================================================================
|
||||
"""
|
||||
# Watchlist Class (** This is subject to change! **)
|
||||
A simple Class to load/download financial market data and automatically
|
||||
apply Technical Analysis indicators with a Pandas TA Strategy. Default
|
||||
Strategy: pandas_ta.AllStrategy.
|
||||
apply Technical Analysis indicators with a Pandas TA Strategy.
|
||||
|
||||
Requirements:
|
||||
Default Strategy: pandas_ta.AllStrategy.
|
||||
|
||||
## Package Support:
|
||||
### Data Source (Default: AlphaVantage)
|
||||
- AlphaVantage (pip install alphaVantage-api).
|
||||
- Python Binance (pip install python-binance). # Future Support
|
||||
- Yahoo Finance (pip install yfinance). # Almost Supported
|
||||
|
||||
# Technical Analysis:
|
||||
- Pandas TA (pip install pandas_ta)
|
||||
- AlphaVantage (pip install alphaVantage-api) for the Default Data Source.
|
||||
To use another Data Source, update the load() method after AV.
|
||||
|
||||
Required Arguments:
|
||||
## Required Arguments:
|
||||
- tickers: A list of strings containing tickers. Example: ['SPY', 'AAPL']
|
||||
============================================================================
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ from pandas_ta.volatility import *
|
||||
from pandas_ta.volume import *
|
||||
from pandas_ta.utils import *
|
||||
|
||||
version = ".".join(("0", "2", "10b"))
|
||||
version = ".".join(("0", "2", "11b"))
|
||||
|
||||
|
||||
# Strategy DataClass
|
||||
|
||||
@@ -22,7 +22,7 @@ class TestStrategyMethods(TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.data = sample_data
|
||||
# cls.data.ta.cores = cores
|
||||
cls.data.ta.cores = cores
|
||||
cls.speed_test = DataFrame()
|
||||
|
||||
@classmethod
|
||||
@@ -37,7 +37,6 @@ class TestStrategyMethods(TestCase):
|
||||
print(f"[i] Total Datapoints: {cls.data.shape[0]}")
|
||||
print(cls.speed_test)
|
||||
del cls.data
|
||||
|
||||
|
||||
|
||||
def setUp(self):
|
||||
@@ -96,7 +95,7 @@ class TestStrategyMethods(TestCase):
|
||||
{"kind": "sma", "length": 200}, # 1
|
||||
{"kind": "bbands", "length": 20}, # 3
|
||||
{"kind": "log_return", "cumulative": True}, # 1
|
||||
{"kind": "sma", "close": "CUMLOGRET_1", "length": 5, "suffix": "CUMLOGRET"}, # 1
|
||||
{"kind": "ema", "close": "CUMLOGRET_1", "length": 5, "suffix": "CLR"}
|
||||
]
|
||||
|
||||
custom = pandas_ta.Strategy(
|
||||
|
||||
Reference in New Issue
Block a user