提交 d26ebdc1 编写于 作者: Z zengbin93

0.3.5 正式更名为“缠中说禅(czsc)”

上级 556e99a6
......@@ -6,11 +6,14 @@
## 安装
Pypi上已经存在一个名为chan的库,以致于这个库没法上传到Pypi。
执行以下代码直接从github安装:
```
pip install git+git://github.com/zengbin93/chan.git -U
pip install git+git://github.com/zengbin93/czsc.git -U
```
执行以下代码从 pypi 安装:
```
pip install czsc -U -i
```
## K线数据样例
......
......@@ -7,7 +7,7 @@ from .solid import SolidAnalyze
from .solid import is_in_tolerance, is_first_buy, is_first_sell, is_second_buy, \
is_second_sell, is_third_buy, is_third_sell, is_xd_buy, is_xd_sell
__version__ = "0.3.4"
__version__ = "0.3.5"
__author__ = "zengbin93"
__email__ = "zeng_bin8888@163.com"
......
......@@ -176,7 +176,7 @@ class KlineAnalyze(object):
self.__update_kline()
def __repr__(self):
return "<chan.analyze.KlineAnalyze of %s, from %s to %s>" % (self.symbol, self.start_dt, self.end_dt)
return "<KlineAnalyze of %s, from %s to %s>" % (self.symbol, self.start_dt, self.end_dt)
@staticmethod
def _preprocess(kline):
......
......@@ -11,7 +11,7 @@ import matplotlib.pyplot as plt
from .ta import macd
def plot_kline(ka, bs=None, file_html="chan.html", width="1400px", height="680px"):
def plot_kline(ka, bs=None, file_html="kline.html", width="1400px", height="680px"):
"""
:param ka: KlineAnalyze
......
# coding: utf-8
"""
结合掘金的数据使用 chan 进行缠论技术分析
结合掘金的数据使用 czsc 进行缠论技术分析
author: zengbin93
email: zeng_bin8888@163.com
......@@ -10,7 +10,7 @@ date: 2020-02-02
from gm.api import *
from datetime import datetime
from chan import KlineAnalyze, SolidAnalyze
from czsc import KlineAnalyze, SolidAnalyze
# 在这里设置你的掘金token,用于获取数据
set_token("your gm token")
......
# coding: utf-8
"""
结合 tushare.pro 的数据使用 chan 进行缠论技术分析
结合 tushare.pro 的数据使用 czsc 进行缠论技术分析
author: zengbin93
email: zeng_bin8888@163.com
......@@ -10,7 +10,7 @@ date: 2020-02-02
import tushare as ts
from datetime import datetime, timedelta
from chan import KlineAnalyze, SolidAnalyze
from czsc import KlineAnalyze, SolidAnalyze
# 首次使用,需要在这里设置你的 tushare token,用于获取数据;在同一台机器上,tushare token 只需要设置一次
# 没有 token,到 https://tushare.pro/register?reg=7 注册获取
......
......@@ -7,7 +7,7 @@ import time
import pandas as pd
from datetime import datetime
from apscheduler.schedulers.blocking import BlockingScheduler
from chan import SolidAnalyze
from czsc import SolidAnalyze
# 企业微信群聊机器人 web hook
hook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=******"
......
......@@ -3,8 +3,8 @@
交易模拟器,用于研究单标的的买卖点变化过程
"""
import chan
print(chan.__version__)
import czsc
print(czsc.__version__)
import os
import time
......@@ -13,8 +13,8 @@ import pandas as pd
from copy import deepcopy
import tushare as ts
from datetime import datetime, timedelta
from chan import SolidAnalyze, KlineAnalyze
from chan import plot_kline
from czsc import SolidAnalyze, KlineAnalyze
from czsc import plot_kline
# 首次使用,需要在这里设置你的 tushare token,用于获取数据;在同一台机器上,tushare token 只需要设置一次
......
......@@ -7,8 +7,8 @@ from copy import deepcopy
from datetime import timedelta, datetime
from cobra.data.kline import kline_simulator, get_kline
from cobra.data.basic import is_trade_day
from chan import SolidAnalyze, KlineAnalyze
from chan.analyze import is_macd_cross
from czsc import SolidAnalyze, KlineAnalyze
from czsc.analyze import is_macd_cross
data_path = "./data"
if not os.path.exists(data_path):
......
......@@ -3,4 +3,5 @@ mplfinance
tqdm
pandas
tushare
git+git://github.com/zengbin93/cobra.git
\ No newline at end of file
git+git://github.com/zengbin93/cobra.git
matplotlib
# coding: utf-8
from setuptools import setup, find_packages
import chan
import czsc
setup(
name="chan",
version=chan.__version__,
author=chan.__author__,
author_email=chan.__email__,
name="czsc",
version=czsc.__version__,
author=czsc.__author__,
author_email=czsc.__email__,
keywords=["缠论", "技术分析", "A股", "期货"],
description="缠技术分析工具",
long_description="缠论技术分析工具",
description="缠中说禅技术分析工具",
long_description="缠中说禅技术分析工具,源自 http://blog.sina.com.cn/chzhshch",
license="MIT",
url="https://github.com/zengbin93/chan",
url="https://github.com/zengbin93/czsc",
packages=find_packages(exclude=['test', 'images', 'docs']),
include_package_data=True,
install_requires=["pandas", "pyecharts", "mplfinance", "tushare"],
install_requires=["pandas", "pyecharts", "mplfinance", "tushare", "matplotlib"],
classifiers=[
'License :: OSI Approved :: Apache Software License',
......
......@@ -3,11 +3,11 @@ import sys
from cobra.data.kline import get_kline
sys.path.insert(0, '.')
sys.path.insert(0, '..')
import chan
from chan import KlineAnalyze
from chan.analyze import is_bei_chi
import czsc
from czsc import KlineAnalyze
from czsc.analyze import is_bei_chi
print(chan.__version__)
print(czsc.__version__)
def test_bei_chi():
......
......@@ -3,9 +3,9 @@ import sys
from cobra.data.kline import get_klines
sys.path.insert(0, '.')
sys.path.insert(0, '..')
import chan
from chan.solid import SolidAnalyze, nested_intervals, is_in_tolerance
print(chan.__version__)
import czsc
from czsc.solid import SolidAnalyze, is_in_tolerance
print(czsc.__version__)
def test_in_tolerance():
......@@ -22,11 +22,6 @@ def test_solid_analyze():
klines = get_klines(ts_code, end_date='2020-04-03 14:00:00', asset='I', freqs='1min,5min,30min,D')
sa = SolidAnalyze(klines)
ka = sa.kas['30分钟']
ka1 = sa.kas['日线']
ka2 = sa.kas['5分钟']
print(nested_intervals(ka, ka1, ka2))
# for func in [sa.is_first_buy, sa.is_first_sell, sa.is_second_buy, sa.is_second_sell,
# sa.is_third_buy, sa.is_third_sell, sa.is_xd_buy, sa.is_xd_sell]:
# for freq in ['1分钟', '5分钟', '30分钟']:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册