{"id":17235,"date":"2021-04-01T10:45:24","date_gmt":"2021-04-01T02:45:24","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=17235"},"modified":"2026-03-03T13:26:27","modified_gmt":"2026-03-03T05:26:27","slug":"backtesting","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insight\/backtesting\/","title":{"rendered":"Backtesting"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1_1GIquC6Igxh5JdR5TjumkrA.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"e064\">Through the previous 2 articles of \u201cData Analysis\u201d , we have shared with you how to use Numpy and Pandas to start the first step of data analysis and the importance of using the adjusted stock price if you want to calculate the return. Therefore, this time we are going to&nbsp;<strong>use those tools to do the \u201cdollar-cost averaging method\u201d backtesting and let you see the power of compound interests!<\/strong><\/p>\n<\/blockquote>\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-69fab8b329e72\" 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-69fab8b329e72\"  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\/backtesting\/#Highlights_of_this_article\" >Highlights of this article<\/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\/backtesting\/#Links_related_to_this_article\" >Links related to this article<\/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\/backtesting\/#What_is_Backtesting_and_how_to_do_it\" >What is Backtesting and how to do it<\/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\/backtesting\/#0050TW_dollar-cost_averagingDCA_method_backtesting\" >0050.TW dollar-cost averaging(DCA) method backtesting<\/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\/backtesting\/#Lets_Start_Coding\" >Let\u2019s Start Coding!!<\/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\/backtesting\/#Conclusion\" >Conclusion<\/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\/backtesting\/#Links_related_to_this_article_again\" >Links related to this article again<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"afda\"><span class=\"ez-toc-section\" id=\"Highlights_of_this_article\"><\/span><strong>Highlights of this article<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Backtesting Intro and its precautions<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"209c\"><span class=\"ez-toc-section\" id=\"Links_related_to_this_article\"><\/span><strong>Links related to this article<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>API Official Website:\u00a0<\/strong><a href=\"https:\/\/api.tej.com.tw\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>TEJ API Official Website<\/strong><\/a><\/li>\n\n\n\n<li><strong>The Product Package:\u00a0<\/strong><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_caseIntro\/1\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>TEJ E SHOP<\/strong><\/a><\/li>\n\n\n\n<li><strong>Source Code:\u00a0<\/strong><a href=\"https:\/\/github.com\/tejtw\/TEJAPI_Python_Medium_Quant\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>TEJ GITHUB<\/strong><\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"28f1\"><span class=\"ez-toc-section\" id=\"What_is_Backtesting_and_how_to_do_it\"><\/span><strong>What is Backtesting and how to do it<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"18a9\"><strong>Backtesting<\/strong>&nbsp;means that after having a strategy, you can invest by selecting the underlying asset, buying\/selling signals, or using portfolio methods and combine with the historical data to test the strategy in order to understand how it performed in the past. Then, use this result as one of the important parameters for future investment decisions. For example:<strong>Assumption\uff1aAs long as the company&#8217;s ROE exceeds 15%, then we buy it&#8217;s stock, rebalance once a year, and sell when its ROE falls below 15%.<\/strong><\/p>\n\n\n\n<p id=\"cf80\">This kind of thought can actually create so-called backtesting because you already have those parameters we have mentioned above. However, there are still some&nbsp;<strong>\u26a0points that need to be noted\u26a0<\/strong>&nbsp;when we do backtesting, which will be shared with you later.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"14dd\"><span class=\"ez-toc-section\" id=\"0050TW_dollar-cost_averagingDCA_method_backtesting\"><\/span><strong>0050.TW dollar-cost averaging(DCA) method backtesting<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"7fc8\">In Taiwan, the DCA method is getting more popular and popular among retail investors. But what is the DCA method? Is that good?&nbsp;<strong>When this kind of thought appears, it\u2019s time for backtesting!<\/strong><\/p>\n\n\n\n<p id=\"0b86\"><strong>Noun Definition:<\/strong><br><strong>1. 0050.TW(ETF): Tracking Taiwan 50 Index, and the constituent stocks include the top 50 market value listed companies in Taiwan.<\/strong><br><strong>2. Dollar-Cost Averaging(DCA) method:&nbsp;<\/strong>An investment strategy of buying a fixed amount of money with every certain period.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"fa15\"><strong>Our strategy:<\/strong><br>At the beginning of each month, we will invest NT$10,000 for total 5 years. During this period, we won\u2019t withdraw our money and the transaction costs will be ignored.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2f2d\"><span class=\"ez-toc-section\" id=\"Lets_Start_Coding\"><\/span><strong>Let\u2019s Start Coding!!<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Import Packages\/API Setting<\/strong><\/li>\n<\/ol>\n\n\n\n<p>import pandas as pd<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import matplotlib.ticker as ticker<br>import matplotlib.transforms as transformsimport datetimeimport tejapi<br>tejapi.ApiConfig.api_key = &#8220;your key&#8221;<\/p>\n\n\n\n<p id=\"dc32\"><strong>2. Data collection from TEJ API<\/strong>TW0050 = tejapi.get(<br>&#8216;TWN\/EWPRCD&#8217;,<br>coid = &#8216;0050&#8217;,<br>mdate={&#8216;gte&#8217;:&#8217;2016-01-01&#8242;, &#8216;lte&#8217;:&#8217;2020-12-31&#8242;},<br>opts={&#8216;columns&#8217;: [&#8216;mdate&#8217;,&#8217;close_adj&#8217;]},<br>paginate=True<br>)<br>TW0050[&#8216;mdate&#8217;] = TW0050.loc[:,&#8217;mdate&#8217;].astype(&#8216;datetime64[ns]&#8217;)<br>TW0050 = TW0050.set_index(&#8216;mdate&#8217;)<strong>##change the frequency of the data<\/strong><br>TW0050_monthly = TW0050.resample(&#8216;MS&#8217;).first()<strong>##add the last day of our historical data<\/strong><br>TW0050_monthly = TW0050_monthly.append(TW0050.iloc[-1])<br>TW0050_monthly<\/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\/197Bw744mOTws5V2KA5xkDA.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Monthly Data(0050.TW)<\/figcaption><\/figure>\n\n\n\n<p id=\"a118\">As we can see from the codes above, after getting the data from TEJ API, we&nbsp;<strong>first set the date data to index, and then use the pandas.resample() function to convert the daily data to monthly data.<\/strong>&nbsp;Last, because we want to know the return rate on the last day of this period, we&nbsp;<strong>add the data point of 2020\u201312\u201331 to our dataframe.<\/strong><\/p>\n\n\n\n<p id=\"fe50\"><strong>3. Calculate relevant information for each period<\/strong><strong>##Shares to buy in each month(chop off)<\/strong><br>TW0050_monthly[&#8216;\u6bcf\u6708\u8cfc\u8cb7\u80a1\u6578&#8217;]=<br>np.floor(10000 \/\u3000TW0050_monthly[&#8216;close_adj&#8217;])TW0050_monthly[&#8216;\u6bcf\u6708\u8cfc\u8cb7\u80a1\u6578&#8217;][-1] = 0<strong>##Cumulative Shares<\/strong><br>TW0050_monthly[&#8216;\u7d2f\u7a4d\u80a1\u6578&#8217;] = TW0050_monthly[&#8216;\u6bcf\u6708\u8cfc\u8cb7\u80a1\u6578&#8217;].cumsum()<strong>##Cumulative Shares Value<\/strong><br>TW0050_monthly[&#8216;\u7d2f\u7a4d\u50f9\u503c(\u6708)&#8217;] =<br>\u3000\u3000round(TW0050_monthly[&#8216;\u7d2f\u7a4d\u80a1\u6578&#8217;] * TW0050_monthly[&#8216;close_adj&#8217;],2)<strong>##Original Asset Value<\/strong><br>TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;] =<br>\u3000\u3000[10000*i for i in range(len(TW0050_monthly.index))]TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;] =<br>\u3000\u3000TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;].shift(-1)TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;][-1] = TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;][-2]<strong>##Cumulative Return<\/strong><br>TW0050_monthly[&#8216;\u7d2f\u7a4d\u5831\u916c(\u6708)&#8217;] =<br>\u3000\u3000round((TW0050_monthly[&#8216;\u7d2f\u7a4d\u50f9\u503c(\u6708)&#8217;]-TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;])\/TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;], 6) +1<\/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\/1SNieSJZXHk2hY5CLyJ5Ogg.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">0050.TW Cumulative Return<\/figcaption><\/figure>\n\n\n\n<p id=\"103b\">From those formulas above we could know that we just simply calculate the value of our total shares each month. Then, we compare with the original asset at the same time period to get this conclusion:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"b370\"><strong>We start to buy the 0050.TW ETF equal to the value of NT$10,000 since 2016 Jan every month. After 5 years, the total number of shares are 8,444 shares, the cumulative value is around 1,010,261, and the cumulative return is 68%.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<p id=\"eb7a\"><strong>4. Data Visualization<br>Let\u2019s use a graph to look at the changes in assets.<\/strong>plt.figure(figsize = (10, 6))<br>plt.plot(TW0050_monthly[&#8216;\u7d2f\u7a4d\u50f9\u503c(\u6708)&#8217;], lw=1.5, label = &#8216;0050&#8217;)<br>plt.plot(TW0050_monthly[&#8216;\u539f\u59cb\u50f9\u503c(\u6708)&#8217;], lw=1.5, label = &#8216;Original Asset&#8217;)<br>plt.xlabel(&#8216;Time(Year)&#8217;)<br>plt.ylabel(&#8216;Value&#8217;)<br>plt.legend(loc = 0)<br>plt.grid()<\/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\/1E5hgZkLrvRn59b0fKm230w.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">0050.TW DCA Method VS Original Asset<\/figcaption><\/figure>\n\n\n\n<p id=\"57ef\">It could be found that most of the growth occurred last year. The increase is relatively slow if we exclude 2020.&nbsp;<strong>Therefore, this investing method takes time to see the increase of our assets.<\/strong>\ud83d\udcaa\ud83d\udcaa<strong><br><\/strong>Then what if we want to know the monthly return?<strong>##Monthly return<\/strong><br>ret =<br>\u3000\u3000np.log(TW0050_monthly[&#8216;\u7d2f\u7a4d\u5831\u916c(\u6708)&#8217;]\/TW0050_monthly[&#8216;\u7d2f\u7a4d\u5831\u916c(\u6708)&#8217;].shift(1))fig, ax = plt.subplots()<br>ret.plot(kind=&#8221;bar&#8221;, figsize=(12,6), stacked=True, ax=ax)<strong>##Build an empty array with the length of total data<br><\/strong>ticklabels = [&#8221;]*len(TW0050_monthly.index)<strong>##Show the month and the date every 6 months<\/strong><br>ticklabels[::6] =<br>\u3000\u3000[item.strftime(&#8216;%b %d&#8217;) for item in TW0050_monthly.index[::6]]<strong>##Show the year every 12 months<\/strong><br>ticklabels[::12] =<br>\u3000\u3000[item.strftime(&#8216;%b %d\\n%Y&#8217;) for item in TW0050_monthly.index[::12]]ax.xaxis.set_major_formatter(ticker.FixedFormatter(ticklabels))<br>plt.gcf().autofmt_xdate()<strong>##Add the horizontal line of average monthly return<\/strong><br>ax.axhline(ret.mean(), c=&#8217;r&#8217;)plt.xlabel(&#8216;Month&#8217;)<br>plt.ylabel(&#8216;Return&#8217;)<br>plt.title(&#8216;0050 Monthly return&#8217;)plt.show()<\/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\/1D0Ln5R3XCN5gIQTplTp-uQ.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">0050.TW Monthly Return<\/figcaption><\/figure>\n\n\n\n<p id=\"4dcb\">From the graph, we could know that<strong>&nbsp;most of the monthly returns are within a certain range except for 2020<\/strong>.<\/p>\n\n\n\n<p id=\"0373\"><strong>5. Performance\/Statistic Indicators<\/strong><br>Finally, we may be able to analyze this strategy through some performance indicators.<strong>##CAGR<\/strong><br>cagr = (TW0050_monthly[&#8216;\u7d2f\u7a4d\u5831\u916c(\u6708)&#8217;][-1]) ** (1\/5) -1<strong>##Annually Standard Deviation<\/strong><br>std = ret.std()*np.sqrt(12)<strong>##Sharpe Ratio(Assume that Rf is 1%)<\/strong><br>shapre_ratio = (cagr-0.01)\/std<strong>##MDD<\/strong><br>roll_max = TW0050_monthly[&#8216;\u7d2f\u7a4d\u50f9\u503c(\u6708)&#8217;].cummax()<br>monthly_dd =TW0050_monthly[&#8216;\u7d2f\u7a4d\u50f9\u503c(\u6708)&#8217;]\/roll_Max &#8211; 1.0<br>max_dd = monthly_dd.cummin()<strong>##Table<\/strong><br>pd.DataFrame(columns=[&#8216;0050&#8217;],<br>\u3000\u3000index=[&#8216;\u5e74\u5316\u5831\u916c\u7387(%)&#8217;, &#8216;\u5e74\u5316\u6a19\u6e96\u5dee(%)&#8217;, &#8216;\u590f\u666e\u6bd4\u7387&#8217;, &#8216;\u671f\u9593\u6700\u5927\u56de\u64a4(%)&#8217;],<br>\u3000\u3000data = np.round(np.array([100*cagr, 100*std, sharpe_ratio, 100*max_dd[-1]]),2))<\/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\/1d8mwvYDOaDAMZozDWwPXRw.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Indicators<\/figcaption><\/figure>\n\n\n\n<p id=\"09b1\">According to our investment method, we could know that using this&nbsp;<strong>DCA method can get an annualized rate of return around 11%,&nbsp;<\/strong>which is quite a high number because the deposit rate of banks is around only 1%.&nbsp;<strong>Through the effect of compound interest, the original asset will increase about 1.6 times the original in 5 years<\/strong>, and the volatility and the Sharpe ratio perform not bad as well.<\/p>\n\n\n\n<p id=\"9cb0\">But in terms of disadvantages, this method will&nbsp;<strong>still be affected by the volatility caused by systematic risks such as COVID-19<\/strong>&nbsp;due to the properties of this ETF. Moreover, the time when we want to sell the stocks and make a profit depends on the investors\u2019 decision.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"2895\">DCA method is a easy and convenient strategy for many people who are new to investment. However, People who use this method&nbsp;<strong>must have a strong discipline<\/strong>&nbsp;such as entering the market every month&nbsp;<strong>no matter what happens at that time<\/strong>&nbsp;<strong>and keeping holding that assets for many years.<\/strong>&nbsp;Therefore,&nbsp;<strong>it is not suitable for people who don\u2019t have enough money&nbsp;<\/strong>to do this operation.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6fb2\"><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=\"4c4b\">In this article, we use backtesting to understand how our strategy performed in the past. But the past does not mean the future. It just allows investors to prove their ideas or strategies which are workable in the past so as to make a reference for the future.<\/p>\n\n\n\n<p id=\"d4c9\"><strong>To make successful backtesting, we still need to pay attention to things such as the data quality, the length of data, whether there are bugs in your program, whether too many transaction costs are ignored, etc.<\/strong>\u00a0As long as there is a mistake in these problems,\u00a0<strong>it will cause the distortion of the backtesting and lose money!!\u00a0<\/strong>As a result, you have to pay attention to our backtesting result again\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f every time<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"779a\"><span class=\"ez-toc-section\" id=\"Links_related_to_this_article_again\"><\/span><strong>Links related to this article again<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>API Official Website:\u00a0<\/strong><a href=\"https:\/\/api.tej.com.tw\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\"><strong>TEJ API Official W<\/strong><\/a><strong><a href=\"https:\/\/api.tej.com.tw\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">ebsite<\/a><\/strong><\/li>\n\n\n\n<li><strong>The Product Package:\u00a0<\/strong><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_caseIntro\/1\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>TEJ E SHOP<\/strong><\/a><\/li>\n\n\n\n<li><strong>Source Code:\u00a0<\/strong><a href=\"https:\/\/github.com\/tejtw\/TEJAPI_Python_Medium_Quant\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>TEJ GITHUB<\/strong><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Through the previous 2 articles of \u201cData Analysis\u201d , we have shared with you how to use Numpy and Pandas to start the first step of data analysis and the importance of using the adjusted stock price if you want to calculate the return. Therefore, this time we are going to&nbsp;use those tools to do [&hellip;]<\/p>\n","protected":false},"featured_media":17236,"template":"","tags":[3063,3200,3176,2988,3008],"insight-category":[690,50,3509],"class_list":["post-17235","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-backtesting-2","tag-etf-2","tag-python-2","tag-quantitative-analysis","tag-tejapi-quant","insight-category-data-analysis","insight-category-fintech","insight-category-fintech-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/17235","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\/17235\/revisions"}],"predecessor-version":[{"id":43967,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/17235\/revisions\/43967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/17236"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=17235"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=17235"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight-category?post=17235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}