{"id":5842,"date":"2025-06-30T19:11:32","date_gmt":"2025-06-30T11:11:32","guid":{"rendered":"http:\/\/192.168.1.29\/?p=5842"},"modified":"2025-06-30T19:11:33","modified_gmt":"2025-06-30T11:11:33","slug":"%e8%82%a1%e7%a5%a8%e9%87%8f%e5%8c%96%e5%af%b9%e5%86%b2%e7%ad%96%e7%95%a5python%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/xc.ipyingshe.net:5347\/?p=5842","title":{"rendered":"\u80a1\u7968\u91cf\u5316\u5bf9\u51b2\u7b56\u7565python\u4ee3\u7801"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u91cf\u5316\u5bf9\u51b2\u7b56\u7565\u8ba1\u7b97\u7ed8\u56fe<\/h1>\n\n\n\n<p><strong>\u4ee3\u7801\u63d0\u8981<\/strong><\/p>\n\n\n\n<p>\u4ee3\u7801\u8fd0\u884c\u73af\u5883\uff0cWIN 11 \uff0cpython 3.13<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f7f\u7528<code>akshare<\/code>\u83b7\u53d6\u80a1\u7968\u6570\u636e\uff0c\u5e76\u7528<code>pandas<\/code>\u7684<code>ewm<\/code>\u51fd\u6570<\/li>\n\n\n\n<li>\u6dfb\u52a0\u4e86<code>akshare<\/code>\u5e93\u83b7\u53d6\u771f\u5b9e\u80a1\u7968\u6570\u636e<\/li>\n\n\n\n<li>\u4e3b\u7a0b\u5e8f\u4e2d\u4f7f\u7528<code>ak.stock_zh_index_daily<\/code>\u83b7\u53d6\u4e0a\u8bc1\u6307\u6570\u6570\u636e<\/li>\n\n\n\n<li>\u589e\u52a0\u4e86\u5f02\u5e38\u5904\u7406\uff0c\u5f53\u83b7\u53d6\u6570\u636e\u5931\u8d25\u65f6\u4f7f\u7528\u968f\u673a\u6570\u636e\u4f5c\u4e3a\u5907\u9009<\/li>\n\n\n\n<li>\u786e\u4fdd\u6570\u636e\u5217\u540d\u4e0e\u539f\u4ee3\u7801\u517c\u5bb9<\/li>\n\n\n\n<li>\u622a\u53d6\u6700\u8fd1200\u4e2a\u4ea4\u6613\u65e5\u7684\u6570\u636e\u8fdb\u884c\u8ba1\u7b97<\/li>\n<\/ol>\n\n\n\n<p><strong>\u4f7f\u7528\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u9700\u8981\u5b89\u88c5\u4f9d\u8d56\u5e93\uff1a<code>pip install pandas numpy akshare<\/code><\/li>\n\n\n\n<li>\u9ed8\u8ba4\u83b7\u53d6\u4e0a\u8bc1\u6307\u6570\u6570\u636e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539<code>ak.stock_zh_index_daily(symbol=\"sh000001\")<\/code>\u4e2d\u7684<code>symbol<\/code>\u53c2\u6570\u83b7\u53d6\u5176\u4ed6\u80a1\u7968\u6570\u636e<\/li>\n\n\n\n<li>\u80a1\u7968\u4ee3\u7801\u683c\u5f0f\u793a\u4f8b\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e0a\u8bc1\u6307\u6570: sh000001<\/li>\n\n\n\n<li>\u6df1\u8bc1\u6210\u6307: sz399001<\/li>\n\n\n\n<li>\u521b\u4e1a\u677f\u6307: sz399006<\/li>\n\n\n\n<li>\u4e2a\u80a1: sh600000(\u6d66\u53d1\u94f6\u884c) \u6216 sz000001(\u5e73\u5b89\u94f6\u884c)<\/li>\n\n\n\n<li>\u672c\u4ee3\u7801\u80a1\u7968\u4ee3\u7801 sz000937 \uff08\u5180\u4e2d\u80fd\u6e90\uff09<\/li>\n<\/ul>\n\n\n\n<p>\u4e0b\u9762\u662f\u6dfb\u52a0\u4e86\u7ed8\u56fe\u529f\u80fd\u7684\u5b8c\u6574\u4ee3\u7801\uff0c\u4f7f\u7528<code>matplotlib<\/code>\u7ed8\u5236\u80a1\u7968\u4ef7\u683c\u548c\u5404\u9879\u91cf\u5316\u6307\u6807\u7684\u56fe\u8868\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\nimport numpy as np\nimport akshare as ak\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\nfrom matplotlib.ticker import MaxNLocator\nimport matplotlib.patches as mpatches\nimport warnings\nimport matplotlib.font_manager as fm\nimport os\n\n# \u5ffd\u7565\u8b66\u544a\nwarnings.filterwarnings('ignore')\n\n# \u8bbe\u7f6e\u5168\u5c40\u5b57\u4f53\nfont_path = 'C:\/Windows\/Fonts\/simhei.ttf'  # \u9ed1\u4f53\u5b57\u4f53\u8def\u5f84\uff0c\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\nif fm.findfont(fm.FontProperties(fname=font_path)):\n    plt.rcParams&#91;'font.family'] = fm.FontProperties(fname=font_path).get_name()\nelse:\n    print(\"\u672a\u627e\u5230\u6307\u5b9a\u5b57\u4f53\uff0c\u8bf7\u68c0\u67e5\u8def\u5f84\u3002\u5c06\u4f7f\u7528\u9ed8\u8ba4\u5b57\u4f53\u3002\")\n\n# \u89e3\u51b3\u8d1f\u53f7\u663e\u793a\u95ee\u9898\nplt.rcParams&#91;'axes.unicode_minus'] = False\n\ndef quant_hedge_strategy(df):\n    # \u4e3b\u529b\u6697\u76d8\u8d44\u91d1\u526f\u56fe\u6307\u6807\n    df&#91;'\u91cf\u5316\u5bf9\u51b21'] = df&#91;'close'].ewm(span=9, adjust=False).mean()\n    df&#91;'\u91cf\u5316\u5bf9\u51b23'] = (df&#91;'\u91cf\u5316\u5bf9\u51b21'] * 1.14).ewm(span=5, adjust=False).mean()\n    df&#91;'\u91cf\u5316\u5bf9\u51b24'] = df&#91;'close'].ewm(span=2, adjust=False).mean()\n\n    # \u8ba1\u7b97130\u65e5\u9ad8\u4f4e\u70b9\n    df&#91;'130\u65e5\u9ad8\u70b9'] = df&#91;'high'].rolling(130).max()\n    df&#91;'130\u65e5\u4f4e\u70b9'] = df&#91;'low'].rolling(130).min()\n\n    # \u8ba1\u7b97\u6761\u4ef6\u67f1\u72b6\u56fe\n    df&#91;'stickline_cond'] = np.where(df&#91;'\u91cf\u5316\u5bf9\u51b24'] &gt;= df&#91;'\u91cf\u5316\u5bf9\u51b23'], 1, 0)\n\n    # \u8ba1\u7b97\u5176\u4ed6\u6307\u6807\n    df&#91;'40\u65e5\u6700\u4f4e'] = df&#91;'low'].rolling(40).min()\n    df&#91;'\u91cf\u5316\u5bf9\u51b22'] = (df&#91;'close'] - df&#91;'40\u65e5\u6700\u4f4e']) \/ df&#91;'40\u65e5\u6700\u4f4e'] * 100\n\n    df&#91;'MA40'] = df&#91;'close'].rolling(40).mean()\n    df&#91;'\u91cf\u5316\u5bf9\u51b27'] = (df&#91;'close'] - df&#91;'MA40']) \/ df&#91;'MA40'] * 100\n\n    df&#91;'40\u65e5\u6700\u4f4e_MA40'] = df&#91;'40\u65e5\u6700\u4f4e'].rolling(40).mean()\n    df&#91;'\u91cf\u5316\u5bf9\u51b28'] = (df&#91;'close'] - df&#91;'40\u65e5\u6700\u4f4e_MA40']) \/ df&#91;'40\u65e5\u6700\u4f4e_MA40'] * 100\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b29'] = 28\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b210'] = df&#91;'close'].rolling(5).mean()\n    df&#91;'100\u65e5\u6700\u9ad8'] = df&#91;'\u91cf\u5316\u5bf9\u51b210'].rolling(100).max()\n    df&#91;'\u91cf\u5316\u5bf9\u51b211'] = np.where(df&#91;'\u91cf\u5316\u5bf9\u51b210'] == df&#91;'100\u65e5\u6700\u9ad8'], df&#91;'\u91cf\u5316\u5bf9\u51b28'], np.nan)\n\n    # \u6210\u672c\u5206\u5e03\u8ba1\u7b97\uff08\u7b80\u5316\u4e3a\u4f7f\u7528\u79fb\u52a8\u5e73\u5747\uff09\n    df&#91;'cost90'] = df&#91;'close'].rolling(90).mean().shift(1)\n    df&#91;'cost10'] = df&#91;'close'].rolling(10).mean().shift(1)\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b212'] = ((df&#91;'close'] * df&#91;'volume'] - df&#91;'cost90'] * df&#91;'volume']) \/ 20 + 250) * 1.2 \/ 5\n    df&#91;'\u91cf\u5316\u5bf9\u51b213'] = ((df&#91;'cost90'] * df&#91;'volume'] - df&#91;'close'] * df&#91;'volume']) \/ 20 + 250) * 1.2 \/ 5\n    df&#91;'\u91cf\u5316\u5bf9\u51b214'] = ((df&#91;'close'] * df&#91;'volume'] - df&#91;'cost10'] * df&#91;'volume']) \/ 20 + 250) * 1.2 \/ 5\n    df&#91;'\u91cf\u5316\u5bf9\u51b215'] = ((df&#91;'cost10'] * df&#91;'volume'] - df&#91;'close'] * df&#91;'volume']) \/ 20 + 250) * 1.2 \/ 5\n\n    # \u4e3b\u529b\u6697\u76d8\u8d44\u91d1\u526f\u56fe\u6307\u6807\u4fe1\u53f7\u6761\u4ef6\n    df&#91;'\u91cf\u5316\u5bf9\u51b25'] = ((df&#91;'\u91cf\u5316\u5bf9\u51b214'] &gt; 0) &amp; \n                     ((df&#91;'\u91cf\u5316\u5bf9\u51b212'] &gt; df&#91;'\u91cf\u5316\u5bf9\u51b213']) | \n                      (df&#91;'\u91cf\u5316\u5bf9\u51b212'] &gt; 0))) \n\n    df&#91;'\u91cf\u5316\u5bf9\u51b26'] = ((df&#91;'\u91cf\u5316\u5bf9\u51b214'] &gt; 0) &amp; \n                     (df&#91;'\u91cf\u5316\u5bf9\u51b212'] &gt; 0) &amp; \n                     (df&#91;'\u91cf\u5316\u5bf9\u51b213'] &lt; 0) &amp; \n                     (df&#91;'\u91cf\u5316\u5bf9\u51b215'] &lt; 0))\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b25_count'] = df&#91;'\u91cf\u5316\u5bf9\u51b25'].rolling(10).sum()\n    df&#91;'\u91cf\u5316\u5bf9\u51b26_count'] = df&#91;'\u91cf\u5316\u5bf9\u51b26'].rolling(60).sum()\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b216'] = ((df&#91;'\u91cf\u5316\u5bf9\u51b25'] &amp; (df&#91;'\u91cf\u5316\u5bf9\u51b25_count'] == 1)) | \n                      (df&#91;'\u91cf\u5316\u5bf9\u51b26'] &amp; (df&#91;'\u91cf\u5316\u5bf9\u51b26_count'] == 1)))\n\n    df&#91;'\u91cf\u5316\u5bf9\u51b216_count'] = df&#91;'\u91cf\u5316\u5bf9\u51b216'].rolling(20).sum()\n    df&#91;'\u8d77\u98de\u4fe1\u53f7'] = np.where(df&#91;'\u91cf\u5316\u5bf9\u51b216'] &amp; (df&#91;'\u91cf\u5316\u5bf9\u51b216_count'] == 1), \n                          df&#91;'\u91cf\u5316\u5bf9\u51b22'] * 1.16, np.nan)\n\n    # \u5996\u80a1\u4fe1\u53f7\n    df&#91;'\u91cf\u5316\u5bf9\u51b214_60\u65e5\u9ad8\u70b9'] = df&#91;'\u91cf\u5316\u5bf9\u51b214'].rolling(60).max()\n    df&#91;'\u91cf\u5316\u5bf9\u51b214_20\u65e5\u9ad8\u70b9'] = df&#91;'\u91cf\u5316\u5bf9\u51b214'].rolling(20).max()\n    df&#91;'\u5996\u80a1\u6761\u4ef61'] = df&#91;'\u91cf\u5316\u5bf9\u51b214'] &gt;= df&#91;'\u91cf\u5316\u5bf9\u51b214_60\u65e5\u9ad8\u70b9']\n    df&#91;'\u5996\u80a1\u6761\u4ef62'] = (df&#91;'\u91cf\u5316\u5bf9\u51b214'] &gt;= df&#91;'\u91cf\u5316\u5bf9\u51b214_20\u65e5\u9ad8\u70b9']).rolling(20).sum() == 1\n    df&#91;'\u5996\u80a1\u6761\u4ef63'] = df&#91;'\u91cf\u5316\u5bf9\u51b214'] &gt; df&#91;'\u91cf\u5316\u5bf9\u51b213']\n\n    df&#91;'\u5996\u80a1\u4fe1\u53f7'] = np.where(df&#91;'\u5996\u80a1\u6761\u4ef61'] &amp; df&#91;'\u5996\u80a1\u6761\u4ef62'] &amp; df&#91;'\u5996\u80a1\u6761\u4ef63'],\n                          df&#91;'\u91cf\u5316\u5bf9\u51b22'] * 1.16, np.nan)\n\n    # \u4ea4\u53c9\u4fe1\u53f7\n    df&#91;'\u4ea4\u53c9\u4fe1\u53f7'] = np.where(df&#91;'\u91cf\u5316\u5bf9\u51b22'].shift(1) &lt; df&#91;'\u91cf\u5316\u5bf9\u51b29'], \n                          df&#91;'\u91cf\u5316\u5bf9\u51b22'], np.nan)\n\n    return df\n\ndef plot_quant_strategy(df, stock_name=\"\u4e0a\u8bc1\u6307\u6570\"):\n    \"\"\"\u7ed8\u5236\u91cf\u5316\u5bf9\u51b2\u7b56\u7565\u56fe\u8868\"\"\"\n    # \u521b\u5efa\u4e00\u4e2a\u5305\u542b4\u4e2a\u5b50\u56fe\u7684\u56fe\u8868\n    fig, axes = plt.subplots(4, 1, figsize=(16, 18), sharex=True)\n    fig.suptitle(f'{stock_name}\u91cf\u5316\u5bf9\u51b2\u7b56\u7565\u5206\u6790', fontsize=16)\n\n    # \u7ed8\u5236K\u7ebf\u56fe\u548c\u5747\u7ebf\n    ax1 = axes&#91;0]\n    ax1.set_title('\u4ef7\u683c\u8d70\u52bf\u4e0e\u5747\u7ebf', fontsize=14)\n    ax1.plot(df.index, df&#91;'close'], label='\u6536\u76d8\u4ef7', color='black', linewidth=2)\n    ax1.plot(df.index, df&#91;'MA40'], label='MA40', color='blue', linestyle='--')\n    ax1.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b210'], label='MA5', color='red', linestyle='--')\n\n    # \u7ed8\u5236\u8d77\u98de\u4fe1\u53f7\n    signal_dates = df&#91;~df&#91;'\u8d77\u98de\u4fe1\u53f7'].isna()].index\n    signal_values = df&#91;~df&#91;'\u8d77\u98de\u4fe1\u53f7'].isna()]&#91;'close']\n    ax1.scatter(signal_dates, signal_values, color='green', s=100, label='\u8d77\u98de\u4fe1\u53f7', marker='^')\n\n    # \u7ed8\u5236\u5996\u80a1\u4fe1\u53f7\n    \u5996\u80a1_dates = df&#91;~df&#91;'\u5996\u80a1\u4fe1\u53f7'].isna()].index\n    \u5996\u80a1_values = df&#91;~df&#91;'\u5996\u80a1\u4fe1\u53f7'].isna()]&#91;'close']\n    ax1.scatter(\u5996\u80a1_dates, \u5996\u80a1_values, color='purple', s=100, label='\u5996\u80a1\u4fe1\u53f7', marker='*')\n\n    # \u7ed8\u5236\u4ea4\u53c9\u4fe1\u53f7\n    cross_dates = df&#91;~df&#91;'\u4ea4\u53c9\u4fe1\u53f7'].isna()].index\n    cross_values = df&#91;~df&#91;'\u4ea4\u53c9\u4fe1\u53f7'].isna()]&#91;'close']\n    ax1.scatter(cross_dates, cross_values, color='orange', s=100, label='\u4ea4\u53c9\u4fe1\u53f7', marker='o')\n\n    ax1.grid(True)\n    ax1.legend(loc='upper left')\n    ax1.set_ylabel('\u4ef7\u683c')\n\n    # \u7ed8\u5236\u91cf\u5316\u5bf9\u51b22\u30019\u300111\u6307\u6807\n    ax2 = axes&#91;1]\n    ax2.set_title('\u91cf\u5316\u5bf9\u51b2\u6307\u68072\u30019\u300111', fontsize=14)\n    ax2.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b22'], label='\u91cf\u5316\u5bf9\u51b22', color='blue')\n    ax2.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b29'], label='\u91cf\u5316\u5bf9\u51b29', color='red', linestyle='--')\n    ax2.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b211'], label='\u91cf\u5316\u5bf9\u51b211', color='green', marker='o', linestyle='', alpha=0.7)\n\n    # \u586b\u5145\u91cf\u5316\u5bf9\u51b22\u5927\u4e8e\u91cf\u5316\u5bf9\u51b29\u7684\u533a\u57df\n    ax2.fill_between(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b22'], df&#91;'\u91cf\u5316\u5bf9\u51b29'], \n                    where=(df&#91;'\u91cf\u5316\u5bf9\u51b22'] &gt; df&#91;'\u91cf\u5316\u5bf9\u51b29']), \n                    color='lightgreen', alpha=0.3)\n    # \u586b\u5145\u91cf\u5316\u5bf9\u51b22\u5c0f\u4e8e\u91cf\u5316\u5bf9\u51b29\u7684\u533a\u57df\n    ax2.fill_between(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b22'], df&#91;'\u91cf\u5316\u5bf9\u51b29'], \n                    where=(df&#91;'\u91cf\u5316\u5bf9\u51b22'] &lt; df&#91;'\u91cf\u5316\u5bf9\u51b29']), \n                    color='lightcoral', alpha=0.3)\n\n    ax2.grid(True)\n    ax2.legend(loc='upper left')\n    ax2.set_ylabel('\u6307\u6807\u503c')\n\n    # \u7ed8\u5236\u91cf\u5316\u5bf9\u51b212\u300113\u300114\u300115\u6307\u6807\n    ax3 = axes&#91;2]\n    ax3.set_title('\u4e3b\u529b\u6697\u76d8\u8d44\u91d1\u6307\u6807', fontsize=14)\n    ax3.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b212'], label='\u91cf\u5316\u5bf9\u51b212', color='blue')\n    ax3.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b213'], label='\u91cf\u5316\u5bf9\u51b213', color='red')\n    ax3.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b214'], label='\u91cf\u5316\u5bf9\u51b214', color='green')\n    ax3.plot(df.index, df&#91;'\u91cf\u5316\u5bf9\u51b215'], label='\u91cf\u5316\u5bf9\u51b215', color='purple')\n\n    # \u7ed8\u5236\u8d77\u98de\u4fe1\u53f7\u548c\u5996\u80a1\u4fe1\u53f7\u5728\u8fd9\u5f20\u56fe\u4e0a\u7684\u4f4d\u7f6e\n    ax3.scatter(signal_dates, df.loc&#91;signal_dates, '\u91cf\u5316\u5bf9\u51b214'], color='green', s=50, marker='^')\n    ax3.scatter(\u5996\u80a1_dates, df.loc&#91;\u5996\u80a1_dates, '\u91cf\u5316\u5bf9\u51b214'], color='purple', s=50, marker='*')\n\n    ax3.grid(True)\n    ax3.legend(loc='upper left')\n    ax3.set_ylabel('\u8d44\u91d1\u6307\u6807')\n\n    # \u7ed8\u5236\u91cf\u5316\u5bf9\u51b25\u30016\u6307\u6807\u67f1\u72b6\u56fe\n    ax4 = axes&#91;3]\n    ax4.set_title('\u91cf\u5316\u5bf9\u51b2\u4fe1\u53f75\u30016', fontsize=14)\n\n    # \u7ed8\u5236\u67f1\u72b6\u56fe\n    bar_width = 0.6\n    quant5_positive = df&#91;'\u91cf\u5316\u5bf9\u51b25_count'].copy()\n    quant5_positive&#91;quant5_positive &lt; 0] = 0\n    quant6_positive = df&#91;'\u91cf\u5316\u5bf9\u51b26_count'].copy()\n    quant6_positive&#91;quant6_positive &lt; 0] = 0\n\n    ax4.bar(df.index, quant5_positive, width=bar_width, color='blue', alpha=0.7, label='\u91cf\u5316\u5bf9\u51b25')\n    ax4.bar(df.index, quant6_positive, width=bar_width, color='green', alpha=0.7, label='\u91cf\u5316\u5bf9\u51b26')\n\n    # \u6dfb\u52a0\u4fe1\u53f7\u6807\u8bb0\n    ax4.scatter(signal_dates, &#91;0]*len(signal_dates), color='green', s=100, marker='^')\n    ax4.scatter(\u5996\u80a1_dates, &#91;0]*len(\u5996\u80a1_dates), color='purple', s=100, marker='*')\n\n    ax4.grid(True)\n    ax4.legend(loc='upper left')\n    ax4.set_ylabel('\u4fe1\u53f7\u5f3a\u5ea6')\n    ax4.set_xlabel('\u65e5\u671f')\n\n    # \u8bbe\u7f6ex\u8f74\u65e5\u671f\u683c\u5f0f\n    locator = mdates.AutoDateLocator()\n    formatter = mdates.ConciseDateFormatter(locator)\n    for ax in axes:\n        ax.xaxis.set_major_locator(locator)\n        ax.xaxis.set_major_formatter(formatter)\n\n    plt.tight_layout()\n    plt.subplots_adjust(top=0.94)\n    return fig\n\n# \u4f7f\u7528\u793a\u4f8b\nif __name__ == \"__main__\":\n    # \u4f7f\u7528akshare\u83b7\u53d6\u80a1\u7968\u6570\u636e\n    try:\n        # \u83b7\u53d6\u4e0a\u8bc1\u6307\u6570\u6570\u636e\uff0c\u53ef\u66ff\u6362\u4e3a\u5176\u4ed6\u80a1\u7968\u4ee3\u7801\n        stock_data = ak.stock_zh_index_daily(symbol=\"sz000937\")\n        # \u91cd\u547d\u540d\u5217\u4ee5\u5339\u914d\u539f\u4ee3\u7801\n        df = stock_data.rename(columns={\n            'date': 'date',\n            'open': 'open',\n            'high': 'high',\n            'low': 'low',\n            'close': 'close',\n            'volume': 'volume'\n        })\n        # \u8bbe\u7f6e\u65e5\u671f\u7d22\u5f15\n        df&#91;'date'] = pd.to_datetime(df&#91;'date'])\n        df.set_index('date', inplace=True)\n\n        # \u786e\u4fdd\u6570\u636e\u91cf\u8db3\u591f\n        if len(df) &lt; 200:\n            print(f\"\u6570\u636e\u957f\u5ea6\u4e0d\u8db3\uff0c\u53ea\u6709{len(df)}\u884c\")\n        else:\n            # \u622a\u53d6\u6700\u8fd1200\u4e2a\u4ea4\u6613\u65e5\u6570\u636e\n            df = df.iloc&#91;-200:]\n\n            # \u8ba1\u7b97\u91cf\u5316\u5bf9\u51b2\u6307\u6807\n            result_df = quant_hedge_strategy(df)\n\n            # \u7ed8\u5236\u56fe\u8868\n            fig = plot_quant_strategy(result_df, \"\u5180\u4e2d\u80fd\u6e90\")\n\n            # \u663e\u793a\u56fe\u8868\n            plt.show()\n\n            # \u8f93\u51fa\u7ed3\u679c\n            print(result_df&#91;&#91;'\u91cf\u5316\u5bf9\u51b21', '\u91cf\u5316\u5bf9\u51b22', '\u91cf\u5316\u5bf9\u51b23', '\u91cf\u5316\u5bf9\u51b24', '\u91cf\u5316\u5bf9\u51b211', \n                           '\u8d77\u98de\u4fe1\u53f7', '\u5996\u80a1\u4fe1\u53f7', '\u4ea4\u53c9\u4fe1\u53f7']].tail())\n    except Exception as e:\n        print(f\"\u83b7\u53d6\u6570\u636e\u51fa\u9519: {e}\")\n        print(\"\u4f7f\u7528\u968f\u673a\u6570\u636e\u4f5c\u4e3a\u66ff\u4ee3\")\n        # \u968f\u673a\u6570\u636e\u4f5c\u4e3a\u5907\u9009\n        data = {\n            'date': pd.date_range(start='2023-01-01', periods=200),\n            'open': np.random.uniform(100, 200, 200),\n            'high': np.random.uniform(110, 220, 200),\n            'low': np.random.uniform(90, 190, 200),\n            'close': np.random.uniform(100, 200, 200),\n            'volume': np.random.randint(10000, 100000, 200)\n        }\n        df = pd.DataFrame(data)\n        df.set_index('date', inplace=True)\n\n        # \u8ba1\u7b97\u91cf\u5316\u5bf9\u51b2\u6307\u6807\n        result_df = quant_hedge_strategy(df)\n\n        # \u7ed8\u5236\u56fe\u8868\n        fig = plot_quant_strategy(result_df, \"\u968f\u673a\u6570\u636e\")\n\n        # \u663e\u793a\u56fe\u8868\n        plt.show()\n\n        # \u8f93\u51fa\u7ed3\u679c\n        print(result_df&#91;&#91;'\u91cf\u5316\u5bf9\u51b21', '\u91cf\u5316\u5bf9\u51b22', '\u91cf\u5316\u5bf9\u51b23', '\u91cf\u5316\u5bf9\u51b24', '\u91cf\u5316\u5bf9\u51b211', \n                       '\u8d77\u98de\u4fe1\u53f7', '\u5996\u80a1\u4fe1\u53f7', '\u4ea4\u53c9\u4fe1\u53f7']].tail())<\/code><\/pre>\n\n\n\n<p>\u65b0\u589e\u7684\u7ed8\u56fe\u529f\u80fd\u7279\u70b9\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5305\u542b4\u4e2a\u5b50\u56fe\uff0c\u5168\u9762\u5c55\u793a\u91cf\u5316\u7b56\u7565\u7684\u5404\u9879\u6307\u6807\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b50\u56fe1\uff1a\u80a1\u7968\u4ef7\u683c\u8d70\u52bf\u4e0e\u5173\u952e\u5747\u7ebf\uff0c\u6807\u8bb0\u5404\u79cd\u4fe1\u53f7\u51fa\u73b0\u4f4d\u7f6e<\/li>\n\n\n\n<li>\u5b50\u56fe2\uff1a\u91cf\u5316\u5bf9\u51b22\u30019\u300111\u6307\u6807\uff0c\u586b\u5145\u6307\u6807\u95f4\u533a\u57df<\/li>\n\n\n\n<li>\u5b50\u56fe3\uff1a\u4e3b\u529b\u6697\u76d8\u8d44\u91d1\u6307\u6807(\u91cf\u5316\u5bf9\u51b212-15)<\/li>\n\n\n\n<li>\u5b50\u56fe4\uff1a\u91cf\u5316\u5bf9\u51b2\u4fe1\u53f75\u30016\u7684\u67f1\u72b6\u56fe<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4fe1\u53f7\u6807\u8bb0\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7eff\u8272\u4e09\u89d2\uff1a\u8d77\u98de\u4fe1\u53f7<\/li>\n\n\n\n<li>\u7d2b\u8272\u661f\u53f7\uff1a\u5996\u80a1\u4fe1\u53f7<\/li>\n\n\n\n<li>\u6a59\u8272\u5706\u70b9\uff1a\u4ea4\u53c9\u4fe1\u53f7<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u56fe\u8868\u7f8e\u5316\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u81ea\u52a8\u8c03\u6574\u65e5\u671f\u663e\u793a\u683c\u5f0f<\/li>\n\n\n\n<li>\u6dfb\u52a0\u7f51\u683c\u7ebf\u63d0\u9ad8\u53ef\u8bfb\u6027<\/li>\n\n\n\n<li>\u6bcf\u4e2a\u5b50\u56fe\u90fd\u6709\u6807\u9898\u548c\u56fe\u4f8b<\/li>\n\n\n\n<li>\u5408\u7406\u7684\u989c\u8272\u642d\u914d<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4ea4\u4e92\u529f\u80fd\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9f20\u6807\u60ac\u505c\u53ef\u67e5\u770b\u5177\u4f53\u6570\u503c<\/li>\n\n\n\n<li>\u53ef\u653e\u5927\u7f29\u5c0f\u7279\u5b9a\u533a\u57df<\/li>\n\n\n\n<li>\u53ef\u4fdd\u5b58\u56fe\u8868\u4e3a\u56fe\u7247\u6587\u4ef6<\/li>\n<\/ul>\n\n\n\n<p>\u4f7f\u7528\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u9700\u8981\u5b89\u88c5\u989d\u5916\u4f9d\u8d56\u5e93\uff1a<code>pip install matplotlib<\/code><\/li>\n\n\n\n<li>\u8fd0\u884c\u4ee3\u7801\u540e\u4f1a\u81ea\u52a8\u663e\u793a\u7ed8\u5236\u7684\u56fe\u8868<\/li>\n\n\n\n<li>\u56fe\u8868\u6807\u9898\u4f1a\u663e\u793a\u80a1\u7968\u540d\u79f0\uff0c\u9ed8\u8ba4\u4e3a&#8221;\u4e0a\u8bc1\u6307\u6570&#8221;<\/li>\n\n\n\n<li>\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539<code>plot_quant_strategy<\/code>\u51fd\u6570\u6765\u81ea\u5b9a\u4e49\u56fe\u8868\u6837\u5f0f\u548c\u5185\u5bb9<\/li>\n<\/ol>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b2\u6307\u6807\u7684\u89e3\u91ca<\/strong><\/h1>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4ee3\u7801\u4e2d\u4e3b\u8981\u91cf\u5316\u5bf9\u51b2\u6307\u6807\u7684\u89e3\u91ca\uff0c\u8fd9\u4e9b\u6307\u6807\u7528\u4e8e\u5206\u6790\u80a1\u7968\u8d8b\u52bf\u3001\u8d44\u91d1\u6d41\u5411\u548c\u6f5c\u5728\u4ea4\u6613\u4fe1\u53f7\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. \u8d8b\u52bf\u8ddf\u8e2a\u6307\u6807<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b21<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a<code>EMA(close, 9)<\/code>\uff089\u65e5\u6307\u6570\u79fb\u52a8\u5e73\u5747\u7ebf\uff09<\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u53cd\u6620\u77ed\u671f\u4ef7\u683c\u8d8b\u52bf\uff0c\u6bd4\u7b80\u5355\u5747\u7ebf\u66f4\u654f\u611f\uff0c\u7528\u4e8e\u8bc6\u522b\u77ed\u671f\u65b9\u5411\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b23<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a<code>EMA(\u91cf\u5316\u5bf9\u51b21 \u00d7 1.14, 5)<\/code>\uff08\u5bf9\u653e\u5927\u540e\u7684\u77ed\u671f\u5747\u7ebf\u518d\u505a5\u65e5EMA\uff09<\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u589e\u5f3a\u8d8b\u52bf\u4fe1\u53f7\uff0c\u653e\u5927\u77ed\u671f\u6ce2\u52a8\uff0c\u7528\u4e8e\u6355\u6349\u5feb\u901f\u53d8\u5316\u7684\u8d8b\u52bf\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b24<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a<code>EMA(close, 2)<\/code>\uff082\u65e5\u6307\u6570\u79fb\u52a8\u5e73\u5747\u7ebf\uff09<\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u8d85\u77ed\u671f\u8d8b\u52bf\u6307\u6807\uff0c\u5bf9\u4ef7\u683c\u53d8\u52a8\u6781\u4e3a\u654f\u611f\uff0c\u7528\u4e8e\u8bc6\u522b\u6781\u77ed\u671f\u8f6c\u6298\u70b9\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. \u76f8\u5bf9\u5f3a\u5f31\u6307\u6807<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b22<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a<code>(close - 40\u65e5\u6700\u4f4e) \/ 40\u65e5\u6700\u4f4e \u00d7 100<\/code><\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u8861\u91cf\u5f53\u524d\u4ef7\u683c\u76f8\u5bf9\u4e8e\u8fd140\u65e5\u6700\u4f4e\u4ef7\u7684\u6da8\u5e45\u767e\u5206\u6bd4\uff0c\u7c7b\u4f3c\u4e8eRSI\u6307\u6807\uff0c\u53cd\u6620\u4ef7\u683c\u5f3a\u5ea6\u3002<\/li>\n\n\n\n<li><strong>\u4fe1\u53f7\u903b\u8f91<\/strong>\uff1a\u503c\u8d8a\u9ad8\uff0c\u8868\u660e\u4ef7\u683c\u8ddd\u79bb\u4f4e\u70b9\u8d8a\u8fdc\uff0c\u53ef\u80fd\u5904\u4e8e\u8d85\u4e70\u533a\u57df\uff1b\u53cd\u4e4b\u53ef\u80fd\u5904\u4e8e\u8d85\u5356\u533a\u57df\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b27<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a<code>(close - MA40) \/ MA40 \u00d7 100<\/code><\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u8861\u91cf\u5f53\u524d\u4ef7\u683c\u76f8\u5bf9\u4e8e40\u65e5\u5747\u4ef7\u7684\u504f\u79bb\u7a0b\u5ea6\uff0c\u7528\u4e8e\u5224\u65ad\u4ef7\u683c\u662f\u5426\u504f\u79bb\u5747\u503c\u8fc7\u8fdc\uff08\u53ef\u80fd\u56de\u8c03\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. \u8d44\u91d1\u6d41\u5411\u6307\u6807<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b212-15<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba1\u7b97\u65b9\u5f0f<\/strong>\uff1a\u57fa\u4e8e\u6536\u76d8\u4ef7\u3001\u6210\u4ea4\u91cf\u4e0e\u4e0d\u540c\u5468\u671f\u6210\u672c\u4ef7\uff0890\u65e5\/10\u65e5\u5747\u4ef7\uff09\u7684\u5dee\u503c\u8ba1\u7b97<\/li>\n\n\n\n<li><code>\u91cf\u5316\u5bf9\u51b212 = ((close \u00d7 volume - cost90 \u00d7 volume) \/ 20 + 250) \u00d7 1.2 \/ 5<\/code><\/li>\n\n\n\n<li><code>\u91cf\u5316\u5bf9\u51b213 = ((cost90 \u00d7 volume - close \u00d7 volume) \/ 20 + 250) \u00d7 1.2 \/ 5<\/code><\/li>\n\n\n\n<li><code>\u91cf\u5316\u5bf9\u51b214 = ((close \u00d7 volume - cost10 \u00d7 volume) \/ 20 + 250) \u00d7 1.2 \/ 5<\/code><\/li>\n\n\n\n<li><code>\u91cf\u5316\u5bf9\u51b215 = ((cost10 \u00d7 volume - close \u00d7 volume) \/ 20 + 250) \u00d7 1.2 \/ 5<\/code><\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u6a21\u62df\u4e0d\u540c\u5468\u671f\u7684\u8d44\u91d1\u6d41\u5165\u6d41\u51fa\u60c5\u51b5\uff0c\u6b63\u503c\u8868\u793a\u8d44\u91d1\u6d41\u5165\uff0c\u8d1f\u503c\u8868\u793a\u8d44\u91d1\u6d41\u51fa\u3002<\/li>\n\n\n\n<li><strong>\u4fe1\u53f7\u903b\u8f91<\/strong>\uff1a\u5f53\u77ed\u671f\u8d44\u91d1\u6d41\u5165\uff08\u5982\u91cf\u5316\u5bf9\u51b214\uff09\u5f3a\u4e8e\u957f\u671f\u8d44\u91d1\u6d41\u51fa\uff08\u5982\u91cf\u5316\u5bf9\u51b213\uff09\u65f6\uff0c\u89c6\u4e3a\u770b\u6da8\u4fe1\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. \u4fe1\u53f7\u751f\u6210\u6307\u6807<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u8d77\u98de\u4fe1\u53f7<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89e6\u53d1\u6761\u4ef6<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>\u91cf\u5316\u5bf9\u51b216<\/code>\u4e3aTrue\uff08\u6ee1\u8db3<code>\u91cf\u5316\u5bf9\u51b25<\/code>\u6216<code>\u91cf\u5316\u5bf9\u51b26<\/code>\u6761\u4ef6\uff09<\/li>\n\n\n\n<li>\u4e14<code>\u91cf\u5316\u5bf9\u51b216<\/code>\u5728\u8fd120\u5929\u5185\u9996\u6b21\u51fa\u73b0<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u6355\u6349\u4ef7\u683c\u542f\u52a8\u521d\u671f\u7684\u4fe1\u53f7\uff0c\u53ef\u80fd\u9884\u793a\u77ed\u671f\u5feb\u901f\u4e0a\u6da8\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u5996\u80a1\u4fe1\u53f7<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89e6\u53d1\u6761\u4ef6<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>\u91cf\u5316\u5bf9\u51b214 \u2265 \u91cf\u5316\u5bf9\u51b214_60\u65e5\u9ad8\u70b9<\/code>\uff08\u77ed\u671f\u8d44\u91d1\u6d41\u5165\u521b60\u65e5\u65b0\u9ad8\uff09<\/li>\n\n\n\n<li>\u4e14<code>\u91cf\u5316\u5bf9\u51b214 \u2265 \u91cf\u5316\u5bf9\u51b214_20\u65e5\u9ad8\u70b9<\/code>\u5728\u8fd120\u5929\u5185\u4ec5\u51fa\u73b01\u6b21<\/li>\n\n\n\n<li>\u4e14<code>\u91cf\u5316\u5bf9\u51b214 > \u91cf\u5316\u5bf9\u51b213<\/code>\uff08\u77ed\u671f\u8d44\u91d1\u6d41\u5165\u5f3a\u4e8e\u957f\u671f\u6d41\u51fa\uff09<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u8bc6\u522b\u53ef\u80fd\u51fa\u73b0\u5927\u5e45\u4e0a\u6da8\u7684&#8221;\u5996\u80a1&#8221;\u7279\u5f81\uff0c\u901a\u5e38\u4f34\u968f\u5f3a\u8d44\u91d1\u63a8\u52a8\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u4ea4\u53c9\u4fe1\u53f7<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89e6\u53d1\u6761\u4ef6<\/strong>\uff1a<code>\u91cf\u5316\u5bf9\u51b22<\/code>\u7684\u524d\u4e00\u65e5\u503c\u4f4e\u4e8e<code>\u91cf\u5316\u5bf9\u51b29<\/code>\uff08\u9608\u503c28\uff09\uff0c\u5f53\u65e5\u503c\u9ad8\u4e8e\u6216\u7b49\u4e8e\u9608\u503c<\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u6355\u6349\u4ef7\u683c\u4ece\u5f31\u52bf\u533a\u57df\u5411\u4e0a\u7a81\u7834\u7684\u8f6c\u6298\u70b9\uff0c\u7c7b\u4f3cMACD\u91d1\u53c9\u4fe1\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. \u8f85\u52a9\u6307\u6807<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u91cf\u5316\u5bf9\u51b25 &amp; \u91cf\u5316\u5bf9\u51b26<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u91cf\u5316\u5bf9\u51b25<\/strong>\uff1a\u77ed\u671f\u8d44\u91d1\u6d41\u5165\u4e3a\u6b63\uff0c\u4e14\uff08\u77ed\u671f\u8d44\u91d1\u6d41\u5165>\u957f\u671f\u8d44\u91d1\u6d41\u51fa \u6216 \u77ed\u671f\u8d44\u91d1\u6d41\u5165\u4e3a\u6b63\uff09<\/li>\n\n\n\n<li><strong>\u91cf\u5316\u5bf9\u51b26<\/strong>\uff1a\u77ed\u671f\u8d44\u91d1\u6d41\u5165\u4e3a\u6b63\uff0c\u4e14\u77ed\u671f\u548c\u957f\u671f\u8d44\u91d1\u6d41\u5165\u5747\u4e3a\u6b63\uff0c\u540c\u65f6\u77ed\u671f\u548c\u957f\u671f\u8d44\u91d1\u6d41\u51fa\u5747\u4e3a\u8d1f<\/li>\n\n\n\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u91cf\u5316\u5bf9\u51b25\u4fa7\u91cd\u77ed\u671f\u8d44\u91d1\u6d41\u5411\uff0c\u91cf\u5316\u5bf9\u51b26\u8981\u6c42\u66f4\u4e25\u683c\u7684\u8d44\u91d1\u9762\u6761\u4ef6\uff0c\u4e24\u8005\u7ed3\u5408\u7528\u4e8e\u786e\u8ba4\u5f3a\u52bf\u4fe1\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7b56\u7565\u903b\u8f91\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u8d8b\u52bf\u5224\u65ad<\/strong>\uff1a\u901a\u8fc7\u591a\u5468\u671f\u5747\u7ebf\uff08\u91cf\u5316\u5bf9\u51b21\u30013\u30014\uff09\u8bc6\u522b\u4ef7\u683c\u8d8b\u52bf\u65b9\u5411\u3002<\/li>\n\n\n\n<li><strong>\u5f3a\u5f31\u8bc4\u4f30<\/strong>\uff1a\u901a\u8fc7\u91cf\u5316\u5bf9\u51b22\u8bc4\u4f30\u4ef7\u683c\u76f8\u5bf9\u5f3a\u5ea6\uff0c\u7ed3\u5408\u9608\u503c\uff08\u91cf\u5316\u5bf9\u51b29\uff09\u5224\u65ad\u8d85\u4e70\u8d85\u5356\u3002<\/li>\n\n\n\n<li><strong>\u8d44\u91d1\u76d1\u63a7<\/strong>\uff1a\u901a\u8fc7\u91cf\u5316\u5bf9\u51b212-15\u8ddf\u8e2a\u4e0d\u540c\u5468\u671f\u8d44\u91d1\u6d41\u5411\uff0c\u5224\u65ad\u591a\u7a7a\u529b\u91cf\u5bf9\u6bd4\u3002<\/li>\n\n\n\n<li><strong>\u4fe1\u53f7\u751f\u6210<\/strong>\uff1a\u7efc\u5408\u4e0a\u8ff0\u6307\u6807\uff0c\u751f\u6210\u8d77\u98de\u4fe1\u53f7\u3001\u5996\u80a1\u4fe1\u53f7\u548c\u4ea4\u53c9\u4fe1\u53f7\uff0c\u4f5c\u4e3a\u4ea4\u6613\u51b3\u7b56\u4f9d\u636e\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u8be5\u7b56\u7565\u9002\u5408\u7528\u4e8e\u8bc6\u522b\u77ed\u671f\u8d8b\u52bf\u8f6c\u6298\u70b9\u548c\u5f3a\u52bf\u80a1\uff0c\u4f46\u5b9e\u9645\u5e94\u7528\u4e2d\u9700\u7ed3\u5408\u6b62\u635f\u673a\u5236\u548c\u4ed3\u4f4d\u7ba1\u7406\uff0c\u907f\u514d\u5047\u4fe1\u53f7\u5e26\u6765\u7684\u98ce\u9669\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"809\" src=\"http:\/\/192.168.1.29\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-1024x809.png\" alt=\"\" class=\"wp-image-5843\" srcset=\"http:\/\/xc.ipyingshe.net:5347\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-1024x809.png 1024w, http:\/\/xc.ipyingshe.net:5347\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-300x237.png 300w, http:\/\/xc.ipyingshe.net:5347\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-768x607.png 768w, http:\/\/xc.ipyingshe.net:5347\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-1536x1213.png 1536w, http:\/\/xc.ipyingshe.net:5347\/wp-content\/uploads\/2025\/06\/\u5c4f\u5e55\u622a\u56fe-2025-06-30-190409-2048x1618.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u91cf\u5316\u5bf9\u51b2\u7b56\u7565\u8ba1\u7b97\u7ed8\u56fe \u4ee3\u7801\u63d0\u8981 \u4ee3\u7801\u8fd0\u884c\u73af\u5883\uff0cWIN 11 \uff0cpython 3. <span class=\"readmore\"><a href=\"http:\/\/xc.ipyingshe.net:5347\/?p=5842\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,24],"tags":[],"class_list":["post-5842","post","type-post","status-publish","format-standard","hentry","category-python","category-24"],"_links":{"self":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/5842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5842"}],"version-history":[{"count":1,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/5842\/revisions"}],"predecessor-version":[{"id":5844,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/5842\/revisions\/5844"}],"wp:attachment":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5842"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}