{"id":21396114,"url":"https://github.com/songjian/economic-data-tools","last_synced_at":"2025-03-16T14:41:49.234Z","repository":{"id":49832208,"uuid":"472646631","full_name":"songjian/economic-data-tools","owner":"songjian","description":"经济数据工具","archived":false,"fork":false,"pushed_at":"2023-04-24T07:59:29.000Z","size":228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T22:48:36.301Z","etag":null,"topics":["quantification"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/economic-data-tools/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/songjian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-22T06:50:43.000Z","updated_at":"2022-04-02T01:33:18.000Z","dependencies_parsed_at":"2024-11-22T21:16:10.784Z","dependency_job_id":null,"html_url":"https://github.com/songjian/economic-data-tools","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":"0.016129032258064502","last_synced_commit":"2cc4a9c2e032c38420f2420570ca8a36332d6d10"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songjian%2Feconomic-data-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songjian%2Feconomic-data-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songjian%2Feconomic-data-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songjian%2Feconomic-data-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/songjian","download_url":"https://codeload.github.com/songjian/economic-data-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885886,"owners_count":20363643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["quantification"],"created_at":"2024-11-22T14:25:05.420Z","updated_at":"2025-03-16T14:41:49.211Z","avatar_url":"https://github.com/songjian.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 经济数据工具\n\n## 数据源\n\n* 上海证券交易所(http://www.sse.com.cn/)\n* 深证证券交易所(http://www.szse.cn/)\n* 中国外汇交易中心(https://www.chinamoney.com.cn/)\n* 新浪财经(https://finance.sina.com.cn/)\n* 网易财经(https://money.163.com/)\n* 华尔街见闻(https://wallstreetcn.com/)\n\n## 使用方法\n\n\n\n### 例4：使用新浪财经获取伦敦金和WTI纽约原油\n\n```bash\n$ python -m sina_finance hf_XAU,hf_CL\nvar hq_str_hf_XAU=\"1913.02,1922.580,1913.02,1913.28,1929.23,1889.98,23:35:51,1922.58,1923.19,0,0,0,2022-03-29,伦敦金（现货黄金）\";\nvar hq_str_hf_CL=\"102.454,,102.900,102.920,107.840,98.440,23:36:59,105.960,103.470,274556.000,1,2,2022-03-29,WTI纽约原油,285553\";\n```\n\n### 例6：新浪财经获取资产负债表\n\n```bash\n$ python -m sina_finance 601318 --zcfzb\n```\n\n指定资产负债表年份\n\n```bash\n$ python -m sina_finance 601318 --zcfzb --year 2020\n报表日期 2020-12-31 2020-09-30 2020-06-30 2020-03-31 \n货币资金 52,630,100.00 50,849,700.00 47,383,200.00 51,504,800.00 \n拆出资金 7,099,600.00 9,879,700.00 8,381,800.00 4,955,100.00 \n交易性金融资产 123,133,100.00 106,041,300.00 104,284,900.00 103,236,700.00 \n衍生金融资产 3,766,100.00 3,165,000.00 3,575,000.00 4,056,400.00 \n买入返售金融资产 12,276,500.00 9,291,700.00 9,389,600.00 9,345,400.00 \n应收保费 9,400,300.00 9,811,400.00 9,590,100.00 9,279,900.00 \n应收利息 -- -- -- -- \n应收分保账款 1,184,000.00 1,386,400.00 1,215,900.00 1,411,200.00 \n应收分保未到期责任准备金 -- -- -- -- \n应收分保未决赔款准备金 -- -- -- -- \n应收分保寿险责任准备金 -- -- -- -- \n应收分保长期健康险责任准备金 -- -- -- -- \n保户质押贷款 16,138,100.00 15,670,200.00 15,231,700.00 14,790,100.00 \n可供出售金融资产 -- -- -- -- \n持有至到期投资 262,484,800.00 257,035,700.00 245,421,700.00 234,216,900.00 \n长期股权投资 26,781,900.00 23,668,500.00 22,358,500.00 21,343,400.00 \n存出资本保证金 1,256,100.00 1,261,100.00 1,257,000.00 1,251,000.00 \n应收款项类投资 -- -- -- -- \n固定资产 4,184,900.00 4,130,300.00 4,155,500.00 4,166,500.00 \n无形资产 2,749,000.00 2,856,700.00 2,783,200.00 2,732,400.00 \n商誉 2,303,100.00 2,122,400.00 2,085,900.00 2,091,400.00 \n独立账户资产 5,305,900.00 5,087,300.00 5,039,800.00 4,538,400.00 \n递延所得税资产 6,190,100.00 5,624,300.00 5,621,900.00 5,337,100.00 \n投资性房地产 5,715,400.00 5,140,200.00 5,321,400.00 5,411,200.00 \n定期存款 25,351,800.00 25,326,500.00 24,670,600.00 24,421,200.00 \n其他资产 18,448,900.00 20,318,400.00 21,694,900.00 20,784,400.00 \n资产总计 952,787,000.00 913,831,800.00 884,863,100.00 866,295,200.00 \n短期借款 13,475,300.00 11,581,100.00 11,869,200.00 10,511,600.00 \n拆入资金 4,133,400.00 6,215,800.00 3,929,600.00 2,689,600.00 \n交易性金融负债 3,721,700.00 5,668,100.00 7,646,400.00 7,749,400.00 \n衍生金融负债 4,857,900.00 4,298,400.00 4,637,700.00 4,865,600.00 \n卖出回购金融资产款 27,660,200.00 31,172,300.00 22,998,900.00 22,634,000.00 \n预收账款 -- -- -- -- \n预收保费 4,844,200.00 1,655,000.00 1,689,600.00 1,776,000.00 \n应付手续费及佣金 1,000,100.00 1,113,300.00 1,155,400.00 1,085,200.00 \n应付分保账款 1,599,100.00 1,771,700.00 1,645,800.00 1,875,700.00 \n应付职工薪酬 4,349,500.00 4,039,300.00 3,529,000.00 3,250,800.00 \n应交税费 2,606,000.00 2,703,900.00 2,312,500.00 3,102,400.00 \n应付利息 -- -- -- -- \n应付赔付款 6,509,400.00 6,358,100.00 6,273,100.00 6,140,000.00 \n应付保单红利 6,380,600.00 6,346,600.00 6,304,200.00 6,192,000.00 \n保户储金及投资款 76,897,500.00 75,328,100.00 73,658,200.00 72,402,200.00 \n未到期责任准备金 -- -- -- -- \n未决赔款准备金 -- -- -- -- \n寿险责任准备金 -- -- -- -- \n长期健康险责任准备金 -- -- -- -- \n长期借款 20,582,400.00 21,046,300.00 21,625,400.00 21,395,500.00 \n应付债券 90,128,500.00 82,497,300.00 78,582,500.00 67,741,900.00 \n独立账户负债 5,305,900.00 5,087,300.00 5,039,800.00 4,538,400.00 \n递延所得税负债 1,926,700.00 871,800.00 1,574,100.00 1,725,700.00 \n预计负债 -- -- -- -- \n其他负债 26,930,900.00 26,760,000.00 25,642,700.00 23,279,100.00 \n负债合计 853,996,500.00 820,268,700.00 792,646,000.00 775,772,300.00 \n股本 1,828,000.00 1,828,000.00 1,828,000.00 1,828,000.00 \n资本公积金 13,447,400.00 12,817,600.00 12,528,500.00 12,421,400.00 \n其他综合收益 -682,900.00 -1,336,400.00 162,000.00 986,200.00 \n盈余公积金金 1,216,400.00 1,216,400.00 1,216,400.00 1,216,400.00 \n未分配利润 52,167,700.00 49,736,900.00 47,765,400.00 45,954,900.00 \n一般风险准备 8,878,900.00 7,303,900.00 7,296,400.00 7,212,200.00 \n外币报表折算差额 -- -- -- -- \n归属于母公司的股东权益合计 76,256,000.00 70,966,900.00 70,197,200.00 69,019,600.00 \n少数股东权益 22,534,500.00 22,596,200.00 22,019,900.00 21,503,300.00 \n所有者权益合计 98,790,500.00 93,563,100.00 92,217,100.00 90,522,900.00 \n负债及股东权益总计 952,787,000.00 913,831,800.00 884,863,100.00 866,295,200.00 \n```\n\n### 例7：从华尔街见闻获得世界主要国家国债收益率\n\n```bash\n$ python -m wallstreetcn\nCN10YR CN10YR.OTC 中国10年期国债收益率 CN10YR 2.817 3 2.817 2.854 2.806 3.246 2.674 1648799746 2.823 0.006 0.23 forexdata ENDTR 0\nUS10YR US10YR.OTC 美国10年期国债收益率 US10YR 2.325 3 2.325 2.456 2.352 2.555 1.138 1648846795 2.386 0.061 2.62 forexdata ENDTR 0\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongjian%2Feconomic-data-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsongjian%2Feconomic-data-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongjian%2Feconomic-data-tools/lists"}