Beispiel #1
0
    #ss.plot(color='b')
    plt.show()


if __name__ == "__main__":
    global profit, hs300, roe, growth_mbrg, growth_nprg, growth_nav

    profit = getdata.GetProfit('net_profits')
    basic = getdata.GetBasic()['totals']
    roe = getdata.GetProfit('roe')
    growth_mbrg = getdata.GetGrowth('mbrg')
    growth_nprg = getdata.GetGrowth('nprg')

    #growth_nav = getdata.GetGrowth('nav')

    hs300 = getdata.GetHs300()
    zz500 = getdata.GetZz500()

    #retpearray = Series()
    #retpbarray = Series()
    #plotcorrelation()

    #plot use subplot
    #fig, axes = plt.subplots(1,1)
    #plotpe('000538', axes)
    #plt.show()
    #fig, axes = plt.subplots(2,2)

    excludecodelist = download.LoadCodelist('bankcode')
    #codelist = codelist[:-1]  ## skip 000883, since it's not in hs300
    #codelist = ['000001','600036']
Beispiel #2
0
            #print d, ret[d]
            prev = ret[d]
            if firstunzero == 0:
                firstunzero = prev
        else:
            ret[d] = prev

    for d in date:
        if ret[d] == 0:
            ret[d] = firstunzero
    return ret


date = pd.date_range('01/01/2012', end='06/30/2017')
#sz50 = ts.get_sz50s()
sz50 = getdata.GetHs300()
#sz50 = getdata.GetHs300()
#sz50 = sz50.append({'code':'sh', 'name':'index','date': '2016-08-01','weight':0}, ignore_index=True)
sz50code = sz50.index

df = DataFrame(columns=sz50code)
rawdict = {}
namedf = {}

sz50code, nameseries, price, volume = getdata.GetPriceVolume()
corrdf = price.corr()
vvdf = volume.corr()
#print corrdf['000625']['sh']
#print corrdf['000423']['sh']
#print corrdf['000963']['sh']
#codelist = ['000625', '000423', '000963', '600887', '600048', '600066']