minor fix

This commit is contained in:
David Brazda
2024-10-10 10:42:40 +02:00
parent 583c00ff5d
commit 6833710e66
3 changed files with 7 additions and 7 deletions

View File

@ -13,7 +13,7 @@ Example usage:
```python
from ttools import AnchoredIndicator
mom_standard = vbt.indicator("talib:MOM").run(t1data.data["BAC"].close)
mom_anchored_d = AnchoredIndicator("talib:MOM", anchor='D').run(t1data.data["BAC"].close)
mom = vbt.indicator("talib:MOM").run(t1data.data["BAC"].close, timeperiod=10, skipna=True) #standard indicator
mom_anch_d = AnchoredIndicator("talib:MOM", anchor='D').run(t1data.data["BAC"].close, timeperiod=10, skipna=True) #anchored to D
```

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='ttools',
version='0.1.2',
version='0.1.3',
packages=['ttools'],
install_requires=[
'vectorbtpro',

View File

@ -11,8 +11,8 @@ class AnchoredIndicator:
Parameters:
- indicator_name: str, the name of the vectorbt indicator.
- anchor: str, 'D' for day, 'H' for hour, 'T' for minute (default is 'D').
Any valid frequency string ('D', 'H', 'T', 'W', etc.). can be used as it uses pd.Grouper(freq=anchor)
- anchor: str, 'D' for day, 'h' for hour, 'min' for minute (default is 'D').
Any valid frequency string ('D', 'h', 'min', 'W', etc.). can be used as it uses pd.Grouper(freq=anchor)
see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
"""
self.indicator_name = indicator_name
@ -26,8 +26,8 @@ class AnchoredIndicator:
Parameters:
- data: pd.Series or pd.DataFrame, the input data series or dataframe (e.g., close prices).
- anchor: str, 'D' for day, 'H' for hour, 'T' for minute (default is 'D'). Override for anchor on the instance.
Any valid frequency string ('D', 'H', 'T', 'W', etc.). can be used as it uses pd.Grouper(freq=anchor)
- anchor: str, 'D' for day, 'h' for hour, 'min' for minute (default is 'D'). Override for anchor on the instance.
Any valid frequency string ('D', 'h', 'min', 'W', etc.). can be used as it uses pd.Grouper(freq=anchor)
see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
- *args, **kwargs: Arguments and keyword arguments passed to the indicator.
"""