{"id":364,"date":"2023-11-12T11:26:39","date_gmt":"2023-11-12T02:26:39","guid":{"rendered":"https:\/\/www.mhr-y.com\/jp\/wordpress\/?p=364"},"modified":"2023-11-12T11:26:40","modified_gmt":"2023-11-12T02:26:40","slug":"use-ai-to-predict-stock-prices-in-3-days","status":"publish","type":"post","link":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/","title":{"rendered":"Use AI to predict stock prices in 3 days"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>This time, we will use machine learning LSTM, which is an AI method, to predict how much the stock price will change in three days. The implemented site is published at the following URL.<\/p>\n\n\n\n<p>Stock price prediction by AI <a href=\"https:\/\/www.mhr-y.com\/ai-stock\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.mhr-y.com\/jp\/ai-stock\/<\/a><\/p>\n\n\n\n<p>I created this without any prior knowledge of machine learning, so there may be some misunderstandings. Please note. If you have any suggestions for improvement, please leave a comment.<\/p>\n\n\n \n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Prediction algorithm<\/h2>\n\n\n\n<p>This is the prediction algorithm.<\/p>\n\n\n\n<p>The basic idea is as follows.<\/p>\n\n\n\n<p>First, obtain past stock prices and calculate technical indicators.<\/p>\n\n\n\n<p>Next, you will learn the relationship between the values of technical indicators and the rise and fall of stock prices.<\/p>\n\n\n\n<p>Finally, input the price movements for the last 10 days and predict how likely the stock price will change three days from now.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare input data<\/h3>\n\n\n\n<p>First, use pandas_datareader to retrieve the past 180 days of daily data for the input ticker symbol from yahoo.com.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd># Specify the ticker symbol to predict as an argument\ncode = argv&#91;1]\ntoday = date.today()\nago = today - relativedelta(days=180)\n\n# Get data\n# data is pandas.DataFrame type\ndata = pdr.get_data_yahoo(code, start=ago, end=today, progress=False)<\/kbd><\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p>Next, calculate the following technical indicators for Close (closing price) of the obtained stock price data.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simple Moving Average (SMA) : 7, 14, 24<\/li>\n\n\n\n<li>Moving Average Deviation rate (MAD) : 7, 14, 24<\/li>\n\n\n\n<li>Moving Average Convergence\/Divergence (MACD) : short-term EMA12\u3001long-term EMA26\u3001MACD signal 9<\/li>\n\n\n\n<li>Relative Strength Index (RSI) : 14<\/li>\n\n\n\n<li>Bollinger Bands : 20<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>data = sma(data,7)\ndata = sma(data,14)\ndata = sma(data,24)\ndata = macd(data)\ndata = rsi(data,14)\ndata = sigma(data,20)<\/kbd><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>def sma(df, window):\n   df&#91;'SMA' +str(window)] = df&#91;'Close'].rolling(window=window).mean()\n   df&#91;'Moving_average_divergence' +str(window)] = 100.0 *(df&#91;'Close'] -df&#91;'SMA' +str(window)]) \/df&#91;'SMA' +str(window)]\n   return df\n\ndef macd(df):\n   FastEMA_period = 12\n   SlowEMA_period = 26\n   SignalSMA_period = 9\n   df&#91;'MACD'] = df&#91;'Close'].ewm(span=FastEMA_period).mean() -df&#91;'Close'].ewm(span=SlowEMA_period).mean()\n   df&#91;'Signal'] = df&#91;'MACD'].rolling(SignalSMA_period).mean()\n   return df\n\ndef rsi(df, window):\n   df_diff = df&#91;'Close'].diff(1)\n   df_up, df_down = df_diff.copy(), df_diff.copy()\n   df_up&#91;df_up &lt;0] = 0\n   df_down&#91;df_down &gt;0] = 0\n   df_down = df_down *-1\n   df_up_sma = df_up.rolling(window=window,center=False).mean()\n   df_down_sma = df_down.rolling(window=window,center=False).mean()\n   df&#91;'RSI'+str(window)] = 100.0 *(df_up_sma \/(df_up_sma +df_down_sma))\n   return df\n\ndef sigma(df, window):\n   df_mean = df&#91;'Close'].rolling(window=window).mean()\n   df_std = df&#91;'Close'].rolling(window=window).std()\n   df&#91;'sigma' +str(window)] = (df&#91;'Close'] -df_mean) \/df_std\n   return df<\/kbd><\/code><\/pre>\n\n\n\n<p>Next, since the scale of each technical indicator value is different, it is normalized. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Normalization\" target=\"_blank\" rel=\"noreferrer noopener\">Normalization<\/a> is calculated by subtracting the mean value from all elements and dividing by the standard deviation.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd># Specify numbers to standardize\nuse_cols = &#91;'SMA7', 'Moving_average_divergence7',\n            'SMA14', 'Moving_average_divergence14',\n            'SMA24', 'Moving_average_divergence24',\n            'MACD', 'RSI14', 'sigma20']\n\n# Normalize the specified number\nn_df = mean_norm(data&#91;use_cols])<\/kbd><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd># Normalization\ndef mean_norm(df_input):\n   return df_input.apply(lambda x: (x -x.mean()) \/x.std(), axis=0)<\/kbd><\/code><\/pre>\n\n\n \n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Create training data and learning data<\/h3>\n\n\n\n<p>The next step is to extract data for n_prev days from the technical indicator values you created.<\/p>\n\n\n\n<p>The extracted data is used as training data, and the correct data is how much the closing price rose or fell three days after the last closing price of the data for n_prev days.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd># n_prev days of training data in docx\n# Correct data on how much stock prices actually rose and fell on docy\ndocx, docy = &#91;],&#91;]\nn_prev = 10 # Number of days to study\nn_df = n_df&#91;25:] # Skip the first 25 rows of the standardized pd.DataFrame. This includes data such as the 24-day simple moving average above, but due to calculation reasons, there is no data for the first 24 days, so I deleted the first 25 days so that all the data was properly aligned. to be in a state of being\n\n# Repeat loop processing for n_df rows minus 13 times\nfor i in range(len(n_df) -13): \n       docx.append(n_df.iloc&#91;i:i+n_prev]&#91;use_cols].values)\n       docy.append(100.0 *(data.iloc&#91;i+13]&#91;'Close'] -data.iloc&#91;i+10]&#91;'Close']) \/data.iloc&#91;i+10]&#91;'Close'])\n\narrayX = np.array(docx) # Value of each technical indicator\narrayY = np.array(docy) # 3-day stock price change rate<\/kbd><\/code><\/pre>\n\n\n\n<p>Next, we will categorize the rate of change in stock prices. If the stock price has fallen by -2.5% or more after 3 days, it is classified into 7 categories, such as -3, and if it is in the range of -0.5% decline to 0.5% increase, it is 0.<\/p>\n\n\n\n<p>Furthermore, by applying a one-hot encoder, the 7 categories are converted into a 7-column matrix.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd># Divide the rate of change into seven categories\narrayY&#91;arrayY &lt;= -2.5] = -3\narrayY&#91;(arrayY > -2.5) &amp; (arrayY &lt;= -1.5)] = -2\narrayY&#91;(arrayY > -1.5) &amp; (arrayY &lt;= -0.5)] = -1\narrayY&#91;(arrayY > -0.5) &amp; (arrayY &lt; 0.5)] = 0\narrayY&#91;(arrayY >= 0.5) &amp; (arrayY &lt; 1.5)] = 1\narrayY&#91;(arrayY >= 1.5) &amp; (arrayY &lt; 2.5)] = 2\narrayY&#91;arrayY >= 2.5] = 3\n\n# One-hot encode the numbers divided into 7 categories\nenc = sp.OneHotEncoder(sparse_output=False)\narrayY = enc.fit_transform(arrayY.reshape(-1,1))<\/kbd><\/code><\/pre>\n\n\n\n<p>Of the data created, 90% will be used as training data and the remaining 10% will be used as test data.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>ntrn = round(len(arrayX) *(1 -0.1))  # 90% is for training, remaining 10% is test data\nntrn = int(ntrn)\n\n# X_train is training data, y_train is its correct data\r\n# X_test is test data, y_test is test correct data\nX_train, y_train = arrayX&#91;0:ntrn], arrayY&#91;0:ntrn]\nX_test, y_test = arrayX&#91;ntrn:], arrayY&#91;ntrn:]<\/kbd><\/code><\/pre>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Building and training machine learning models<\/h3>\n\n\n\n<p>Build the model with model.compile.<\/p>\n\n\n\n<p>As a machine learning model, we use an artificial recurrent neural network (RNN) architecture suitable for classification, processing, and prediction based on time-series data called LSTM (Long Short-Term Memory).<\/p>\n\n\n\n<p>hidden_dim is a variable that specifies hidden layers; increasing the number of hidden layers increases calculation time, but allows for more flexible learning.<\/p>\n\n\n\n<p>input_shape is specified as (10,9). This number is because the input data consists of 10 days worth of data and a matrix of 9 technical indicators.<\/p>\n\n\n\n<p>Dropout (0.2) intentionally disables 20% of the calculation flow from above. This has the effect of preventing a decline in predictive ability for unknown data due to over-learning.<\/p>\n\n\n\n<p>Dense(7) makes the output 7 numbers. Since the correct answer data has 7 categories, we will output 7-dimensional data.<\/p>\n\n\n\n<p>Activation (&#8216;softmax&#8217;) converts the sum of the last 7-dimensional data output to 1. We want the percentage changes in the seven categories of stock prices to add up to 100%.<\/p>\n\n\n\n<p>Specify Adam and learning rate for the optimization algorithm.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>hidden_dim = 128\nmodel = Sequential()\nmodel.add(LSTM(hidden_dim, input_shape=(10,9), stateful=False, return_sequences=False))\nmodel.add(Dropout(0.2)) \nmodel.add(Dense(7)) \nmodel.add(Activation('softmax'))\nopt = keras.optimizers.Adam(learning_rate=0.0001)\nmodel.compile(optimizer=opt ,loss='categorical_crossentropy',metrics=&#91;'accuracy'])<\/kbd><\/code><\/pre>\n\n\n\n<p>Train the model built with model.fit. Specify the number of learning times with epochs.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>epochs = 100\nverbose = 0\nhistory = model.fit(X_train, y_train, batch_size=128, epochs=epochs, verbose=verbose, validation_split=0.2, validation_data=(X_test, y_test))<\/kbd><\/code><\/pre>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Output prediction<\/h3>\n\n\n\n<p>If you input the technical indicators for the last 10 days into the model you built, the model will output the probabilities for each of the 7 categories.<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><kbd>predict = model.predict(n_df.iloc&#91;-10:]&#91;use_cols].values.reshape(1,10,9), verbose=verbose)\n\ncolumns =&#91;'~ -2.5%', '-2.5% ~ -1.5%', '-1.5% ~ -0.5%', '-0.5% ~ 0.5%', '0.5% ~ 1.5%', '1.5% ~ 2.5%', '2.5% ~ ']\npred = pd.DataFrame(predict, columns=columns)<\/kbd><\/code><\/pre>\n\n\n\n<p>You can try the actual output at the following URL.<\/p>\n\n\n\n<p>Stock price prediction by AI <a href=\"https:\/\/www.mhr-y.com\/ai-stock\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.mhr-y.com\/jp\/ai-stock\/<\/a><\/p>\n\n\n \n\n\n<div style=\"height:41px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Finally<\/h2>\n\n\n\n<p>This time, we used LSTM to predict the stock price in 3 days.<\/p>\n\n\n\n<p>This implementation is based on the following site.<\/p>\n\n\n\n<p><a href=\"https:\/\/note.com\/happy_ice_cream\/n\/n0cae976e5c78\">https:\/\/note.com\/happy_ice_cream\/n\/n0cae976e5c78<\/a><\/p>\n\n\n\n<p>I&#8217;m glad if you can use it as a reference.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This time, we will use machine learning LSTM, which is an AI method, to predict how much the stoc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,44,31],"tags":[52,47],"class_list":["post-364","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-15","category-44","category-31","tag-ai","tag-lstm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5<\/title>\n<meta name=\"description\" content=\"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5\" \/>\n<meta property=\"og:description\" content=\"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/\" \/>\n<meta property=\"og:site_name\" content=\"\u65e5\u65e5\u662f\u597d\u65e5\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-12T02:26:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-12T02:26:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png\" \/>\n\t<meta property=\"og:image:width\" content=\"780\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"MHR-Y\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"MHR-Y\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"19\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/\"},\"author\":{\"name\":\"MHR-Y\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#\\\/schema\\\/person\\\/20985e010213c16c5314692e2bfee7c6\"},\"headline\":\"Use AI to predict stock prices in 3 days\",\"datePublished\":\"2023-11-12T02:26:39+00:00\",\"dateModified\":\"2023-11-12T02:26:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/\"},\"wordCount\":655,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#\\\/schema\\\/person\\\/20985e010213c16c5314692e2bfee7c6\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png\",\"keywords\":[\"AI\",\"LSTM\"],\"articleSection\":[\"\u30d7\u30ed\u30b0\u30e9\u30e0\",\"\u6a5f\u68b0\u5b66\u7fd2\",\"\u8abf\u3079\u305f\u3053\u3068\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/\",\"url\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/\",\"name\":\"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png\",\"datePublished\":\"2023-11-12T02:26:39+00:00\",\"dateModified\":\"2023-11-12T02:26:40+00:00\",\"description\":\"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png\",\"contentUrl\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png\",\"width\":780,\"height\":410},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/2023\\\/11\\\/use-ai-to-predict-stock-prices-in-3-days\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use AI to predict stock prices in 3 days\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/\",\"name\":\"\u65e5\u65e5\u662f\u597d\u65e5\",\"description\":\"\u65e5\u3005\u300c\u5165\u529b\u2192\u51e6\u7406\u2192\u51fa\u529b\u300d\u3092\u5b9f\u8df5\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#\\\/schema\\\/person\\\/20985e010213c16c5314692e2bfee7c6\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/#\\\/schema\\\/person\\\/20985e010213c16c5314692e2bfee7c6\",\"name\":\"MHR-Y\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-mhr-y_black.png\",\"url\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-mhr-y_black.png\",\"contentUrl\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-mhr-y_black.png\",\"width\":512,\"height\":512,\"caption\":\"MHR-Y\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-mhr-y_black.png\"},\"sameAs\":[\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\"],\"url\":\"https:\\\/\\\/www.mhr-y.com\\\/jp\\\/wordpress\\\/author\\\/mhr-y\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","description":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/","og_locale":"ja_JP","og_type":"article","og_title":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","og_description":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","og_url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/","og_site_name":"\u65e5\u65e5\u662f\u597d\u65e5","article_published_time":"2023-11-12T02:26:39+00:00","article_modified_time":"2023-11-12T02:26:40+00:00","og_image":[{"width":780,"height":410,"url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png","type":"image\/png"}],"author":"MHR-Y","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"MHR-Y","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"19\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#article","isPartOf":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/"},"author":{"name":"MHR-Y","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#\/schema\/person\/20985e010213c16c5314692e2bfee7c6"},"headline":"Use AI to predict stock prices in 3 days","datePublished":"2023-11-12T02:26:39+00:00","dateModified":"2023-11-12T02:26:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/"},"wordCount":655,"commentCount":0,"publisher":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#\/schema\/person\/20985e010213c16c5314692e2bfee7c6"},"image":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png","keywords":["AI","LSTM"],"articleSection":["\u30d7\u30ed\u30b0\u30e9\u30e0","\u6a5f\u68b0\u5b66\u7fd2","\u8abf\u3079\u305f\u3053\u3068"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/","url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/","name":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","isPartOf":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#primaryimage"},"image":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png","datePublished":"2023-11-12T02:26:39+00:00","dateModified":"2023-11-12T02:26:40+00:00","description":"Use AI to predict stock prices in 3 days - \u65e5\u65e5\u662f\u597d\u65e5","breadcrumb":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#primaryimage","url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png","contentUrl":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/11\/\u6a5f\u68b0\u5b66\u7fd2\u682a\u4fa1en.png","width":780,"height":410},{"@type":"BreadcrumbList","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/2023\/11\/use-ai-to-predict-stock-prices-in-3-days\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.mhr-y.com\/jp\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Use AI to predict stock prices in 3 days"}]},{"@type":"WebSite","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#website","url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/","name":"\u65e5\u65e5\u662f\u597d\u65e5","description":"\u65e5\u3005\u300c\u5165\u529b\u2192\u51e6\u7406\u2192\u51fa\u529b\u300d\u3092\u5b9f\u8df5","publisher":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#\/schema\/person\/20985e010213c16c5314692e2bfee7c6"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mhr-y.com\/jp\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":["Person","Organization"],"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/#\/schema\/person\/20985e010213c16c5314692e2bfee7c6","name":"MHR-Y","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/03\/cropped-mhr-y_black.png","url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/03\/cropped-mhr-y_black.png","contentUrl":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/03\/cropped-mhr-y_black.png","width":512,"height":512,"caption":"MHR-Y"},"logo":{"@id":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-content\/uploads\/2023\/03\/cropped-mhr-y_black.png"},"sameAs":["https:\/\/www.mhr-y.com\/jp\/wordpress"],"url":"https:\/\/www.mhr-y.com\/jp\/wordpress\/author\/mhr-y\/"}]}},"_links":{"self":[{"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/posts\/364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/comments?post=364"}],"version-history":[{"count":20,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/posts\/364\/revisions"}],"predecessor-version":[{"id":384,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/posts\/364\/revisions\/384"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/media\/385"}],"wp:attachment":[{"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/media?parent=364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/categories?post=364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mhr-y.com\/jp\/wordpress\/wp-json\/wp\/v2\/tags?post=364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}