{"id":16841,"date":"2022-04-20T08:03:33","date_gmt":"2022-04-20T00:03:33","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=16841"},"modified":"2023-08-17T13:26:54","modified_gmt":"2023-08-17T05:26:54","slug":"svm-model","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insight\/svm-model\/","title":{"rendered":"SVM Model"},"content":{"rendered":"\n<p id=\"7de2\">Apply Financial Data to Predict Stock Price Fluctuation<\/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_1zPJUMLgFX3i_LAYoYrVsbQ.jpg\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Photo by&nbsp;<a href=\"https:\/\/unsplash.com\/@lukechesser\" rel=\"noreferrer noopener\" target=\"_blank\">Luke Chesser<\/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-69f2d0f6edc2f\" 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-69f2d0f6edc2f\"  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\/svm-model\/#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\/svm-model\/#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\/svm-model\/#Editing_Environment_and_Modules_Required\" >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\/svm-model\/#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\/svm-model\/#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-6\" href=\"https:\/\/www.tejwin.com\/en\/insight\/svm-model\/#Modelling\" >Modelling<\/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\/svm-model\/#Conclusion\" >Conclusion<\/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\/svm-model\/#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-9\" href=\"https:\/\/www.tejwin.com\/en\/insight\/svm-model\/#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-10\" href=\"https:\/\/www.tejwin.com\/en\/insight\/svm-model\/#Related_Link\" >Related Link<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"c72b\"><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\u2605\u2606\u2606<\/li>\n\n\n\n<li>Fit financial data in SVM Model and test the winning points<\/li>\n\n\n\n<li>Reminder\uff1aWe would firstly conduct variables selection and pre-processing. Subsequently, fit the model. Lastly, calculate the points of train data and test data and visualize the result. The following preface would illustrate how SVM works. There is no mathematic formula but you should know basic concept of Statistics, like overfitting, linear and so forth.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"80a4\"><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=\"39fd\">Support Vector Machine, short as SVM, is a machine learning algorithm based on Statistics theorem. It is widely used in data classifier and regression. As for this article, we would focus on Classifier.<\/p>\n\n\n\n<p id=\"fd56\">Simply put, classification of SVM is conducted by draw straight or irregular line(s) to divide different type of data. As for the way to draw the line, we should consider two conditions. First is&nbsp;<strong>the degree of difference between data<\/strong>. It is determine by how large the width of the line, briefly speaking. The wider the line, the better to recognize the difference. Second is the&nbsp;<strong>Error<\/strong>. Since it is hardly possible to fully distinguish one type of data from the other, we should take error in consideration. The way to measure above conditions is by setting coefficient of error term. As for the weights between them, it requires us to determine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"dc6f\"><span class=\"ez-toc-section\" id=\"Editing_Environment_and_Modules_Required\"><\/span><strong>Editing Environment and Modules Required<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"1018\">MacOS &amp; Jupyter Notebook<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Basic<br>import numpy as np<br>import pandas as pd# Graph<br>import matplotlib.pyplot as plt<br>%matplotlib inline<br>import seaborn as sns<br>sns.set()# TEJ API<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=\"6eae\"><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=\"f416\"><a href=\"https:\/\/api.tej.com.tw\/columndoc.html?subId=107\" rel=\"noreferrer noopener\" target=\"_blank\">Security Document<\/a>: Security Types in TAIEX. Code is \u201cTWN\/ANPRCSTD\u201d.<\/p>\n\n\n\n<p id=\"d85d\"><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_case_detail\/3?item_id=TWN%2FEWIFINQ\" rel=\"noreferrer noopener\" target=\"_blank\">Seasonal Financial Table<\/a>: Seasonally Basic Financial Information. Code is \u201cTWN\/EWIFINQ\u201d.<\/p>\n\n\n\n<p id=\"a811\"><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 \u201cTWN\/APRCD\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d70e\"><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=\"cca8\"><strong>Step 1. Filter Security Type<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sec_code = tejapi.get('TWN\/ANPRCSTD', chinese_column_name = True)condition = (sec_code['\u4e0a\u5e02\u5225'] == 'TSE') &amp; (sec_code['\u8b49\u5238\u7a2e\u985e\u540d\u7a31'] == '\u666e\u901a\u80a1')pub_common_stk = sec_code.loc[condition, '\u8b49\u5238\u78bc'].to_list()<\/pre>\n\n\n\n<p id=\"218c\">Select the security type of TSE and consider only common stock.<\/p>\n\n\n\n<p id=\"cb3d\"><strong>Step 1. Import Financial Data<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fin_data = tejapi.get('TWN\/EWIFINQ',<br>          coid = pub_common_stk, <br>          mdate= {'gte': '2017-01-01', 'lte': '2021-12-31'},<br>          opts={'columns': ['coid', 'mdate', 'ac_r103', 'ac_r403']},<br>          paginate = True,<br>          chinese_column_name = True)<br>fin_data = fin_data.dropna()<\/pre>\n\n\n\n<p id=\"51bf\">This time, we would apply ROE and Growth of Operating Income Margin. We assume that the larger number of these two indexes represents the better performance.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"8b0f\">ROE\uff1aReturn on Equity, measure one company\u2019s ability of profit<\/p>\n\n\n\n<p id=\"ae8c\">Growth of Operating Income Margin\uff1aOperating Income Margin is the proportion of how Operating Income occupy Sales Revenue. As for its growth rate, we apply the index to test whether the company is under stable growth.<\/p>\n<\/blockquote>\n\n\n\n<p id=\"200d\">The reason we select the above two indexes is that we hope find a balance point between shot-term and mid-term period of investment. This assumption is derive from that we consider ROE is a great measurement for financial performance, but it would easily affected by seasonal rotation and transformation of capital structure. We, therefore, regard Growth of Operating Income Margin as the standard to judge the performance of company management so as to alleviate the shortage of ROE.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1Tto9j7_5ZqY9KS7SLYlBjg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"303f\"><strong>Step 3. Import Stock Price &amp; Merge Data<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">price_df = pd.DataFrame()<br>for i in pub_common_stk:<br>    price_data = tejapi.get('TWN\/APRCD',<br>               coid = i, <br>               mdate= {'gte': '2016-01-01', 'lte': '2021-12-31'},<br>               opts={'columns': ['coid', 'mdate', 'close_d']},<br>               paginate = True,<br>               chinese_column_name = True<br>               )<br>    price_df = pd.concat([price_df, price_data], axis = 0)<\/pre>\n\n\n\n<p id=\"e942\">Import Close Price of qualified securities.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def compare(df1, df2):<br>    df2 = df2.rename(columns = {'\u8b49\u5238\u78bc':'\u8b49\u5238\u4ee3\u78bc', '\u8ca1\u52d9\u8cc7\u6599\u65e5':'\u5e74\u6708\u65e5'})<br>    compare = pd.merge(df1, df2, how='inner', on=['\u8b49\u5238\u4ee3\u78bc', '\u5e74\u6708\u65e5'])<br>    result1 = pd.concat([compare['\u5e74\u6708\u65e5'], compare['\u8b49\u5238\u4ee3\u78bc']], axis = 1)<br>    result2 = pd.merge(df1, result1, how='inner', on =['\u8b49\u5238\u4ee3\u78bc', '\u5e74\u6708\u65e5'])<br>    return result2ret_df2 = compare(price_df, fin_data)<br>ret_df2 = ret_df2.set_index(['\u8b49\u5238\u4ee3\u78bc'])<\/pre>\n\n\n\n<p id=\"6a00\">Merge fin_data and price_data, and only keep Date and Price data. We, subsequently, would calculate Holding Period Return between Dates.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/12VIUs5Fuy3jPME7KHVnGaQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"0701\"><strong>Step 4. Calculate Return &amp; Final Data Table<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ret_df2['\u5831\u916c%'] = pd.Series()for i in ret_df2.index.values:<br>    ret_df2.loc[i]['\u5831\u916c%'] = pd.Series(ret_df2.loc[i]['\u6536\u76e4\u50f9(\u5143)']).pct_change(1)*100<br>ret_df2 = ret_df2.dropna().reset_index()<\/pre>\n\n\n\n<p id=\"4af8\">Note\uff1aWe should import data of each security by loop and calculate return separately so as to avoid the circumstances that compute return with different securities.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def compare2(df1, df2):<br>    df2 = df2.rename(columns = {'\u8b49\u5238\u78bc':'\u8b49\u5238\u4ee3\u78bc', '\u8ca1\u52d9\u8cc7\u6599\u65e5':'\u5e74\u6708\u65e5'})<br>    compare = pd.merge(df1, df2, how='inner', on=['\u8b49\u5238\u4ee3\u78bc', '\u5e74\u6708\u65e5'])<br>    return comparedata = compare2(ret_df2, fin_data).set_index(['\u8b49\u5238\u4ee3\u78bc','\u5e74\u6708\u65e5'])<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1vBj1xPR2U1Eu8G7UYJQfHQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"5129\"><strong>Step 5. Outlier<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1aPxc9O454WXl7C7ePhi8Mg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"0dd7\">Based on above chart, we can say that outlier problem exists in both ROE and Growth of Operating Income Margin. Hence, we would set the standard of exceeding standard deviation to exclude those outliers.(Considering the length of article, please check complete process in&nbsp;<strong>Source Code<\/strong>)<\/p>\n\n\n\n<p id=\"bbf5\"><strong>Step 6. Standardize Distribution of Data<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import sklearn.preprocessing as preprocessingdata_rmout = data_no.replace([np.inf, -np.inf], np.nan)<br>data_rmout = data_no.dropna()<br>data_std = pd.DataFrame(preprocessing.scale(data_no), index = data_no.index, columns = data_no.columns)<br>plt.figure(figsize=(15,8))<br>plt.hist(data_std['ROE(A)-\u7a05\u5f8c'], bins = 50)<br>plt.hist(data_std['\u71df\u696d\u5229\u76ca\u6210\u9577\u7387'], bins = 50, alpha =0.7)<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1A4qvk-7y43v1BNWshKAhiA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"2aa1\">According to above distribution, it is clear that data has been standardized and the distribution of two indexes is similar.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"06fc\"><span class=\"ez-toc-section\" id=\"Modelling\"><\/span><strong>Modelling<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"04ae\"><strong>Step 1. Data Split<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from sklearn.model_selection import train_test_splitdata_train, data_test = train_test_split(data_std, test_size = 0.2, random_state = 0)<\/pre>\n\n\n\n<p id=\"c041\"><strong>Step 2. Model Fitting<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from sklearn.svm import SVCcf = SVC(<br><strong>C=10.0<\/strong>, break_ties=False, cache_size=200, class_weight=None, coef0=0.0,decision_function_shape='ovr', degree=3, gamma='scale', <strong>kernel='linear'<\/strong>,max_iter=-1, probability=False, random_state=None, shrinking=True,tol=0.001, verbose=False<br>)index = ['ROE(A)-\u7a05\u5f8c', '\u71df\u696d\u5229\u76ca\u6210\u9577\u7387']cf.fit(data_train[index], data_train['\u5831\u916c%'] &gt;  data_train['\u5831\u916c%'].quantile(0.5))<\/pre>\n\n\n\n<p id=\"a1bc\">Checking the setting area of model would know that what we apply is the structure of linear model. To boot, considering that linear may give rise to a too simple model, we set the coefficient of error as 10 so as to increase the complexity of model. As for the standard to measure up or down, we set the standard of \u201c larger or smaller than median\u201d.<\/p>\n\n\n\n<p id=\"9d92\"><strong>Step 3. Visualize Data Classifier<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from mlxtend.plotting import plot_decision_regionsindex_plot = data_test[index].values<br>labels_plot = (data_test['\u5831\u916c%'] &gt; data_test['\u5831\u916c%'].quantile(0.5)).astype(int).valuesplot_decision_regions(index_plot, labels_plot, cf)<br>plt.xlabel('\u80a1\u6771\u6b0a\u76ca\u5831\u916c\u7387')<br>plt.ylabel('\u71df\u696d\u5229\u76ca\u6210\u9577\u7387')<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/18-zZXCazWLyN_DBNsvK3fg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"b593\">With above chart, model makes us conclude that higher ROE and Growth of Operating Income Margin brings about potential growth, same as our previous assumption.<\/p>\n\n\n\n<p id=\"bfb4\"><strong>Step 4. Test Result<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># TRAIN<br>cf.score(data_train[index], data_train['\u5831\u916c%'] &gt;  data_train['\u5831\u916c%'].quantile(0.5))# TEST<br>cf.score(data_test[index], data_test['\u5831\u916c%'] &gt;  data_test['\u5831\u916c%'].quantile(0.5))<\/pre>\n\n\n\n<p id=\"a2ac\">Train Data Score\uff1a0.5857<\/p>\n\n\n\n<p id=\"e49b\">Valid Data Score\uff1a0.5965<\/p>\n\n\n\n<p id=\"3d3a\">The scores are both larger than 0.5, which means that model is effective. On top of that, Valid Data outperforming Train Data represents that there is no overfitting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"e93c\"><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=\"c9a5\">This article firstly show you the selection of data and pre-processing. Subsequently, implement model fitting, visualization and train-valid test. The part of process of data processing, we illustrate the meaning of ROE and Growth of Operating Income Margin. If you prefer other indexes, welcome check TEJ Database. During model fitting, we select the simple linear structure so as to make you understand the basic settings of parameters. Lastly, by visualization of model result, we prove that \u201cThe larger the indexes, the better the potential\u201d. And, confirm the effectiveness of model by calculating scores of train and valid data.<\/p>\n\n\n\n<p id=\"de51\">Last but not least, if you are interested in machine learning, please keep following us. We will publish more articles about other applications. Besides, welcome to purchase the plans offered in&nbsp;<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/index\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E Shop<\/a>&nbsp;and use the well-complete database to implement your own model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"62aa\"><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\/04373fd8987a38e9487757db2ee5f729#file-tejapi_medium-13-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=\"178b\"><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\/lasso-regression-model\/\" class=\"ek-link\">Lasso Regression Model<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tejwin.com\/en\/insight\/defensive-stocks-recover-after-going-ex-dividend\/\" class=\"ek-link\">defensive stocks -recover after going ex-dividend<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1647\"><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\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Apply Financial Data to Predict Stock Price Fluctuation Highlights Preface Support Vector Machine, short as SVM, is a machine learning algorithm based on Statistics theorem. It is widely used in data classifier and regression. As for this article, we would focus on Classifier. Simply put, classification of SVM is conducted by draw straight or irregular [&hellip;]<\/p>\n","protected":false},"featured_media":16843,"template":"","tags":[2630,2637,3007],"insight-category":[690,50,3509],"class_list":["post-16841","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-roe","tag-svm","tag-tejapi-data-analysis","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\/16841","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":0,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16841\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/16843"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=16841"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=16841"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight-category?post=16841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}