<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>本益成長比 &#8211; FinLab</title>
	<atom:link href="https://www.finlab.tw/tag/%E6%9C%AC%E7%9B%8A%E6%88%90%E9%95%B7%E6%AF%94/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.finlab.tw</link>
	<description>深入淺出的量化投資，讓你在在茫茫股海中，找到專屬於自己的投資方法</description>
	<lastBuildDate>Wed, 01 Feb 2023 17:05:46 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.9</generator>

<image>
	<url>https://www.finlab.tw/wp-content/uploads/2020/07/favicon.png</url>
	<title>本益成長比 &#8211; FinLab</title>
	<link>https://www.finlab.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">179699571</site>	<item>
		<title>低波動本益成長比策略 &#124; MAE_MFE 機器學習選股</title>
		<link>https://www.finlab.tw/low_volatility_stratgy_by_mae_mfe_ml/</link>
					<comments>https://www.finlab.tw/low_volatility_stratgy_by_mae_mfe_ml/#respond</comments>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Mon, 07 Nov 2022 23:33:00 +0000</pubDate>
				<category><![CDATA[AI看股票]]></category>
		<category><![CDATA[FinLab 量化平台]]></category>
		<category><![CDATA[VIP文章]]></category>
		<category><![CDATA[基本面分析]]></category>
		<category><![CDATA[技術面]]></category>
		<category><![CDATA[籌碼面]]></category>
		<category><![CDATA[選股策略]]></category>
		<category><![CDATA[Kmeans]]></category>
		<category><![CDATA[MAE_MFE]]></category>
		<category><![CDATA[PEG]]></category>
		<category><![CDATA[scikit-learn]]></category>
		<category><![CDATA[VIP限定]]></category>
		<category><![CDATA[低波動]]></category>
		<category><![CDATA[台股]]></category>
		<category><![CDATA[本益成長比]]></category>
		<category><![CDATA[機器學習]]></category>
		<category><![CDATA[決策樹]]></category>
		<category><![CDATA[混淆矩陣]]></category>
		<category><![CDATA[融資使用率]]></category>
		<category><![CDATA[進場波動]]></category>
		<guid isPermaLink="false">https://www.finlab.tw/?p=3687</guid>

					<description><![CDATA[有時我們有了初始策略輪廓，寫出來發現年化報酬率不錯，但夏普率不高、最大回撤率過大，若拿去實戰，持有歷程會遇上信心考驗，績效跳動範圍也大。有沒有辦法讓策略能夠報酬率更高、波動更低？

本篇範例會利用基礎的機器學習演算法 Kmeans 分群 mae_mfe 指標，製作決策樹使用的 Labels，優化原本的"本益成長比"策略，示範 scikit-learn 搭配 finlab 模組是多麼強大又簡單！]]></description>
										<content:encoded><![CDATA[
<p class="has-medium-font-size">有時我們有了初始策略輪廓，寫出來發現年化報酬率不錯，但夏普率不高、最大回撤率過大，若拿去實戰，持有歷程會遇上信心考驗，績效跳動範圍也大。有沒有辦法讓策略能夠報酬率更高、波動更低？ 但選股條件那麼多，單因子策略不停去 try error 組合很沒效率，這時就是&#8221;機器學習選股&#8221;的優勢，高效分析影響性大的特徵。<br>很多人對如何將機器學習應用到投資領域很有興趣，但實作要怎麼設計？用報酬率當Label真的好嗎？太難的演算法又看不懂或難消化，到底怎麼辦？<br>本篇範例會利用基礎的機器學習演算法 Kmeans 分群 mae_mfe 指標，製作決策樹使用的 Labels，優化原本的&#8221;本益成長比&#8221;策略，示範 scikit-learn 搭配 finlab 模組是多麼強大又簡單！</p>



<h2>選定待優化的策略</h2>



<p class="has-medium-font-size"><a href="https://www.finlab.tw/finlab-tw-stock-peg-strategy/">進化後的本益比｜本益成長比選股策略</a> 一文中用簡單的單因子回歸產生一個簡潔卻有效的選股策略。為了製造比較多的回測樣本，我們將之前的策略調成每月選取20檔標的。<br><strong>留意本篇的測試資料結果可能隨著資料集增長而產生差異，回測僅供參考。</strong><br>回測年化報酬率23%是不錯的水準，夏普率勉強優於大盤的0.9，但最大回撤率蠻高的，報酬率曲線震盪有點劇烈，好幾次回檔30%，實戰的持有過程肯定會備受考驗，可以加上哪些條件解決波動的問題呢？</p>



<pre class="wp-block-code"><code lang="python" class="language-python">from finlab import data
from finlab.backtest import sim

pe = data.get('price_earning_ratio:本益比')
rev = data.get('monthly_revenue:當月營收')
rev_ma3 = rev.average(3)
rev_ma12 = rev.average(12)
營業利益成長率 = data.get('fundamental_features:營業利益成長率').deadline()
peg = (pe/營業利益成長率)
cond1 = rev_ma3/rev_ma12 &gt; 1.1
cond2 = rev/rev.shift(1) &gt; 0.9

cond_all = cond1 &amp; cond2
result = peg*(cond_all)
position = result[result&gt;0].is_smallest(20).reindex(rev.index_str_to_date().index, method='ffill')


report = sim(position=position,name="本益成長比", fee_ratio=1.425/1000/3,upload=True,mae_mfe_window=30,position_limit=0.05)
report.display()</code></pre>



<figure class="wp-container-2 wp-block-gallery-1 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img width="1024" height="645" data-id="4735" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.19.18-1024x645.png" alt="截圖 2022 10 30 下午9.19.18" class="wp-image-4735" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.19.18-1024x645.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.19.18-300x189.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.19.18-768x483.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.19.18.png 1390w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 1"></figure>
</figure>



<p class="has-medium-font-size"><br></p>



<h2>製作波動性 Labels </h2>



<p class="has-medium-font-size">給對的學習目標很重要！選擇比努力更重要！<br>一般機器學習選股策略使用報酬率做 label ，但演算法只會判斷報酬率的賺賠高低，並沒有辦法學習波動特性，若給定的 label 一開始就有所限制，再怎麼學也是無法跳脫只追求高報酬的風險。 </p>



<h3>MAE &amp; MFE</h3>



<p class="has-medium-font-size"><a href="https://www.finlab.tw/display_mae_mfe_analysis/">揭開策略的波動面紗｜MAE&amp;MFE分析圖組使用指南</a> 一文中解釋了 MAE 與 MFE 的可幫助我們分析策略波動和基本應用，我們可以輕鬆由FinLab模組中的<a href="https://doc.finlab.tw/reference/analysis/#finlab.analysis.Report.get_trades" target="_blank" rel="noopener"> <code>report.get_trades()</code></a> 取得策略標的持有歷程的 MAE 與 MFE 與其他交易資料。<a href="https://doc.finlab.tw/reference/analysis/#finlab.analysis.Report.display_mae_mfe_analysis" target="_blank" rel="noopener"> <code>report.display_mae_mfe_analysis()</code></a> 則可顯示波動率分析圖組，幫助我們觀察波動分佈。</p>



<figure class="wp-container-4 wp-block-gallery-3 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1200" height="1200" data-id="4729" src="https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1.png" alt="newplot 1" class="wp-image-4729" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1.png 1200w, https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1-300x300.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1-1024x1024.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1-150x150.png 150w, https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1-768x768.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/newplot-1-600x600.png 600w" sizes="(max-width: 1200px) 100vw, 1200px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 2"></figure>
</figure>



<p class="has-medium-font-size"><br>從上圖中的 GMFE / MAE 子圖可以發現波動分佈分為三塊：</p>



<ul class="has-medium-font-size"><li>最多聚集的一塊是在左下角小賺小賠的標的。</li><li>策略獲利的標的有些是「高 GMFE 低 MAE (往上高波動、往下低波動)」，給我們帶來極高獲利，這在趨勢策略較常出現，是我們想保留的。</li><li>虧損的標的大多是 「低 GMFE 高 MAE  (往下高波動、往上低波動)」的族群，有些標的持有紀錄還有 -50% 以上不利跌幅，這些會影響到策略的波動穩定度，是我們想淘汰的拖油瓶。</li></ul>



<p class="has-medium-font-size">若能用MAE &amp; MFE 取代報酬率作為 label，就可以讓模型學習判斷波動度與報酬率，若三個分群有特徵共通性，那之後做機器學習可能可找到有效分類 「高 GMFE 低 MAE 」 與 「低 GMFE 高 MAE」的特徵。</p>



<h3>Kmeans 分群</h3>



<p class="has-medium-font-size">如何界定「高 GMFE 低 MAE 」與 「低 GMFE 高 MAE 」 ？<br>這時<a href="https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html" target="_blank" rel="noopener">非監督學習演算法Kmeans</a>就可以粉墨登場，幫我們去做分群的動作，讓模型自動幫我們藉由 GMFE 低 MAE 兩項特徵分出三個群集。<br><strong>注意分群給的數字具有隨機性！</strong>比如「高 GMFE 低 MAE 」可能分類標註為1，下次執行跳為2。<br>在模型訓練前，因用有少數大幅獲利與多數群集分太開，先使用 <code>from sklearn.preprocessing import StandardScaler</code> 將資料做正規化，將資料傳入 Kmeans 分群，並將結果繪圖呈現分佈。<br>我們把預設值 y_pred 放入原本的 trade dataframe，設為 group，就完成 label 標記了，輸出結果可以發現 Kmeans 成功幫我們分出三個顏色區塊。</p>



<pre class="wp-block-code"><code lang="python" class="language-python">import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans

from sklearn.preprocessing import StandardScaler

def scale_data(data):
    scaler = StandardScaler().fit(data)
    X_scaled = scaler.transform(data)
    return X_scaled

scale_mae = scale_data(trades['mae'].values.reshape(-1, 1))
scale_gmfe = scale_data(trades['gmfe'].values.reshape(-1, 1))


plt.figure(figsize = (8, 8))
random_state = 100
X = np.hstack((scale_mae,scale_gmfe))
y_pred = KMeans(n_clusters=3,random_state=random_state).fit_predict(X)

scatter = plt.scatter(X[:, 0], X[:, 1], c=y_pred)
plt.legend(*scatter.legend_elements())
plt.title("mae_gmfe kmeans")
plt.xlabel("mae")
plt.ylabel("gmfe")</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="942" height="855" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.00.52.png" alt="截圖 2022 10 30 下午9.00.52" class="wp-image-4731" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.00.52.png 942w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.00.52-300x272.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.00.52-768x697.png 768w" sizes="(max-width: 942px) 100vw, 942px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 3"></figure>



<p class="has-medium-font-size">為了讓模型更專注於「高 GMFE 低 MAE 」與 「低 GMFE 高 MAE 」 的學習，只保留 group 為1、2 (藍綠點) 的部分，我們把白點的區塊視為不影響大局的雜訊，藍色和綠色的點才是影響策略波動的關鍵</p>



<pre class="wp-block-code"><code lang="python" class="language-python">cluster_trades = trades.copy()
cluster_trades['group'] = y_pred
cluster_trades['stock_id'] = cluster_trades['stock_id'].apply(lambda s:s[:s.index(' ')])
ana_targets = cluster_trades[cluster_trades['group'].isin([1,2])]
ana_targets = ana_targets.reset_index().set_index(['stock_id', 'entry_sig_date'])</code></pre>



<p class="has-medium-font-size"></p>



<h2>決策樹-探索低波動因子</h2>



<p class="has-medium-font-size">標注完了 label 後，就可以進行下一步，尋找有沒有選股條件能辨識label ，這就要換監督式學習登場。這部分的程式主要參考 <a href="https://hahow.in/courses/5b9d3a6dca498a001e917383/discussions" target="_blank" rel="noopener">Python 理財：打造自己的 AI 股票理專課程</a>  單元 3-7-隨機森林選股策略實作，因資料量級較小，把隨機森林換成決策樹。</p>



<h3>製作 Features</h3>



<p class="has-medium-font-size">將想測試的資料或可能的低波動因子並成 dataframe 準備進入模型訓練，特徵可以使用 <a href="https://ai.finlab.tw/database" target="_blank" rel="noopener">Finlab 資料庫</a> 取得，並將資料以 2019 年為分界點，切成訓練及測試資料集。</p>



<figure class="wp-block-image"><img alt=""/></figure>



<h3>模型測試結果</h3>



<p class="has-medium-font-size">將資料集套入 sklearn 決策樹，驗證目標為label=1的集群(低 GMFE 高 MAE )，若找到機率越高，能有效躲避波動。<br>測試結果放入 <a href="https://www.ycc.idv.tw/confusion-matrix.html" target="_blank" rel="noopener">confusion-matrix</a> 驗證結果，抓出「低 GMFE 高 MAE 」的準確度達75%，預測45(34+11) 次內有34次正確。<br>指標意義詳見～<a href="https://medium.com/nlp-tsupei/precision-recall-f1-score%E7%B0%A1%E5%96%AE%E4%BB%8B%E7%B4%B9-f87baa82a47" target="_blank" rel="noopener">Precision, Recall, F1-score簡單介紹</a>。<br></p>



<pre class="wp-block-code"><code lang="python" class="language-python">import pandas as pd
from sklearn import metrics
from sklearn.tree import DecisionTreeClassifier

label = ana_targets[ana_targets['mae']&gt; ana_targets['gmfe']]['group'].values[0]
features_name = list(features.keys())
cf = DecisionTreeClassifier(max_depth=3)
cf.fit(dataset_train[features_name], dataset_train['group'] ==label)


prediction = cf.predict(dataset_test[features_name])
confusion_matrix = metrics.confusion_matrix(dataset_test['group'] == label, prediction)
tn, fp, fn, tp = confusion_matrix.ravel()
confusion_matrix = np.array([[tp, fp],[fn, tn]])


print('f1 score:',metrics.f1_score(dataset_test['group'] == label, prediction))
print('precision score(p):',metrics.precision_score(dataset_test['group'] == label, prediction))
print('recall score(p):',metrics.recall_score(dataset_test['group'] == label, prediction))


plt.figure(figsize=(10, 6))
sns.set(font_scale=2)

ax = sns.heatmap(confusion_matrix, annot=True, cmap='Blues')
ax.set_title('Confusion Matrix with labels\n\n');
ax.set_xlabel('Actual Values')
ax.set_ylabel('Predicted Values');

## Ticket labels - List must be in alphabetical order
ax.xaxis.set_ticklabels(['True','False'])
ax.yaxis.set_ticklabels(['True','False'])

## Display the visualization of the Confusion Matrix.
plt.show()
</code></pre>



<figure class="wp-container-6 wp-block-gallery-5 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="954" data-id="4866" src="https://www.finlab.tw/wp-content/uploads/2022/11/截圖-2022-11-13-下午7.16.34-1024x954.png" alt="截圖 2022 11 13 下午7.16.34" class="wp-image-4866" srcset="https://www.finlab.tw/wp-content/uploads/2022/11/截圖-2022-11-13-下午7.16.34-1024x954.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/11/截圖-2022-11-13-下午7.16.34-300x280.png 300w, https://www.finlab.tw/wp-content/uploads/2022/11/截圖-2022-11-13-下午7.16.34-768x716.png 768w, https://www.finlab.tw/wp-content/uploads/2022/11/截圖-2022-11-13-下午7.16.34.png 1422w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 4"></figure>
</figure>



<p></p>



<h3>因子重要性</h3>



<p class="has-medium-font-size"><code>from sklearn.tree import plot_tree</code>  可繪製出決策樹的機器學習選股決策流程，最上頭的X[8]為&#8217;融資使用率&#8217;，使用33.6當數值分界點，X序列等同features_name排序。<br><code>cf.feature_importances_</code>  可得知重要因子的影響性分數。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="751" src="https://www.finlab.tw/wp-content/uploads/2022/10/下載-1-1024x751.png" alt="下載 1" class="wp-image-4733" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/下載-1-1024x751.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/下載-1-300x220.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/下載-1-768x563.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/下載-1.png 1130w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 5"><figcaption>決策樹分類流程</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="409" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47-1024x409.png" alt="截圖 2022 10 30 下午9.10.47" class="wp-image-4734" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47-1024x409.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47-300x120.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47-768x307.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47-1536x613.png 1536w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.10.47.png 2034w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 6"></figure>



<p class="has-medium-font-size"></p>



<h3>優化測試</h3>



<p class="has-medium-font-size">參考 features_name 、 plot_tree 設定條件數值，加入條件到原本的策略，檢測能否優化。<br>檔數、部位上限、週期設定不變，只加上選股條件。數據會因資料集擴增而有差異，僅供參考。</p>



<h4 class="has-medium-font-size">低融資使用率</h4>



<p class="has-medium-font-size">加入 (融資使用率 &lt;= 34) 條件。</p>



<figure class="wp-container-8 wp-block-gallery-7 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="690" data-id="4737" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.26.22-1024x690.png" alt="截圖 2022 10 30 下午9.26.22" class="wp-image-4737" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.26.22-1024x690.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.26.22-300x202.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.26.22-768x518.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.26.22.png 1383w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 7"></figure>
</figure>



<h4 class="has-medium-font-size">低進場波動率</h4>



<p class="has-medium-font-size">加入 ( entry_volatility &lt;= 0.032) 條件。</p>



<figure class="wp-container-10 wp-block-gallery-9 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="701" data-id="4738" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.29.17-1024x701.png" alt="截圖 2022 10 30 下午9.29.17" class="wp-image-4738" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.29.17-1024x701.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.29.17-300x205.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.29.17-768x526.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.29.17.png 1385w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 8"></figure>
</figure>



<h4 class="has-medium-font-size"> </h4>



<h4 class="has-medium-font-size">低融資使用率 ＆ 低進場波動率<br></h4>



<figure class="wp-container-12 wp-block-gallery-11 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="692" data-id="4736" src="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.24.29-1024x692.png" alt="截圖 2022 10 30 下午9.24.29" class="wp-image-4736" srcset="https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.24.29-1024x692.png 1024w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.24.29-300x203.png 300w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.24.29-768x519.png 768w, https://www.finlab.tw/wp-content/uploads/2022/10/截圖-2022-10-30-下午9.24.29.png 1387w" sizes="(max-width: 1024px) 100vw, 1024px" title="低波動本益成長比策略 | MAE_MFE 機器學習選股 9"></figure>
</figure>



<h4 class="has-medium-font-size"><br></h4>



<h3>回測分析</h3>



<p class="has-medium-font-size">單因子中「低融資使用率」效果最強，明顯提升「夏普率」，「最大回撤率」則變動不大。可能代表原本的策略蠻多虧損或大幅低檔震盪的源在選到高融資使用率的股票，這類股票通常是市場的大波動熱門股，持有者偏向短線操作，很不穩定。<br><br>「低進場波動度」雖然讓「年化報酬率」減少，但是「夏普率」和「最大回撤率」提升效果比「低融資使用率」更優。低進場波動度代表買入時波動穩定，比較不會碰上已漲一大段的飛天股之後的乖離過大修正，若之後要加上停損條件，也比較不會在持有初期頻繁停損被洗出場。<br><br>「低融資使用率」若與「低進場波動度」因子結合，「夏普率」 從原先策略的 0.9 拉升到1.5，「最大回撤率」降到 -17% 的水準，明顯優化回撤波動。幾乎每一年回測都是正報酬穩定度明顯提升。</p>



<h2>結論</h2>



<p class="has-medium-font-size">這樣的優化策略思路是不是很有趣呢？藉由多元 label 的設定，讓機器學習能考慮多方面去強化策略，只用 scikit learn 最基本的機器學習演算法，非監督式學習與監督式的雙流分工，就能讓優化策略的流程省時省力，趕緊來試試用機器學習選股讓策略更上一層樓吧～<br><a href="https://colab.research.google.com/drive/1Sag1kIoHY2TDXJWWbugRIz1Mq8BcCi2f?usp=sharing" target="_blank" rel="noopener">colab 範例檔</a><br><a href="https://ai.finlab.tw/strategyview/?uid=TJN4FDuqrwU8DML7DAjUYFIMutp2&amp;sid=%E4%BD%8E%E6%B3%A2%E5%8B%95%E6%9C%AC%E7%9B%8A%E6%88%90%E9%95%B7%E6%AF%94" target="_blank" rel="noopener">低波動本益成長比策略部署</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.finlab.tw/low_volatility_stratgy_by_mae_mfe_ml/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3687</post-id>	</item>
		<item>
		<title>進化後的本益比｜本益成長比選股策略</title>
		<link>https://www.finlab.tw/finlab-tw-stock-peg-strategy/</link>
					<comments>https://www.finlab.tw/finlab-tw-stock-peg-strategy/#respond</comments>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Fri, 24 Sep 2021 07:34:05 +0000</pubDate>
				<category><![CDATA[股票策略]]></category>
		<category><![CDATA[VIP文章]]></category>
		<category><![CDATA[基本面分析]]></category>
		<category><![CDATA[選股策略]]></category>
		<category><![CDATA[VIP限定]]></category>
		<category><![CDATA[本益成長比]]></category>
		<category><![CDATA[本益比]]></category>
		<guid isPermaLink="false">https://www.finlab.tw/?p=2796</guid>

					<description><![CDATA[本益成長比(簡稱:PEG)是本益比(簡稱:PE)的延伸，將公司未來獲利成長因素納入考量，解決PE對成長股反應過 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p id="block-5a296350-e9c1-4fa2-96ad-f001bd020ffe">本益成長比(簡稱:PEG)是本益比(簡稱:PE)的延伸，將公司未來獲利成長因素納入考量，解決PE對成長股反應過慢的問題。</p>



<p id="block-5a296350-e9c1-4fa2-96ad-f001bd020ffe">相對PE，PEG較少人應用。這篇文章延續上一篇<a href="https://www.finlab.tw/finlab-tw-stock-pe-strategy/" class="rank-math-link">本益比策略</a>的內容，會帶大家來驗證PEG的相關策略，示範如何使用使用Finlab量化平台工具幫助開發，說明策略撰寫的脈絡，進而延伸到結合成長因子的雙因子策略。</p>



<h2 id="block-46be4338-5989-4e5d-b00a-0b234040d402">PEG定義</h2>



<p id="block-d1891dd4-1cb4-436c-9271-96c12dff1b95">一般傳統的PEG公式如下</p>



<blockquote class="wp-block-quote"><p>本益成長比(PEG) = 本益比/稅後盈餘成長率</p></blockquote>



<p id="block-d0b7677a-4961-4513-82b2-ae59359fcf3c">例如公司A公司本益比10元，近一季稅後盈餘成長率20%，則PEG為10/20(百分比%的部份直接除)=0.5。</p>



<p>PEG反應越高的本益比要對應越高的成長性才合理。</p>



<p>PEG為1，代表本益比與獲利預期成長相等，股價在合理區間。</p>



<p>小於0.6代表預期獲利成長明顯大於本益比，可能被低估，有機會在實現成長後達到合理價。</p>



<p>大於2代表預期獲利成長明顯小於本益比，可能被高估成本夢比。</p>



<h3>公式重構</h3>



<p>傳統上PEG分母使用稅後盈餘成長率，但回測後發現效果沒太好，於是想到～雖然稅後盈餘成長與EPS最高度相關，稅後盈餘成長可能帶有一次性獲利的雜訊，因獲利成長持續性低，市場對這類的企業可能評價較低。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="393" src="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-1024x393.png" alt="截圖 2021 09 25 下午4.56.32" class="wp-image-2813" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-1024x393.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-300x115.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-768x295.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-1536x590.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-25-下午4.56.32-2048x786.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 10"><figcaption>稅後盈餘成長率計算PEG</figcaption></figure>



<p>所以回測看看所有的盈餘成長率，包含&#8217;營收成長率&#8217;, &#8216;營業毛利成長率&#8217;, &#8216;營業利益成長率&#8217;, &#8216;稅前淨利成長率&#8217;, &#8216;稅後淨利成長率&#8217;，觀察每一種PEG指標在0.2間隔區間的回測。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="590" src="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9-1024x590.png" alt="newplot 9" class="wp-image-2812" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9-1024x590.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9-300x173.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9-768x442.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9-1536x885.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-9.png 1736w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 11"></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="590" src="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7-1024x590.png" alt="newplot 7" class="wp-image-2797" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7-1024x590.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7-300x173.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7-768x442.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7-1536x885.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-7.png 1736w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 12"></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="590" src="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8-1024x590.png" alt="newplot 8" class="wp-image-2798" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8-1024x590.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8-300x173.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8-768x442.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8-1536x885.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/newplot-8.png 1736w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 13"></figure>



<p>發現使用&#8217;營業利益成長率'(子圖3)當作分母的線性回歸最佳，另外四種成長率指標的趨勢較跳動，且越低的&#8217;PE/營業利益成長率&#8217;報酬率較高，推測合理解釋為營業利益成長較能反映本業成長性，若獲利多來自本業成長，排除賣資產灌獲利的本業低成長公司，市場預期成長持續性的機率較高，則可能給予較高的評價。</p>



<h2 id="block-ae351a92-f06e-4e55-a73e-8d42c07934ea">PEG單因子策略回測</h2>



<p id="block-d30c3519-bcb6-4d2a-982b-b3d492519192">使用Finlab套件輕鬆撰寫策略～回測低PEG的標的，每月進行換股。</p>



<pre id="block-7e7128bc-59f8-4a4b-ab03-faf890b90967" class="wp-block-code"><code lang="python" class="language-python">from finlab import data
from finlab.backtest import sim

pe = data.get('price_earning_ratio:本益比')
營業利益成長率=data.get('fundamental_features:營業利益成長率')
peg=(pe/營業利益成長率)
position= (peg&gt;0) &amp; (peg&lt;0.5)
rr=sim(position=position,resample='M',name="策略教學範例:peg_single_factor",upload=True)</code></pre>



<p></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="387" src="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-1024x387.png" alt="截圖 2021 09 24 下午2.43.51 1" class="wp-image-2800" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-1024x387.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-300x113.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-768x290.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-1536x581.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午2.43.51-1-2048x774.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 14"><figcaption>營業利益成長率計算PEG</figcaption></figure>



<h2 id="block-8764c5a5-4873-4c05-bde0-f87be275ebca">雙因子策略</h2>



<p>PEG是有效因子，但可能還有優化的空間，搭配其他成長因子的指標如月營收，可以更鎖定成長動能強+股價低估的標的。</p>



<h3 id="block-9af3019f-c3d5-45b9-bab3-77de241db26a">月營收成長策略回測</h3>



<p id="block-f8c8225d-c978-4576-a968-ee754a2e09df">我們先來測試月營收成長的單因子策略，主要思維為短期營收動能突破長期趨勢，條件為:</p>



<p>1.近3月平均月營收/近12月平均月營收&gt;1.1</p>



<p>2.營收月增大於-10%</p>



<p>3.每月進行換股，回測區間為方便與PEG策略同步比較，回測區間為2013-2021。</p>



<pre id="block-f73b961c-3124-4f5c-9fc7-f39d25a90c1c" class="wp-block-code"><code lang="python" class="language-python">from finlab import data
from finlab.backtest import sim

rev=data.get('monthly_revenue:當月營收')
rev_ma3=rev.average(3)
rev_ma12=rev.average(12)
pe = data.get('price_earning_ratio:本益比')

cond1= rev_ma3/rev_ma12&gt;1.1
cond2=rev/rev.shift(1)&gt;0.9

position=cond1 &amp; cond2

# 同步回測年度
position=position.reindex(pe.index, method='ffill')
sim(position=position,resample='M',name="策略教學範例:rev",upload=True)</code></pre>



<p></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="400" src="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-1024x400.png" alt="截圖 2021 09 24 下午3.05.47" class="wp-image-2801" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-1024x400.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-300x117.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-768x300.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-1536x600.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.05.47-2048x800.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 15"></figure>



<p>回測數據蠻好的，就單因子而言，月營收成長明顯比PEG策略有更好的表現。</p>



<p></p>



<h3 id="block-ec34c7cb-88ce-44c8-8e28-5c05aaaafec3">雙因子策略回測</h3>



<p>若結合營收成長因子與PEG會有更好的效果嗎？</p>



<p>我們把PEG當作輔助因子，用來把月營收成長策略的標的做限縮，每個月月營收成長過濾完後，再挑PEG最低的10檔當作持股，。</p>



<p>再加入適當的停損條件去優化組合波動，如何設定適當的停損會在後續教學文章解說。這次停損設定在10%。</p>



<pre id="block-bdb8d055-1bee-46d5-9ce1-97dccbb8332e" class="wp-block-code"><code lang="python" class="language-python">pe = data.get('price_earning_ratio:本益比')
rev=data.get('monthly_revenue:當月營收')
rev_ma3=rev.average(3)
rev_ma12=rev.average(12)
營業利益成長率=data.get('fundamental_features:營業利益成長率')
peg=(pe/營業利益成長率)
cond1= rev_ma3/rev_ma12&gt;1.1
cond2=rev/rev.shift(1)&gt;0.9

cond_all=cond1 &amp; cond2
result=peg*(cond_all)
position=result[result&gt;0].is_smallest(10).reindex(rev._index_str_to_date_month().index, method='ffill')

sim(position=position,name="策略教學範例:peg_rev",stop_loss=0.1,upload=True)</code></pre>



<p id="block-4d357d2f-747d-424f-b5ac-491d039174a9"></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="398" src="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-1024x398.png" alt="截圖 2021 09 24 下午3.19.37" class="wp-image-2802" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-1024x398.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-300x117.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-768x298.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-1536x597.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.19.37-2048x796.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 16"></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="894" src="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57-1024x894.png" alt="截圖 2021 09 24 下午3.25.57" class="wp-image-2803" srcset="https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57-1024x894.png 1024w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57-300x262.png 300w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57-768x671.png 768w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57-1536x1341.png 1536w, https://www.finlab.tw/wp-content/uploads/2021/09/截圖-2021-09-24-下午3.25.57.png 1545w" sizes="(max-width: 1024px) 100vw, 1024px" title="進化後的本益比｜本益成長比選股策略 17"></figure>



<p>可以發現策略績效上升到31%，夏普率和MDD都更優化，僅是這樣簡單的條件就能寫出不錯的雙因子策略。今年更是靠抓到航海王賺到不少油水。</p>



<h2 id="block-e495eafc-9b2c-498f-a772-7e75e9aeb5d5">總結</h2>



<p id="block-ec69750e-5119-40aa-9bae-dcd5154a2fcb">PEG做單因子選股有正面效果，結合其他成長指標更能如虎添翼，在成長動能型的策略會是好幫手。</p>



<p id="finlab-tw-stock-peg-strategy">有沒有更會使用Finlab量化平台開發策略了呢？</p>



<p id="block-55168ab1-74c2-48d9-8026-9c0247c0d5c9">對本篇程式有興趣的可以參考文底連結附檔，記得要先註冊<a href="https://ai.finlab.tw/" target="_blank" rel="noopener">Finlab量化平台</a>才可有權限使用程式喔！</p>



<p id="block-08507cdf-ff03-4654-83bd-ea97a8476d7a"><a href="https://drive.google.com/file/d/12gYKKJ-l1IMgtvO6VpgZi1d4QAwdROzI/view?usp=sharing" class="rank-math-link" target="_blank" rel="noopener">colab程式範例</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.finlab.tw/finlab-tw-stock-peg-strategy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2796</post-id>	</item>
		<item>
		<title>本益成長比真的越低越好！？</title>
		<link>https://www.finlab.tw/%e6%af%94%e6%9c%ac%e7%9b%8a%e6%af%94%e6%9b%b4%e5%a5%bd%e7%94%a8%e7%9a%84%e6%9c%ac%e7%9b%8a%e6%af%94%e6%88%90%e9%95%b7%e7%8e%87%ef%bc%81/</link>
					<comments>https://www.finlab.tw/%e6%af%94%e6%9c%ac%e7%9b%8a%e6%af%94%e6%9b%b4%e5%a5%bd%e7%94%a8%e7%9a%84%e6%9c%ac%e7%9b%8a%e6%af%94%e6%88%90%e9%95%b7%e7%8e%87%ef%bc%81/#respond</comments>
		
		<dc:creator><![CDATA[FinLab - 韓承佑]]></dc:creator>
		<pubDate>Wed, 22 Jul 2020 07:04:43 +0000</pubDate>
				<category><![CDATA[基本面分析]]></category>
		<category><![CDATA[PEG]]></category>
		<category><![CDATA[指標]]></category>
		<category><![CDATA[本益成長比]]></category>
		<category><![CDATA[本益比]]></category>
		<category><![CDATA[選股]]></category>
		<guid isPermaLink="false">http://34.96.136.135/?p=493</guid>

					<description><![CDATA[很久之前有寫過 本益比 如何使用，本益比 就是看企業股價和獲利之間的關係，選擇小一點的本益比是可以幫助我們選到好股票的，但是每一家公司的本益比都有著天壤之別，所以必須要校正， 本益成長比 就是一個本益比的進化版。本益成長比 不只可以看當下，還考慮了一家公司未來是否能繼續盈利一個指標。]]></description>
										<content:encoded><![CDATA[
<p>很久之前有寫過&nbsp;<strong>本益比</strong>&nbsp;如何使用，<strong>本益比</strong>&nbsp;就是看企業股價和獲利之間的關係，選擇小一點的本益比是可以幫助我們選到好股票的，但是每一家公司的本益比都有著天壤之別，所以必須要校正，&nbsp;<strong>本益成長比</strong>&nbsp;就是一個本益比的進化版。<strong>本益成長比</strong>&nbsp;不只可以看當下，還考慮了一家公司未來是否能繼續盈利一個指標。</p>



<p>以下是&nbsp;<strong>本益成長比</strong>&nbsp;的公式：</p>



<p>近4季稅後淨利年增率：(近4季稅後淨利總和 / 去年同期近4季稅後淨利總和 &#8211; 1) * 100%<br>本益成長比（PEG）：本益比/近4季稅後淨利年增率</p>



<p>看起來考慮了公司的成長，所以當PEG越小，代表&nbsp;<strong>本益比</strong>&nbsp;越小或是&nbsp;<strong>淨利年增率</strong>&nbsp;越大，對投資人來講都是好事情！</p>



<p>理論上是這樣，而實際上真的是這樣嗎？我們不妨接著看！</p>



<p>首先我們先算出當前所有上市上櫃其PEG的分佈圖：<a href="https://www.finlab.tw/%E6%AF%94%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%9B%B4%E5%A5%BD%E7%94%A8%E7%9A%84%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%88%90%E9%95%B7%E7%8E%87%EF%BC%81/dis.png"></a></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="595" height="252" src="http://34.96.136.135/wp-content/uploads/2020/07/dis-1.png" alt="dis 1" class="wp-image-494" srcset="https://www.finlab.tw/wp-content/uploads/2020/07/dis-1.png 595w, https://www.finlab.tw/wp-content/uploads/2020/07/dis-1-300x127.png 300w" sizes="(max-width: 595px) 100vw, 595px" title="本益成長比真的越低越好！？ 18"></figure></div>



<p>可以發現越接近0的越多公司，這種分佈還滿奇特的，我以為接近0的公司會很少才對，沒想到事實竟然跟我想像的相反，感覺好像很多公司的淨利年增率很猛！然而假如我哪裡做錯了，可以直接留言糾正我。</p>



<p>我們就將公司分成好幾組，每60天選擇PEG在只定範圍內的股票，就可以畫成下圖：<a href="https://www.finlab.tw/%E6%AF%94%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%9B%B4%E5%A5%BD%E7%94%A8%E7%9A%84%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%88%90%E9%95%B7%E7%8E%87%EF%BC%81/eq.png"></a></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="598" height="340" src="http://34.96.136.135/wp-content/uploads/2020/07/eq-9.png" alt="eq 9" class="wp-image-495" srcset="https://www.finlab.tw/wp-content/uploads/2020/07/eq-9.png 598w, https://www.finlab.tw/wp-content/uploads/2020/07/eq-9-300x171.png 300w" sizes="(max-width: 598px) 100vw, 598px" title="本益成長比真的越低越好！？ 19"></figure></div>



<p>簡直有夠亂…這說明了PEG難道無效？！感覺是真的很難分辨出越小越好，還是越大越好…，所以我們再畫另一張圖，更好的判斷PEG大小跟獲利的高低：<a href="https://www.finlab.tw/%E6%AF%94%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%9B%B4%E5%A5%BD%E7%94%A8%E7%9A%84%E6%9C%AC%E7%9B%8A%E6%AF%94%E6%88%90%E9%95%B7%E7%8E%87%EF%BC%81/peg.png"></a></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="598" height="361" src="http://34.96.136.135/wp-content/uploads/2020/07/peg.png" alt="peg" class="wp-image-496" srcset="https://www.finlab.tw/wp-content/uploads/2020/07/peg.png 598w, https://www.finlab.tw/wp-content/uploads/2020/07/peg-300x181.png 300w" sizes="(max-width: 598px) 100vw, 598px" title="本益成長比真的越低越好！？ 20"></figure></div>



<p>圖中的X軸是PEG從小到大，而Y軸是平均獲利，我們發現，當PEG太大獲利真的很差。但當PEG非常小的時候，效果也非常不好。<br>PEG約等於0.5的時候，會有最好的獲利。</p>



<p>只能說PEG在台股可能不是非常的好用，PEG不能一味的追求越小越好，最好選擇PEG等於 0.5 左右的股票，歷史回測會有比較好的結果。</p>



<p>我覺得另一個可能的原因是，當PEG過小的時候，可能選入了一些短期內獲利爆起爆落的公司，其公司股價可能先盛後衰，造成投資上的虧損。但我不太確定，還必須做更多功課才能釐清。</p>



<p>總之以統計的結果來看，PEG並沒有特別顯著的功能，相較於其它介紹過的指標。也有可能是我實驗那裡做錯了，可以留言跟我討論，我會儘速更改！確保大家獲得正確的內容～！</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.finlab.tw/%e6%af%94%e6%9c%ac%e7%9b%8a%e6%af%94%e6%9b%b4%e5%a5%bd%e7%94%a8%e7%9a%84%e6%9c%ac%e7%9b%8a%e6%af%94%e6%88%90%e9%95%b7%e7%8e%87%ef%bc%81/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">493</post-id>	</item>
	</channel>
</rss>
