{"id":13488061,"url":"https://github.com/HuaRongSAO/talib-document","last_synced_at":"2025-03-27T23:32:38.413Z","repository":{"id":37656526,"uuid":"97904303","full_name":"HuaRongSAO/talib-document","owner":"HuaRongSAO","description":"talib学习 talib中文翻译 talib中文文档","archived":false,"fork":false,"pushed_at":"2021-06-10T02:29:24.000Z","size":64,"stargazers_count":1735,"open_issues_count":10,"forks_count":578,"subscribers_count":82,"default_branch":"master","last_synced_at":"2025-03-24T22:34:46.108Z","etag":null,"topics":["python","ta-lib","talib"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HuaRongSAO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-21T03:58:16.000Z","updated_at":"2025-03-24T12:50:47.000Z","dependencies_parsed_at":"2022-07-13T19:10:38.478Z","dependency_job_id":null,"html_url":"https://github.com/HuaRongSAO/talib-document","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuaRongSAO%2Ftalib-document","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuaRongSAO%2Ftalib-document/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuaRongSAO%2Ftalib-document/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuaRongSAO%2Ftalib-document/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuaRongSAO","download_url":"https://codeload.github.com/HuaRongSAO/talib-document/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245785798,"owners_count":20671632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","ta-lib","talib"],"created_at":"2024-07-31T18:01:08.970Z","updated_at":"2025-03-27T23:32:33.384Z","avatar_url":"https://github.com/HuaRongSAO.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# TA-Lib\n# 简介：\nTalib一直缺乏有效的中文文档，自己又有空闲时间，且在研究量化对冲系统，就发点时间，做一下翻译。\n原文地址： [TA-LIB document](https://mrjbq7.github.io/ta-lib/)\n翻译地址：\n\n这是一个Python 金融指数处理库[TA-LIB](http://ta-lib.org)，他是基于 Cython\n而不是 SWIG。\n\n\u003e TA-Lib is widely used by trading software developers requiring to perform\n\u003e technical analysis of financial market data.  \n\u003e TA-Lib广泛应用与交易软件，和金融市场数据进行技术分析。\n\n\u003e * Includes 150+ indicators such as ADX, MACD, RSI, Stochastic, Bollinger\n\u003e   Bands, etc.\n\u003e * Candlestick pattern recognition\n\u003e * Open-source API for C/C++, Java, Perl, Python and 100% Managed .NET    \n\u003e * 包含了150多个指标,包括：ADX, MACD, RSI, Stochastic, Bollinger Bands, 等.\n\u003e * K线形态识别\n\u003e * 完全开源，支持 C/C++, Java, Perl, Python and 100% Managed .NET\n\n\n\n#### 安装TA-Lib\n\n## 案例（快速开始）\n\nSimilar to TA-Lib, the function interface provides a lightweight wrapper of\nthe exposed TA-Lib indicators.  \n类似于TA-Lib，函数接口提供了一个暴露TA-Lib指标的轻量级封装。\n\nEach function returns an output array and have default values for their\nparameters, unless specified as keyword arguments. Typically, these functions\nwill have an initial \"lookback\" period (a required number of observations\nbefore an output is generated) set to ``NaN``.   \n每个函数都默认需要输入数组，并为它们提供默认值。\n参数，除非指定为关键字参数。通常，这些函数\n会有一个初步的“lookback”时期（观测所需数量\n在生成一个输出之前），设置为“NaN”。\n\nAll of the following examples use the function API:  \n所有的API函数的使用，都需引入库文件：\n\n```python\nimport numpy\nimport talib\n\nclose = numpy.random.random(100)\n```\n\n计算收盘价的一个简单移动平均数SMA:\n\n```python\noutput = talib.SMA(close)\n```\n\n计算布林线，三指数移动平均：\n\n```python\nfrom talib import MA_Type\n\nupper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)\n```\n\n计算收盘价的动量，时间为5：\n\n```python\noutput = talib.MOM(close, timeperiod=5)\n```\n\n## Abstract API Quick Start 抽象 API 快速入门\n\nIf you're already familiar with using the function API, you should feel right\nat home using the abstract API. Every function takes the same input, passed\nas a dictionary of Numpy arrays:   \n如果您已经熟悉使用函数API，那么您就应该精通使用抽象API。\n每个函数有相同的输入，作为一个字典通过NumPy数组：\n\n```python\nimport numpy as np\n# note that all ndarrays must be the same length!\ninputs = {\n    'open': np.random.random(100),\n    'high': np.random.random(100),\n    'low': np.random.random(100),\n    'close': np.random.random(100),\n    'volume': np.random.random(100)\n}\n```\n函数可以直接导入，也可以用名称实例化：\n\n```python\nfrom talib import abstract\nsma = abstract.SMA\nsma = abstract.Function('sma')\n```\n\n调用函数基本上与函数API相同：\n\n```python\nfrom talib.abstract import *\noutput = SMA(input_arrays, timeperiod=25) # SMA均线价格计算收盘价\noutput = SMA(input_arrays, timeperiod=25, price='open') # SMA均线价格计算收盘价\nupper, middle, lower = BBANDS(input_arrays, 20, 2, 2)\nslowk, slowd = STOCH(input_arrays, 5, 3, 0, 3, 0) # uses high, low, close by default\nslowk, slowd = STOCH(input_arrays, 5, 3, 0, 3, 0, prices=['high', 'low', 'open'])\n```\n\n了解更多高级使用TA库 [here]().\n\n## Supported Indicators 支持的指标\n\nWe can show all the TA functions supported by TA-Lib, either as a ``list`` or\nas a ``dict`` sorted by group (e.g. \"Overlap Studies\", \"Momentum Indicators\",\netc):  \n我们可以显示Ta lib的所有TA函数,返回一个 ``list`` 或者 ``dict`` \n\n```python\nimport talib\n\nprint talib.get_functions()\nprint talib.get_function_groups()\n```\n\n### Function Groups\n\n* [Overlap Studies 重叠研究](func_groups/overlap_studies.md)\n* [Momentum Indicators 动量指标](func_groups/momentum_indicators.md)\n* [Volume Indicators 成交量指标](func_groups/volume_indicators.md)\n* [Volatility Indicators 波动性指标](func_groups/volatility_indicators.md)\n* [Price Transform 价格指标](func_groups/price_transform.md)\n* [Cycle Indicators 周期指标](func_groups/cycle_indicators.md)\n* [Pattern Recognition 形态识别](func_groups/pattern_recognition.md)\n* [Statistic Functions 统计函数](func_groups/statistic_functions.md)\n* [Math Transform 数学变换](func_groups/math_transform.md)\n* [Math Operators 数学运算符](func_groups/math_operators.md)\n\n\n#### [Overlap Studies](func_groups/overlap_studies.md)\n\n```\nBBANDS               Bollinger Bands #布林带\nDEMA                 Double Exponential Moving Average #双指数移动平均线\nEMA                  Exponential Moving Average #指数滑动平均\nHT_TRENDLINE         Hilbert Transform - Instantaneous Trendline #希尔伯特变换瞬时趋势\nKAMA                 Kaufman Adaptive Moving Average #卡玛考夫曼自适应移动平均\nMA                   Moving average #均线\nMAMA                 MESA Adaptive Moving Average #自适应移动平均 \nMAVP                 Moving average with variable period #变周期移动平均\nMIDPOINT             MidPoint over period #在周期的中点\nMIDPRICE             Midpoint Price over period #中间时段价格\nSAR                  Parabolic SAR #抛物线转向指标\nSAREXT               Parabolic SAR - Extended #抛物线转向指标 - 扩展\nSMA                  Simple Moving Average# 简单移动平均线\nT3                   Triple Exponential Moving Average (T3)\nTEMA                 Triple Exponential Moving Average#三次指数移动平均\nTRIMA                Triangular Moving Average# 三角形移动平均\nWMA                  Weighted Moving Average#加权移动平均线\n```\n\n#### [Momentum Indicators](func_groups/momentum_indicators.md)\n\n```\nADX                  Average Directional Movement Index\nADXR                 Average Directional Movement Index Rating\nAPO                  Absolute Price Oscillator\nAROON                Aroon\nAROONOSC             Aroon Oscillator\nBOP                  Balance Of Power\nCCI                  Commodity Channel Index\nCMO                  Chande Momentum Oscillator\nDX                   Directional Movement Index\nMACD                 Moving Average Convergence/Divergence\nMACDEXT              MACD with controllable MA type\nMACDFIX              Moving Average Convergence/Divergence Fix 12/26\nMFI                  Money Flow Index\nMINUS_DI             Minus Directional Indicator\nMINUS_DM             Minus Directional Movement\nMOM                  Momentum\nPLUS_DI              Plus Directional Indicator\nPLUS_DM              Plus Directional Movement\nPPO                  Percentage Price Oscillator\nROC                  Rate of change : ((price/prevPrice)-1)*100\nROCP                 Rate of change Percentage: (price-prevPrice)/prevPrice\nROCR                 Rate of change ratio: (price/prevPrice)\nROCR100              Rate of change ratio 100 scale: (price/prevPrice)*100\nRSI                  Relative Strength Index\nSTOCH                Stochastic\nSTOCHF               Stochastic Fast\nSTOCHRSI             Stochastic Relative Strength Index\nTRIX                 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA\nULTOSC               Ultimate Oscillator\nWILLR                Williams' %R\n```\n\n#### [Volume Indicators](func_groups/volume_indicators.html)\n\n```\nAD                   Chaikin A/D Line\nADOSC                Chaikin A/D Oscillator\nOBV                  On Balance Volume\n```\n\n#### [Volatility Indicators](func_groups/volatility_indicators.html)\n\n```\nATR                  Average True Range\nNATR                 Normalized Average True Range\nTRANGE               True Range\n```\n\n#### [Price Transform](func_groups/price_transform.html)\n\n```\nAVGPRICE             Average Price\nMEDPRICE             Median Price\nTYPPRICE             Typical Price\nWCLPRICE             Weighted Close Price\n```\n\n#### [Cycle Indicators](func_groups/cycle_indicators.html)\n\n```\nHT_DCPERIOD          Hilbert Transform - Dominant Cycle Period\nHT_DCPHASE           Hilbert Transform - Dominant Cycle Phase\nHT_PHASOR            Hilbert Transform - Phasor Components\nHT_SINE              Hilbert Transform - SineWave\nHT_TRENDMODE         Hilbert Transform - Trend vs Cycle Mode\n```\n\n#### [Pattern Recognition](func_groups/pattern_recognition.html)\n\n```\nCDL2CROWS            Two Crows\nCDL3BLACKCROWS       Three Black Crows\nCDL3INSIDE           Three Inside Up/Down\nCDL3LINESTRIKE       Three-Line Strike\nCDL3OUTSIDE          Three Outside Up/Down\nCDL3STARSINSOUTH     Three Stars In The South\nCDL3WHITESOLDIERS    Three Advancing White Soldiers\nCDLABANDONEDBABY     Abandoned Baby\nCDLADVANCEBLOCK      Advance Block\nCDLBELTHOLD          Belt-hold\nCDLBREAKAWAY         Breakaway\nCDLCLOSINGMARUBOZU   Closing Marubozu\nCDLCONCEALBABYSWALL  Concealing Baby Swallow\nCDLCOUNTERATTACK     Counterattack\nCDLDARKCLOUDCOVER    Dark Cloud Cover\nCDLDOJI              Doji\nCDLDOJISTAR          Doji Star\nCDLDRAGONFLYDOJI     Dragonfly Doji\nCDLENGULFING         Engulfing Pattern\nCDLEVENINGDOJISTAR   Evening Doji Star\nCDLEVENINGSTAR       Evening Star\nCDLGAPSIDESIDEWHITE  Up/Down-gap side-by-side white lines\nCDLGRAVESTONEDOJI    Gravestone Doji\nCDLHAMMER            Hammer\nCDLHANGINGMAN        Hanging Man\nCDLHARAMI            Harami Pattern\nCDLHARAMICROSS       Harami Cross Pattern\nCDLHIGHWAVE          High-Wave Candle\nCDLHIKKAKE           Hikkake Pattern\nCDLHIKKAKEMOD        Modified Hikkake Pattern\nCDLHOMINGPIGEON      Homing Pigeon\nCDLIDENTICAL3CROWS   Identical Three Crows\nCDLINNECK            In-Neck Pattern\nCDLINVERTEDHAMMER    Inverted Hammer\nCDLKICKING           Kicking\nCDLKICKINGBYLENGTH   Kicking - bull/bear determined by the longer marubozu\nCDLLADDERBOTTOM      Ladder Bottom\nCDLLONGLEGGEDDOJI    Long Legged Doji\nCDLLONGLINE          Long Line Candle\nCDLMARUBOZU          Marubozu\nCDLMATCHINGLOW       Matching Low\nCDLMATHOLD           Mat Hold\nCDLMORNINGDOJISTAR   Morning Doji Star\nCDLMORNINGSTAR       Morning Star\nCDLONNECK            On-Neck Pattern\nCDLPIERCING          Piercing Pattern\nCDLRICKSHAWMAN       Rickshaw Man\nCDLRISEFALL3METHODS  Rising/Falling Three Methods\nCDLSEPARATINGLINES   Separating Lines\nCDLSHOOTINGSTAR      Shooting Star\nCDLSHORTLINE         Short Line Candle\nCDLSPINNINGTOP       Spinning Top\nCDLSTALLEDPATTERN    Stalled Pattern\nCDLSTICKSANDWICH     Stick Sandwich\nCDLTAKURI            Takuri (Dragonfly Doji with very long lower shadow)\nCDLTASUKIGAP         Tasuki Gap\nCDLTHRUSTING         Thrusting Pattern\nCDLTRISTAR           Tristar Pattern\nCDLUNIQUE3RIVER      Unique 3 River\nCDLUPSIDEGAP2CROWS   Upside Gap Two Crows\nCDLXSIDEGAP3METHODS  Upside/Downside Gap Three Methods\n```\n\n#### [Statistic Functions](func_groups/statistic_functions.html)\n\n```\nBETA                 Beta\nCORREL               Pearson's Correlation Coefficient (r)\nLINEARREG            Linear Regression\nLINEARREG_ANGLE      Linear Regression Angle\nLINEARREG_INTERCEPT  Linear Regression Intercept\nLINEARREG_SLOPE      Linear Regression Slope\nSTDDEV               Standard Deviation\nTSF                  Time Series Forecast\nVAR                  Variance\n```\n\n我想成为一名依靠乞讨的程序员。   \n\n![164938069.png](https://upload-images.jianshu.io/upload_images/6167081-bd931bef186e212e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHuaRongSAO%2Ftalib-document","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHuaRongSAO%2Ftalib-document","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHuaRongSAO%2Ftalib-document/lists"}