TWI705408B - Prediction method for price trend of financial product and prediction system using thereof - Google Patents
Prediction method for price trend of financial product and prediction system using thereof Download PDFInfo
- Publication number
- TWI705408B TWI705408B TW108115629A TW108115629A TWI705408B TW I705408 B TWI705408 B TW I705408B TW 108115629 A TW108115629 A TW 108115629A TW 108115629 A TW108115629 A TW 108115629A TW I705408 B TWI705408 B TW I705408B
- Authority
- TW
- Taiwan
- Prior art keywords
- price
- estimated
- data
- historical
- image
- Prior art date
Links
Images
Landscapes
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
本發明關於一種金融商品價格的趨勢預測,特別是關於一種金融商品價格趨勢的預測方法及其系統。 The present invention relates to the trend prediction of a financial commodity price, in particular to a method and system for predicting the price trend of a financial commodity.
隨著人類生活水準的提升,除了透過工作而獲取主動收入以外,也有愈來愈多人以投資理財的方式獲取被動收入。適格的投資標的係不勝枚舉,而其中各式金融商品(如股票、債券、基金等)由於公開資訊相對豐富,較受人們青睞。 With the improvement of human living standards, in addition to earning active income through work, more and more people are earning passive income through investment and financial management. The list of eligible investment targets is endless, and various financial products (such as stocks, bonds, funds, etc.) are more popular due to the relatively abundant public information.
目前的金融商品價格趨勢的預測主要是透過判斷過去市場交易狀況以及預測者的經驗法則。然而,此種預測方式由於涉及預測者較多的主觀意識,可能無法適當地反映真實投資環境。 The current forecast of the price trend of financial products is mainly based on judging the past market transactions and the rules of experience of forecasters. However, this kind of forecasting method may not properly reflect the real investment environment due to the subjective consciousness of forecasters.
有鑒於此,一種金融商品價格趨勢的預測系統,適用於預測金融商品於受估時間區段之後第J天的價格趨勢,預測系統包括處理器、儲存模組以及輸出模組,處理器訊號連接於儲存模組及輸出模組之間。處理器自儲存模組取得金融商品的多個歷史價格圖像以及受估價格圖像,該些歷史價格圖像分別對應金融商品於多個歷史時間區段的價格資料,受估價格圖像對應受估時間區段的價格資料。處理器將各歷史價格圖像分割為 多個歷史價格區塊以及將受估價格圖像分割為多個受估價格區塊,且各歷史價格區塊位於對應的歷史價格圖像的不同位置,各受估價格區塊位於受估價格圖像的不同位置。處理器比對受估價格圖像的該些受估價格區塊以及各歷史價格圖像的該些價格區塊而從該些歷史價格圖像選擇多個可類比價格圖像,該些可類比價格圖像對應多個可類比價格資料。處理器根據各可類比價格資料於對應的歷史時間區段之後第0天及第J天的價格資料,將該些可類比價格資料分類為上漲族群與下跌族群,其中J大於0。處理器比對受估價格圖像所對應的受估價格資料與該些可類比價格資料而決定受估價格資料的分類結果,分類結果對應上漲族群及下跌族群的其中之一。最後由輸出模組輸出分類結果。 In view of this, a financial product price trend prediction system is suitable for predicting the price trend of financial products on the J day after the estimated time period. The prediction system includes a processor, a storage module and an output module, and the processor signal connection Between the storage module and the output module. The processor obtains multiple historical price images and estimated price images of financial products from the storage module. These historical price images correspond to the price data of financial products in multiple historical time periods, and the estimated price images correspond to Price data for the estimated time period. The processor divides each historical price image into Multiple historical price blocks and divide the estimated price image into multiple estimated price blocks, and each historical price block is located in a different position of the corresponding historical price image, and each estimated price block is located at the estimated price Different positions of the image. The processor compares the estimated price blocks of the estimated price image and the price blocks of each historical price image, and selects a plurality of comparable price images from the historical price images, the analogous ones The price image corresponds to multiple comparable price data. The processor classifies the comparable price data into the rising group and the falling group according to the price data on the 0th day and the J day after the corresponding historical time interval for each comparable price data, where J is greater than 0. The processor compares the estimated price data corresponding to the estimated price image with the comparable price data to determine the classification result of the estimated price data, and the classification result corresponds to one of the rising group and the falling group. Finally, the output module outputs the classification results.
在一或多個實施例中,處理器更根據各可類比價格資料於對應的歷史時間區段之後第0天與第J天的價格資料的比值決定各可類比價格資料為上漲族群或下跌族群。 In one or more embodiments, the processor further determines whether each comparable price data is an ascending group or a descending group based on the ratio of the price data on the 0th day and the Jth day after the corresponding historical time period. .
在一或多個實施例中,處理器更根據各可類比價格資料於對應的歷史時間區段之後第-J天至第+J天與第0天的價格資料的比值取得各可類比價格資料的平均曲線,且處理器更根據受估價格資料與各可類比價格資料的平均曲線於對應的歷史時間區段之後第-J天至第+J天的歐氏距離,決定受估價格資料的分類結果。 In one or more embodiments, the processor further obtains each comparable price data according to the ratio of the price data from day -J to day +J to day 0 after each comparable price data in the corresponding historical time period The processor further determines the value of the estimated price data based on the Euclidean distance from the -J day to the +J day after the average curve of the estimated price data and each comparable price data in the corresponding historical time period Classification results.
在一或多個實施例中,處理器更根據各可類比價格資料於對應的歷史時間區段之後第0天至第J天的一收盤價、至少一技術指標以及至少一總體經濟指標,將各可類比價格圖像分類為上漲族群或下跌族群。其中,處理器更利用收盤價、該至少一技術指標以及該至少一總體經濟指標 做為多個特徵值,並以該些特徵值輸入分群演算法比對受估價格資料與該些可類比價格資料而決定受估價格資料的分類結果。進一步地,處理器更根據該受估價格資料於該受估時間區段之後第I天的價格資料,重新決定該些特徵值的一重要性排序,其中I小於J。 In one or more embodiments, the processor further determines the closing price, at least one technical indicator, and at least one general economic indicator of each comparable price data from day 0 to day J after the corresponding historical time period. The comparable price images are classified as rising or falling groups. Wherein, the processor further uses the closing price, the at least one technical indicator, and the at least one overall economic indicator As a plurality of characteristic values, input the clustering algorithm with these characteristic values to compare the estimated price data with the comparable price data to determine the classification result of the estimated price data. Further, the processor further determines an importance order of the characteristic values according to the price data of the estimated price data on the I day after the estimated time period, where I is less than J.
在一或多個實施例中,處理器更根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定受估價格資料的分類結果,其中I小於J。 In one or more embodiments, the processor further determines the classification result of the estimated price data based on the price data of the estimated price data on the first day after the estimated time period, where I is less than J.
在另一實施例中,一種金融商品價格趨勢的預測方法,適用於預測金融商品於受估時間區段之後第J天的價格趨勢,預測方法包括以下步驟。歷史價格圖像取得步驟:取得金融商品的多個歷史價格圖像,其中該些歷史價格圖像分別對應金融商品於多個歷史時間區段的價格資料,各歷史價格圖像包括多個歷史價格區塊,各歷史價格區塊位於對應的歷史價格圖像的不同位置;受估價格圖像取得步驟:取得金融商品的受估價格圖像,其中受估價格圖像對應受估時間區段的價格資料,受估價格圖像包括多個受估價格區塊,各受估價格區塊位於受估價格圖像的不同位置;第一階段型態辨識步驟:比對受估價格圖像的該些受估價格區塊以及各歷史價格圖像的該些歷史價格區塊而自該些歷史價格圖像選擇多個可類比價格圖像,其中該些可類比價格圖像對應多個可類比價格資料;第二階段型態辨識步驟:根據各可類比價格資料於對應的歷史時間區段之後第0天及第J天的價格資料,將該些可類比價格資料分類為上漲族群與下跌族群,其中J大於0;以及趨勢決定步驟:比對受估價格圖像所對應的受估價格資料與該些可類比價格資料而決定受估價格資料為上漲族群或下跌族 群。 In another embodiment, a method for predicting the price trend of financial products is suitable for predicting the price trend of financial products on the J-th day after the estimated time period. The method includes the following steps. Historical price image acquisition step: Obtain multiple historical price images of financial products, where the historical price images correspond to the price data of the financial product in multiple historical time periods, and each historical price image includes multiple historical prices Block, each historical price block is located in a different position of the corresponding historical price image; the step of obtaining the estimated price image: obtain the estimated price image of the financial product, where the estimated price image corresponds to the estimated time period Price information, the estimated price image includes multiple estimated price blocks, and each estimated price block is located in a different position of the estimated price image; the first-stage type identification step: compare the value of the estimated price image The estimated price blocks and the historical price blocks of each historical price image, and a plurality of comparable price images are selected from the historical price images, wherein the comparable price images correspond to a plurality of comparable prices Data; the second-stage pattern identification step: According to the price data of each comparable price data on the 0th day and the J day after the corresponding historical time period, the comparable price data are classified into rising and falling groups, Where J is greater than 0; and the trend determination step: compare the estimated price data corresponding to the estimated price image with the comparable price data to determine whether the estimated price data is a rising group or a falling group group.
在一或多個實施例中,於第二階段型態辨識步驟中,更包括:根據各可類比價格資料於對應的歷史時間區段之後第0天與第J天的價格資料的比值將各可類比價格資料分類為上漲族群或下跌族群。 In one or more embodiments, in the second-stage pattern recognition step, it further includes: according to the ratio of the price data on the 0th day to the Jth day after each comparable price data in the corresponding historical time period, each Comparable price data are classified as rising or falling groups.
在一或多個實施例中,於第二階段型態辨識步驟中,更包括:根據各可類比價格資料於對應的該歷史時間區段之後第-J天至第+J天與第0天的價格資料的比值取得各可類比價格資料的平均曲線;於趨勢決定步驟中,更包括:根據受估價格資料與各可類比價格資料的平均曲線於對應的歷史時間區段之後第-J天至第+J天的歐氏距離,決定受估價格資料為上漲族群或下跌族群。 In one or more embodiments, in the second-stage pattern recognition step, the step further includes: according to each comparable price data, from the -J day to the +J day and the 0 day after the corresponding historical time period The ratio of the price data to obtain the average curve of each comparable price data; in the trend determination step, it further includes: according to the average curve of the estimated price data and each comparable price data on the -J day after the corresponding historical time period The Euclidean distance to the +J day determines whether the estimated price data is the rising group or the falling group.
在一或多個實施例中,於第二階段型態辨識步驟中,更包括:根據各可類比價格資料於對應的歷史時間區段之後第0天至第J天的一收盤價、至少一技術指標以及至少一總體經濟指標,將各可類比價格圖像分類為上漲族群或下跌族群。其中,於趨勢決定步驟中,更包括:利用收盤價、該至少一技術指標以及該至少一總體經濟指標做為多個特徵值,並以該些特徵值輸入分群演算法比對受估價格資料與該些可類比價格資料而決定受估價格資料為上漲族群或下跌族群。進一步而言,前述預測方法更包括回饋修正步驟:根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定該些特徵值的重要性排序,其中I小於J。 In one or more embodiments, in the second-stage pattern recognition step, it further includes: a closing price from day 0 to day J after each comparable price data in the corresponding historical time period, at least one Technical indicators and at least one overall economic indicator classify each comparable price image into an up or down ethnic group. Wherein, in the trend determination step, it further includes: using the closing price, the at least one technical indicator, and the at least one overall economic indicator as multiple feature values, and inputting the clustering algorithm with the feature values to compare the estimated price data With these comparable price data, determine whether the estimated price data is an up or down group. Furthermore, the aforementioned prediction method further includes a feedback correction step: according to the price data of the estimated price data on the first day after the estimated time period, the importance order of the characteristic values is re-determined, where I is less than J.
在一或多個實施例中,前述預測方法更包括回饋修正步驟:根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定受估價格資料為上漲族群或下跌族群,其中I小於J。 In one or more embodiments, the aforementioned forecasting method further includes a feedback correction step: according to the price data of the estimated price data on the first day after the estimated time period, re-determine whether the estimated price data is the rising group or the falling group, Where I is less than J.
綜合上述內容,根據本發明一或多個實施例所述的金融商品價格趨勢的預測系統及方法,以二階段型態辨識進行相似資料的篩選,而可以更客觀地判斷金融商品於未來某個時間點可能的價格趨勢與走向,有利於使用者擬定投資策略。此外,透過其回饋修正機制還可以根據實際狀況適當地修正投資策略,提升系統的實用性。 In summary, according to the system and method for predicting the price trend of financial products according to one or more embodiments of the present invention, similar data can be screened by two-stage type identification, and it is possible to more objectively judge whether a financial product is in the future. The possible price trends and trends at a time point are conducive to the user's formulation of investment strategies. In addition, through its feedback correction mechanism, the investment strategy can be appropriately modified according to the actual situation, and the practicability of the system can be improved.
80:預測系統 80: prediction system
81:處理器 81: processor
82:儲存模組 82: storage module
83:影像擷取模組 83: Image capture module
84:輸出模組 84: output module
S101~S108、S1051~S1053、S1061~S1062:步驟 S101~S108, S1051~S1053, S1061~S1062: steps
圖1為本發明的第一實施例的金融商品價格趨勢的預測系統的架構示意圖。 FIG. 1 is a schematic structural diagram of a system for predicting the price trend of financial commodities according to the first embodiment of the present invention.
圖2為本發明的第二實施例的金融商品價格趨勢的預測方法的步驟流程圖。 Fig. 2 is a flow chart of the steps of the method for predicting the price trend of financial commodities according to the second embodiment of the present invention.
圖3為本發明的第三實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。 Fig. 3 is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the third embodiment of the present invention.
圖4為本發明的第四實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。 4 is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the fourth embodiment of the present invention.
圖5為本發明的第五實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。 Fig. 5 is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the fifth embodiment of the present invention.
圖6為本發明的第六實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。 Fig. 6 is a flow chart of detailed steps of the method for predicting the price trend of financial commodities according to the sixth embodiment of the present invention.
圖7為本發明的第七實施例的金融商品價格趨勢的預測方法的步驟流程圖。 Fig. 7 is a flow chart of the steps of the method for predicting the price trend of financial commodities according to the seventh embodiment of the present invention.
圖8為本發明的第八實施例的金融商品價格趨勢的預測方法的步驟流 程圖。 Fig. 8 is the flow of steps of the method for predicting the price trend of financial commodities according to the eighth embodiment of the present invention Cheng Tu.
如圖1所示,係繪示本發明第一實施例的金融商品價格趨勢的預測系統的架構示意圖,其適用於預測一金融商品於受估時間區段之後第J天的價格趨勢。金融商品例如可為國內外市場之各種有價證券如股票、債券、貨幣、商業票據等,金融商品也可以是衍生性金融商品如期貨、期權、權證等。 As shown in FIG. 1, it is a schematic structural diagram of a system for predicting the price trend of financial products according to the first embodiment of the present invention, which is suitable for predicting the price trend of a financial product on the Jth day after the estimated time period. Financial products can be, for example, various securities in domestic and foreign markets, such as stocks, bonds, currencies, commercial papers, etc., and financial products can also be derivative financial products such as futures, options, and warrants.
如圖1所示,預測系統80包括處理器81、儲存模組82、影像擷取模組83以及輸出模組84。處理器81、儲存模組82、影像擷取模組83以及輸出模組84彼此透過有線或無線直接或間接的訊號連接。舉例而言,預測系統80可以是工業電腦、個人電腦、筆記型電腦、智慧型手機、平板電腦等。於此,處理器81可以由一個或多個處理元件實現。於此,各處理元件可以是微處理器、微控制器、數位信號處理器、微型計算機、中央處理器、場編程閘陣列、可編程邏輯設備、狀態器、邏輯電路、類比電路、數位電路和/或任何基於操作指令操作信號(類比和/或數位)的裝置,但在此並不對其限制。儲存模組82可以由一個或多個儲存元件所實現。其中,各儲存元件可以是例如非揮發式記憶體、硬碟、光碟、或磁帶等,但在此並不對其限制。另外,需要說明的是,儲存模組82中所儲存的資料可以來自於透過有線或無線連接的終端機,而可進行即時性的更新。影像擷取模組83可以是照相機、攝影機等,但在此並不對其限制。輸出模組84可以是螢幕、印表機、語音輸出裝置(例如喇叭),但在此並不對其限制。
以下係針對各元件於此預測系統80的功能進行進一步說明。
As shown in FIG. 1, the
首先,處理器81自儲存模組82取得金融商品的多個歷史價格資料以及受估價格資料。其中,該些歷史價格資料分別對應金融商品於多個歷史時間區段的價格資料,而受估價格資料對應受估時間區段的價格資料。如表1顯示某金融商品的歷史價格資料中的前10筆,其中各歷史價格資料分別對應此金融商品於不同歷史時間區段的價格資料;且在本實施例中,各歷史價格資料涵蓋的資料區間約為1個半月,但並不以此為限。
此外,在一實施例中,價格資料是金融商品的收盤價,但價格資料也可以包含多種資料類型,例如可以是金融商品的收盤價、成交量或者技術指標之間的組合,其中技術指標可以是MACD、KD、布林通道、RSI等。
First, the
需要說明的是,在一實施例中,歷史價格資料以及受估價格
資料可以是圖像化的資料。或者,在一些實施例中,歷史價格資料以及受估價格資料也可以是非圖像化的資料。因此,係以影像擷取模組83根據該些歷史價格資料擷取多個歷史價格圖像以及根據受估價格資料擷取受估價格圖像。具體來說,影像擷取模組83係可對著該些歷史價格資料與受估價格資料進行拍照、電腦截圖等方式而取得歷史價格圖像與受估價格圖像(以下合稱圖像),這些圖像可以被儲存於儲存模組82或者於取得後即刻提供至處理器81進行後續處理。
It should be noted that, in one embodiment, the historical price data and the estimated price
The data can be graphical data. Alternatively, in some embodiments, historical price data and estimated price data may also be non-graphical data. Therefore, the
於獲取圖像後,處理器81將各歷史價格圖像分割為多個歷史價格區塊以及將受估價格圖像分割為多個受估價格區塊,當中各歷史價格區塊位於對應的歷史價格圖像的不同位置,而各受估價格區塊位於受估價格圖像的不同位置。進一步言,處理器81可以透過參數設定的方式,根據所取得圖像的尺寸以及圖像涵蓋的時間區間長短,將圖像分割為N x N個相同大小的區塊,而各區塊係具有多個像素。換句話說,當圖像的時間區間較長時,所涵蓋的價格資料較多,因此需要將圖像分割為較多的區塊,才可以在後續程序中有效地辨識;而當圖像的時間區間較短時,所涵蓋的價格資料較少,因此僅需要將圖像分割為較少的區塊即可進行後續程序。
惟須說明,對應不同需求,亦可在圖像的時間區間較短時分割圖像為較多的區塊,或是於圖像的時間區間較長時分割圖像為較少的區塊。又如本實施例中,各圖像係被分割為6 x 6個區塊。
After acquiring the image, the
需要說明的是,若價格資料包括兩種以上的資料類型時,自影像擷取模組83所取得的圖像可以先由處理器81進行影像處理而僅選擇需要進行比對的資料類型做為價格資料,之後再由處理器81將處理後的圖
像分割為區塊。舉例來說,若價格資料包括收盤價、成交量、KD值及MACD值時,處理器81可以先對圖像進行影像處理篩選掉不需要的資料類型,再將處理後的圖像分割為區塊。另外,在一些實施例中,處理器81也可以分別選擇價格資料中的各資料類型而分割為區塊,亦即對應單一歷史價格圖像或單一受估價格圖像可以有多個影像處理後的價格圖像,而各價格圖像包括多個對應不同位置的區塊。
It should be noted that if the price data includes more than two data types, the image obtained from the
接著,處理器81比對受估價格圖像的該些受估價格區塊以及各歷史價格圖像的該些價格區塊而從該些歷史價格圖像選擇多個可類比價格圖像,當中該些可類比價格圖像對應多個可類比價格資料。具體來說,此時處理器81係進行第一階段型態辨識,比對各歷史價格圖像與受估價格圖像的各對應區塊之間的相似程度而判斷所比對之歷史價格圖像是否為可類比價格圖像。舉例來說,處理器81可計算歷史價格圖像與受估價格圖像中各對應區塊之間重合像素的數量與不重合像素的數量的比例,再依照歷史價格圖像的區塊與受估價格圖像的區塊間的距離,乘上距離權重;換句話說當兩個有值的區塊相差越遠,其距離權重越大。在另一些實施例中,處理器81計算歷史價格圖像與受估價格圖像中各對應區塊之間重合像素的數量與不重合像素的數量的比例之後,係將該比例值累加而取得加總比例值,並於該加總比例值超過門檻值時判斷所比對之歷史價格圖像為可類比價格圖像。
Next, the
在一或多個實施例中,處理器81係如前述,於加總比例值超過門檻值時判斷所比對的歷史價格圖像為初步篩選價格圖像,且處理器81還計算該些受估價格資料與各初步篩選價格圖像對應的價格資料之間的
誤差量,並於誤差量超過門檻值時判斷所比對的初步篩選價格圖像為可類比價格圖像。具體來說,誤差量可以是價格圖像重合像素的誤差量、價格資料統計值的誤差量、技術指標的誤差量中的至少一者,說明如下段。
In one or more embodiments, the
當價格資料為收盤價時,處理器81可以分別先將該些受估價格區塊與各初步篩選價格圖像的該些價格區塊的收盤價轉換為價格圖像,計算受估價格圖像的所有受估價格區塊與各初步篩選價格圖像的像素重合程度誤差量。或者,處理器81也可以再根據受估價格資料與各初步篩選價格圖像對應的價格資料進一步計算各種統計值(如平均值、標準差、中位數等)的誤差量;另一方面,當價格資料為技術指標時,則處理器81可以根據受估價格資料與各初步篩選價格圖像對應的價格資料計算各種技術指標的誤差量。在一或多個實施例中,該些區塊對於誤差量的計算具有不同的權重;例如,資料時間愈新的區塊享有愈高的權重。
When the price data is the closing price, the
在一或多個實施例中,於前述誤差量計算程序後,處理器81可透過輸出模組84輸出如下表2之比對表。
In one or more embodiments, after the foregoing error calculation procedure, the
附帶說明,有關於表2中歷史價格資料序號的決定,是透過價格圖像像素重合誤差值、價格資料統計值的誤差值以及技術指標誤差值的加總進行排序,當加總值愈小表示誤差愈小,相似程度愈高,且該筆價格資料的序號數愈小。 Incidentally, the decision on the serial number of historical price data in Table 2 is sorted by the sum of the pixel coincidence error value of the price image, the error value of the statistical value of the price data, and the error value of the technical indicators. When the sum is smaller, it means The smaller the error, the higher the degree of similarity, and the smaller the serial number of the price data.
接著,處理器81係進行第二階段型態辨識,根據各該可類比價格資料於對應的歷史時間區段之後第0天及第J天的價格資料,將該些可類比價格資料分類為上漲族群與下跌族群,其中J大於0;例如J可以是10但並不以此為限。然後處理器81比對受估價格資料與該些可類比價格資料而決定受估價格資料的分類結果,並由輸出模組84輸出分類結果。其中,分類結果對應上漲族群及下跌族群的其中之一。具體來說,當輸出模組84是顯示螢幕時,可以文字、圖像、影片或者上述之組合呈現受估價格的分類結果,但應知不以此為限;如同前述,輸出模組84也可以是印表機而可將分類結果印出,或者輸出模組84也可以是喇叭而以聲音或音樂的方式呈現受估價格的分類結果。
Then, the
在本發明一或多個實施例中是採用以下兩種方式將可類比價格資料分類:統計方法以及演算法。 In one or more embodiments of the present invention, the following two methods are used to classify comparable price data: statistical methods and algorithms.
在本發明一或多個實施例中,是採用統計方法將可類比價格資料進行第二階段的型態辨識而分類。在一實施態樣中,處理器81更根據各可類比價格資料於對應的歷史時間區段之後第0天與第J天的價格資料的比值決定各可類比價格資料為上漲族群或下跌族群。舉例來說,當比值為小於1時,表示可類比價格資料在第J天呈現下跌而應歸類於下跌族群,當比值為大於或等於1時,則將可類比價格資料歸類於上漲族群。在另一實施態樣中,處理器81更根據各可類比價格資料於對應的歷史時間區段之後第-J天至第+J天與第0天的價格資料的比值取得各可類比價格資料的平均曲線,且處理器81更根據受估價格資料與各可類比價格資料的平均曲線於對應的歷史時間區段之後第-J天至第+J天的歐氏距離,決定受估價格資料的分類結果。換句話說,在本實施態樣中,是根據受估價格資料的受估時間區段內的每筆價格資料與各可類比價格資料於對應的歷史時間區段之後第-J天至第+J天的平均曲線的最小直線距離而決定,例如當歐氏距離小於門檻值時,則決定受估價格資料為上漲族群;而當歐氏距離大於或等於門檻值時,則決定受估價格資料為下跌族群。
In one or more embodiments of the present invention, a statistical method is used to classify the comparable price data in the second stage of type identification. In an implementation aspect, the
另一方面,在本發明另一或多個實施例中,是採用演算法將可類比價格資料進行第二階段型態辨識而分類。具體來說,在一實施態樣中,處理器81更根據各可類比價格資料於對應的歷史時間區段之後第0天至第J天的收盤價、至少一技術指標以及至少一總體經濟指標,將各可類比價格圖像分類為上漲族群或下跌族群。具體來說,在此,處理器81不僅是根據各可類比價格圖像的價格資料將其分類,而是同時透過金融商品本身的價格資料、對應地區市場的財經資訊、總體經濟指標(如匯率)等各
種特徵值而以多變數的方式分類可類比價格圖像為上漲族群或下跌族群。接著,處理器81更將前述特徵值輸入分群演算法以比對受估價格資料與該些可類比價格資料而決定受估價格資料的分類結果。在此,分群演算法為KNN分群演算法(K-Nearest Neighbor Clustering Algorithm),但並不以此為限;此處採用的分群演算法亦可以是決策樹(Decision Trees)演算法、支援向量機(Support Vector Machine,SVM)、羅吉斯迴歸分類器(Logistic Regression Classifier)、貝式分類器(Naïve Bayes Classifier)等。另外,除了直接將前述特徵值輸入分群演算法而決定受估價格資料的分類結果外,也可以根據前述特徵值,利用數學統計方式比對受估價格資料與該些可類比價格資料而決定受估價格資料的分類結果。
On the other hand, in another or more embodiments of the present invention, an algorithm is used to classify the comparable price data in the second stage of type identification. Specifically, in an implementation aspect, the
需要說明的是,不同的特徵值對於演算法的重要性也可能不同。因此,在將特徵值輸入分群演算法之前,可以利用梯度樹提升(Gradient tree boosting)演算法先決定各特徵值之間的重要性,再選取重要性較高的數個(例如10個)特徵值輸入分群演算法以提升預測準確率以及節省運算時間。除了前述梯度樹提升演算法以外,也可以利用決策樹演算法、隨機抽樣法等方式決定各特徵值之間的重要性排序。另外,重要性較高的特徵值,係可配置較高的權重以適當地於演算結果反映該特徵值的影響。 It should be noted that the importance of different eigenvalues to the algorithm may also be different. Therefore, before inputting the feature values into the clustering algorithm, the Gradient tree boosting algorithm can be used to determine the importance of each feature value first, and then select several (for example, 10) features with higher importance. The value is input to the grouping algorithm to improve the prediction accuracy and save computing time. In addition to the aforementioned gradient tree lifting algorithm, decision tree algorithm, random sampling method, etc. can also be used to determine the importance ranking among the eigenvalues. In addition, eigenvalues with higher importance can be configured with higher weights to appropriately reflect the influence of the eigenvalues in the calculation results.
在一或多個實施例中,預測系統80還可具有回饋修正機制。
具體來說,處理器81更根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定受估價格資料的該分類結果,其中I小於J;本例中I可以是5但同樣不以此為限。在另一些實施例中,處理器81也可以上述價格
資料,重新決定分群演算法所使用的特徵值重要性排序。在又一些實施例中,處理器81也可以根據上述價格資料,改變某特徵值的權重。透過此一回饋修正機制,可以根據實際狀況適當地修正投資策略,提升其實用性。
In one or more embodiments, the
參閱圖2所示,圖2為本發明第二實施例的金融商品價格趨勢的預測方法的步驟流程圖,其適用於預測金融商品於受估時間區段之後第J天的價格趨勢。如圖2所示,本發明一或多個實施例進一步揭露一種金融商品價格趨勢的預測方法,包括以下步驟:歷史價格資料取得步驟S101、歷史價格圖像取得步驟S102、受估價格圖像取得步驟S103、第一階段型態辨識步驟S104、第二階段型態辨識步驟S105以及趨勢決定步驟S106,各步驟說明如下。 Referring to FIG. 2, FIG. 2 is a flow chart of the steps of the method for predicting the price trend of financial products according to the second embodiment of the present invention, which is suitable for predicting the price trend of financial products on the J day after the estimated time period. As shown in FIG. 2, one or more embodiments of the present invention further disclose a method for predicting the price trend of financial commodities, which includes the following steps: historical price data acquisition step S101, historical price image acquisition step S102, and estimated price image acquisition In step S103, the first-stage pattern recognition step S104, the second-stage pattern recognition step S105, and the trend determination step S106, each step is described as follows.
歷史價格資料取得步驟包括取得金融商品的多個歷史價格資料,如步驟S101所示;其中該些歷史價格資料分別對應金融商品於多個歷史時間區段的價格資料。 The historical price data obtaining step includes obtaining multiple historical price data of the financial product, as shown in step S101; wherein the historical price data respectively correspond to the price data of the financial product in multiple historical time segments.
歷史價格圖像取得步驟包括根據該些歷史價格資料取得多個歷史價格圖像,如步驟S102所示;其中各歷史價格圖像包括多個歷史價格區塊,且各歷史價格區塊位於對應的歷史價格圖像的不同位置。 The historical price image obtaining step includes obtaining multiple historical price images according to the historical price data, as shown in step S102; wherein each historical price image includes multiple historical price blocks, and each historical price block is located in a corresponding Different positions of historical price images.
受估價格圖像取得步驟包括根據該金融商品的受估價格資料取得受估價格圖像,如步驟S103所示;其中受估價格資料對應受估時間區段的價格資料,受估價格圖像包括多個受估價格區塊,且各受估價格區塊位於受估價格圖像的不同位置。 The step of obtaining the estimated price image includes obtaining the estimated price image based on the estimated price data of the financial product, as shown in step S103; wherein the estimated price data corresponds to the price data of the estimated time period, and the estimated price image It includes multiple estimated price blocks, and each estimated price block is located in a different position of the estimated price image.
第一階段型態辨識步驟包括比對受估價格圖像的該些受估價格區塊以及各歷史價格圖像的該些歷史價格區塊而自該些歷史價格圖 像選擇多個可類比價格圖像,如步驟S104所示;其中該些可類比價格圖像對應多個可類比價格資料。 The first-stage type recognition step includes comparing the estimated price blocks of the estimated price image and the historical price blocks of each historical price image from the historical price maps. For example, selecting a plurality of comparable price images is as shown in step S104; wherein the comparable price images correspond to a plurality of comparable price data.
第二階段型態辨識步驟包括根據各可類比價格資料於對應的歷史時間區段之後第0天及第J天的價格資料,將該些可類比價格資料分類為上漲族群與下跌族群,如步驟S105所示;其中J大於0。 The second-stage pattern identification step includes classifying the comparable price data into the rising group and the falling group based on the price data on the 0th day and the J day after the corresponding historical period of time for each comparable price data, as in step Shown in S105; where J is greater than 0.
趨勢決定步驟包括比對受估價格資料與該些可類比價格資料而決定受估價格資料為上漲族群或下跌族群,如步驟S106所示。 The trend determination step includes comparing the estimated price data with the comparable price data to determine whether the estimated price data is an increasing group or a decreasing group, as shown in step S106.
請參閱圖3,為本發明的第三實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。如圖3所示,根據本發明一或多個實施例,於第二階段型態辨識步驟S105中,更包括步驟S1051:根據各可類比價格資料於對應的歷史時間區段之後第0天與第J天的價格資料的比值將各可類比價格資料分類為上漲族群或下跌族群。 Please refer to FIG. 3, which is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the third embodiment of the present invention. As shown in FIG. 3, according to one or more embodiments of the present invention, in the second-stage pattern recognition step S105, the step S1051 is further included: according to each comparable price data, the 0th day after the corresponding historical time period and The ratio of the price data on the J day classifies the comparable price data as rising or falling groups.
請參閱圖4,為本發明的第四實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。如圖4所示,根據本發明一或多個實施例,於第二階段型態辨識步驟S105中,更包括步驟S1052:根據各可類比價格資料於對應的該歷史時間區段之後第-J天至第+J天與第0天的價格資料的比值取得各可類比價格資料的平均曲線。並且,對應地於趨勢決定步驟S106中,更包括步驟S1061:根據受估價格資料與各可類比價格資料的平均曲線於對應的歷史時間區段之後第-J天至第+J天的歐氏距離,決定受估價格資料為上漲族群或下跌族群。 Please refer to FIG. 4, which is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the fourth embodiment of the present invention. As shown in FIG. 4, according to one or more embodiments of the present invention, in the second-stage pattern recognition step S105, the step S1052 is further included: according to each comparable price data, after the corresponding historical period of time -J The ratio of the price data from day to day +J to day 0 obtains the average curve of each comparable price data. And, corresponding to the trend determination step S106, it further includes step S1061: According to the average curve of the estimated price data and the comparable price data, the Euclidean date from day -J to day +J after the corresponding historical time period The distance determines whether the estimated price data is the rising group or the falling group.
請參閱圖5,為本發明的第五實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。如圖5所示,根據本發明一或多個實施例, 於第二階段型態辨識步驟S105中,更包括步驟S1053:根據各可類比價格資料於對應的歷史時間區段之後第0天至第J天的一收盤價、至少一技術指標以及至少一總體經濟指標,將各可類比價格圖像分類為上漲族群或下跌族群。 Please refer to FIG. 5, which is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the fifth embodiment of the present invention. As shown in Fig. 5, according to one or more embodiments of the present invention, In the second-stage pattern recognition step S105, the step S1053 is further included: a closing price, at least one technical indicator, and at least one overall price from the 0th day to the Jth day after the corresponding historical time period according to each comparable price data Economic indicators, which classify each comparable price image as rising or falling.
再者,請參閱圖6,為本發明的第六實施例的金融商品價格趨勢的預測方法的細部步驟流程圖。如圖6所示,根據本發明一或多個實施例,於趨勢決定步驟S106中,更包括步驟S1062:利用收盤價、該至少一技術指標以及該至少一總體經濟指標做為多個特徵值,並以該些特徵值輸入分群演算法比對受估價格資料與該些可類比價格資料而決定受估價格資料為上漲族群或下跌族群。 Furthermore, please refer to FIG. 6, which is a flowchart of detailed steps of the method for predicting the price trend of financial commodities according to the sixth embodiment of the present invention. As shown in FIG. 6, according to one or more embodiments of the present invention, in the trend determination step S106, the step S1062 is further included: using the closing price, the at least one technical indicator, and the at least one overall economic indicator as multiple characteristic values , And use the characteristic values to input the clustering algorithm to compare the estimated price data with the comparable price data to determine whether the estimated price data is an up or down group.
前述預測方法可更包括回饋修正步驟。圖7為本發明的第七實施例的金融商品價格趨勢的預測方法的步驟流程圖。如圖7所示,於本發明一或多個實施例中,回饋修正步驟S107包括根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定受估價格資料為上漲族群或下跌族群,其中I小於J。圖8為本發明的第八實施例的金融商品價格趨勢的預測方法的步驟流程圖。如圖8所示,於本發明另一或多個實施例中,回饋修正步驟S108包括根據受估價格資料於受估時間區段之後第I天的價格資料,重新決定該些特徵值的重要性排序。 The aforementioned prediction method may further include a feedback correction step. Fig. 7 is a flow chart of the steps of the method for predicting the price trend of financial commodities according to the seventh embodiment of the present invention. As shown in FIG. 7, in one or more embodiments of the present invention, the feedback correction step S107 includes re-determining the estimated price data as the rising group based on the price data of the estimated price data on the first day after the estimated time period. Or descending group, where I is less than J. Fig. 8 is a flow chart of the steps of the method for predicting the price trend of financial commodities according to the eighth embodiment of the present invention. As shown in FIG. 8, in another or more embodiments of the present invention, the feedback correction step S108 includes re-determining the importance of the characteristic values according to the price data of the estimated price data on the first day after the estimated time period. Sexual sorting.
綜合上述內容,根據本發明一或多個實施例所述的金融商品價格趨勢的預測系統及方法,以二階段型態辨識進行相似資料的篩選,而可以更客觀地判斷金融商品於未來某個時間點可能的價格趨勢與走向,有利於使用者擬定投資策略。此外,透過其回饋修正機制還可以根據實際狀 況適當地修正投資策略,提升系統的實用性。 In summary, according to the system and method for predicting the price trend of financial products according to one or more embodiments of the present invention, similar data can be screened by two-stage type identification, and it is possible to more objectively judge whether a financial product is in the future. The possible price trends and trends at a time point are conducive to the user's formulation of investment strategies. In addition, through its feedback correction mechanism, it can also be based on actual conditions. The investment strategy should be appropriately revised to improve the practicability of the system.
80:預測系統 80: prediction system
81:處理器 81: processor
82:儲存模組 82: storage module
83:影像擷取模組 83: Image capture module
84:輸出模組 84: output module
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108115629A TWI705408B (en) | 2019-05-06 | 2019-05-06 | Prediction method for price trend of financial product and prediction system using thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108115629A TWI705408B (en) | 2019-05-06 | 2019-05-06 | Prediction method for price trend of financial product and prediction system using thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI705408B true TWI705408B (en) | 2020-09-21 |
TW202042160A TW202042160A (en) | 2020-11-16 |
Family
ID=74091516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108115629A TWI705408B (en) | 2019-05-06 | 2019-05-06 | Prediction method for price trend of financial product and prediction system using thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI705408B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201222455A (en) * | 2010-11-25 | 2012-06-01 | Hui-Xi Li | Method, computer program product and computer-readable recordable medium for selecting investment target |
US20130304623A1 (en) * | 2012-04-18 | 2013-11-14 | The Florida State University Research Foundation, Inc. | Stock ranking & price prediction based on neighborhood model |
CN106355499A (en) * | 2016-09-29 | 2017-01-25 | 河南理工大学 | Stock price trend forecasting and trading method |
CN109472700A (en) * | 2018-11-20 | 2019-03-15 | 中山大学 | Prediction technique, server and the storage medium of stock price |
-
2019
- 2019-05-06 TW TW108115629A patent/TWI705408B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201222455A (en) * | 2010-11-25 | 2012-06-01 | Hui-Xi Li | Method, computer program product and computer-readable recordable medium for selecting investment target |
US20130304623A1 (en) * | 2012-04-18 | 2013-11-14 | The Florida State University Research Foundation, Inc. | Stock ranking & price prediction based on neighborhood model |
CN106355499A (en) * | 2016-09-29 | 2017-01-25 | 河南理工大学 | Stock price trend forecasting and trading method |
CN109472700A (en) * | 2018-11-20 | 2019-03-15 | 中山大学 | Prediction technique, server and the storage medium of stock price |
Also Published As
Publication number | Publication date |
---|---|
TW202042160A (en) | 2020-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chang et al. | Application of eXtreme gradient boosting trees in the construction of credit risk assessment models for financial institutions | |
Fallahpour et al. | Using an ensemble classifier based on sequential floating forward selection for financial distress prediction problem | |
Bellotti et al. | Support vector machines for credit scoring and discovery of significant features | |
Hu et al. | Measuring retail company performance using credit scoring techniques | |
Sánchez-Lasheras et al. | A hybrid device for the solution of sampling bias problems in the forecasting of firms’ bankruptcy | |
Zhao | Futures price prediction of agricultural products based on machine learning | |
Saberi Anari | A hybrid model for leaf diseases classification based on the modified deep transfer learning and ensemble approach for agricultural aiot-based monitoring | |
CN110457577B (en) | Data processing method, device, equipment and computer storage medium | |
WO2023272852A1 (en) | Method and apparatus for classifying user by using decision tree model, device and storage medium | |
CN113095927B (en) | Method and equipment for identifying suspected transactions of backwashing money | |
Pehlivanlı et al. | Indicator selection with committee decision of filter methods for stock market price trend in ISE | |
CN114022176A (en) | Method for predicting commodity sales on e-commerce platform and electronic equipment | |
US11532036B2 (en) | Digital image ordering using object position and aesthetics | |
CN111863276A (en) | Hand-foot-and-mouth disease prediction method using fine-grained data, electronic device, and medium | |
Maguluri et al. | An Efficient Stock Market Trend Prediction Using the Real-Time Stock Technical Data and Stock Social Media Data. | |
TWI705408B (en) | Prediction method for price trend of financial product and prediction system using thereof | |
Helder et al. | Application of the VNS heuristic for feature selection in credit scoring problems | |
Sheikhi et al. | Financial distress prediction using distress score as a predictor | |
TWM584501U (en) | Prediction system for price trend of financial product | |
Sokudlor et al. | Enhancing milled rice qualitative classification with machine learning techniques using morphological features of binary images | |
Nikolaidis et al. | Exploring population drift on consumer credit behavioral scoring | |
Wong et al. | GANStick: US stock forecasting with GAN-generated candlesticks | |
US11042837B2 (en) | System and method for predicting average inventory with new items | |
Chen et al. | Predicting the japanese Yen to US dollar exchange rate based on machine learning models | |
Mao et al. | Loan prepayment prediction based on SVM-RFE and XGBoost models |