Skip to content

Commit 9e7e964

Browse files
HuaRongSAOHuaRongSAO
authored andcommitted
funcs translate
1 parent 0f87e8a commit 9e7e964

File tree

16 files changed

+905
-363
lines changed

16 files changed

+905
-363
lines changed

.idea/docs.iml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/preferred-vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 550 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TA-Lib
12
# 简介:
23
Talib一直缺乏有效的中文文档,自己又有空闲时间,且在研究量化对冲系统,就发点时间,做一下翻译。
34
原文地址: [TA-LIB document](https://mrjbq7.github.io/ta-lib/)
@@ -123,18 +124,19 @@ print talib.get_function_groups()
123124

124125
### Function Groups
125126

126-
* [Overlap Studies 重叠的研究]()
127-
* [Momentum Indicators 动量指标]()
128-
* [Volume Indicators 量指标]()
129-
* [Volatility Indicators 波动性指标]()
130-
* [Price Transform 价格]()
131-
* [Cycle Indicators 循环指标]()
132-
* [Pattern Recognition 模式识别]()
133-
* [Statistic Functions 统计功能]()
134-
* [Math Transform 数学变换]()
135-
* [Math Operators 数学运算符]()
127+
* [Overlap Studies 重叠的研究](func_groups/overlap_studies.md)
128+
* [Momentum Indicators 动量指标](func_groups/momentum_indicators.md)
129+
* [Volume Indicators 量指标](func_groups/volume_indicators.md)
130+
* [Volatility Indicators 波动性指标](func_groups/volatility_indicators.md)
131+
* [Price Transform 价格指标](func_groups/price_transform.md)
132+
* [Cycle Indicators 循环指标](func_groups/cycle_indicators.md)
133+
* [Pattern Recognition 模式识别](func_groups/pattern_recognition.md)
134+
* [Statistic Functions 统计功能](func_groups/statistic_functions.md)
135+
* [Math Transform 数学变换](func_groups/math_transform.md)
136+
* [Math Operators 数学运算符](func_groups/math_operators.md)
136137

137-
#### [Overlap Studies]()
138+
139+
#### [Overlap Studies](func_groups/overlap_studies.md)
138140

139141
```
140142
BBANDS Bollinger Bands #布林带
@@ -156,7 +158,7 @@ TRIMA Triangular Moving Average
156158
WMA Weighted Moving Average
157159
```
158160

159-
#### [Momentum Indicators](func_groups/momentum_indicators.html)
161+
#### [Momentum Indicators](func_groups/momentum_indicators.md)
160162

161163
```
162164
ADX Average Directional Movement Index

abstract.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Abstract API Quick Start
1+
# 抽象API快速开始
22

3-
If you're already familiar with using the function API, you should feel right
4-
at home using the abstract API. Every function takes the same input, passed
5-
as a dictionary of Numpy arrays:
3+
如果您已经熟悉使用函数API,那么您就应该在精通使用抽象API。
4+
每个函数有相同的输入,作为一个字典通过NumPy数组:
65

76
```python
87
import numpy as np
9-
# note that all ndarrays must be the same length!
8+
#请注意,所有的ndarrays必须是相同的长度!
109
inputs = {
1110
'open': np.random.random(100),
1211
'high': np.random.random(100),
@@ -16,15 +15,14 @@ inputs = {
1615
}
1716
```
1817

19-
Functions can either be imported directly or instantiated by name:
18+
函数可以直接导入,也可以用名称实例化:
2019

2120
```python
2221
from talib import abstract
2322
sma = abstract.SMA
2423
sma = abstract.Function('sma')
2524
```
26-
27-
From there, calling functions is basically the same as the function API:
25+
调用函数基本上与函数API相同:
2826

2927
```python
3028
from talib.abstract import *
@@ -35,14 +33,18 @@ slowk, slowd = STOCH(input_arrays, 5, 3, 0, 3, 0) # uses high, low, close by def
3533
slowk, slowd = STOCH(input_arrays, 5, 3, 0, 3, 0, prices=['high', 'low', 'open'])
3634
```
3735

38-
## Advanced Usage
36+
## 高级用法
3937

4038
For more advanced use cases of TA-Lib, the Abstract API also offers much more
4139
flexibility. You can even subclass ``abstract.Function`` and override
4240
``set_input_arrays`` to customize the type of input data Function accepts
41+
(e.g. a pandas DataFrame).
42+
对于更高级的TA库用例,抽象API也提供了更大的灵活性。
43+
你甚至可以子类``abstract.Function``和覆盖`` set_input_arrays``自定义类型的输入数据的函数接受
4344
(e.g. a pandas DataFrame).
4445

45-
Details about every function can be accessed via the info property:
46+
Details about every function can be accessed via the info property:
47+
有关每个功能的详细信息可以通过信息属性访问:
4648

4749
```python
4850
print Function('stoch').info
@@ -64,13 +66,13 @@ print Function('stoch').info
6466
}
6567

6668
```
67-
Or in human-readable format:
69+
或者是可读的格式:
6870
```python
6971
help(STOCH)
7072
str(STOCH)
7173
```
7274

73-
Other useful properties of ``Function``:
75+
其他有用属性 ``Function``:
7476

7577
```python
7678
Function('x').function_flags
@@ -85,7 +87,9 @@ Function('x').outputs
8587

8688
Aside from calling the function directly, Functions maintain state and will
8789
remember their parameters/input_arrays after they've been set. You can set
88-
parameters and recalculate with new input data using run():
90+
parameters and recalculate with new input data using run():
91+
除了直接调用函数,函数还可以保持状态,已经记住他们的 参数/数组
92+
你可以设置参数,重新计算使用run()新输入数据
8993
```python
9094
SMA.parameters = {'timeperiod': 15}
9195
result1 = SMA.run(input_arrays1)
@@ -97,7 +101,7 @@ ma10 = SMA(timeperiod=10)
97101
ma20 = SMA(20)
98102
```
99103

100-
For more details, take a look at the
101-
[code](https://github.com/mrjbq7/ta-lib/blob/master/talib/abstract.pyx#L46).
102104

103-
[Documentation Index](doc_index.html)
105+
欲了解更多详情,请看 [code](https://github.com/mrjbq7/ta-lib/blob/master/talib/abstract.pyx#L46).
106+
107+
[文档](doc_index.html)

doc_index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Documentation
22

3-
* [Installation and Troubleshooting](install.html)
4-
* [Using the Function API](func.html)
5-
* [Using the Abstract API](abstract.html)
6-
* [All Functions](funcs.html)
7-
* [Overlap Studies](func_groups/overlap_studies.html)
8-
* [Momentum Indicators](func_groups/momentum_indicators.html)
9-
* [Volume Indicators](func_groups/volume_indicators.html)
10-
* [Volatility Indicators](func_groups/volatility_indicators.html)
11-
* [Price Transform](func_groups/price_transform.html)
12-
* [Cycle Indicators](func_groups/cycle_indicators.html)
13-
* [Pattern Recognition](func_groups/pattern_recognition.html)
14-
* [Statistic Functions](func_groups/statistic_functions.html)
15-
* [Math Transform](func_groups/math_transform.html)
16-
* [Math Operators](func_groups/math_operators.html)
3+
* [安装和问题](install.md)
4+
* [快速使用](func.md)
5+
* [高级应用](abstract.md)
6+
* [方法分类](funcs.md)
7+
* [Overlap Studies 重叠的研究](func_groups/overlap_studies.md)
8+
* [Momentum Indicators 动量指标](func_groups/momentum_indicators.md)
9+
* [Volume Indicators 量指标](func_groups/volume_indicators.md)
10+
* [Volatility Indicators 波动性指标](func_groups/volatility_indicators.md)
11+
* [Price Transform 价格指标](func_groups/price_transform.md)
12+
* [Cycle Indicators 循环指标](func_groups/cycle_indicators.md)
13+
* [Pattern Recognition 模式识别](func_groups/pattern_recognition.md)
14+
* [Statistic Functions 统计功能](func_groups/statistic_functions.md)
15+
* [Math Transform 数学变换](func_groups/math_transform.md)
16+
* [Math Operators 数学运算符](func_groups/math_operators.md)

0 commit comments

Comments
 (0)