<?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/%E5%A4%A7%E8%B7%8C/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.finlab.tw</link>
	<description>深入淺出的量化投資，讓你在在茫茫股海中，找到專屬於自己的投資方法</description>
	<lastBuildDate>Wed, 22 Jul 2020 07:05:21 +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>大跌後：用python找出強勢股！</title>
		<link>https://www.finlab.tw/%e5%a4%a7%e8%b7%8c%e5%be%8c%ef%bc%9a%e6%89%be%e5%87%ba%e5%bc%b7%e5%8b%a2%e8%82%a1%ef%bc%81/</link>
					<comments>https://www.finlab.tw/%e5%a4%a7%e8%b7%8c%e5%be%8c%ef%bc%9a%e6%89%be%e5%87%ba%e5%bc%b7%e5%8b%a2%e8%82%a1%ef%bc%81/#respond</comments>
		
		<dc:creator><![CDATA[FinLab - 韓承佑]]></dc:creator>
		<pubDate>Wed, 22 Jul 2020 07:05:21 +0000</pubDate>
				<category><![CDATA[技術面]]></category>
		<category><![CDATA[大盤]]></category>
		<category><![CDATA[大跌]]></category>
		<category><![CDATA[選股策略]]></category>
		<guid isPermaLink="false">http://34.96.136.135/?p=653</guid>

					<description><![CDATA[今天台股真的太誇張了，這波由美股帶頭的狂跌，真的很難預料，然而事情已經發生，我們能做的就是養精蓄銳，將自己的能力培養起來，等到盤勢穩定的時候，再持之以恒的投資！海浪退潮，你看的出誰穿褲子游泳，今天就帶大家來找出大跌中的強勢股～]]></description>
										<content:encoded><![CDATA[
<p>今天台股真的太誇張了，這波由美股帶頭的狂跌，真的很難預料，然而事情已經發生，我們能做的就是養精蓄銳，將自己的能力培養起來，等到盤勢穩定的時候，再持之以恒的投資！海浪退潮，你看的出誰穿褲子游泳，今天就帶大家來找出大跌中的強勢股～（長下影線）<a href="https://www.finlab.tw/%E5%A4%A7%E8%B7%8C%E5%BE%8C%EF%BC%9A%E6%89%BE%E5%87%BA%E5%BC%B7%E5%8B%A2%E8%82%A1%EF%BC%81/thumbnail.jpg"></a></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img width="800" height="533" src="http://34.96.136.135/wp-content/uploads/2020/07/thumbnail.jpg" alt="thumbnail" class="wp-image-654" srcset="https://www.finlab.tw/wp-content/uploads/2020/07/thumbnail.jpg 800w, https://www.finlab.tw/wp-content/uploads/2020/07/thumbnail-300x200.jpg 300w, https://www.finlab.tw/wp-content/uploads/2020/07/thumbnail-768x512.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" title="大跌後：用python找出強勢股！ 1"></figure></div>



<h3 id="災情分享">災情分享</h3>



<p>我自己的持股在禮拜一開盤就清空了，因為當時美股已經倒地<br>我可以承受少賺一個禮拜，但不想賠光好幾個月的獲利。<br>雖然統計說<a href="http://rich01.com/87-2/" rel="noreferrer noopener" target="_blank">開盤跟美股高連動</a>，盤中相關性反而低，最好在盤中或盤末賣，比較不受影響，<br>但我在法國，沒辦法看盤，所以還是開盤賣…損失了3%左右。</p>



<h3 id="持之以恒">持之以恒</h3>



<p>投資最重要的就是持之以恒，並不是說一直持有股票，是一直持續學習！<br>我從來都沒有推薦哪支股票，看多或看空，只推薦你不斷的學習！</p>



<h3 id="程式">程式</h3>



<p>首先先複製<a href="https://www.finlab.tw/%E8%B6%85%E7%B0%A1%E5%96%AE%E5%8F%B0%E8%82%A1%E6%AF%8F%E6%97%A5%E7%88%AC%E8%9F%B2%E6%95%99%E5%AD%B8/">今日股價爬蟲</a>，找出今天崩壞的可憐股票們：<br>每日爬蟲</p>



<pre class="wp-block-code"><code>import requests
from io import StringIO
import pandas as pd
import numpy as np
datestr = '20180205'
r = requests.post('http://www.twse.com.tw/exchangeReport/MI_INDEX?response=csv&amp;date=' + datestr + '&amp;type=ALL')
df = pd.read_csv(StringIO("\n".join(&#91;i.translate({ord(c): None for c in ' '}) 
                                     for i in r.text.split('\n') 
                                     if len(i.split('",')) == 17 and i&#91;0] != '='])), header=0)</code></pre>



<p>接下來做一些處裡：</p>



<ol><li>設定股票名稱為index，讓每個股票可以對應到一樣的數值</li><li>將df中的字串轉換成float（有小數點的數字）</li></ol>



<p>資料整理</p>



<pre class="wp-block-code"><code>df.index = df&#91;'證券名稱']
for i,v in df.items():
    df&#91;i] = pd.to_numeric(df&#91;i], errors='coerce')</code></pre>



<p>再來，就可以用條件篩選出今天逆勢上漲的股票們！或是下影線長值得期待的股票們：</p>



<p>找出今天很猛的股票</p>



<pre class="wp-block-code"><code>strongIndex = (df&#91;'收盤價'] - df&#91;'最低價']) / (df&#91;'最高價'] - df&#91;'最低價'])
strongIndex&#91;(strongIndex > 0.8) &amp; ((df&#91;'最高價'] / df&#91;'最低價'] > 1.02))].sort_values(ascending=False)</code></pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="554" src="http://34.96.136.135/wp-content/uploads/2020/07/list-1-1024x554.png" alt="list 1" class="wp-image-655" srcset="https://www.finlab.tw/wp-content/uploads/2020/07/list-1-1024x554.png 1024w, https://www.finlab.tw/wp-content/uploads/2020/07/list-1-300x162.png 300w, https://www.finlab.tw/wp-content/uploads/2020/07/list-1-768x416.png 768w, https://www.finlab.tw/wp-content/uploads/2020/07/list-1.png 1123w" sizes="(max-width: 1024px) 100vw, 1024px" title="大跌後：用python找出強勢股！ 2"></figure></div>



<p><a href="https://www.finlab.tw/%E5%A4%A7%E8%B7%8C%E5%BE%8C%EF%BC%9A%E6%89%BE%E5%87%BA%E5%BC%B7%E5%8B%A2%E8%82%A1%EF%BC%81/list.png"></a></p>



<h3 id="結語">結語</h3>



<p>雖然分析出了強勢股，可以持續追蹤，但別衝動。<br>現在最重要的就是找買點了，最近有時間的話，我想分析台股大跌的歷史紀錄，找出辨別好買點指標！</p>



<p>大家在投資的路上繼續努力！共勉之～</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.finlab.tw/%e5%a4%a7%e8%b7%8c%e5%be%8c%ef%bc%9a%e6%89%be%e5%87%ba%e5%bc%b7%e5%8b%a2%e8%82%a1%ef%bc%81/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">653</post-id>	</item>
	</channel>
</rss>
