polars-ta


Namepolars-ta JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
Summarypolars expressions
upload_time2024-04-18 02:57:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2023 wukan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords polars expression talib
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # polars_ta

Technical Indicator Operators Rewritten in `polars`.

We provide wrappers for some functions (like `TA-Lib`) that are not `pl.Expr` alike.

## How to Install

### Using `pip`

```commandline
pip install -i https://pypi.org/simple --upgrade polars_ta
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade polars_ta  # Mirror in China
```

### Build from Source

```commandline
git clone --depth=1 https://github.com/wukan1986/polars_ta.git
cd polars_ta
python -m build
cd dist
pip install polars_ta-0.1.2-py3-none-any.whl
```

### How to Install TA-Lib
Non-official `TA-Lib` wheels can be downloaded from `https://github.com/cgohlke/talib-build/releases`

## Usage

See `examples` folder.

```python
# We need to modify the function name by prefixing `ts_` before using them in `expr_coodegen`
from polars_ta.prefix.tdx import *
# Import functions from `wq`
from polars_ta.prefix.wq import *

# Example
df = df.with_columns([
    # Load from `wq`
    *[ts_returns(CLOSE, i).alias(f'ROCP_{i:03d}') for i in (1, 3, 5, 10, 20, 60, 120)],
    *[ts_mean(CLOSE, i).alias(f'SMA_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_std_dev(CLOSE, i).alias(f'STD_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_max(HIGH, i).alias(f'HHV_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_min(LOW, i).alias(f'LLV_{i:03d}') for i in (5, 10, 20, 60, 120)],

    # Load from `tdx`
    *[ts_RSI(CLOSE, i).alias(f'RSI_{i:03d}') for i in (6, 12, 24)],
])
```

## How We Designed This

1. We use `Expr` instead of `Series` to avoid using `Series` in the calculation. Functions are no longer methods of class.
2. Use `wq` first. It mimics `WorldQuant Alpha` and strives to be consistent with them.
3. Use `ta` otherwise. It is a `polars`-style version of `TA-Lib`. It tries to reuse functions from `wq`.
4. Use `tdx` last. It also tries to import functions from `wq` and `ta`.
5. We keep the same signature and parameters as the original `TA-Lib` in `talib`.
6. If there is a naming conflict, we suggest calling `wq`, `ta`, `tdx`, `talib` in order. The higher the priority, the closer the implementation is to `Expr`.

## Comparison of Our Indicators and Others

See [compare](compare.md)

## Handling Null/NaN Values

See [nan_to_null](nan_to_null.md)

## Evolve of Our TA-Lib Wrappers

1. `Expr.map_batches` can be used to call third-party libraries, such as `TA-Lib, bottleneck`. But because of the input and output format requirements, you need to wrap the third-party API with a function.
  - Both input and output can only be one column. If you want to support multiple columns, you need to convert them to `pl.Struct`. After that, you need to use `unnest` to split `pl.Struct`.
  - The output must be `pl.Series`
2. Start to use `register_expr_namespace` to simplify the code
  - Implementation [helper.py](polars_ta/utils/helper.py)
  - Usage demo [demo_ta1.py](examples/demo_ta1.py)
  - Pros: Easy to use
  - Cons:
    - The `member function call mode` is not convenient for inputting into genetic algorithms for factor mining
    - `__getattribute__` dynamic method call is very flexible, but loses `IDE` support.
3. Prefix expression. Convert all member functions into formulas
  - Implementation [wrapper.py](polars_ta/utils/wrapper.py)
  - Usage demo [demo_ta2.py](examples/demo_ta2.py)
  - Pros: Can be input into our implementation of genetic algorithms
  - Cons: `__getattribute__` dynamic method call is very flexible, but loses `IDE` support.
4. Code generation.
  - Implementation [codegen_talib2.py](tools/codegen_talib2.py)
  - Generated result will be at [\_\_init\_\_.py](polars_ta/talib/__init__.py)
  - Usage demo [demo_ta3.py](examples/demo_ta3.py)
  - Pros:
    - Can be input into our implementation of genetic algorithms
    - `IDE` support


## Debugging

```commandline
git clone --depth=1 https://github.com/wukan1986/polars_ta.git
cd polars_ta
pip install -e .
```

Notice:
If you have added some functions in `ta` or `tdx`, please run `prefix_ta.py` or `prefix_tdx.py` inside the `tools` folder to generate the corrected Python script (with the prefix added).
This is required to use in `expr_codegen`.

## Reference

- https://github.com/pola-rs/polars
- https://github.com/TA-Lib/ta-lib
- https://github.com/twopirllc/pandas-ta
- https://github.com/bukosabino/ta
- https://github.com/peerchemist/finta
- https://github.com/wukan1986/ta_cn
- https://support.worldquantbrain.com/hc/en-us/community/posts/20278408956439-从价量看技术指标总结-Technical-Indicator-






# polars_ta

基于`polars`的算子库。实现量化投研中常用的技术指标、数据处理等函数。对于不易翻译成`Expr`的库(如:`TA-Lib`)也提供了函数式调用的封装

## 安装

### 在线安装

```commandline
pip install -i https://pypi.org/simple --upgrade polars_ta  # 官方源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade polars_ta  # 国内镜像源
```

### 源码安装

```commandline
git clone --depth=1 https://github.com/wukan1986/polars_ta.git
cd polars_ta
python -m build
cd dist
pip install polars_ta-0.1.2-py3-none-any.whl
```

### TA-Lib安装
Windows用户不会安装可从`https://github.com/cgohlke/talib-build/releases` 下载对应版本whl文件

## 使用方法

参考`examples`目录即可,例如:

```python
# 如果需要在`expr_codegen`中使用,需要有`ts_`等前权,这里导入提供了前缀
from polars_ta.prefix.tdx import *
# 导入wq公式
from polars_ta.prefix.wq import *

# 演示生成大量指标
df = df.with_columns([
    # 从wq中导入指标
    *[ts_returns(CLOSE, i).alias(f'ROCP_{i:03d}') for i in (1, 3, 5, 10, 20, 60, 120)],
    *[ts_mean(CLOSE, i).alias(f'SMA_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_std_dev(CLOSE, i).alias(f'STD_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_max(HIGH, i).alias(f'HHV_{i:03d}') for i in (5, 10, 20, 60, 120)],
    *[ts_min(LOW, i).alias(f'LLV_{i:03d}') for i in (5, 10, 20, 60, 120)],

    # 从tdx中导入指标
    *[ts_RSI(CLOSE, i).alias(f'RSI_{i:03d}') for i in (6, 12, 24)],
])
```

## 设计原则

1. 调用方法由`成员函数`换成`独立函数`。输入输出使用`Expr`,避免使用`Series`
2. 优先实现`wq`公式,它仿`WorldQuant Alpha`公式,与官网尽量保持一致。如果部分功能实现在此更合适将放在此处
3. 其次实现`ta`公式,它相当于`TA-Lib`的`polars`风格的版本。优先从`wq`中导入更名
4. 最后实现`tdx`公式,它也是优先从`wq`和`ta`中导入
5. `talib`的函数名与参数与原版`TA-Lib`完全一致
6. 如果出现了命名冲突,建议调用优先级为`wq`、`ta`、`tdx`、`talib`。因为优先级越高,实现方案越接近于`Expr`

## 指标区别

请参考[compare](compare.md)

## 空值处理

请参考[nan_to_null](nan_to_null.md)

## TA-Lib封装的演化

1. `Expr.map_batches`可以实现调用第三方库,如`TA-Lib, bottleneck`。但因为对输入与输出格式有要求,所以还需要用函数对第三方API封装一下。
    - 输入输出都只能是一列,如要支持多列需转换成`pl.Struct`。事后`pl.Struct`要拆分需使用`unnest`
    - 输出必须是`pl.Series`
2. 参数多,代码长。开始使用`register_expr_namespace`来简化代码
    - 实现代码[helper.py](polars_ta/utils/helper.py)
    - 使用演示[demo_ta1.py](examples/demo_ta1.py)
    - 优点:使用简单
    - 不足:`成员函数调用模式`不便于输入到遗传算法中进行因子挖掘
    - 不足:`__getattribute__`动态方法调用非常灵活,但失去了`IDE`智能提示
3. 前缀表达式。将所有的成员函数都转换成公式
    - 实现代码[wrapper.py](polars_ta/utils/wrapper.py)
    - 使用演示[demo_ta2.py](examples/demo_ta2.py)
    - 优点:可以输入到遗传算法
    - 不足:`__getattribute__`动态方法调用非常灵活,但失去了`IDE`智能提示
4. 代码自动生成。
    - 实现代码[codegen_talib2.py](tools/codegen_talib2.py)
    - 生成结果[\_\_init\_\_.py](polars_ta/talib/__init__.py)
    - 使用演示[demo_ta3.py](examples/demo_ta3.py)
    - 优点:即可以输入到遗传算法,`IDE`还有智能提示

## 开发调试

```commandline
git clone --depth=1 https://github.com/wukan1986/polars_ta.git
cd polars_ta
pip install -e .
```

注意:如果你在`ta`或`tdx`中添加了新的函数,请再运行`tools`下的`prefix_ta.py`或`prefix_tdx.py`,用于生成对应的前缀文件。前缀文件方便在`expr_codegen`中使用

## 参考

- https://github.com/pola-rs/polars
- https://github.com/TA-Lib/ta-lib
- https://github.com/twopirllc/pandas-ta
- https://github.com/bukosabino/ta
- https://github.com/peerchemist/finta
- https://github.com/wukan1986/ta_cn
- https://support.worldquantbrain.com/hc/en-us/community/posts/20278408956439-从价量看技术指标总结-Technical-Indicator-


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "polars-ta",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "polars, expression, talib",
    "author": null,
    "author_email": "wukan <wu-kan@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/8b/e4/51828e871dbcd30ebb6393761ec217807eefbb50998745e217d2602cb104/polars_ta-0.2.4.tar.gz",
    "platform": null,
    "description": "# polars_ta\n\nTechnical Indicator Operators Rewritten in `polars`.\n\nWe provide wrappers for some functions (like `TA-Lib`) that are not `pl.Expr` alike.\n\n## How to Install\n\n### Using `pip`\n\n```commandline\npip install -i https://pypi.org/simple --upgrade polars_ta\npip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade polars_ta  # Mirror in China\n```\n\n### Build from Source\n\n```commandline\ngit clone --depth=1 https://github.com/wukan1986/polars_ta.git\ncd polars_ta\npython -m build\ncd dist\npip install polars_ta-0.1.2-py3-none-any.whl\n```\n\n### How to Install TA-Lib\nNon-official `TA-Lib` wheels can be downloaded from `https://github.com/cgohlke/talib-build/releases`\n\n## Usage\n\nSee `examples` folder.\n\n```python\n# We need to modify the function name by prefixing `ts_` before using them in `expr_coodegen`\nfrom polars_ta.prefix.tdx import *\n# Import functions from `wq`\nfrom polars_ta.prefix.wq import *\n\n# Example\ndf = df.with_columns([\n    # Load from `wq`\n    *[ts_returns(CLOSE, i).alias(f'ROCP_{i:03d}') for i in (1, 3, 5, 10, 20, 60, 120)],\n    *[ts_mean(CLOSE, i).alias(f'SMA_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_std_dev(CLOSE, i).alias(f'STD_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_max(HIGH, i).alias(f'HHV_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_min(LOW, i).alias(f'LLV_{i:03d}') for i in (5, 10, 20, 60, 120)],\n\n    # Load from `tdx`\n    *[ts_RSI(CLOSE, i).alias(f'RSI_{i:03d}') for i in (6, 12, 24)],\n])\n```\n\n## How We Designed This\n\n1. We use `Expr` instead of `Series` to avoid using `Series` in the calculation. Functions are no longer methods of class.\n2. Use `wq` first. It mimics `WorldQuant Alpha` and strives to be consistent with them.\n3. Use `ta` otherwise. It is a `polars`-style version of `TA-Lib`. It tries to reuse functions from `wq`.\n4. Use `tdx` last. It also tries to import functions from `wq` and `ta`.\n5. We keep the same signature and parameters as the original `TA-Lib` in `talib`.\n6. If there is a naming conflict, we suggest calling `wq`, `ta`, `tdx`, `talib` in order. The higher the priority, the closer the implementation is to `Expr`.\n\n## Comparison of Our Indicators and Others\n\nSee [compare](compare.md)\n\n## Handling Null/NaN Values\n\nSee [nan_to_null](nan_to_null.md)\n\n## Evolve of Our TA-Lib Wrappers\n\n1. `Expr.map_batches` can be used to call third-party libraries, such as `TA-Lib, bottleneck`. But because of the input and output format requirements, you need to wrap the third-party API with a function.\n  - Both input and output can only be one column. If you want to support multiple columns, you need to convert them to `pl.Struct`. After that, you need to use `unnest` to split `pl.Struct`.\n  - The output must be `pl.Series`\n2. Start to use `register_expr_namespace` to simplify the code\n  - Implementation [helper.py](polars_ta/utils/helper.py)\n  - Usage demo [demo_ta1.py](examples/demo_ta1.py)\n  - Pros: Easy to use\n  - Cons:\n    - The `member function call mode` is not convenient for inputting into genetic algorithms for factor mining\n    - `__getattribute__` dynamic method call is very flexible, but loses `IDE` support.\n3. Prefix expression. Convert all member functions into formulas\n  - Implementation [wrapper.py](polars_ta/utils/wrapper.py)\n  - Usage demo [demo_ta2.py](examples/demo_ta2.py)\n  - Pros: Can be input into our implementation of genetic algorithms\n  - Cons: `__getattribute__` dynamic method call is very flexible, but loses `IDE` support.\n4. Code generation.\n  - Implementation [codegen_talib2.py](tools/codegen_talib2.py)\n  - Generated result will be at [\\_\\_init\\_\\_.py](polars_ta/talib/__init__.py)\n  - Usage demo [demo_ta3.py](examples/demo_ta3.py)\n  - Pros:\n    - Can be input into our implementation of genetic algorithms\n    - `IDE` support\n\n\n## Debugging\n\n```commandline\ngit clone --depth=1 https://github.com/wukan1986/polars_ta.git\ncd polars_ta\npip install -e .\n```\n\nNotice:\nIf you have added some functions in `ta` or `tdx`, please run `prefix_ta.py` or `prefix_tdx.py` inside the `tools` folder to generate the corrected Python script (with the prefix added).\nThis is required to use in `expr_codegen`.\n\n## Reference\n\n- https://github.com/pola-rs/polars\n- https://github.com/TA-Lib/ta-lib\n- https://github.com/twopirllc/pandas-ta\n- https://github.com/bukosabino/ta\n- https://github.com/peerchemist/finta\n- https://github.com/wukan1986/ta_cn\n- https://support.worldquantbrain.com/hc/en-us/community/posts/20278408956439-\u4ece\u4ef7\u91cf\u770b\u6280\u672f\u6307\u6807\u603b\u7ed3-Technical-Indicator-\n\n\n\n\n\n\n# polars_ta\n\n\u57fa\u4e8e`polars`\u7684\u7b97\u5b50\u5e93\u3002\u5b9e\u73b0\u91cf\u5316\u6295\u7814\u4e2d\u5e38\u7528\u7684\u6280\u672f\u6307\u6807\u3001\u6570\u636e\u5904\u7406\u7b49\u51fd\u6570\u3002\u5bf9\u4e8e\u4e0d\u6613\u7ffb\u8bd1\u6210`Expr`\u7684\u5e93\uff08\u5982\uff1a`TA-Lib`\uff09\u4e5f\u63d0\u4f9b\u4e86\u51fd\u6570\u5f0f\u8c03\u7528\u7684\u5c01\u88c5\n\n## \u5b89\u88c5\n\n### \u5728\u7ebf\u5b89\u88c5\n\n```commandline\npip install -i https://pypi.org/simple --upgrade polars_ta  # \u5b98\u65b9\u6e90\npip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade polars_ta  # \u56fd\u5185\u955c\u50cf\u6e90\n```\n\n### \u6e90\u7801\u5b89\u88c5\n\n```commandline\ngit clone --depth=1 https://github.com/wukan1986/polars_ta.git\ncd polars_ta\npython -m build\ncd dist\npip install polars_ta-0.1.2-py3-none-any.whl\n```\n\n### TA-Lib\u5b89\u88c5\nWindows\u7528\u6237\u4e0d\u4f1a\u5b89\u88c5\u53ef\u4ece`https://github.com/cgohlke/talib-build/releases` \u4e0b\u8f7d\u5bf9\u5e94\u7248\u672cwhl\u6587\u4ef6\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n\u53c2\u8003`examples`\u76ee\u5f55\u5373\u53ef\uff0c\u4f8b\u5982\uff1a\n\n```python\n# \u5982\u679c\u9700\u8981\u5728`expr_codegen`\u4e2d\u4f7f\u7528\uff0c\u9700\u8981\u6709`ts_`\u7b49\u524d\u6743\uff0c\u8fd9\u91cc\u5bfc\u5165\u63d0\u4f9b\u4e86\u524d\u7f00\nfrom polars_ta.prefix.tdx import *\n# \u5bfc\u5165wq\u516c\u5f0f\nfrom polars_ta.prefix.wq import *\n\n# \u6f14\u793a\u751f\u6210\u5927\u91cf\u6307\u6807\ndf = df.with_columns([\n    # \u4ecewq\u4e2d\u5bfc\u5165\u6307\u6807\n    *[ts_returns(CLOSE, i).alias(f'ROCP_{i:03d}') for i in (1, 3, 5, 10, 20, 60, 120)],\n    *[ts_mean(CLOSE, i).alias(f'SMA_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_std_dev(CLOSE, i).alias(f'STD_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_max(HIGH, i).alias(f'HHV_{i:03d}') for i in (5, 10, 20, 60, 120)],\n    *[ts_min(LOW, i).alias(f'LLV_{i:03d}') for i in (5, 10, 20, 60, 120)],\n\n    # \u4ecetdx\u4e2d\u5bfc\u5165\u6307\u6807\n    *[ts_RSI(CLOSE, i).alias(f'RSI_{i:03d}') for i in (6, 12, 24)],\n])\n```\n\n## \u8bbe\u8ba1\u539f\u5219\n\n1. \u8c03\u7528\u65b9\u6cd5\u7531`\u6210\u5458\u51fd\u6570`\u6362\u6210`\u72ec\u7acb\u51fd\u6570`\u3002\u8f93\u5165\u8f93\u51fa\u4f7f\u7528`Expr`\uff0c\u907f\u514d\u4f7f\u7528`Series`\n2. \u4f18\u5148\u5b9e\u73b0`wq`\u516c\u5f0f\uff0c\u5b83\u4eff`WorldQuant Alpha`\u516c\u5f0f\uff0c\u4e0e\u5b98\u7f51\u5c3d\u91cf\u4fdd\u6301\u4e00\u81f4\u3002\u5982\u679c\u90e8\u5206\u529f\u80fd\u5b9e\u73b0\u5728\u6b64\u66f4\u5408\u9002\u5c06\u653e\u5728\u6b64\u5904\n3. \u5176\u6b21\u5b9e\u73b0`ta`\u516c\u5f0f\uff0c\u5b83\u76f8\u5f53\u4e8e`TA-Lib`\u7684`polars`\u98ce\u683c\u7684\u7248\u672c\u3002\u4f18\u5148\u4ece`wq`\u4e2d\u5bfc\u5165\u66f4\u540d\n4. \u6700\u540e\u5b9e\u73b0`tdx`\u516c\u5f0f\uff0c\u5b83\u4e5f\u662f\u4f18\u5148\u4ece`wq`\u548c`ta`\u4e2d\u5bfc\u5165\n5. `talib`\u7684\u51fd\u6570\u540d\u4e0e\u53c2\u6570\u4e0e\u539f\u7248`TA-Lib`\u5b8c\u5168\u4e00\u81f4\n6. \u5982\u679c\u51fa\u73b0\u4e86\u547d\u540d\u51b2\u7a81\uff0c\u5efa\u8bae\u8c03\u7528\u4f18\u5148\u7ea7\u4e3a`wq`\u3001`ta`\u3001`tdx`\u3001`talib`\u3002\u56e0\u4e3a\u4f18\u5148\u7ea7\u8d8a\u9ad8\uff0c\u5b9e\u73b0\u65b9\u6848\u8d8a\u63a5\u8fd1\u4e8e`Expr`\n\n## \u6307\u6807\u533a\u522b\n\n\u8bf7\u53c2\u8003[compare](compare.md)\n\n## \u7a7a\u503c\u5904\u7406\n\n\u8bf7\u53c2\u8003[nan_to_null](nan_to_null.md)\n\n## TA-Lib\u5c01\u88c5\u7684\u6f14\u5316\n\n1. `Expr.map_batches`\u53ef\u4ee5\u5b9e\u73b0\u8c03\u7528\u7b2c\u4e09\u65b9\u5e93\uff0c\u5982`TA-Lib, bottleneck`\u3002\u4f46\u56e0\u4e3a\u5bf9\u8f93\u5165\u4e0e\u8f93\u51fa\u683c\u5f0f\u6709\u8981\u6c42\uff0c\u6240\u4ee5\u8fd8\u9700\u8981\u7528\u51fd\u6570\u5bf9\u7b2c\u4e09\u65b9API\u5c01\u88c5\u4e00\u4e0b\u3002\n    - \u8f93\u5165\u8f93\u51fa\u90fd\u53ea\u80fd\u662f\u4e00\u5217\uff0c\u5982\u8981\u652f\u6301\u591a\u5217\u9700\u8f6c\u6362\u6210`pl.Struct`\u3002\u4e8b\u540e`pl.Struct`\u8981\u62c6\u5206\u9700\u4f7f\u7528`unnest`\n    - \u8f93\u51fa\u5fc5\u987b\u662f`pl.Series`\n2. \u53c2\u6570\u591a\uff0c\u4ee3\u7801\u957f\u3002\u5f00\u59cb\u4f7f\u7528`register_expr_namespace`\u6765\u7b80\u5316\u4ee3\u7801\n    - \u5b9e\u73b0\u4ee3\u7801[helper.py](polars_ta/utils/helper.py)\n    - \u4f7f\u7528\u6f14\u793a[demo_ta1.py](examples/demo_ta1.py)\n    - \u4f18\u70b9\uff1a\u4f7f\u7528\u7b80\u5355\n    - \u4e0d\u8db3\uff1a`\u6210\u5458\u51fd\u6570\u8c03\u7528\u6a21\u5f0f`\u4e0d\u4fbf\u4e8e\u8f93\u5165\u5230\u9057\u4f20\u7b97\u6cd5\u4e2d\u8fdb\u884c\u56e0\u5b50\u6316\u6398\n    - \u4e0d\u8db3\uff1a`__getattribute__`\u52a8\u6001\u65b9\u6cd5\u8c03\u7528\u975e\u5e38\u7075\u6d3b\uff0c\u4f46\u5931\u53bb\u4e86`IDE`\u667a\u80fd\u63d0\u793a\n3. \u524d\u7f00\u8868\u8fbe\u5f0f\u3002\u5c06\u6240\u6709\u7684\u6210\u5458\u51fd\u6570\u90fd\u8f6c\u6362\u6210\u516c\u5f0f\n    - \u5b9e\u73b0\u4ee3\u7801[wrapper.py](polars_ta/utils/wrapper.py)\n    - \u4f7f\u7528\u6f14\u793a[demo_ta2.py](examples/demo_ta2.py)\n    - \u4f18\u70b9\uff1a\u53ef\u4ee5\u8f93\u5165\u5230\u9057\u4f20\u7b97\u6cd5\n    - \u4e0d\u8db3\uff1a`__getattribute__`\u52a8\u6001\u65b9\u6cd5\u8c03\u7528\u975e\u5e38\u7075\u6d3b\uff0c\u4f46\u5931\u53bb\u4e86`IDE`\u667a\u80fd\u63d0\u793a\n4. \u4ee3\u7801\u81ea\u52a8\u751f\u6210\u3002\n    - \u5b9e\u73b0\u4ee3\u7801[codegen_talib2.py](tools/codegen_talib2.py)\n    - \u751f\u6210\u7ed3\u679c[\\_\\_init\\_\\_.py](polars_ta/talib/__init__.py)\n    - \u4f7f\u7528\u6f14\u793a[demo_ta3.py](examples/demo_ta3.py)\n    - \u4f18\u70b9\uff1a\u5373\u53ef\u4ee5\u8f93\u5165\u5230\u9057\u4f20\u7b97\u6cd5\uff0c`IDE`\u8fd8\u6709\u667a\u80fd\u63d0\u793a\n\n## \u5f00\u53d1\u8c03\u8bd5\n\n```commandline\ngit clone --depth=1 https://github.com/wukan1986/polars_ta.git\ncd polars_ta\npip install -e .\n```\n\n\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u5728`ta`\u6216`tdx`\u4e2d\u6dfb\u52a0\u4e86\u65b0\u7684\u51fd\u6570\uff0c\u8bf7\u518d\u8fd0\u884c`tools`\u4e0b\u7684`prefix_ta.py`\u6216`prefix_tdx.py`\uff0c\u7528\u4e8e\u751f\u6210\u5bf9\u5e94\u7684\u524d\u7f00\u6587\u4ef6\u3002\u524d\u7f00\u6587\u4ef6\u65b9\u4fbf\u5728`expr_codegen`\u4e2d\u4f7f\u7528\n\n## \u53c2\u8003\n\n- https://github.com/pola-rs/polars\n- https://github.com/TA-Lib/ta-lib\n- https://github.com/twopirllc/pandas-ta\n- https://github.com/bukosabino/ta\n- https://github.com/peerchemist/finta\n- https://github.com/wukan1986/ta_cn\n- https://support.worldquantbrain.com/hc/en-us/community/posts/20278408956439-\u4ece\u4ef7\u91cf\u770b\u6280\u672f\u6307\u6807\u603b\u7ed3-Technical-Indicator-\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 wukan  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "polars expressions",
    "version": "0.2.4",
    "project_urls": null,
    "split_keywords": [
        "polars",
        " expression",
        " talib"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf71f4954c393d351a5c43786995a1692bf5ca3d0de5d606277da1ba786569dd",
                "md5": "e895eeeac5a53a67029182a659b95d33",
                "sha256": "07a259c94e6f900b95f68c0db99c2a8c0ed4322d9639b55b0af3154e17007dc2"
            },
            "downloads": -1,
            "filename": "polars_ta-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e895eeeac5a53a67029182a659b95d33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 53045,
            "upload_time": "2024-04-18T02:57:00",
            "upload_time_iso_8601": "2024-04-18T02:57:00.003647Z",
            "url": "https://files.pythonhosted.org/packages/cf/71/f4954c393d351a5c43786995a1692bf5ca3d0de5d606277da1ba786569dd/polars_ta-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8be451828e871dbcd30ebb6393761ec217807eefbb50998745e217d2602cb104",
                "md5": "d2b6f85dca06e14a46a6c741c884bbc0",
                "sha256": "23ac0a6402c6c6da3bf54a5a54f759468399f331f9630aadf959156beb665408"
            },
            "downloads": -1,
            "filename": "polars_ta-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d2b6f85dca06e14a46a6c741c884bbc0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 42830,
            "upload_time": "2024-04-18T02:57:02",
            "upload_time_iso_8601": "2024-04-18T02:57:02.095510Z",
            "url": "https://files.pythonhosted.org/packages/8b/e4/51828e871dbcd30ebb6393761ec217807eefbb50998745e217d2602cb104/polars_ta-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 02:57:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "polars-ta"
}
        
Elapsed time: 0.23598s