Git Product home page Git Product logo

Comments (12)

rainx avatar rainx commented on July 23, 2024 1

更新了一下字段的标题,并且增加了category字段,区分类型, 至于 “送转股 分红 配股 配股价 “ 这些,应该是根据后面的字段和类别可以算出来了,由于我这边金融的公式了解的还不算多,所以还没有加,等后续理解了每个公式的含义后再追加一下

    year  month  day  category  panqianliutong  panhouliutong  qianzongguben  \
0   2001      1    4         5     4200.000000    9200.000000        33000.0   
1   2001      3   30         5     9200.000000   10000.000000        33000.0   
2   2001      6    8         1     4098.000000       0.000000            0.0   
3   2002      5   20         1     2434.006250       0.000000            0.0   
4   2003      5   29         1     1218.003125       0.000000            0.0   
5   2004      6    1         1        2.000000       0.000000            0.0   
6   2005      7   11         1     2050.000000     520.000000            0.0   
7   2005      7   12         2    10000.000000   20000.000000        33000.0   
8   2006      1   16         1        0.000000    4098.000000            0.0   
9   2006      1   16         5    20000.000000   26000.000000        66000.0   
10  2006      7   21         1    19456.503125       0.000000            0.0   
11  2007      1   16         5    26000.000000   26100.800781        66000.0   
12  2007      5   25         1     6400.502344       0.000000            0.0   
13  2008      3   26         1        0.400000       0.000000            0.0   
14  2008      5   22         5    26100.800781   26100.800781        66000.0   
15  2009      1   16         5    26100.800781   66000.000000        76000.0   
16  2009      5   11         1        0.300000    1032.000000            0.0   
17  2009      5   12         9    66000.000000  145200.000000        76000.0   
18  2009      5   22         5   145200.000000  160600.000000       167200.0   
19  2010      6    2         1        0.500000       0.000000            0.0   
20  2011      5   16         1     6400.502344       0.000000            0.0   
21  2011      5   23         5   160600.000000  167200.000000       167200.0   
22  2012      6   12         1        0.500000       0.000000            0.0   
23  2013      6   13         1     6400.502344       0.000000            0.0   
24  2014      6   18         1        0.500000       0.000000            0.0   
25  2015      6   12         1    77824.125781       0.000000            0.0   
26  2016      5   18         1        0.300000       0.000000            0.0   
27  2017      6   16         1    77824.125781       0.000000            0.0   

    houzongguben  
0        33000.0  
1        33000.0  
2            0.0  
3            0.0  
4            0.0  
5            0.0  
6            0.0  
7        66000.0  
8            0.0  
9        66000.0  
10           0.0  
11       66000.0  
12           0.0  
13           0.0  
14       76000.0  
15       76000.0  
16           0.0  
17      167200.0  
18      167200.0  
19           0.0  
20           0.0  
21      167200.0  
22           0.0  
23           0.0  
24           0.0  
25           0.0  
26           0.0  
27           0.0  
--------------------

from pytdx.

zfsamzfsam avatar zfsamzfsam commented on July 23, 2024 1

能否提供通过除息除权信息去算出前复权价格的API?

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

事实上可能是有些丢失字段? 总之 应该标题不是那个songguprice这些 而是前后流通盘大小 @rainx

from pytdx.

rainx avatar rainx commented on July 23, 2024

@yutiansut 嗯嗯,这些字段之前主要参照tradex里面相对应的字段取值,的确具体的含义没有深究.. 而且有写字节的确跳过解析了

            pos += 1 #skip a byte
            year, month, day, hour, minite, pos = get_datetime(9, body_buf, pos)
            pos += 1 #skip a byte

主要是在日期解析前后分别跳过了一个字节,不过还无法确认具体的含义..
之前一直没有安装通达信的软件,我今天争取结合你给的信息再检查一下,然后把名称这边也纠正一下

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@rainx 大大效率好高~~~ 赞~~(≧▽≦)/~

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

因为目前pytdx没法直接拿到前复权的价格,所以只能通过这些信息去算出复权价格

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

继续更新:

和通达信数据对比后 category应该代表这几个
"""
category:
1 : 除息除权
2 : 送配股上市
3 : 非流通股上市
5 : 股本变化
9 : 转配股上市

"""

from pytdx.

codingoc avatar codingoc commented on July 23, 2024

请问如何通过除权除息信息去计算前复权的价格呢

from pytdx.

rainx avatar rainx commented on July 23, 2024

@yutiansut 修复了 category == 1 和 category == 11 时出错的字段..
增加了:
fenhong peigujia songzhuangu peigu suogu

/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/rainx/dev/pytdx/pytdx/parser/get_xdxr_info.py
    year  month  day  category  fenhong  peigujia  songzhuangu  peigu suogu  \
0   2001      1    4         5      NaN       NaN          NaN    NaN  None   
1   2001      3   30         5      NaN       NaN          NaN    NaN  None   
2   2001      6    8         1      3.0       0.0          0.0    0.0  None   
3   2002      5   20         1      2.6       0.0          0.0    0.0  None   
4   2003      5   29         1      2.3       0.0          0.0    0.0  None   
5   2004      6    1         1      2.0       0.0          0.0    0.0  None   
6   2005      7   11         1      2.5       0.0         10.0    0.0  None   
7   2005      7   12         2      NaN       NaN          NaN    NaN  None   
8   2006      1   16         1      0.0       0.0          3.0    0.0  None   
9   2006      1   16         5      NaN       NaN          NaN    NaN  None   
10  2006      7   21         1      0.8       0.0          0.0    0.0  None   
11  2007      1   16         5      NaN       NaN          NaN    NaN  None   
12  2007      5   25         1      0.6       0.0          0.0    0.0  None   
13  2008      3   26         1      0.4       0.0          0.0    0.0  None   
14  2008      5   22         5      NaN       NaN          NaN    NaN  None   
15  2009      1   16         5      NaN       NaN          NaN    NaN  None   
16  2009      5   11         1      0.3       0.0         12.0    0.0  None   
17  2009      5   12         9      NaN       NaN          NaN    NaN  None   
18  2009      5   22         5      NaN       NaN          NaN    NaN  None   
19  2010      6    2         1      0.5       0.0          0.0    0.0  None   
20  2011      5   16         1      0.6       0.0          0.0    0.0  None   
21  2011      5   23         5      NaN       NaN          NaN    NaN  None   
22  2012      6   12         1      0.5       0.0          0.0    0.0  None   
23  2013      6   13         1      0.6       0.0          0.0    0.0  None   
24  2014      6   18         1      0.5       0.0          0.0    0.0  None   
25  2015      6   12         1      0.2       0.0          0.0    0.0  None   
26  2016      5   18         1      0.3       0.0          0.0    0.0  None   
27  2017      6   16         1      0.2       0.0          0.0    0.0  None   

    panqianliutong  panhouliutong  qianzongguben  houzongguben  
0      4200.000000    9200.000000        33000.0       33000.0  
1      9200.000000   10000.000000        33000.0       33000.0  
2              NaN            NaN            NaN           NaN  
3              NaN            NaN            NaN           NaN  
4              NaN            NaN            NaN           NaN  
5              NaN            NaN            NaN           NaN  
6              NaN            NaN            NaN           NaN  
7     10000.000000   20000.000000        33000.0       66000.0  
8              NaN            NaN            NaN           NaN  
9     20000.000000   26000.000000        66000.0       66000.0  
10             NaN            NaN            NaN           NaN  
11    26000.000000   26100.800781        66000.0       66000.0  
12             NaN            NaN            NaN           NaN  
13             NaN            NaN            NaN           NaN  
14    26100.800781   26100.800781        66000.0       76000.0  
15    26100.800781   66000.000000        76000.0       76000.0  
16             NaN            NaN            NaN           NaN  
17    66000.000000  145200.000000        76000.0      167200.0  
18   145200.000000  160600.000000       167200.0      167200.0  
19             NaN            NaN            NaN           NaN  
20             NaN            NaN            NaN           NaN  
21   160600.000000  167200.000000       167200.0      167200.0  
22             NaN            NaN            NaN           NaN  
23             NaN            NaN            NaN           NaN  
24             NaN            NaN            NaN           NaN  
25             NaN            NaN            NaN           NaN  
26             NaN            NaN            NaN           NaN  
27             NaN            NaN            NaN           NaN  

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

@rainx 🥇 赞赞赞 💯 👍

from pytdx.

zzeric avatar zzeric commented on July 23, 2024

有了权息数据,就可以自行计算除权因子了,不需要用爬虫去同花顺抓取

from pytdx.

yutiansut avatar yutiansut commented on July 23, 2024

是的

from pytdx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.