{"id":3162,"date":"2025-12-11T07:31:00","date_gmt":"2025-12-10T23:31:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=3162"},"modified":"2025-12-04T16:36:30","modified_gmt":"2025-12-04T08:36:30","slug":"%e9%ab%98%e7%9b%9b%e5%86%85%e9%83%a8%e9%87%8f%e5%8c%96%e5%b7%a5%e5%85%b7%e6%9b%9d%e5%85%89%ef%bc%8c%e5%85%8d%e8%b4%b9%e7%9a%84%e6%b3%95%e6%8b%89%e5%88%a9%e4%bd%a0%e8%bf%98%e4%b8%8d","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/12\/11\/%e9%ab%98%e7%9b%9b%e5%86%85%e9%83%a8%e9%87%8f%e5%8c%96%e5%b7%a5%e5%85%b7%e6%9b%9d%e5%85%89%ef%bc%8c%e5%85%8d%e8%b4%b9%e7%9a%84%e6%b3%95%e6%8b%89%e5%88%a9%e4%bd%a0%e8%bf%98%e4%b8%8d\/","title":{"rendered":"\u9ad8\u76db\u5185\u90e8\u91cf\u5316\u5de5\u5177\u66dd\u5149\uff0c\u514d\u8d39\u7684\u201c\u6cd5\u62c9\u5229\u201d\u4f60\u8fd8\u4e0d\u4e0a\u8f66\uff1f"},"content":{"rendered":"\n<p>\u4f5c\u8005\uff1a<a href=\"https:\/\/www.laoyulaoyu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u8001\u4f59\u635e\u9c7c<\/a><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"383\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/456dadff-2de2-45a4-82c3-79c43e79d6eb.png\" alt=\"\" class=\"wp-image-3163\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/456dadff-2de2-45a4-82c3-79c43e79d6eb.png 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/456dadff-2de2-45a4-82c3-79c43e79d6eb-300x128.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/456dadff-2de2-45a4-82c3-79c43e79d6eb-768x327.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<pre class=\"wp-block-verse\"><strong>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a<\/strong>\u90a3\u4e2a\u5728\u534e\u5c14\u8857\u7ffb\u4e91\u8986\u96e8\u7684\u9ad8\u76db\uff0c\u5c45\u7136\u628a\u5b83\u5185\u90e8\u6838\u5fc3\u7684\u91cf\u5316\u5206\u6790\u5de5\u5177GS-Quant\u7ed9\u5f00\u6e90\u4e86\uff01\u6211\u53d1\u73b0\u8fd9\u4e1c\u897f\u4e0d\u4ec5\u529f\u80fd\u5f3a\u5927\u5230\u6ca1\u670b\u53cb\uff0c\u800c\u4e14\u5bf9\u54b1\u4eec\u666e\u901a\u4eba\u6781\u5176\u53cb\u597d\u3002<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u60f3\u77e5\u9053\u9876\u7ea7\u6295\u884c\u7684\u7cbe\u82f1\u4eec\u662f\u600e\u4e48\u505a\u91cf\u5316\u4ea4\u6613\u7684\u5417\uff1f\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u5e26\u4f60\u4e00\u63a2\u7a76\u7adf\uff0c\u624b\u628a\u624b\u6559\u4f60\u600e\u4e48\u7528\u4e0a\u534e\u5c14\u8857\u7684\u201c\u79d8\u5bc6\u6b66\u5668\u201d<\/mark>\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>01 \u4e3a\u5565\u8fde\u9ad8\u76db\u90fd\u6562\u628a\u201c\u5403\u996d\u5bb6\u4f19\u201d\u5f00\u6e90\uff1f<\/strong><\/h2>\n\n\n\n<p>\u5148\u7ed9\u65b0\u670b\u53cb\u79d1\u666e\u4e00\u4e0b\uff0c<strong>GS-Quant<\/strong>\uff0c\u5168\u540d\u53eb<em>Goldman Sachs Quantitative Toolkit<\/em>\uff0c\u7ffb\u8bd1\u8fc7\u6765\u5c31\u662f\u201c\u9ad8\u76db\u91cf\u5316\u5de5\u5177\u5305\u201d\u3002\u53bb\u5e74\u76f4\u63a5\u4e0a\u4f20\u5230GitHub\uff0cMIT \u534f\u8bae\uff0c\u968f\u4fbf\u5546\u7528\u3002<\/p>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u628a\u5b83\u60f3\u8c61\u6210\u4e00\u4e2a\u88c5\u6ee1\u4e86\u5404\u79cd\u201c\u8d85\u80fd\u529b\u201d\u7684\u79ef\u6728\u76d2\u3002\u6bcf\u4e00\u5757\u79ef\u6728\uff0c\u90fd\u662f\u9ad8\u76db\u9876\u7ea7\u7684\u6570\u5b66\u5bb6\u3001\u7a0b\u5e8f\u5458\u548c\u4ea4\u6613\u5458\u4eec\uff0c\u82b1\u4e86\u65e0\u6570\u5fc3\u8840\u6253\u9020\u51fa\u6765\u7684\u5206\u6790\u5de5\u5177\u3002\u4ee5\u524d\uff0c\u8fd9\u4e2a\u201c\u79ef\u6728\u76d2\u201d\u8fc7\u53bb\u53ea\u6709\u9ad8\u76db\u81ea\u5df1\u5185\u90e8\u7684\u4eba\u624d\u80fd\u73a9\uff0c\u662f\u4ed6\u4eec\u8fdb\u884c\u5e02\u573a\u5206\u6790\u3001\u98ce\u9669\u5b9a\u4ef7\u3001\u5236\u5b9a\u4ea4\u6613\u7b56\u7565\u7684\u201c\u79d8\u5bc6\u6b66\u5668\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L08fgSEwkPEJh1ibfWNCypdAgz4XAGcJuicBlke6VBcoWO5Qee8Rv0U2G0GbTf4xUhnQG5SGVgNiakEQ\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u73b0\u5728\uff0c\u9ad8\u76db\u628a\u5b83\u5f00\u6e90\u4e86\uff0c\u610f\u601d\u5c31\u662f\uff0c\u6211\u4eec\u666e\u901a\u4eba\u4e5f\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684Python\u4ee3\u7801\uff0c\u6765\u8c03\u7528\u8fd9\u4e9b\u201c\u8d85\u80fd\u529b\u79ef\u6728\u201d\uff0c\u642d\u5efa\u51fa\u5c5e\u4e8e\u81ea\u5df1\u7684\u5206\u6790\u6a21\u578b\u3002\u8fd9\u611f\u89c9\uff0c\u5c31\u50cf\u6258\u5c3c\u00b7\u65af\u5854\u514b\u628a\u4ed6\u7684\u94a2\u94c1\u4fa0\u56fe\u7eb8\u7ed9\u4f60\u6284\u4e86\u4e00\u6837\uff01<\/p>\n\n\n\n<p>\u6709\u4eba\u62c5\u5fc3\u201c\u6295\u884c\u5272\u97ed\u83dc\u201d\uff0c\u5176\u5b9e\u6070\u6070\u76f8\u53cd\u2014\u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6a21\u578b\u65e9\u5c31\u7ecf\u624b\u5343\u4ebf\u7f8e\u91d1\uff0c<strong>Bug \u7387\u6bd4\u6211\u4eec\u81ea\u5df1\u5199\u7684\u4f4e\u5f97\u591a<\/strong>\uff1b<\/li>\n\n\n\n<li>\u5f00\u6e90\u80fd\u5438\u5f15\u5168\u7403\u5f00\u53d1\u8005\u4e00\u8d77\u627e\u832c\uff0c<strong>\u9ad8\u76db\u7a33\u8d5a\u53e3\u7891<\/strong>\uff1b<\/li>\n\n\n\n<li>\u5bf9\u54b1\u4eec\u5c0f\u6563\u6765\u8bf4\uff0c<strong>\u7b49\u4e8e\u767d\u5ad6\u4e00\u53f0\u6cd5\u62c9\u5229\u5f15\u64ce<\/strong>\uff0c\u88c5\u4e0a\u5c31\u80fd\u8dd1\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4e00\u53e5\u8bdd\uff1a\u4eba\u5bb6\u653e\u7684\u662f\u201c\u5243\u5200\u201d\uff0c\u4e0d\u662f\u201c\u9570\u5200\u201d\uff1b\u6562\u4e0d\u6562\u6361\uff0c\u5c31\u770b\u4f60\u624b\u901f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>02\u00a0\u8fd9\u628a\u201c\u5c60\u9f99\u5200\u201d\uff0c\u6211\u4eec\u666e\u901a\u4eba\u800d\u5f97\u52a8\u5417\uff1f<\/strong><\/h2>\n\n\n\n<p>\u5f88\u591a\u4eba\u4e00\u542c\u201c\u91cf\u5316\u201d\u3001\u201c\u7f16\u7a0b\u201d\u5c31\u5934\u5927\uff0c\u89c9\u5f97\u8fd9\u80af\u5b9a\u662f\u4e13\u4e1a\u4eba\u58eb\u7684\u73a9\u5177\u3002\u4f46\u5728\u6211\u770b\u6765\uff0cGS Quant \u6700\u725b\u7684\u4e00\u70b9\uff0c\u6070\u6070\u662f\u5b83\u7684<strong>\u201c\u4eb2\u6c11\u201d<\/strong>\u3002<\/p>\n\n\n\n<p>\u9ad8\u76db\u663e\u7136\u662f\u60f3\u628a\u8fd9\u4e2a\u5de5\u5177\u63a8\u5e7f\u7ed9\u66f4\u591a\u4eba\u7528\uff0c\u6240\u4ee5\u8bbe\u8ba1\u4e0a\u975e\u5e38\u53cb\u597d\u3002\u53ea\u8981\u4f60\u61c2\u4e00\u70b9\u70b9Python\u57fa\u7840\uff0c\u5c31\u80fd\u5feb\u901f\u4e0a\u624b\u3002\u54b1\u4eec\u6765\u770b\u4e2a\u4f8b\u5b50\uff0c\u6bd4\u5982\u4f60\u60f3\u67e5\u4e00\u4e0b\u82f9\u679c\u516c\u53f8\uff08AAPL\uff09\u548c\u7279\u65af\u62c9\uff08TSLA\uff09\u7684\u80a1\u4ef7\uff0c\u7528GS Quant\u6709\u591a\u7b80\u5355\uff1f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>from&nbsp;gs_quant.data&nbsp;import&nbsp;Dataset<\/code><code>from&nbsp;gs_quant.markets&nbsp;import&nbsp;PricingContext<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code><\/code><code># \u8bbe\u7f6e\u67e5\u8be2\u7684\u65f6\u95f4\u8303\u56f4<\/code><code>start_date =&nbsp;'2023-01-01'<\/code><code>end_date =&nbsp;'2025-12-05'<\/code><code><\/code><code># \u83b7\u53d6\u6570\u636e<\/code><code>gs_dataset = Dataset('TR.PriceClose')&nbsp;# TR.PriceClose\u662f\u6536\u76d8\u4ef7\u6570\u636e\u96c6\u7684ID<\/code><code>price_data = gs_dataset.get_data(<\/code><code>&nbsp; &nbsp; start_date,&nbsp;<\/code><code>&nbsp; &nbsp; end_date,&nbsp;<\/code><code>&nbsp; &nbsp; bbid=&#91;'AAPL UW',&nbsp;'TSLA UW']&nbsp;<\/code><code>)<\/code><code><\/code><code>print(price_data.head())&nbsp;# \u770b\u770b\u6570\u636e\u957f\u5565\u6837<\/code><\/code><\/pre>\n\n\n\n<p>\u4f60\u770b\uff0c\u5c31\u8fd9\u4e48\u51e0\u884c\u4ee3\u7801\uff0c\u4f60\u5c31\u62ff\u5230\u4e86\u8ddf\u534e\u5c14\u8857\u4ea4\u6613\u5458\u4e00\u6a21\u4e00\u6837\u7684\u9ad8\u8d28\u91cf\u6570\u636e\u3002\u662f\u4e0d\u662f\u6bd4\u4f60\u53bb\u5404\u79cd\u7f51\u7ad9\u4e0a\u6252\u6570\u636e\uff0c\u6216\u8005\u7528\u90a3\u4e9b\u65f6\u4e0d\u65f6\u5c31\u6389\u94fe\u5b50\u7684\u514d\u8d39\u63a5\u53e3\u8981\u9999\u591a\u4e86\uff1f<\/p>\n\n\n\n<p>\u518d\u6bd4\u5982\uff0c\u4f60\u60f3\u7ed9\u4e00\u4e2a\u671f\u6743\u5b9a\u4e2a\u4ef7\uff0c\u8fd9\u5728\u4ee5\u524d\u53ef\u662f\u91d1\u878d\u5de5\u7a0b\u7855\u58eb\u7684\u6d3b\u513f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>from&nbsp;gs_quant.instrument&nbsp;import&nbsp;EqOption<\/code><code>from&nbsp;gs_quant.risk&nbsp;import&nbsp;Price<\/code><code><\/code><code># \u5b9a\u4e49\u4e00\u4e2a\u82f9\u679c\u516c\u53f8\u7684\u770b\u6da8\u671f\u6743<\/code><code>apple_option = EqOption(<\/code><code>&nbsp; &nbsp;&nbsp;'AAPL',&nbsp;<\/code><code>&nbsp; &nbsp; expiration_date='3m',&nbsp;<\/code><code>&nbsp; &nbsp; strike_price='150',&nbsp;<\/code><code>&nbsp; &nbsp; option_type='Call'<\/code><code>)<\/code><code><\/code><code># \u8ba1\u7b97\u4ef7\u683c<\/code><code>price_result = apple_option.price()<\/code><code><\/code><code>print(f\"\u8fd9\u4e2a\u671f\u6743\u7684\u4ef7\u683c\u5927\u6982\u662f:&nbsp;{price_result:.2f}&nbsp;\u7f8e\u5143\")<\/code><\/code><\/pre>\n\n\n\n<p>\u51e0\u884c\u4ee3\u7801\u641e\u5b9a\uff01\u5b83\u81ea\u52a8\u5e2e\u4f60\u628a\u4ec0\u4e48\u6ce2\u52a8\u7387\u3001\u65e0\u98ce\u9669\u5229\u7387\u8fd9\u4e9b\u590d\u6742\u73a9\u610f\u513f\u5168\u90fd\u8003\u8651\u8fdb\u53bb\u4e86\u3002\u8fd9\u79cd\u611f\u89c9\uff0c\u5c31\u50cf\u4ee5\u524d\u4f60\u5f97\u81ea\u5df1\u94bb\u6728\u53d6\u706b\uff0c\u73b0\u5728\u76f4\u63a5\u7ed9\u4f60\u4e2a\u6253\u706b\u673a\uff0c\u723d\u4e0d\u723d\uff1f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>03 \u5bf9\u6bd4\u6d4b\u8bc4\uff1ags-quant\u00a0vs \u5176\u4ed6\u5de5\u5177\uff0c\u4f18\u52bf\u5728\u54ea\uff1f\u00a0<\/strong><\/h2>\n\n\n\n<p>\u5e02\u9762\u4e0a\u505a\u91cf\u5316\u7684Python\u5e93\u4e5f\u4e0d\u5c11\uff0c\u6bd4\u5982 Zipline\u3001Backtrader\u3001Pandas \u7b49\u3002\u90a3\u9ad8\u76db\u8fd9\u4e2a\u201c\u4eb2\u513f\u5b50\u201d\u8ddf\u5b83\u4eec\u6bd4\uff0c\u5230\u5e95\u5f3a\u5728\u54ea\uff1f\u6211\u7ed9\u5927\u5bb6\u505a\u4e86\u4e2a\u7b80\u5355\u7684\u5bf9\u6bd4\u8868\u683c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">\u5bf9\u6bd4\u7ef4\u5ea6<\/th><th class=\"has-text-align-left\" data-align=\"left\">GS Quant (\u9ad8\u76db)<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u4f20\u7edf\u5f00\u6e90\u5e93 (\u5982Zipline)<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u901a\u7528\u6570\u636e\u5206\u6790\u5e93 (\u5982Pandas)<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u5b9a\u4f4d<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u4e13\u4e1a\u7ea7\u3001\u4e00\u4f53\u5316<\/strong>\u7684\u91d1\u878d\u5206\u6790\u4e0e\u4ea4\u6613\u5e73\u53f0<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u4fa7\u91cd\u4e8e<strong>\u56de\u6d4b<\/strong>\uff0c\u529f\u80fd\u76f8\u5bf9\u5355\u4e00<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u901a\u7528\u6570\u636e\u5904\u7406\u5de5\u5177\uff0c<strong>\u975e\u91d1\u878d\u4e13\u7528<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u6570\u636e\u6e90<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">\u76f4\u63a5\u5bf9\u63a5\u9ad8\u76db<strong>\u673a\u6784\u7ea7<\/strong>\u6570\u636e\u5e93\uff0c\u8d28\u91cf\u9ad8\u3001\u8986\u76d6\u5e7f<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u9700\u8981<strong>\u81ea\u884c\u5bfb\u627e\u548c\u6574\u5408<\/strong>\u6570\u636e\uff0c\u8d28\u91cf\u53c2\u5dee\u4e0d\u9f50<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u5b8c\u5168\u4e0d\u63d0\u4f9b\u6570\u636e\uff0c\u9700\u8981\u81ea\u5df1\u5bfc\u5165<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u6838\u5fc3\u4f18\u52bf<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">\u590d\u6742\u7684<strong>\u884d\u751f\u54c1\u5b9a\u4ef7<\/strong>\u3001\u98ce\u9669\u7ba1\u7406\u3001\u4e0e\u9ad8\u76db\u751f\u6001\u65e0\u7f1d\u96c6\u6210<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u793e\u533a\u6210\u719f\uff0c\u56de\u6d4b\u6846\u67b6\u7075\u6d3b<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u6570\u636e\u6e05\u6d17\u3001\u5904\u7406\u80fd\u529b\u6781\u5f3a<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u4e0a\u624b\u96be\u5ea6<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">\u4e2d\u7b49\uff0c\u4f46API\u8bbe\u8ba1<strong>\u975e\u5e38\u53cb\u597d<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">\u4e2d\u7b49\u504f\u4e0a\uff0c\u9700\u8981\u914d\u7f6e\u548c\u5b66\u4e60\u7684\u4e1c\u897f\u8f83\u591a<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u7b80\u5355\uff0c\u4f46\u8981\u7528\u4e8e\u91d1\u878d\u5206\u6790\u9700\u8981\u5927\u91cf\u989d\u5916\u5de5\u4f5c<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u4e00\u53e5\u8bdd\u603b\u7ed3<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u201c\u822a\u6bcd\u6218\u6597\u7fa4\u201d<\/strong>\uff0c\u8981\u5565\u6709\u5565<\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u201c\u9a71\u9010\u8230\u201d<\/strong>\uff0c\u5728\u7279\u5b9a\u9886\u57df\u5f88\u5f3a<\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>\u201c\u5de5\u5177\u7bb1\u201d<\/strong>\uff0c\u96f6\u4ef6\u591a\u4f46\u9700\u81ea\u5df1\u7ec4\u88c5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7b80\u5355\u8bf4\uff0cGS Quant \u63d0\u4f9b\u7684\u662f\u4e00\u4e2a\u4ece\u6570\u636e\u3001\u5206\u6790\u5230\u4ea4\u6613\u7684\u5168\u5bb6\u6876\u670d\u52a1\u3002\u4f60\u4e0d\u7528\u518d\u50cf\u4ee5\u524d\u4e00\u6837\uff0c\u4e1c\u62fc\u897f\u51d1\u627e\u6570\u636e\uff0c\u81ea\u5df1\u5b9e\u73b0\u590d\u6742\u7684\u6a21\u578b\uff0c\u5b83\u90fd\u5e2e\u4f60\u6253\u5305\u597d\u4e86\u3002\u8fd9\u5bf9\u4e8e\u60f3\u8981\u5feb\u901f\u9a8c\u8bc1\u81ea\u5df1\u60f3\u6cd5\u7684\u91cf\u5316\u7231\u597d\u8005\u6216\u8005\u5c0f\u578b\u56e2\u961f\u6765\u8bf4\uff0c\u7b80\u76f4\u662f\u5929\u964d\u798f\u97f3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>04 \u4e94\u4e2a\u9ad8\u9891\u573a\u666f\uff0c\u4e00\u952e\u5957\u7528\u6a21\u677f<\/strong><\/h2>\n\n\n\n<p>\u4e0b\u9762\u628a\u6211\u81ea\u5df1\u5e38\u7528\u7684\u201c\u5c0f\u6284\u201d\u76f4\u63a5\u7ed9\u4f60\uff0c\u590d\u5236\u5373\u53ef\u8fd0\u884c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\uff09\u4e00\u952e\u7b97\u5e03\u6797\u5e26<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>upper, mid, lower = ts.bollinger(px, Window(20,0),&nbsp;2)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2\uff09\u4e00\u952e\u7b97\u6700\u5927\u56de\u64a4<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>drawdown&nbsp;= ts.max_drawdown(px)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3\uff09\u4e00\u952e\u7b97\u590f\u666e<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sharpe&nbsp;= ts.sharpe_ratio(rets, Window(252,0))<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4\uff09\u4e00\u952e\u7b97\u671f\u6743\u9690\u6ce2\uff08\u9700\u63a5\u5165\u9ad8\u76db\u6570\u636e\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>from&nbsp;gs_quant.risk&nbsp;import&nbsp;IRDelta<\/code><code>option = IRSwaption(PayReceive.Receive,&nbsp;'5y',&nbsp;'10y',&nbsp;0.02)<\/code><code>option.resolve() &nbsp;# \u81ea\u52a8\u62c9\u5e02\u573a\u9690\u6ce2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5\uff09\u4e00\u952e\u505a\u60c5\u666f\u538b\u529b\u6d4b\u8bd5<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code>from&nbsp;gs_quant.risk&nbsp;import&nbsp;MarketDataShock<\/code><code>shock = MarketDataShock(spot_shock=0.1) &nbsp;# \u73b0\u8d27\u7a81\u7136\u8dcc 10%<\/code><code>with&nbsp;shock:<\/code><code>&nbsp; &nbsp;&nbsp;print(option.price()) &nbsp;# \u770b\u7ec4\u5408\u65b0\u4f30\u503c<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>05 \u907f\u5751\u6307\u5357\uff1a\u65b0\u624b\u6700\u5bb9\u6613\u7ffb\u8f66\u7684 3 \u4e2a\u70b9<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u683c\u5f0f\uff1a<\/strong>gs-quant \u53ea\u8ba4\u81ea\u5df1\u5bb6\u7684\u00a0<code>Series<\/code>\uff0c\u8bb0\u5f97\u5148\u00a0<code>ts.Series(pandas_series)<\/code>\u00a0\u518d\u5582\u8fdb\u53bb\uff0c\u4e0d\u7136\u62a5\u9519\u3002<\/li>\n\n\n\n<li><strong>\u65e5\u671f\u5bf9\u9f50\uff1a<\/strong>\u591a\u5e01\u79cd\u3001\u591a\u4ea4\u6613\u6240\u6570\u636e\u8981\u628a\u4ea4\u6613\u65e5\u5386\u5bf9\u9f50\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u201c\u672a\u6765\u51fd\u6570\u201d\u3002\u7528\u00a0<code>gs_quant.data.Dataset('CALENDAR')<\/code>\u00a0\u7edf\u4e00\u62c9\u3002<\/li>\n\n\n\n<li><strong>\u4e2d\u6587\u8def\u5f84\uff1a<\/strong>Windows \u7528\u6237\u522b\u628a Jupyter \u5efa\u5728\u4e2d\u6587\u6587\u4ef6\u5939\u91cc\uff0cgs-quant \u7684 C++ \u5185\u6838\u4f1a\u62bd\u98ce\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>06 \u603b\u7ed3\uff1a\u666e\u901a\u4eba\u600e\u4e48\u628a\u8fd9\u53f0\u201c\u6cd5\u62c9\u7b2c\u201d\u5f00\u8d77\u6765\uff1f<\/strong><\/h2>\n\n\n\n<p>\u5982\u679c\u4f60\u53ea\u60f3\u767d\u5ad6\u4e00\u4e2a\u201c\u53c8\u5feb\u53c8\u51c6\u201d\u7684\u91cf\u5316\u5e93\uff0cgs-quant \u5df2\u7ecf\u591f\u9999\uff1b\u5982\u679c\u4f60\u60f3\u8fdb\u4e00\u6b65\u8585\uff0c\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53bb GitHub \u628a\u6e90\u7801\u514b\u9686\u4e0b\u6765\uff0c\u8bfb\u5355\u5143\u6d4b\u8bd5\uff0c\u6bd4\u770b\u5927\u90e8\u5934\u6559\u6750\u7ba1\u7528\uff1b<\/li>\n\n\n\n<li>\u628a\u5bb6\u91cc ETF\u3001\u53ef\u8f6c\u503a\u3001\u9006\u56de\u8d2d\u90fd\u8dd1\u4e00\u6b21\u5386\u53f2\u56de\u6d4b\uff0c<strong>\u81f3\u5c11\u80fd\u907f\u5f00 80% \u7684\u5927\u5751<\/strong>\uff1b<\/li>\n<\/ul>\n\n\n\n<p><strong>1. \u9ad8\u76db\u91cf\u5316\u5f00\u53d1\u5e73\u53f0\u5730\u5740\uff1a<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/developer.gs.com\/discover\/home\">https:\/\/developer.gs.com\/discover\/home<\/a><\/p>\n\n\n\n<p><strong>2. \u9ad8\u76dbGS-Quant\u5de5\u5177GitHub\u5730\u5740\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L08fgSEwkPEJh1ibfWNCypdA01ChILRguJZEyjIZm3RicpfuAogbFQEMMiaB8kw1KDEmWOCODeicn6Nhw\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/github.com\/goldmansachs\/gs-quant\">https:\/\/github.com\/goldmansachs\/gs-quant<\/a><\/p>\n\n\n\n<p>\u6240\u4ee5\uff0c\u522b\u518d\u72b9\u8c6b\u4e86\u3002\u4e0d\u7ba1\u4f60\u662f\u91d1\u878d\u4ece\u4e1a\u8005\u3001\u7a0b\u5e8f\u5458\uff0c\u8fd8\u662f\u5bf9\u6295\u8d44\u611f\u5174\u8da3\u7684\u5b66\u751f\uff0c\u90fd\u5e94\u8be5\u7acb\u523b\u53bb\u4e86\u89e3\u3001\u5b66\u4e60\u8fd9\u4e2a\u5de5\u5177\u3002\u8fd9\u4e0d\u4ec5\u662f\u4e3a\u4e86\u8ddf\u4e0a\u6f6e\u6d41\uff0c\u66f4\u662f\u4e3a\u4e86\u5728\u672a\u6765\u667a\u80fd\u5316\u7684\u91d1\u878d\u4e16\u754c\u91cc\uff0c\u4e3a\u81ea\u5df1\u8d62\u5f97\u4e00\u5e2d\u4e4b\u5730\u3002<\/p>\n\n\n\n<p><strong>\u6700\u540e\u63d0\u9192\u4e00\u53e5\uff1a<\/strong>\u5de5\u5177\u518d\u725b\uff0c\u4e5f\u53ea\u662f\u201c\u5243\u5200\u201d\uff1b\u522b\u501f\u94b1\u68ad\u54c8\uff0c\u66f4\u522b\u602a\u5243\u5200\u4e0d\u5feb\u3002\u795d\u5404\u4f4d\u90fd\u80fd\u628a\u5e02\u573a\u5f53\u63d0\u6b3e\u673a\uff0c\u800c\u4e0d\u662f\u788e\u949e\u673a\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u89c9\u5f97\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u8bb0\u5f97\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u670b\u53cb\u3002\u6709\u4ec0\u4e48\u95ee\u9898\u53ef\u4ee5\u5728\u8bc4\u8bba\u533a\u7559\u8a00\uff0c\u8001\u4f59\u4f1a\u4e00\u4e00\u89e3\u7b54\u3002\u8ba9\u6211\u4eec\u4e00\u8d77\u5728\u91cf\u5316\u4ea4\u6613\u7684\u9053\u8def\u4e0a\u8d8a\u8d70\u8d8a\u8fdc\uff01<\/p>\n\n\n\n<p>\u00a0<a>#AI\u7092\u80a1<\/a>\u00a0<a>#\u91cf\u5316\u4ea4\u6613<\/a>\u00a0<a>#gs<\/a>-quant\u00a0<a>#\u81ea\u52a8\u5316\u5206\u6790<\/a>\u00a0<a>#\u8d22\u5bcc\u81ea\u7531<\/a>\u00a0<a>#Python\u7f16\u7a0b<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\">\u98ce\u9669\u63d0\u793a\uff1a\u6295\u8d44\u6709\u98ce\u9669\uff0c\u5165\u5e02\u9700\u8c28\u614e\u3002\u672c\u6587\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u8001\u4f59\u635e\u9c7c \u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2025\/12\/11\/%e9%ab%98%e7%9b%9b%e5%86%85%e9%83%a8%e9%87%8f%e5%8c%96%e5%b7%a5%e5%85%b7%e6%9b%9d%e5%85%89%ef%bc%8c%e5%85%8d%e8%b4%b9%e7%9a%84%e6%b3%95%e6%8b%89%e5%88%a9%e4%bd%a0%e8%bf%98%e4%b8%8d\/\">Continue reading<span class=\"screen-reader-text\">\u9ad8\u76db\u5185\u90e8\u91cf\u5316\u5de5\u5177\u66dd\u5149\uff0c\u514d\u8d39\u7684\u201c\u6cd5\u62c9\u5229\u201d\u4f60\u8fd8\u4e0d\u4e0a\u8f66\uff1f<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[17,5,7],"class_list":{"0":"post-3162","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"tag-7","10":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/comments?post=3162"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3162\/revisions"}],"predecessor-version":[{"id":3164,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3162\/revisions\/3164"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=3162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=3162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=3162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}