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

量化交易吧 /  数理科学 帖子:3364716 新帖:3

A股市场低开现象研究

K线达人发表于:6 月 19 日 12:00回复(1)

引言¶

研究目的:¶

本文参考华泰证券量化择时系列研报《A股市场低开现象研究》内容,对动量因子进行创新性的探索。对于股票市场的每日涨跌,可以将其分解为今开与昨收之间的跳价部分和今收与今开之间的日内连续部分。分解为这两部分之后可以发现,A股主要指数的跳价部分常常为负,其累积收益稳定为负值,存在显著的低开现象。对于“低开现象”的收益来源,我们猜测可能和A股市场“T+1”的交易制度、个人投资者为主的投资者结构有关。

研究思路:¶

【1】收益分解:将标的证券每日收益分解为今开与昨收之间的跳价部分和今收与今开之间的日内连续部分,观察跳价现象在A股市场的存在性。

【2】行业分解:根据收益分解部分内容思路将A股按照申万一级行业划分,设定阈值观察跳价现象在行业上的分布特征。

【3】价值曲线:基于跳价现象构建半仓t+0策略,即在第0天开盘买入半仓持有,第1天开盘买入剩下的半仓,并在收盘时将第0天买入的半仓卖出,以此类推构建策略,观察不同证券收益曲线。

研究结论:¶

【1】低开现象在我国A股市场中广泛存在。

【2】在跳价现象的行业分布上,房地产,综合,钢铁,商业贸易相对明显,而银行,电气设备,机械设备,计算机相对不明显。

【3】在考虑了手续费以及印花税后,大部分跳价收益会被抹平,只有少数表现最好的股票能够获取超额收益。高昂的手续费以及印花税让半仓t+0这种较为高频的交易策略难以获得超额收益。

研究周期:¶

2007.1 ~ 2019.6

注:¶

**对于收益分解以及半仓t+0策略的构造详见下文。

from jqdata import *
import numpy as np
import pandas as pd
import math
#交易日获取函数
def get_trade_day_list(start_date, end_date):
    date_df = get_price('000001.XSHG', start_date = start_date, end_date = end_date)
    date_list = []
    for item in list(date_df.index):
        item = str(item)
        y = int(item[0:4])
        m = int(item[5:7])
        d = int(item[8:10])
        date_list.append(datetime.date(y,m,d))
    return date_list

收益分解:¶

A股市场每个交易日从上午九点交易到下午三点,中午十一点半到一点休市,共交易4个小时,通过9:15至9:25的集合竞价形成开盘价。由于交易时间非连续,一些重要信息会在非交易时间发布,同时海外市场的交易时间也与A股不同,这样容易造成A股开盘价与前一日收盘价的差异也就是所谓的“跳开”。我们的研究发现A股的“跳开”存在一定的规律,低开的现象非常明显。

对于每日收益率而言,我们计算的都是收盘价与昨日收盘价之间的涨跌幅,考虑到交易连续与非连续的差别,将每日收益率分解为连续交易的日内收益与非连续交易的日间收益两部分,这里我们以对数收益率分解收益。

ln ( close_price_1 / close_price_0 ) = ln ( open_price_1 / close_price_0 ) + ln ( close_price_1 / open_price_1 )

日间收益(或者说跳价收益)部分指的是当天的开盘价对前一天收盘价的对数收益,日内收益部分指的是当天的收盘价对当天开盘价的对数收益,下文中我们分别对上证50,沪深300,中证500指数进行了收益分解工作。

观察图表我们可以发现,在上证50,沪深300,中证500中均存在显著的跳价收益,接下来我们将在考虑交易费用后再对这一结论进行充实。

#累计对数收益率计算函数
def return_sort(stock, date_list):
    trade_day_list = list(get_all_trade_days())
    total = 0
    daytime = 0
    nighttime = 0
    return_df = pd.DataFrame()
    for day in date_list:
        location = trade_day_list.index(day)
        start_day = trade_day_list[location - 1]
        price_df = get_price(stock, start_date = start_day, end_date = day)
        close_t0 = price_df.loc[start_day, 'close']
        close_t1 = price_df.loc[day, 'close']
        open_t1 = price_df.loc[day, 'open'] 
        total_return = math.log(close_t1 / close_t0)
        day_return = math.log(close_t1 / open_t1)
        night_return = math.log(open_t1 / close_t0)  
        delta_price = []
        total = total + total_return
        delta_price.append(total)
        daytime = daytime + day_return
        delta_price.append(daytime)
        nighttime = nighttime + night_return
        delta_price.append(nighttime)
        return_df[day] = delta_price
    return_df = return_df.T
    return_df.columns = ['total', 'day', 'night']
    return return_df
#交易日列表
trade_day_list = get_trade_day_list(datetime.date(2007,1,16),datetime.date(2019,6,13))
#上证50累计对数分解收益
SZ50_df = return_sort('000016.XSHG', trade_day_list)
SZ50_df.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f36486c0940>
#沪深300累计对数分解收益
HS300_df = return_sort('000300.XSHG', trade_day_list)
HS300_df.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f3648811e80>
#中证500累计对数分解收益
ZZ500_df = return_sort('000905.XSHG', trade_day_list)
ZZ500_df.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f3648627588>

行业分布¶

基于上一部分的对数分解收益,我们将A股所有股票进一步按照申万一级行业进行区分,设定阈值对每一个行业低开现象显著的股票比例进行计算后排名,观察低开现象在行业上的分布情况,在这里我们将阈值设定为年化的-0.15。

观察图表我们可以发现,跳价现象的行业分布上,房地产,综合,钢铁,商业贸易相对明显,而银行,电气设备,机械设备,计算机相对不明显。

#个股低开现象比例计算函数
def low_rate_cal(stock_list, trade_day_list, rate):
    count = 0
    total = 0
    for stock in stock_list:
        start_date = get_security_info(stock).start_date
        if start_date <= trade_day_list[0]:
            start_date = trade_day_list[0]
        location = trade_day_list.index(start_date)
        length = len(trade_day_list) - location
        power = length / 250
        low = pow((1+rate), power)
        stock_df = return_sort(stock, trade_day_list[location:])
        night_rate = stock_df.loc[trade_day_list[-1], 'night']
        if night_rate < low:
            count = count + 1
        total = total + 1
    if total != 0:
        rate = count / total
    else:
        rate = 0
    return rate
#行业个股低开比例函数
def industry_rate(industry_name, trade_day_list, rate):
    industry_df = get_industries(name = industry_name)
    industry_list = list(industry_df.index)
    industry_rate_df = pd.DataFrame()
    for industry in industry_list:
        stock_list = get_industry_stocks(industry)
        industry_rate_df[industry_df.loc[industry, 'name']] = [low_rate_cal(stock_list, trade_day_list, rate)]
    return industry_rate_df
#设定阈值并计算该阈值下行业个股低开比例,耗时!
industry_rate_df = industry_rate('sw_l1', trade_day_list, -0.15)
#排序
industry_rate_df = industry_rate_df.T
industry_rate_df = industry_rate_df.sort_values(by = [0], ascending = False)
industry_rate_df = industry_rate_df[industry_rate_df[0] != 0]
#画图
industry_plot_df = industry_rate_df[industry_rate_df[0] != 0]
industry_plot_df.columns = ['rate']
industry_plot_df.plot(kind = 'bar', figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f9b53438>

价值曲线——半仓 t + 0 策略的构建¶

获取A股低开收益的方法最直接的是每日开盘买入、收盘卖出,但是由于T+1交易机制的限制,当日买入的股票无法当日卖出。因此如果想获取这部分收益,需要一部分底仓的存在。所谓半仓策略,即初始仓位里有一半现金和一半股票,每日开盘时现金购入股票,仓位变为满仓,收盘时将仓位中原有的股票卖出,回到半仓状态,如此循环往复。基础操作如下:

【1】初始净值假设为1,定义基准为证券本身

【2】在第一日开盘时买入半仓,第二天开盘时再补至满仓,收盘时卖出一半股票,恢复半仓状态,如此循环往复

【3】计算手续费,印花税下策略净值走势和绩效表现

首先我们测试了上证50,沪深300,中证500指数的等效组合的绩效表现以观察跳价现象在市场中整体的存在性。观察图表可知,整体上交易费用以及印花税会抹平跳价带来的超额收益,甚至将正收益变为负收益。其中尽管印花税是单向的,但由于数值过高,其对于收益的负面影响要大于手续费。

#设置两个仓位获取价值数据
#(买入时万分之三,卖出时万分之三加千分之一印花税)
def value_cal(security, trade_day_list, fee_rate = 0.0003, tax_rate = 0.001):
    value_df = pd.DataFrame()
    price_df = get_price(security, start_date = trade_day_list[0], end_date = trade_day_list[-1], fields = ['open', 'close'])
    price_df = price_df.dropna()
    value_df['benchmark'] = price_df['close'] / price_df.loc[price_df.index[0], 'close']
    date_list = list(value_df.index)
    
    value_list_1 = [(1- fee_rate - tax_rate) * price_df.loc[price_df.index[0], 'close']]
    value_list_2 = [price_df.loc[price_df.index[0], 'open']]
    a = 1
    value_list = [value_list_1[0] + value_list_2[0]]
    for date in date_list[1:]:
        location = date_list.index(date)
        last_date = date_list[location - 1]
        if a == 1:
            value_1 = value_list_1[location - 1] * price_df.loc[date, 'close'] * (1 - tax_rate - fee_rate) / price_df.loc[last_date, 'close']
            value_list_1.append(value_1)
            value_2 = value_list_2[location - 1] * price_df.loc[date, 'close'] * (1 - fee_rate) / price_df.loc[date, 'open']
            value_list_2.append(value_2)
            a = 0
        else:
            value_1 = value_list_1[location - 1] * price_df.loc[date, 'close'] * (1 - fee_rate) / price_df.loc[date, 'open']
            value_list_1.append(value_1)
            value_2 = value_list_2[location - 1] * price_df.loc[date, 'close'] * (1 - tax_rate - fee_rate) / price_df.loc[last_date, 'close']
            value_list_2.append(value_2)
            a = 1
        value_list.append(value_1 + value_2)
#    value_df['value_1'] = value_list_1
#    value_df['value_1'] = value_df['value_1'] / value_list_1[0]
#    value_df['value_2'] = value_list_2
#    value_df['value_2'] = value_df['value_2'] / value_list_2[0]
    value_df['value'] = value_list
    value_df['value'] = value_df['value'] / value_list[0]

    return value_df
#上证50指数等效组合价值曲线
SZ50_value = value_cal('000016.XSHG', trade_day_list)
SZ50_value['zero_cost'] = value_cal('000016.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
SZ50_value['fee'] = value_cal('000016.XSHG', trade_day_list, tax_rate = 0)['value']
SZ50_value['tax'] = value_cal('000016.XSHG', trade_day_list, fee_rate = 0)['value']
SZ50_value.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8ca1ac8>
#沪深300指数等效组合价值曲线
HS300_value = value_cal('000300.XSHG', trade_day_list)
HS300_value['zero_cost'] = value_cal('000300.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
HS300_value['fee'] = value_cal('000300.XSHG', trade_day_list, tax_rate = 0)['value']
HS300_value['tax'] = value_cal('000300.XSHG', trade_day_list, fee_rate = 0)['value']
HS300_value.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8c576a0>
#中证500指数等效组合价值曲线
ZZ500_value = value_cal('000905.XSHG', trade_day_list)
ZZ500_value['zero_cost'] = value_cal('000905.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
ZZ500_value['fee'] = value_cal('000905.XSHG', trade_day_list, tax_rate = 0)['value']
ZZ500_value['tax'] = value_cal('000905.XSHG', trade_day_list, fee_rate = 0)['value']
ZZ500_value.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8beb6a0>
#定义股票池内年化超额收益排名函数
def return_rank(stock_index, trade_day_list):
    stock_list = get_index_stocks(stock_index)
    return_df = pd.DataFrame()
    for stock in stock_list:
        value_df = value_cal(stock, trade_day_list)
        value_year_return = pow(value_df.loc[value_df.index[-1], 'value'], (250/len(value_df.index)))
        benchmark_year_return = pow(value_df.loc[value_df.index[-1], 'benchmark'], (250/len(value_df.index)))
        return_df[stock] = [(value_year_return / benchmark_year_return) - 1]       
    return_df = return_df.T
    return_df = return_df.dropna()
    return_df = return_df.sort_values(by = [0], ascending = False)
    return_df.columns = ['ER']
    return return_df

价值曲线——头部股票¶

为了进一步验证调剂收益的可获取性,我们将上证50,沪深300,中证500指数成分股按照年化收益率进行排名,选取头部股票观察收益曲线,在这里我们以中证500的前十只股票为例:

观察图表可知,头部股票确实即使在考虑交易费用后依旧可以获取超额收益,理论上跳价收益可以作为扩大优势股票收益的工具进行使用,其具体使用方式还需要进一步探究。

#上证50个股超额收益排名
SZ50_return_rank = return_rank('000016.XSHG', trade_day_list)
SZ50_return_rank
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
ER
601066.XSHG 0.220766
601336.XSHG 0.126391
603993.XSHG 0.054739
601138.XSHG 0.022589
600048.XSHG 0.017255
601800.XSHG -0.002649
601111.XSHG -0.008054
601211.XSHG -0.023863
601628.XSHG -0.025054
600029.XSHG -0.028194
601688.XSHG -0.042799
600837.XSHG -0.045463
601857.XSHG -0.053393
601601.XSHG -0.053608
601398.XSHG -0.060029
600050.XSHG -0.062897
600028.XSHG -0.068586
600340.XSHG -0.071350
600030.XSHG -0.072502
601818.XSHG -0.077137
601288.XSHG -0.079786
600309.XSHG -0.080648
601988.XSHG -0.081142
600887.XSHG -0.081899
600690.XSHG -0.083665
600276.XSHG -0.084658
600000.XSHG -0.089670
601166.XSHG -0.090649
600703.XSHG -0.092588
601939.XSHG -0.094364
601229.XSHG -0.098207
601989.XSHG -0.099016
600019.XSHG -0.101453
600519.XSHG -0.102404
601668.XSHG -0.109090
601328.XSHG -0.117780
600016.XSHG -0.119565
601390.XSHG -0.126305
600585.XSHG -0.126946
600104.XSHG -0.126983
601088.XSHG -0.128972
601186.XSHG -0.130530
601318.XSHG -0.136055
600036.XSHG -0.136811
600196.XSHG -0.146273
601888.XSHG -0.150497
600031.XSHG -0.152965
601766.XSHG -0.165666
601319.XSHG -0.235635
603259.XSHG -0.421421
#沪深300个股超额收益排名
HS300_return_rank = return_rank('000300.XSHG', trade_day_list)
HS300_return_rank
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
ER
601066.XSHG 0.220766
300033.XSHE 0.150592
601577.XSHG 0.135992
601336.XSHG 0.126391
600383.XSHG 0.119942
603156.XSHG 0.114420
600809.XSHG 0.106390
601225.XSHG 0.102207
002673.XSHE 0.095974
000596.XSHE 0.089911
603799.XSHG 0.088568
600760.XSHG 0.079197
002153.XSHE 0.063220
601881.XSHG 0.062376
300017.XSHE 0.058857
601878.XSHG 0.056622
601901.XSHG 0.056390
300059.XSHE 0.055266
603993.XSHG 0.054739
601108.XSHG 0.046890
601377.XSHG 0.046010
601198.XSHG 0.045528
601555.XSHG 0.040637
601899.XSHG 0.035734
600489.XSHG 0.028471
002460.XSHE 0.024377
601138.XSHG 0.022589
600061.XSHG 0.021613
002120.XSHE 0.021055
600339.XSHG 0.019622
... ...
300122.XSHE -0.168107
601360.XSHG -0.170281
600900.XSHG -0.172251
601298.XSHG -0.172846
002938.XSHE -0.172982
300296.XSHE -0.175339
000333.XSHE -0.176077
300433.XSHE -0.180500
002415.XSHE -0.181215
600118.XSHG -0.182366
601828.XSHG -0.184049
600177.XSHG -0.185500
600170.XSHG -0.186219
600522.XSHG -0.190980
002602.XSHE -0.199438
600068.XSHG -0.201243
300070.XSHE -0.212442
600705.XSHG -0.219197
600089.XSHG -0.228940
002925.XSHE -0.234302
601319.XSHG -0.235635
603019.XSHG -0.238141
603260.XSHG -0.242851
600977.XSHG -0.270750
002044.XSHE -0.302151
603160.XSHG -0.302863
603986.XSHG -0.343745
603259.XSHG -0.421421
601162.XSHG -0.452585
002945.XSHE -0.480387

300 rows × 1 columns

#中证500个股超额收益排名
ZZ500_return_rank = return_rank('000905.XSHG', trade_day_list)
ZZ500_return_rank
.dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; }
ER
002839.XSHE 0.491875
002797.XSHE 0.187259
300253.XSHE 0.166109
600158.XSHG 0.156395
002745.XSHE 0.152181
000025.XSHE 0.141972
002807.XSHE 0.134840
002709.XSHE 0.130462
600393.XSHG 0.111319
600291.XSHG 0.106462
002936.XSHE 0.103479
000563.XSHE 0.090054
002285.XSHE 0.088219
600908.XSHG 0.081874
600280.XSHG 0.075620
601128.XSHG 0.070484
603198.XSHG 0.068276
000537.XSHE 0.066970
600640.XSHG 0.065777
600707.XSHG 0.065733
600022.XSHG 0.065467
300166.XSHE 0.065266
600376.XSHG 0.063674
002155.XSHE 0.055077
300133.XSHE 0.052484
600073.XSHG 0.052031
300324.XSHE 0.051545
300287.XSHE 0.051456
300168.XSHE 0.050896
002690.XSHE 0.049590
... ...
601869.XSHG -0.188069
002051.XSHE -0.188375
300459.XSHE -0.189006
002491.XSHE -0.192290
000027.XSHE -0.194717
600642.XSHG -0.199942
603569.XSHG -0.210581
002465.XSHE -0.217575
601966.XSHG -0.220450
603556.XSHG -0.221530
300450.XSHE -0.223404
002818.XSHE -0.225042
002821.XSHE -0.225226
002920.XSHE -0.239413
601068.XSHG -0.241791
603501.XSHG -0.242982
300376.XSHE -0.244222
601811.XSHG -0.253412
601326.XSHG -0.254869
601611.XSHG -0.258619
603659.XSHG -0.277185
002812.XSHE -0.326627
603712.XSHG -0.335562
002916.XSHE -0.344661
601127.XSHG -0.346876
603056.XSHG -0.353902
603486.XSHG -0.395131
601615.XSHG -0.400603
002946.XSHE -0.402981
002941.XSHE -0.412952

500 rows × 1 columns

#002839.XSHE
S_002839 = value_cal('002839.XSHE', trade_day_list)
S_002839['zero_cost'] = value_cal('002839.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_002839['fee'] = value_cal('002839.XSHE', trade_day_list, tax_rate = 0)['value']
S_002839['tax'] = value_cal('002839.XSHE', trade_day_list, fee_rate = 0)['value']
S_002839.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8e491d0>
#002797.XSHE
S_002797 = value_cal('002797.XSHE', trade_day_list)
S_002797['zero_cost'] = value_cal('002797.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_002797['fee'] = value_cal('002797.XSHE', trade_day_list, tax_rate = 0)['value']
S_002797['tax'] = value_cal('002797.XSHE', trade_day_list, fee_rate = 0)['value']
S_002797.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8a750f0>
#300253.XSHE
S_300253 = value_cal('300253.XSHE', trade_day_list)
S_300253['zero_cost'] = value_cal('300253.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_300253['fee'] = value_cal('300253.XSHE', trade_day_list, tax_rate = 0)['value']
S_300253['tax'] = value_cal('300253.XSHE', trade_day_list, fee_rate = 0)['value']
S_300253.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f8a680f0>
#600158.XSHG
S_600158 = value_cal('600158.XSHG', trade_day_list)
S_600158['zero_cost'] = value_cal('600158.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_600158['fee'] = value_cal('600158.XSHG', trade_day_list, tax_rate = 0)['value']
S_600158['tax'] = value_cal('600158.XSHG', trade_day_list, fee_rate = 0)['value']
S_600158.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f89e0d30>
#002745.XSHE
S_002745 = value_cal('002745.XSHE', trade_day_list)
S_002745['zero_cost'] = value_cal('002745.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_002745['fee'] = value_cal('002745.XSHE', trade_day_list, tax_rate = 0)['value']
S_002745['tax'] = value_cal('002745.XSHE', trade_day_list, fee_rate = 0)['value']
S_002745.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f890e5f8>
#000025.XSHE
S_000025 = value_cal('000025.XSHE', trade_day_list)
S_000025['zero_cost'] = value_cal('000025.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_000025['fee'] = value_cal('000025.XSHE', trade_day_list, tax_rate = 0)['value']
S_000025['tax'] = value_cal('000025.XSHE', trade_day_list, fee_rate = 0)['value']
S_000025.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f88aa6d8>
#002807.XSHE
S_002807 = value_cal('002807.XSHE', trade_day_list)
S_002807['zero_cost'] = value_cal('002807.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_002807['fee'] = value_cal('002807.XSHE', trade_day_list, tax_rate = 0)['value']
S_002807['tax'] = value_cal('002807.XSHE', trade_day_list, fee_rate = 0)['value']
S_002807.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f882a630>
#002709.XSHE
S_002709 = value_cal('002709.XSHE', trade_day_list)
S_002709['zero_cost'] = value_cal('002709.XSHE', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_002709['fee'] = value_cal('002709.XSHE', trade_day_list, tax_rate = 0)['value']
S_002709['tax'] = value_cal('002709.XSHE', trade_day_list, fee_rate = 0)['value']
S_002709.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f87a0198>
#600393.XSHG
S_600393 = value_cal('600393.XSHG', trade_day_list)
S_600393['zero_cost'] = value_cal('600393.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_600393['fee'] = value_cal('600393.XSHG', trade_day_list, tax_rate = 0)['value']
S_600393['tax'] = value_cal('600393.XSHG', trade_day_list, fee_rate = 0)['value']
S_600393.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f871e828>
#600291.XSHG
S_600291 = value_cal('600291.XSHG', trade_day_list)
S_600291['zero_cost'] = value_cal('600291.XSHG', trade_day_list, fee_rate = 0, tax_rate = 0)['value']
S_600291['fee'] = value_cal('600291.XSHG', trade_day_list, tax_rate = 0)['value']
S_600291['tax'] = value_cal('600291.XSHG', trade_day_list, fee_rate = 0)['value']
S_600291.plot(figsize = (20,12))
<matplotlib.axes._subplots.AxesSubplot at 0x7f35f864f940>
 

全部回复

0/140

量化课程

    移动端课程