-
-
Notifications
You must be signed in to change notification settings - Fork 892
Expand file tree
/
Copy path__init__.py
More file actions
63 lines (51 loc) · 1.72 KB
/
__init__.py
File metadata and controls
63 lines (51 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright (c) 2021 Oleg Polakow. All rights reserved.
# This code is licensed under Apache 2.0 with Commons Clause license (see LICENSE.md for details)
"""Modules for building and running indicators.
Technical indicators are used to see past trends and anticipate future moves.
See [Using Technical Indicators to Develop Trading Strategies](https://www.investopedia.com/articles/trading/11/indicators-and-strategies-explained.asp)."""
from vectorbt import _typing as tp
from vectorbt.indicators.basic import (
MA,
MSTD,
BBANDS,
RSI,
STOCH,
MACD,
ATR,
OBV
)
from vectorbt.indicators.factory import IndicatorFactory, IndicatorBase
def talib(*args, **kwargs) -> tp.Type[IndicatorBase]:
"""Shortcut for `vectorbt.indicators.factory.IndicatorFactory.from_talib`."""
return IndicatorFactory.from_talib(*args, **kwargs)
def mtalib(*args, **kwargs) -> tp.Type[IndicatorBase]:
"""Shortcut for `vectorbt.indicators.factory.IndicatorFactory.from_talib`."""
return IndicatorFactory.from_mtalib(*args, **kwargs)
def pandas_ta(*args, **kwargs) -> tp.Type[IndicatorBase]:
"""Shortcut for `vectorbt.indicators.factory.IndicatorFactory.from_pandas_ta`."""
return IndicatorFactory.from_pandas_ta(*args, **kwargs)
def ta(*args, **kwargs) -> tp.Type[IndicatorBase]:
"""Shortcut for `vectorbt.indicators.factory.IndicatorFactory.from_ta`."""
return IndicatorFactory.from_ta(*args, **kwargs)
__all__ = [
'IndicatorFactory',
'talib',
'mtalib',
'pandas_ta',
'ta',
'MA',
'MSTD',
'BBANDS',
'RSI',
'STOCH',
'MACD',
'ATR',
'OBV'
]
__whitelist__ = [
'mtalib',
'talib',
'pandas_ta',
'ta'
]
__pdoc__ = {k: k in __whitelist__ for k in __all__}