请 [注册] 或 [登录]  | 返回主站

量化交易吧 /  量化平台 帖子:3354525 新帖:22

【API解析】有关数据获取方法

EA发表于:5 月 9 日 19:48回复(1)

1.目前提供哪些数据

JQData提供哪些数据

数据更新时间

举个例子:
Img

2.目前有哪些数据获取方法

API:数据获取函数

2.1行情类:

2.1.1 通用

函数名 取数类型 返回类型
get_price 多标的、多字段 DataFrame
get_bars 多标的、多字段 numpy.ndarray
get_extras 多标的、单字段(基金单位/累计净值,期货结算价/持仓量,ST等) DataFrame / Dict

具体字段查看SecurityUnitData

2.1.2 回测/模拟交易专用

函数名 取数类型 返回类型
history 多标的、单字段 DataFrame / Dict
attribute_history 单标的、多字段 DataFrame / Dict
get_current_data 单标的、多字段 Dict

2.2 财务数据类

  • get_fundamentals 返回一个DataFrame

  • get_fundamentals_continuously 返回一个pandas.Panel

财务数据文档

2.4 其他股票数据

  • get_billboard_list 获取龙虎榜数据

  • get_locked_shares 获取限售解禁数据

其他函数详见API

2.3 数据库数据

  • finance 股票/基金/舆论/行业行情等数据
股票 期货 场外公募基金 行业指数
国际指数行情 雪球热度数据 新闻联播文本数据 ---
  • opt 期权数据

  • macro 宏观经济数据

  • jy 聚源数据

    查询聚源数据的简单例子

2.4 因子类

2.2.1 聚宽因子库

  • get_all_factors 获取聚宽因子库中所有因子的信息

  • get_factor_values 质量、基础、情绪、成长、风险、每股等数百个因子数据

    因子库文档

  • get_factor_kanban_values 获取因子看板列表数据

Alpha 101 因子

alpha101

Alpha 191 因子

alpha191

技术分析指标

technical_analysis

3.Query方法

基本的查询方式

  • query() 填写需要查询的对象,可以是整张表,也可以是表中的多个字段或计算出的结果
  • filter 填写过滤条件,多个过滤条件可以用逗号隔开,或者用and,or这样的语法
    • in_ 判断某个字段的值是否在列表之中(一般用于查询多个标的)
  • order_by() 填写排序条件
    • .desc() 降序排列
    • .asc() 升序排列
  • limit() 限制返回的个数
  • group_by() 分组统计

详细说明见Query对象的简单使用教程

4.JQData获取数据所需时间

4.1研究环境

Img

# get_price
stocks = get_all_securities('stock').index.tolist()
dt = datetime.datetime.now()
%time df = get_price(stocks, end_date=dt, count=1).iloc[:,0,:]

# get_bars
%time ar = get_bars(stocks,end_dt=dt,count=1) #仅JQData支持

%time
for st in stocks:
    get_bars(st,end_dt=dt,count=1)

Img

# 查询财务数据
%time
q = query(
        valuation, income
    ).filter(
        # 这里不能使用 in 操作, 要使用in_()函数
        valuation.code.in_(['000001.XSHE', '600000.XSHG']))

get_fundamentals(q,statDate='2018')

4.2 回测/模拟交易

4.2.1 利用性能分析 enable_proile()计算

Img

# 打开性能分析
enable_profile()
import datetime
# 导入函数库
from jqdata import *

# 初始化函数,设定基准等等
def initialize(context):
    run_daily(func1, time='open', reference_security='000300.XSHG')
    g.security = get_all_securities('stock').index.tolist()
    g.time = datetime.datetime.now()

## 开盘时运行函数
def func1(context):
    security = g.security

    ## 获取交易行情
    # 多标的、多字段
    pr1 = get_price(security, end_date=context.current_dt, frequency='1d',fields = ['open', 'close'], count=1)

    his1 = history(count = 1, unit='1d',field='close', security_list=security, df=False)

    his2 = history(count = 1, unit='1d',field='close', security_list=security, df=True)

    bar1 = get_bars(security, count=1, unit='1d', fields=['open', 'close'])

    for st in security:
        get_price(st, end_date=context.current_dt, frequency='1d',fields = ['open', 'close'], count=1)

    for st in security:
        history(count = 1, unit='1d',field='close', security_list=st, df=False)

    for st in security:
        get_bars(st,count=1, unit='1d', fields=['open', 'close'])

    for st in security:
        attribute_history(st, count=1, unit='1d',fields=['open', 'close'],df=False)

    # 单标的、多字段
    pr2 = get_price(security[0], end_date=context.current_dt, frequency='1d',fields = ['open', 'close'], count=1)

    his3 = history(count = 1, unit='1d',field='close', security_list=security[0], df=False)

    bars2 = get_bars(security[0], count=1, unit='1d', fields=['open', 'close'])

    current_data = get_current_data()
    current_data['000001.XSHE'].last_price

    atthis1 = attribute_history(security[0], count=1, unit='1d',fields=['open', 'close'],df=False)

    ## 获取财务数据
    # 查询财务数据
    q = query(
        valuation, income
        ).filter(valuation.code.in_(['000001.XSHE', '600000.XSHG']))

    get_fundamentals(q,statDate='2018')

    ## 计时
    t = datetime.datetime.now()

    print(t - g.time)

4.2.2 利用datatime.datetime.now()计算

在初始化函数中获取并保存第一次时间g.time = datatime.datetime.now(),在需要计时的函数后再次获取时间time_i = datatime.datetime.now(),计算时间差time_i - g.time即可得到该函数耗时,可以通过打印在日志中输出

5.Jqdatasdk获取数据所需时间

Img

6.总结

6.1 数据获取速度总结

  • 在研究环境中获取数据,get_bars速度最快
  • 在回测/模拟交易中获取数据:
    • 获取多条数据时,get_bars(df=False)速度最快,使用循环时,attribute_history速度最快
    • 获取单条数据时,get_current_data速度最快

6.2 小贴示

  • 对于能获取多个标的的API,尽量传入多个标的;

  • 能使用其他非DataFrame格式的尽量使用;

  • 您可以使用性能分析等方式分析策略耗时,并有针对性地优化策略。

7.相关帖子

  • history和attribute_history的区别?

  • JoinQuant 心得——股票行情数据

  • 新手入门:数据提取逻辑

  • 【算命师系列】2:6000倍!平台上最快的取数据方法和最慢的取数据方法之间居然能差6000倍!

数据获取方法¶

import pandas as pd
from jqdata import *

import warnings
warnings.filterwarnings('ignore')

行情类¶

通用¶

get_price 多标的、多字段¶

dt = '2019-04-01'
stocks = get_all_securities('stock',dt).index.tolist()
%time df = get_price(stocks, end_date=dt, count=1).iloc[:,0,:]
CPU times: user 1.71 s, sys: 131 ms, total: 1.84 s
Wall time: 1.85 s

get_bars 多标的、多字段¶

%time ar = get_bars(stocks,end_dt=dt,count=1) #仅JQData支持
CPU times: user 871 ms, sys: 3.99 ms, total: 875 ms
Wall time: 892 ms
%time
for st in stocks:
    get_bars(st,end_dt=dt,count=1)
CPU times: user 4 µs, sys: 0 ns, total: 4 µs
Wall time: 9.54 µs

get_extras 多标的 单字段(基金单位/累计净值,期货结算价/持仓量,ST等)¶

ls = ['000001.XSHE','000002.XSHE','159001.XSHE','A1905.XDCE']
inf = ['is_st', # stock
       'acc_net_value', 'unit_net_value', # fund
       'futures_sett_price', 'futures_positions'] # future
st = get_extras(inf[0], ls[0:2],end_date=dt, df=True, count=1)
fund = get_extras(inf[1],ls[2],end_date=dt,df=True,count=1)
future = get_extras(inf[3],ls[3],end_date=dt,df=True,count=1)
st
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
000001.XSHE 000002.XSHE
2019-04-01 False False
fund
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
159001.XSHE
2019-04-01 2.629
future
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
A1905.XDCE
2019-04-01 3331.0

回测/模拟交易专用¶

history 多标的、单字段

attribute_history 单标的、多字段

get_current_data 单标的、多字段

财务数据类¶

# 查询财务数据
%time
q = query(
        valuation, income
    ).filter(
        # 这里不能使用 in 操作, 要使用in_()函数
        valuation.code.in_(['000001.XSHE', '600000.XSHG']))

get_fundamentals(q,statDate='2018')
CPU times: user 6 µs, sys: 0 ns, total: 6 µs
Wall time: 11 µs
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
id code pe_ratio turnover_ratio pb_ratio ps_ratio pcf_ratio capitalization market_cap circulating_cap circulating_market_cap day pe_ratio_lyr id.1 code.1 statDate pubDate statDate.1 total_operating_revenue operating_revenue interest_income premiums_earned commission_income total_operating_cost operating_cost interest_expense commission_expense refunded_premiums net_pay_insurance_claims withdraw_insurance_contract_reserve policy_dividend_payout reinsurance_cost operating_tax_surcharges sale_expense administration_expense financial_expense asset_impairment_loss fair_value_variable_income investment_income invest_income_associates exchange_income operating_profit non_operating_revenue non_operating_expense disposal_loss_non_current_liability total_profit income_tax_expense net_profit np_parent_company_owners minority_profit basic_eps diluted_eps other_composite_income total_composite_income ci_parent_company_owners ci_minority_owners
0 20643607 000001.XSHE 6.5760 0.3358 0.7481 1.4301 4.1653 1717041.125 1610.5846 1717024.625 1610.5691 2018-12-28 6.9455 69861 000001.XSHE 2018-12-31 2019-03-07 2018-12-31 1.167160e+11 1.167160e+11 1.628880e+11 NaN 3.936200e+10 3.654000e+10 NaN 8.814300e+10 8.065000e+09 NaN NaN NaN NaN NaN 1.149000e+09 NaN 3.539100e+10 NaN NaN 892000000.0 9.186000e+09 NaN 2.090000e+08 3.230500e+10 28000000.0 102000000.0 NaN 3.223100e+10 7.413000e+09 2.481800e+10 2.481800e+10 NaN 1.39 1.39 9.120000e+08 2.573000e+10 NaN NaN
1 20645730 600000.XSHG 5.1761 0.0975 0.6761 1.6895 2.7684 2935208.000 2876.5039 2810376.500 2754.1689 2018-12-28 5.3015 70340 600000.XSHG 2018-12-31 2019-03-26 2018-12-31 1.715420e+11 1.715420e+11 2.674880e+11 NaN 4.620500e+10 1.061990e+11 NaN 1.556440e+11 7.196000e+09 NaN NaN NaN NaN NaN 1.852000e+09 NaN 4.309400e+10 NaN NaN 798000000.0 1.476500e+10 164000000.0 1.155000e+09 6.534300e+10 104000000.0 163000000.0 NaN 6.528400e+10 8.769000e+09 5.651500e+10 5.591400e+10 601000000.0 1.85 1.85 6.983000e+09 6.349800e+10 6.289300e+10 605000000.0
# 查询多日的财务数据
q = query(valuation.turnover_ratio,
              valuation.market_cap,
              indicator.eps
            ).filter(valuation.code.in_(['000001.XSHE', '600000.XSHG']))

panel = get_fundamentals_continuously(q, end_date='2018-01-01', count=5)
panel
<class 'pandas.core.panel.Panel'>
Dimensions: 3 (items) x 5 (major_axis) x 2 (minor_axis)
Items axis: turnover_ratio to eps
Major_axis axis: 2017-12-25 to 2017-12-29
Minor_axis axis: 000001.XSHE to 600000.XSHG
panel.minor_xs('600000.XSHG')
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
turnover_ratio market_cap eps
day
2017-12-25 0.0687 3695.4270 0.48
2017-12-26 0.0542 3710.1030 0.48
2017-12-27 0.1165 3704.2324 0.48
2017-12-28 0.0849 3680.7510 0.48
2017-12-29 0.0582 3695.4270 0.48

其他股票数据¶

龙虎榜数据¶

get_billboard_list(stocks, end_date = dt, count =1).head()
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
code day direction rank abnormal_code abnormal_name sales_depart_name buy_value buy_rate sell_value sell_rate total_value net_value amount
0 603956.XSHG 2019-04-01 ALL 0 106004 换手率达20%的证券 None 40024206.57 10.7445 21611165.62 5.8015 61635372.19 18413040.95 372509610.0
1 603956.XSHG 2019-04-01 SELL 4 106004 换手率达20%的证券 东吴证券股份有限公司上海西藏南路证券营业部 NaN NaN 3397111.32 0.9120 3397111.32 -3397111.32 372509610.0
2 603956.XSHG 2019-04-01 BUY 2 106004 换手率达20%的证券 东海证券股份有限公司长沙岳麓大道证券营业部 8571228.57 2.3009 NaN NaN 8571228.57 8571228.57 372509610.0
3 603956.XSHG 2019-04-01 SELL 1 106004 换手率达20%的证券 中国银河证券股份有限公司北京建国路证券营业部 NaN NaN 6887123.35 1.8488 6887123.35 -6887123.35 372509610.0
4 603956.XSHG 2019-04-01 BUY 5 106004 换手率达20%的证券 东海证券股份有限公司长沙韶山北路证券营业部 5218834.00 1.4010 NaN NaN 5218834.00 5218834.00 372509610.0

限售解禁数据¶

get_locked_shares(stocks, start_date=dt, forward_count=500).head()
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
day code num rate1 rate2
0 2019-04-01 603223.XSHG 33600000.0 0.1667 0.2000
1 2019-04-01 603214.XSHG 30202839.0 0.3020 1.2081
2 2019-04-01 603128.XSHG 19850672.0 0.0196 0.0208
3 2019-04-01 603028.XSHG 105231337.0 0.4766 0.9106
4 2019-04-01 601021.XSHG 145000.0 0.0002 0.0002

数据库数据¶

finance¶

# 十大股东

q=query(finance.STK_SHAREHOLDER_TOP10
  ).filter(
        finance.STK_SHAREHOLDER_TOP10.code == "600000.XSHG",
        finance.STK_SHAREHOLDER_TOP10.pub_date >= '2018-12-31'
  ).order_by(
        finance.STK_SHAREHOLDER_TOP10.pub_date.desc()
  ).limit(5)

finance.run_query(q)
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
id company_name company_id code end_date pub_date change_reason_id change_reason shareholder_rank shareholder_name shareholder_name_en shareholder_id shareholder_class_id shareholder_class share_number share_ratio sharesnature_id sharesnature share_pledge_freeze share_pledge share_freeze
0 1829382 上海浦东发展银行股份有限公司 420600000 600000.XSHG 2018-12-31 2019-03-26 306019 定期报告 1 上海国际集团有限公司 Shanghai International Group Co., Ltd. 300015309 307099 其他机构 6.331323e+09 21.57 308025 流通A股和流通受限股份 None None None
1 1829383 上海浦东发展银行股份有限公司 420600000 600000.XSHG 2018-12-31 2019-03-26 306019 定期报告 2 中国移动通信集团广东有限公司 China Mobile Group Guangdong Co., Ltd. 300005039 307099 其他机构 5.334893e+09 18.18 308007 流通A股 None None None
2 1829384 上海浦东发展银行股份有限公司 420600000 600000.XSHG 2018-12-31 2019-03-26 306019 定期报告 3 富德生命人寿保险股份有限公司-传统 Funde Sino Life Insurance Co., Ltd. - Traditional 100123472 307014 保险投资组合 2.779437e+09 9.47 308007 流通A股 None None None
3 1829385 上海浦东发展银行股份有限公司 420600000 600000.XSHG 2018-12-31 2019-03-26 306019 定期报告 4 富德生命人寿保险股份有限公司-资本金 Funde Sino Life Insurance Co., Ltd. - Capital 100137437 307014 保险投资组合 1.763232e+09 6.01 308007 流通A股 None None None
4 1829386 上海浦东发展银行股份有限公司 420600000 600000.XSHG 2018-12-31 2019-03-26 306019 定期报告 5 上海上国投资产管理有限公司 Shanghai Shangguotou Asset Management Co., Ltd. 100113208 307099 其他机构 1.395571e+09 4.75 308007 流通A股 None None None

opt¶

q=query(opt.OPT_CONTRACT_INFO
       ).order_by(opt.OPT_CONTRACT_INFO.expire_date.desc()
                 ).limit(5)

opt.run_query(q)
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
id code trading_code name contract_type exchange_code currency_id underlying_symbol underlying_name underlying_exchange underlying_type exercise_price contract_unit contract_status list_date list_reason list_price high_limit low_limit expire_date last_trade_date exercise_date delivery_date is_adjust delist_date delist_reason
0 13824 RU2003C15250.XSGE None 天胶购3月15250 CO XSGE CNY RU2003.XSGE 沪天胶2003合约 XSGE FUTURE 15250.0 10 LIST 2019-03-18 合约新挂 None 2424.0 1.0 2020-02-24 2020-02-24 None None 0 None None
1 13825 RU2003C15500.XSGE None 天胶购3月15500 CO XSGE CNY RU2003.XSGE 沪天胶2003合约 XSGE FUTURE 15500.0 10 LIST 2019-03-18 合约新挂 None 2368.0 1.0 2020-02-24 2020-02-24 None None 0 None None
2 13826 RU2003C15750.XSGE None 天胶购3月15750 CO XSGE CNY RU2003.XSGE 沪天胶2003合约 XSGE FUTURE 15750.0 10 LIST 2019-03-18 合约新挂 None 2315.0 1.0 2020-02-24 2020-02-24 None None 0 None None
3 13827 RU2003C16000.XSGE None 天胶购3月16000 CO XSGE CNY RU2003.XSGE 沪天胶2003合约 XSGE FUTURE 16000.0 10 LIST 2019-03-18 合约新挂 None 2269.0 1.0 2020-02-24 2020-02-24 None None 0 None None
4 13828 RU2003C16250.XSGE None 天胶购3月16250 CO XSGE CNY RU2003.XSGE 沪天胶2003合约 XSGE FUTURE 16250.0 10 LIST 2019-03-18 合约新挂 None 2225.0 1.0 2020-02-24 2020-02-24 None None 0 None None

macro¶

# 上海银行间同业拆放利率
q = query(macro.MAC_LEND_RATE
         ).filter(macro.MAC_LEND_RATE.market_id == '5',
        ).order_by(macro.MAC_LEND_RATE.day.desc()).limit(5)

macro.run_query(q)
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
id day currency_id market_id term_id interest_rate currency_name
0 987021 2019-04-04 1 5 23 2.906 人民币
1 987024 2019-04-04 1 5 20 1.417 人民币
2 987020 2019-04-04 1 5 14 2.376 人民币
3 987023 2019-04-04 1 5 12 3.047 人民币
4 987022 2019-04-04 1 5 7 2.418 人民币

因子类¶

聚宽因子库¶

from jqfactor import get_all_factors 
# 获取聚宽因子库中所有因子的信息
print(get_all_factors().head()) 
                       factor      ...       category_intro
0  administration_expense_ttm      ...           基础科目及衍生类因子
1   asset_impairment_loss_ttm      ...           基础科目及衍生类因子
2                        EBIT      ...           基础科目及衍生类因子
3                      EBITDA      ...           基础科目及衍生类因子
4       financial_expense_ttm      ...           基础科目及衍生类因子

[5 rows x 4 columns]
from jqfactor import get_factor_values
# 质量、基础、情绪、成长、风险、每股等数百个因子数据
# 获取因子Skewness60(个股收益的60日偏度)从 2017-01-01 至 2017-03-04 的因子值
factor_data = get_factor_values(securities=['000001.XSHE'], factors=['Skewness60'], start_date='2017-01-01', end_date='2017-03-04')
# 查看因子值
factor_data['Skewness60'].head()
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
code 000001.XSHE
2017-01-03 -0.002081
2017-01-04 0.021962
2017-01-05 -0.003263
2017-01-06 -0.007545
2017-01-09 -0.007441
# 获取因子看板列表数据
from jqfactor import get_factor_kanban_values
df = get_factor_kanban_values(universe='hs300',bt_cycle='month_3',
                         model='long_only',category=['quality'])
df.head()
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
date universe bt_cycle category code compound_return_1q compound_return_5q annual_return_1q annual_return_5q max_drawdown_1q max_drawdown_5q sharpe_1q sharpe_5q turnover_mean_1q turnover_mean_5q annual_return_bm ic_mean ir good_ic
0 2019-04-04 hs300 month_3 quality operating_cost_to_operating_revenue_ratio 0.361848 0.300939 2.969988 2.236498 0.038352 0.046835 12.140436 8.950136 0.003571 0.004762 2.299182 -0.018442 -0.233116 0.803571
1 2019-04-04 hs300 month_3 quality financial_expense_rate 0.425024 0.398847 3.860780 3.474657 0.045869 0.049295 15.083800 12.609282 0.001429 0.002150 2.299182 -0.011219 -0.116209 0.821429
2 2019-04-04 hs300 month_3 quality intangible_asset_ratio 0.304671 0.306365 2.278151 2.297204 0.049559 0.040803 8.576084 9.112623 0.001488 0.000298 2.299182 -0.007822 -0.130018 0.714286
3 2019-04-04 hs300 month_3 quality invest_income_associates_to_total_profit 0.280638 0.314116 2.017044 2.385441 0.067890 0.074217 7.734128 7.838341 0.018452 0.022917 2.299182 -0.007334 -0.098196 0.767857
4 2019-04-04 hs300 month_3 quality cash_to_current_liability 0.316702 0.349292 2.415284 2.809170 0.053259 0.046298 9.423543 11.356771 0.010714 0.006195 2.299182 -0.005947 -0.097873 0.714286

alpha101¶

from jqlib.alpha101 import *
#传入一个股票list,获取股票list的alpha_001因子值
a101=alpha_001(dt,'000300.XSHG')
a101.head()
000001.XSHE   -0.423333
000002.XSHE   -0.423333
000063.XSHE   -0.423333
000069.XSHE   -0.423333
000100.XSHE   -0.423333
Name: rank_value_boolean, dtype: float64

alpha191¶

from jqlib.alpha191 import *
a191 = alpha_001(stocks,dt)
a191.head()
000001.XSHE    0.169009
000002.XSHE   -0.067180
000004.XSHE   -1.000000
000005.XSHE   -0.950777
000006.XSHE   -0.382764
dtype: float64

技术分析指标¶

from jqlib.technical_analysis import *

security_list1 = '000001.XSHE'
security_list2 = ['000001.XSHE','000002.XSHE','600001.XSHG','600002.XSHG']

# 计算并输出 security_list1 的 MACD 值
macd_dif, macd_dea, macd_macd = MACD(security_list1,check_date='2017-01-04', SHORT = 12, LONG = 26, MID = 9)
print(macd_dif[security_list1])
print(macd_dea[security_list1])
print(macd_macd[security_list1])

print('-'*20)
# 输出 security_list2 的 MACD 值
macd_dif, macd_dea, macd_macd = MACD(security_list2,check_date='2017-01-04', SHORT = 12, LONG = 26, MID = 9)
for stock in security_list2:
    print(macd_dif[stock])
    print(macd_dea[stock])
    print(macd_macd[stock])
    print('='*20)
-0.06663409333148707
-0.057120768967898014
-0.019026648727178103
--------------------
-0.06663409333148707
-0.057120768967898014
-0.019026648727178103
====================
-1.106615196370992
-1.1518450238134519
0.0904596548849197
====================
0.042721033329423896
0.09561322733906769
-0.10578438801928758
====================
0.12283360382906672
0.1677319794789868
-0.08979675129984016
====================

全部回复

0/140

达人推荐

量化课程

    移动端课程