avatarJoel Fukuzawa

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

6094

Abstract

nge(len(<span class="hljs-class"><span class="hljs-keyword">data</span>)):</span>

        try:
            
            <span class="hljs-class"><span class="hljs-keyword">data</span>[i, where] = (<span class="hljs-title">data</span>[<span class="hljs-title">i</span> - <span class="hljs-title">lookback</span> + 1:<span class="hljs-title">i</span> + 1, <span class="hljs-title">close</span>].<span class="hljs-title">mean</span>())</span>
        
        except <span class="hljs-type">IndexError</span>:
            
            pass
        
<span class="hljs-class"><span class="hljs-keyword">data</span> = jump(<span class="hljs-title">data</span>, <span class="hljs-title">lookback</span>)</span>

return <span class="hljs-class"><span class="hljs-keyword">data</span></span></pre></div><div id="0f03"><pre><span class="hljs-attribute">def</span> demarker(Data, lookback, high, low, where):

<span class="hljs-comment"># Calculating DeMAX</span>
<span class="hljs-attribute">for</span> i in range(len(Data)):
    
    <span class="hljs-attribute">if</span> Data[i, high] &gt; Data[i - <span class="hljs-number">1</span>, high]:
        <span class="hljs-attribute">Data</span>[i, where] = Data[i, high] - Data[i - <span class="hljs-number">1</span>, high]
    <span class="hljs-attribute">else</span>:
        <span class="hljs-attribute">Data</span>[i, where] = <span class="hljs-number">0</span>

<span class="hljs-comment"># Calculating the Moving Average on DeMAX</span>
<span class="hljs-attribute">Data</span> = ma(Data, lookback, where, where + <span class="hljs-number">1</span>)        
        
<span class="hljs-comment"># Calculating DeMIN</span>
<span class="hljs-attribute">for</span> i in range(len(Data)):
    
    <span class="hljs-attribute">if</span> Data[i - <span class="hljs-number">1</span>, low] &gt; Data[i, low]:
        <span class="hljs-attribute">Data</span>[i, where + <span class="hljs-number">2</span>] = Data[i - <span class="hljs-number">1</span>, low] - Data[i, low]
    <span class="hljs-attribute">else</span>:
        <span class="hljs-attribute">Data</span>[i, where + <span class="hljs-number">2</span>] = <span class="hljs-number">0</span>    

<span class="hljs-comment"># Calculating the Moving Average on DeMIN</span>
<span class="hljs-attribute">Data</span> = ma(Data, lookback, where + <span class="hljs-number">2</span>, where + <span class="hljs-number">3</span>)        


<span class="hljs-comment"># Calculating DeMarker</span>
<span class="hljs-attribute">for</span> i in range(len(Data)):
    
    <span class="hljs-attribute">Data</span>[i, where + <span class="hljs-number">4</span>] = Data[i, where + <span class="hljs-number">1</span>] / (Data[i, where + <span class="hljs-number">1</span>] + Data[i, where + <span class="hljs-number">3</span>]) 

<span class="hljs-comment"># Removing Excess Columns</span>
<span class="hljs-attribute">Data</span> = deleter(Data, where, <span class="hljs-number">4</span>)

<span class="hljs-attribute">return</span> Data</pre></div><figure id="a207"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Hzlb4TnTDcvH3sxeXwjTUQ.png"><figcaption><b>EURUSD in the first panel with the 21-period Demarker in the second panel.</b></figcaption></figure><p id="9cfd">Check out my weekly market sentiment report to understand the current positioning and to estimate the future direction of several major markets through complex and simple models working side by side. Find out more about the report through this link:</p><div id="7415" class="link-block">
      <a href="https://coalescence.substack.com/">
        <div>
          <div>
            <h2>Coalescence</h2>
            <div><h3>A Weekly Report Covering FX &amp; Equities Market Positioning Using Complex Models. Let me read it first This site requires…</h3></div>
            <div><p>coalescence.substack.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*7zo8Jv6sfnts5WCL)"></div>
          </div>
        </div>
      </a>
    </div><h1 id="8210">Using the Demarker</h1><p id="0df8">I am not a strong believer in the 0.30/0.70 overbought/oversold levels as I prefer to widen them a little bit to at least 0.20/0.80. Therefore, when we see the signals on the chart following the 0.20/0.80 rule, we can get something like the below plot.</p><ul><li><b>A long (Buy) signal is generated whenever the Demarker reaches 0.20 with the previous value above 0.20.</b></li><li><b>A short (Sell) signal is generated whenever the Demarker reaches 0.80 with the previous value below 0.80.</b></li></ul><div id="ff6e"><pre><span class="hljs-keyword">def</span> <span class="hljs-title function_">signal</span>(<span class="hljs-params"><span class="hljs-title class_">Data</span>, what, buy, sell</span>)<span class="hljs-symbol">:</span></pre></div><div id="0e12"><pre><span class="hljs-type">Data</span> = adder(<span class="hljs-type">Data</span>, <span class="hljs-number">10</span>)</pre></div><div id="4a8f"><pre><span class="hljs-symbol">for</span> i in range(len(<span class="hljs-meta">Data</span>)):
        
    <span class="hljs-meta">if</span> <span class="hljs-meta">Data</span>[i, what] &lt; lower_barrier <span class="hljs-keyword">and</span> <span class="hljs-meta">Data</span>[i - <span class="hljs-number">1</span>, what] &gt; lower_barrier:
        <span class="hljs-meta">Data</span>[i + <span class="hljs-number">1</span>, buy] = <span class="hljs-number">1</span>
        
    <span class="hljs-meta">if</span> <span class="hljs-meta">Data</span>[i, what] &gt; upper_barrier <span class="hljs-keyword">and</span> <span class="hljs-meta">Data</span>[i - <span class="hljs-number">1</span>, what] &lt; upper_barrier:
        <span class="hljs-meta">Data</span>[i + <

Options

span class="hljs-number">1</span>, sell] = -<span class="hljs-number">1</span>

return <span class="hljs-meta">Data</span></pre></div><figure id="7ee7"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Vwt17ycpypw7FqWrOQ2urQ.png"><figcaption><b>Signal chart.</b></figcaption></figure><p id="251c">Another strategy can be created which states that only the exit of the extreme zones will yield a trade:</p><ul><li><b>A long (Buy) signal is generated whenever the Demarker exits 0.20 with the previous value below 0.20.</b></li><li><b>A short (Sell) signal is generated whenever the Demarker exits 0.80 with the previous value above 0.80.</b></li></ul><div id="47c0"><pre><span class="hljs-keyword">def</span> <span class="hljs-title function_">signal</span>(<span class="hljs-params"><span class="hljs-title class_">Data</span>, what, buy, sell</span>)<span class="hljs-symbol">:</span></pre></div><div id="2fa6"><pre><span class="hljs-type">Data</span> = adder(<span class="hljs-type">Data</span>, <span class="hljs-number">10</span>)</pre></div><div id="f24b"><pre><span class="hljs-symbol">for</span> i in range(len(<span class="hljs-meta">Data</span>)):
        
    <span class="hljs-meta">if</span> <span class="hljs-meta">Data</span>[i, what] &gt; lower_barrier <span class="hljs-keyword">and</span> <span class="hljs-meta">Data</span>[i - <span class="hljs-number">1</span>, what] &lt; lower_barrier:
        <span class="hljs-meta">Data</span>[i + <span class="hljs-number">1</span>, buy] = <span class="hljs-number">1</span>
        
    <span class="hljs-meta">if</span> <span class="hljs-meta">Data</span>[i, what] &lt; upper_barrier <span class="hljs-keyword">and</span> <span class="hljs-meta">Data</span>[i - <span class="hljs-number">1</span>, what] &gt; upper_barrier:
        <span class="hljs-meta">Data</span>[i + <span class="hljs-number">1</span>, sell] = -<span class="hljs-number">1</span>
        
return <span class="hljs-meta">Data</span></pre></div><figure id="2c88"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_4OQFQtIqhz1AfcsJcXosg.png"><figcaption><b>Signal chart.</b></figcaption></figure><p id="d761">The second technique of waiting before initiating the position showed slightly better results but not statistically different. In anyways, both are losing strategies with the second one losing less (0.94 profit factor compared to 0.96).</p><p id="3618">I have recently partnered with Lumiwealth, and if you want to see how to create all sorts of algorithms yourself, feel free to check out the below link. From algorithmic trading to blockchain and machine learning, they have hands-on detailed courses that I highly recommend.</p><div id="fead" class="link-block">
      <a href="https://www.lumiwealth.com/algorithmic-trading-landing-page/?utm_source=influence&amp;utm_medium=medium&amp;utm_campaign=sofien">
        <div>
          <div>
            <h2>Learn Algorithmic Trading with Python Lumiwealth</h2>
            <div><h3>undefined</h3></div>
            <div><p>undefined</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*FbCz_ARtbOdywMlC)"></div>
          </div>
        </div>
      </a>
    </div><h1 id="e420">Summary</h1><p id="05a4">To sum up, what I am trying to do is to simply contribute to the world of objective technical analysis which is promoting more transparent techniques and strategies that need to be back-tested before being implemented. This way, technical analysis will get rid of the bad reputation of being subjective and scientifically unfounded.</p><p id="570c">Medium is a hub to interesting reads. I read a lot of articles before I decided to start writing. Consider joining Medium using my referral link (at <b>NO </b>additional cost to you).</p><div id="de8c" class="link-block">
      <a href="https://kaabar-sofien.medium.com/membership">
        <div>
          <div>
            <h2>Join Medium with my referral link — Sofien Kaabar</h2>
            <div><h3>As a Medium member, a portion of your membership fee goes to writers you read, and you get full access to every story…</h3></div>
            <div><p>kaabar-sofien.medium.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*XBqK-oHjNF_4ydU8)"></div>
          </div>
        </div>
      </a>
    </div><p id="5d41">I recommend you always follow the the below steps whenever you come across a trading technique or strategy:</p><ul><li>Have a critical mindset and get rid of any emotions.</li><li>Back-test it using real life simulation and conditions.</li><li>If you find potential, try optimizing it and running a forward test.</li><li>Always include transaction costs and any slippage simulation in your tests.</li><li>Always include risk management and position sizing in your tests.</li></ul><p id="beb3">Finally, even after making sure of the above, stay careful and monitor the strategy because market dynamics may shift and make the strategy unprofitable.</p><p id="4f75">For the paperback link of the book, you may use the following link:</p><div id="355f" class="link-block">
      <a href="https://www.amazon.com/dp/B09VG3SH2P?&amp;linkCode=sl1&amp;tag=sofien-20&amp;linkId=f0daa140733c5f6b08c1e744bd1b98b5&amp;language=en_US&amp;ref_=as_li_ss_tl">
        <div>
          <div>
            <h2>Contrarian Trading Strategies in Python</h2>
            <div><h3>Amazon.com: Contrarian Trading Strategies in Python: 9798434008075: Kaabar, Sofien: Books</h3></div>
            <div><p>www.amazon.co</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*C7k3f3kawsSsQCVn)"></div>
          </div>
        </div>
      </a>
    </div></article></body>

珍珠奶茶雖然退燒 但是台灣手搖茶飲文化卻依舊人氣不衰

疫情之前的 2019 年日本吹起被稱為「第三波的台灣珍珠奶茶」熱潮,根據日本工商調研中心的資料, 2020 年 8 月日本全國各地的珍珠奶茶連鎖店超過 125 家,但是在 2019 年 8 月的時候才只有 60 家而已,短短一年內增加了兩倍,但是到了 2021 年,走在被稱為日本珍珠奶茶聖地的原宿街頭,會發現珍珠奶茶店已經寥寥無幾。就在日本出現珍珠奶茶消退的跡象,Fortune Business Insights 卻認為全球以珍珠奶茶為主的茶飲市場可以在 2028 年達到 33.9 億美元。究竟以珍珠奶茶為主的台灣茶手搖飲產業,疫情前所帶來的全球效應,會繼續增長還是出現衰退?

貢茶日本逆勢成長 疫情開店排行的第四名

回答這個問題可以到東京街頭觀察一下,今年 4 月來自台灣的手搖茶飲品牌「貢茶」,門店排隊的人潮並沒有衰退,而且幾乎都是女子高中生以及女性上班族。貢茶在疫情期間,開店速度並沒有減緩,光是這兩年新開幕的門店高達 56 家,根據日本餐飲調查網站 Foodbiz 的資料,在疫情期間門店持續增加的連鎖餐飲品牌排行中,貢茶名列第四,第一名是星巴克咖啡的 166 家門市、客美多咖啡以 69 家門市搶下第二,排在貢茶前面的是壽司郎這兩年總共開了 67 家門市。排在貢茶前面的三家餐飲連鎖品牌在疫情期間逆向成長或許還能理解當中的緣由,為什麼貢茶這個以珍珠奶茶手搖茶飲為主的業種,居然也能逆向成長?答案或許可以從他們最近推出的「草莓杏仁阿里山奶茶」在 3 個星期內賣出 25 萬杯找到證明。負責日本貢茶行銷的越智大志說:「貢茶的核心不是珍珠奶茶專賣店而是台灣茶專賣店,所以當珍珠奶茶在日本退燒的時候,我們立刻切換到椰果以及水果茶的市場,不會受到影響。」

快速開店 檢視業績 快速迭代 一氣呵成

除了商品魅力之外,貢茶挑選門市的地點以及型態也很花心思,像貢茶在立川車站分別有兩個不同型態的門店,一個有提供 96 個座位可以坐下來休息的咖啡廳型態門店,另一個則是只提供外帶的簡易門市,不一樣的門店型態,既可以照顧到逛街累了想要歇歇腳的消費者,也能滿足想要拿了就走的需求。而且貢茶在選店換店的速度也比一般餐飲連鎖店快,只要發現這個區域年輕女性居多,開店團店就會快速找到地點開店,但是只要發現判斷錯誤業績停滯,也會立刻收掉門市,轉換到其他陣地。透過快速的設點、迭代,使得貢茶門市中的人氣店比例明顯比其他同業來得高。對於日本的餐飲連鎖店來說,如果每坪每個月可以做出 30 萬日圓的業績,可以稱得上是「繁盛店」。客單價比較低的咖啡廳,如果每個月每坪可以帶入 10~15 萬日圓的話,也算表現不錯。但是貢茶每家門店,每個月每坪的平均業績都能維持在 30 萬日圓左右。

貢茶計畫 IPO 展店區域以職業女性為主要客層

「貢茶」最早是 2006 年在高雄創立,後來公司經過多次的轉讓,到了 2019 年被美國波士頓公司TA Associates 從韓國買下貢茶全球 70% 的經營權,另外 30% 則是被英商 GC Group BIDCO 所掌握,現在貢茶除了日本之外,在包括澳洲、美國、英國以及韓國、新加坡各國都有據點。未來預計到 2025 年將會在美國設立 500 家門店。貢茶最近在全球各地積極展店,有可能與他們計劃在 2022 年 IPO 的佈局有關,目前預估整個貢茶的事業體價值將會超過 6 億美金以上。日本貢茶行銷部的越智大志說:「未來貢茶將會鎖定東京、大阪以及名古屋這些商業都市中心集中展店。」當女性大量從家庭走入職場,相信對於各種茶飲的需求也將會明顯的提升。越智大志非常有信心的說:「雖然珍珠奶茶在日本已經退燒,但是台灣茶飲文化依舊會在日本女性職場中維持人氣。」

福澤喬,帶你從縱深潛入去認識日本這個鄰居。
當了十幾年的記者,希望做的事情就是用文字、影像去傳達心中的一些想法。
如果喜歡這篇文章也請讓我知道,同時歡迎Follow
這是讓我調整寫作方向的做法。
日本
中文
Japan
Business
Food
Recommended from ReadMedium