{"id":16743,"date":"2022-02-22T02:32:59","date_gmt":"2022-02-21T18:32:59","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=16743"},"modified":"2024-07-03T17:36:28","modified_gmt":"2024-07-03T09:36:28","slug":"momentum-trade","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/","title":{"rendered":"Momentum trade"},"content":{"rendered":"\n<p id=\"52f6\">use volume indicator to backtesting , using 2618<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1_1NnQgBB4jBN4doLrwAtBwKg.jpg\" alt=\"\"\/><figcaption class=\"wp-element-caption\">photo by&nbsp;<a href=\"https:\/\/unsplash.com\/@leio\" rel=\"noreferrer noopener\" target=\"_blank\">Leio McLaren<\/a>&nbsp;on&nbsp;<a href=\"https:\/\/unsplash.com\/\" rel=\"noreferrer noopener\" target=\"_blank\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f36ab327ab1\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f36ab327ab1\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Highlights\" >Highlights<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Preface\" >Preface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#The_Editing_Environment_and_Modules_Required\" >The Editing Environment and Modules Required<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Database\" >Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Data_Selection\" >Data Selection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Data_Processing\" >Data Processing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Calculate_the_return\" >Calculate the return<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Performance_comparison\" >Performance comparison<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Source_Code\" >Source Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Extended_Reading\" >Extended Reading<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.tejwin.com\/en\/insight\/momentum-trade\/#Related_Link\" >Related Link<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"69f0\"><span class=\"ez-toc-section\" id=\"Highlights\"><\/span><strong>Highlights<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Difficulty\uff1a\u2605\u2605\u2606\u2606\u2606<\/li>\n\n\n\n<li>Backtesting by trading volume indicator and relative performance of this strategy<\/li>\n\n\n\n<li>Advice: This article adopts TEJ database to calculate RSI indicators, create signals and form the return. Before reading this,\u00a0<a href=\"https:\/\/medium.com\/tej-api-financial-data-anlaysis\/quant-2-technical-analysis-2958435a8922\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">\u3010Quant(2)\u3011Technical Analysis<\/a>\u00a0is recommended to explore to better understand the basic procedure of backtesting.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ccaf\"><span class=\"ez-toc-section\" id=\"Preface\"><\/span><strong>Preface<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"4e03\">Nowadays Momentum trade are frequently used to trade strategy,we often talk about the price-volume relationship .So in this article we are going to talk about this strategy which based on abnormal growing of the trading volume.but this strategy doesn&#8217;t have the clear definition.so we write the function more flexible.you can change the parameter by yourself ! Following is the way to our set the parameter :<\/p>\n\n\n\n<p id=\"8b15\">1. buy-signal : when the trading volume is 2.5 times more than the average of previous 4 days.<\/p>\n\n\n\n<p id=\"50a8\">2. sell-singal : when the trading volume is 0.75 times less than the average of last 4 days.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cf10\"><span class=\"ez-toc-section\" id=\"The_Editing_Environment_and_Modules_Required\"><\/span><strong>The Editing Environment and Modules Required<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"dfe7\">Window10 Spyder(anaconda31)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">##########<br>import pandas as pd<br>import matplotlib.pyplot as plt<br>import numpy as np<br>#################TEJ<br>import tejapi<br>tejapi.ApiConfig.api_key = 'Your Key'<br>tejapi.ApiConfig.ignoretz = True<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"0efe\"><span class=\"ez-toc-section\" id=\"Database\"><\/span><strong>Database<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"ffc5\"><a href=\"https:\/\/api.tej.com.tw\/columndoc.html?subId=42\" rel=\"noreferrer noopener\" target=\"_blank\">Security Transaction Data Table<\/a>\uff1aListed securities with unadjusted price and index. Code is \u2018TWN\/EWPRCD\u2019.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d602\"><span class=\"ez-toc-section\" id=\"Data_Selection\"><\/span><strong>Data Selection<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">coid=\"2618\" #### you can replace the stock id what you want<br>start=\"2018-01-01\" ### time~<br>end= \"2022-03-2\"  ### endopts={'columns': ['coid', 'mdate', 'volume', 'close_adj','close_d','open_d']}  ###<br>#############<br>fly=tejapi.get('TWN\/EWPRCD',coid=coid, <br>                mdate={'gt':start,'lt':end},<br>                paginate=True,<br>                chinese_column_name=True,<br>                opts=opts )<\/pre>\n\n\n\n<p id=\"7963\">we using the popular groups in recent days to demonstrate our code .Time we select is 2018\/1\/1~ 2022~3\/2.After we get the data ,we want to plot the data.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fly.set_index(\"\u65e5\u671f\",drop=True,inplace=True) # set index<br>plt.figure(facecolor='white',figsize=(12,8))<br>plt.plot(fly['\u6536\u76e4\u50f9'], label='\u6536\u76e4\u50f9')<br>plt.title(\"\u98db\u6a5f\u8d77\u98db\u8868\",fontsize=25)<br>plt.xticks(rotation=45)<br>plt.xlabel('\u65e5\u671f',fontsize=25)<br>plt.ylabel('\u80a1\u50f9',fontsize=25)<br>plt.grid()<br>plt.show()<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/12v7L_pKtmkynU49usWlgIw.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"b6d8\"><span class=\"ez-toc-section\" id=\"Data_Processing\"><\/span><strong>Data Processing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"4932\"><strong>Step 1. set the indicator<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def voltrade(df,p,q,r):<br>    df =df.copy()<br>    df[\"\u7576\u65e5\u4ea4\u6613\u91cf\"]=df[\"\u6210\u4ea4\u91cf(\u5343\u80a1)\"].rolling(p).mean() <br>    df[\"\u524d\u4e94\u65e5\u7e3d\u91cf\"]=df[\"\u6210\u4ea4\u91cf(\u5343\u80a1)\"].rolling(q).sum()<br>    df[str(r)+\"\u65e5\u5747\u7dda\"]=df[\"\u6536\u76e4\u50f9-\u9664\u6b0a\u606f\"].rolling(r).mean()<br>    ####\u6263\u9664\u6389\u7576\u65e5\u4e4b\u5e73\u5747<br>    df[\"\u524d\u5e7e\u65e5\u5e73\u5747\"]=(df[\"\u524d\u4e94\u65e5\u7e3d\u91cf\"]-df[\"\u7576\u65e5\u4ea4\u6613\u91cf\"])\/(q-p)<br>    <br>    return df<\/pre>\n\n\n\n<p id=\"6eeb\">This function we can get previous 4(q) days average tradeing volume ,and the 5(r)ma ( we can change the q r)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">r=5<br>stock=voltrade(fly, 1, 5, r) # the parameter is which we set in this articlestock<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1_1Tho8IDMxDLNC46M2CTdw6g.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"291d\"><strong>Step 2 find the buy singal and sell singal<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def buysell(company,a,b):<br>    company =company.copy()<br>    buy=[]<br>    sell=[]<br>    hold=0<br>    for i in range(len(company)):<br>    <br>        if  company[\"\u7576\u65e5\u4ea4\u6613\u91cf\"][i] &gt; company[\"\u524d\u5e7e\u65e5\u5e73\u5747\"][i]*a :<br>            sell.append(np.nan)<br>            if hold !=1:<br>                buy.append(company[\"\u6536\u76e4\u50f9-\u9664\u6b0a\u606f\"][i])<br>                <br>                hold = 1<br>            else: <br>                buy.append(np.nan)elif company[\"\u7576\u65e5\u4ea4\u6613\u91cf\"][i]&lt;company[\"\u524d\u5e7e\u65e5\u5e73\u5747\"][i]*b :<br>            buy.append(np.nan)<br>            if hold !=0:<br>                sell.append(company[\"\u6536\u76e4\u50f9-\u9664\u6b0a\u606f\"][i])<br>                hold = 0<br>            else:<br>                sell.append(np.nan)<br>        else:<br>            buy.append(np.nan)<br>            sell.append(np.nan)<br>    a=(buy,sell)<br>        <br>    company['Buy_Signal_Price']=a[0]<br>    company['Sell_Signal_Price']=a[1]<br>    company[\"\u8cb7\u8ce3\u80a1\u65781\"]=company['Buy_Signal_Price'].apply(lambda x : 1000 if x &gt;0 else 0)<br>    company[\"\u8cb7\u8ce3\u80a1\u65782\"]=company['Sell_Signal_Price'].apply(lambda x : -1000 if x &gt;0 else 0  )<br>    company[\"\u8cb7\u8ce3\u80a1\u6578\"]=company[\"\u8cb7\u8ce3\u80a1\u65781\"]+ company[\"\u8cb7\u8ce3\u80a1\u65782\"]<br>    <br>    return companyvol=buysell(stock,2.5,0.75)<br>plot(vol)<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1V7xm6Rc2uApxcR0fw2xZNg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"b571\">In this stargey ,we have done too much buying and selling which incrase frictional cost.and found that we often sell to early.Therefore we try to increase more restriction like the 5ma stargey,here is the following :<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1H8iu5WVt_FlPCuTKXoKhCg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"cd54\">casue we are talking about the indicator ,so we plot it together .<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pvtwo(volma) #seprate <br>pvsame(volma)#combine <\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1saL6uM9TYFsKwnzKrbGKog.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1fNklArHEBbWBKJFQQO3ZeQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"501f\"><span class=\"ez-toc-section\" id=\"Calculate_the_return\"><\/span><strong>Calculate the return<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"b4af\">In<a href=\"https:\/\/medium.com\/tej-api-%E9%87%91%E8%9E%8D%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90\/quant-8-backtesting-by-macd-indicator-f0dc6ceecef2\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\"> <\/a><a href=\"https:\/\/www.tejwin.com\/en\/insight\/backtesting-by-macd-indicator\/\" class=\"ek-link\">Backtesting by MACD Indicator<\/a>, we have discussed the details in the calculation of frictions cost and the method to calculate return with initial principal. In this article, we use function to achieve all of it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def target_return(data, principal):<br>    data=data.copy()<br>    #\u8a08\u7b97\u6210\u672c<br>    data['\u624b\u7e8c\u8cbb'] = data['\u6536\u76e4\u50f9-\u9664\u6b0a\u606f']* abs(data['\u8cb7\u8ce3\u80a1\u6578'])*0.001425<br>    data['\u624b\u7e8c\u8cbb'] = np.where((data['\u624b\u7e8c\u8cbb']&gt;0)&amp;(data['\u624b\u7e8c\u8cbb'] &lt;20), 20, data['\u624b\u7e8c\u8cbb'])<br>    data['\u8b49\u4ea4\u7a05'] = np.where(data['\u8cb7\u8ce3\u80a1\u6578']&lt;0, data['\u6536\u76e4\u50f9-\u9664\u6b0a\u606f']* abs(data['\u8cb7\u8ce3\u80a1\u6578'])*0.003, 0)<br>    data['\u6469\u64e6\u6210\u672c'] = (data['\u624b\u7e8c\u8cbb'] + data['\u8b49\u4ea4\u7a05']).apply(np.floor)<br>    <br>    #\u8a08\u7b97\u8cc7\u7522\u50f9\u503c<br>    data['\u80a1\u7968\u50f9\u503c'] = data['\u8cb7\u8ce3\u80a1\u6578'].cumsum() * data['\u6536\u76e4\u50f9-\u9664\u6b0a\u606f']<br>    data['\u73fe\u91d1\u50f9\u503c'] = principal - data['\u6469\u64e6\u6210\u672c'] + (data['\u6536\u76e4\u50f9-\u9664\u6b0a\u606f']* -data['\u8cb7\u8ce3\u80a1\u6578']).cumsum() <br>    data['\u8cc7\u7522\u50f9\u503c'] = data['\u80a1\u7968\u50f9\u503c'] + data['\u73fe\u91d1\u50f9\u503c']<br>    <br>    #\u8a08\u7b97\u5831\u916c\u7387<br>    data['\u7576\u65e5\u50f9\u503c\u8b8a\u52d5(%)'] = (data['\u8cc7\u7522\u50f9\u503c']\/data['\u8cc7\u7522\u50f9\u503c'].shift(1) - 1)*100<br>    data['\u7d2f\u8a08\u5831\u916c(%)'] = (data['\u8cc7\u7522\u50f9\u503c']\/principal - 1)*100<br>    <br>    return data<\/pre>\n\n\n\n<p id=\"bc9b\">We only consider the trading of common stock. There is no margin buy or margin sell situation, so we do not have to calculate premium. With the data containing trading shares and initial principal, we can quickly get the transaction costs and return. In this article, we set 16000 as our principal.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">volreturn1 = target_return( volma, principal = 16000)##with ma<br>volreturn2 = target_return( vol, principal = 16000)##without ma <\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1_1io2RuB_HYfgzfPgCN_YTQw.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">we add buy-and-hold strategy as our benchmarks.<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The return of buy-and-hold<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">keep=vol.copy()<br>keep[\"\u8cb7\u8ce3\u80a1\u6578\"]=0<br>keep[\"\u8cb7\u8ce3\u80a1\u6578\"][0]=1000<br>keep[\"\u8cb7\u8ce3\u80a1\u6578\"][len(keep)-1]=-1000<br>volreturn3 = target_return( keep, principal = 16000)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6083\"><span class=\"ez-toc-section\" id=\"Performance_comparison\"><\/span><strong>Performance comparison<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"0ac5\"><strong>Step 1. Comparison of cumulative return (See the details in source code)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1B7N_8Ct9PTNKEXNMt8Znkg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"58d6\"><strong>Step 2. Performance table (See the details in source code)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1b8s_wifSBplmXAkn3cP-ew.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ad22\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"3f48\">We found that if we only use trading volume as the only indicator\uff0cthe performace will equal to the buy&amp;hold,but when we add the ma,we found that the performace is 2 times than the others ,and the sharp ratio is the highest.But this method also has obvious disadvantages .when we look at the 2018 ~2020 ,in this time period is negative pay.Perhaps the entry conditions can be set more strictly to reduce redundant buying and selling.<\/p>\n\n\n\n<p id=\"8f8b\">There are two special cases to remind the use of this method:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>This method cannot be used in the face of disposal of stocks, because the trading volume is bound to decline when disposed.<\/li>\n\n\n\n<li>When performing index adjustment, such as FTSE index, msci, etc., the trading volume is easy to enlarge, resulting in wrong judgment of buying and selling points.<\/li>\n<\/ol>\n\n\n\n<p id=\"498c\">In 2021 , \u201c2618\u201d started to growth ,this stargey can find the good position to buy ,and can efficient use your funds ! So we will introduce how to use TEJ -API to find the abnormal increase volume next ,and we can Cooperate with this article.<\/p>\n\n\n\n<p id=\"f3c4\">After all, the application of technical indicator varies from person to person. As a result, if readers are interested in diverse trading backtesting, welcome to purchase the plan offered in&nbsp;<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_intro\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E-Shop<\/a>. Construct trading strategies fitting you with high quality database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"0e25\"><span class=\"ez-toc-section\" id=\"Source_Code\"><\/span><strong>Source Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/gist.github.com\/tej87681088\/d577d55fa8b8fb2d1fed9d8cba660df7#file-tejapi_medium-15-ipynb\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">Click here to go Github<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"805a\"><span class=\"ez-toc-section\" id=\"Extended_Reading\"><\/span><strong>Extended Reading<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.tejwin.com\/en\/insight\/modular-backtesting-system\/\" class=\"ek-link\">Modular Backtesting System<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tejwin.com\/en\/insight\/technical-analysis\/\" class=\"ek-link\">Technical Analysis<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2009\"><span class=\"ez-toc-section\" id=\"Related_Link\"><\/span><strong>Related Link<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.tej.com.tw\/index.html\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ API<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_intro\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E-Shop<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>use volume indicator to backtesting , using 2618 Highlights Preface Nowadays Momentum trade are frequently used to trade strategy,we often talk about the price-volume relationship .So in this article we are going to talk about this strategy which based on abnormal growing of the trading volume.but this strategy doesn&#8217;t have the clear definition.so we write [&hellip;]<\/p>\n","protected":false},"featured_media":16745,"template":"","tags":[2371,3008,2541],"insight-category":[690,50],"class_list":["post-16743","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-python","tag-tejapi-quant","tag-2541","insight-category-data-analysis","insight-category-fintech"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight"}],"about":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/types\/insight"}],"version-history":[{"count":1,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16743\/revisions"}],"predecessor-version":[{"id":24867,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16743\/revisions\/24867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/16745"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=16743"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=16743"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight-category?post=16743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}