Samsung Electronics Stock Price in 10 Years: Predicting the Future with AI and Data (feat. Python)

여러분, 삼성전자 10년 후 주가가 어떻게 될지 궁금하신 적 있으신가요? 오늘은 그 흥미진진한 여정을 함께 떠나보려 합니다. 삼성전자 10년후 주가에 대한 예측은 단순한 숫자 게임이 아닙니다. 이는 기술의 진보, 글로벌 경제의 흐름, 그리고 우리의 일상이 어떻게 변화할지를 그려보는 과정이기도 합니다.(삼성전자 10년후 주가는 약 12만원으로 예측되네요!)

삼성전자 10년후 주가 시각화
(Python visualization of Samsung Electronics stock price in 10 years)

In this post, we will look into the future of Samsung Electronics using AI and data analytics, and provide useful insights for investors. (Some people say that Samsung Electronics' corporate culture has changed so much that it is hopeless, while others say that it will follow the same path as Intel. It's a little depressing that no one is positive).

이 글이 사실 2024년 12월경에 작성되었는데 1년이 좀 지난 시점에 한번 업데이트를 해보았습니다.

Samsung Electronics Stock Price in 10 Years: Current Outlook

If you look at the recent forecasts of securities analysts, expectations for Samsung Electronics' stock price in 10 years seem to have been tempered somewhat. The optimistic "100,000 electrons" forecast has now been tempered, but this may be a short-term perspective. Long-term investors could use this volatility as an opportunity.

AI and data predict Samsung Electronics' future stock price

Now, the Pythonand the Prophet model to predict Samsung Electronics' stock price in 10 years. This is a powerful tool for predicting the future by learning patterns from historical data.

import yfinance as yf
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from prophet import Prophet
from datetime import datetime, timedelta

Import # Samsung Electronics data (last 10 years)
ticker = "005930.KS"
data = yf.download(ticker, period="10y")

Prepare # Prophet data
df = data['Adj Close'].reset_index()
df.columns = ['ds', 'y']

Train the # Prophet model
model = Prophet(
    yearly_seasonality=True,
    weekly_seasonality=True,
    daily_seasonality=False,
    changepoint_prior_scale=0.5,
    seasonality_mode='multiplicative' # stock price seasonality is usually multiplicative
)
model.fit(df)

Forecast # 10 years (3650 days) into the future
future_dates = model.make_future_dataframe(periods=3650)
forecast = model.predict(future_dates)

Plot the # graph
plt.figure(figsize=(20, 10))

Plot the # real data
plt.plot(df['ds'], df['y'], label='Historical Price', color='blue', alpha=0.6)

Plot the # forecast data
forecast_dates = forecast['ds'][len(df):]
forecast_values = forecast['yhat'][len(df):]
plt.plot(forecast_dates, forecast_values, label='Predicted Price', color='red', linestyle='--')

Plot the # confidence interval
plt.fill_between(forecast_dates,
                forecast['yhat_lower'][len(df):],
                forecast['yhat_upper'][len(df):],
                color='red', alpha=0.2, label='95% Confidence Interval')

Style the # graph
plt.title("Samsung Electronics 10-Year Stock Price Prediction", fontsize=16, pad=20)
plt.xlabel("Year", fontsize=14)
plt.ylabel("Stock Price (KRW)", fontsize=14)
plt.legend(fontsize=12)
plt.grid(True, linestyle='--', alpha=0.7)

Adjust the # x-axis date format
plt.gcf().autofmt_xdate()

Show # current price and predicted price 10 years from now
current_price = df['y'].iloc[-1]
final_prediction = forecast['yhat'].iloc[-1]
plt.annotate(f'Current: ₩{current_price:,.0f}',
             xy=(df['ds'].iloc[-1], current_price),
             xytext=(10, 10), textcoords='offset points',
             fontsize=12)
plt.annotate(f'10Y Prediction: ₩{final_prediction:,.0f}',
             xy=(forecast_dates.iloc[-1], final_prediction),
             xytext=(10, 10), textcoords='offset points',
             fontsize=12)

plt.tight_layout()
plt.show()

Print # predicted values at key points
print("\nPredicted values at key points:")
future_dates = [1, 3, 5, 7, 10] # years
for years in future_dates:
    future_idx = len(df) + years * 365
    predicted_price = forecast['yhat'].iloc[future_idx]
    lower_bound = forecast['yhat_lower'].iloc[future_idx]
    upper_bound = forecast['yhat_upper'].iloc[future_idx]
    date = forecast['ds'].iloc[future_idx].strftime('%Y-%m-%d')
    print(f"\n{years} years later ({date})")
    print(f"Predicted price: ₩{predicted_price:,.0f}")
    print(f"Confidence interval: ${lower_bound:,.0f} ~ ${upper_bound:,.0f}")

Calculate the # compound annual growth rate (CAGR)
years = 10
cagr = (((final_prediction / current_price) ** (1/years)) - 1) * 100
print(f"\nExpected Compound Annual Growth Rate (CAGR): {cagr:.2f}%")

Code commentary

  1. Import the required libraries.
  2. Use yfinance to download 10-year stock price data for Samsung Electronics.
  3. Prepare your data for the Prophet model.
  4. Set up and train a Prophet model that accounts for annual and weekly seasonality.
  5. Perform a forecast for the next 10 years (3650 days).
  6. Generate a graph using matplotlib.
  7. Plot the actual stock price data and the predicted stock price on a graph.
  8. Plot the confidence interval of the prediction in a graph.
  9. Set the graph's title, axis labels, and more.
  10. Annotate the graph with the current price and the predicted price in 10 years.
  11. Outputs the predicted price and confidence intervals for 1, 3, 5, 7, and 10 years out.
  12. Calculate and output a 10-year compound annual growth rate (CAGR).

With this code, you can predict and visualize the stock price of Samsung Electronics in 10 years. Of course, this is a simple predictive model, so actual results may differ.

It's hard to predict the stock price of Samsung Electronics 10 years from now, but it's easy to see the trend of the stock price in the past 10 years, right? If you're curious about this, check out the post on Click hereTry it! I plotted the following graph for the past 10 years based on the average monthly stock price!

Samsung Electronics stock price concerns in 10 years and how to improve

Concerns

Failure to maintain a skills gap

  • Possibility of closing or falling behind in process technology gap with TSMC.
  • Concerned about eroding competitiveness if losses to TSMC on yield issues persist.

Organizational structure and culture

  • Bureaucratized organizational cultures and bloated executive structures slow down rapid decision-making and innovation.
  • The potential for a repeat of past failures to respond quickly to new trends, such as AI.

Diversified competition

  • Strong competitors such as SK Hynix in memory, TSMC in foundries, and Apple-Qualcomm in mobile chip design.

Lack of government support

  • Intel has strong support from the U.S. government, while Samsung is relatively self-reliant.

How to avoid going down the same path as Intel

Strengthen technology leadership

  • Continued to increase R&D investments and achieve our goal of leading sub-2 nm process technology.
  • Innovate manufacturing processes and strengthen quality control to improve yields.

Transforming organizational culture

  • Breaking down bureaucratic organizational structures and introducing flexible, fast decision-making.
  • Empower your organization by hiring young, innovative talent.

Focus your business strategy

  • Focusing investments around core business (foundry-memory) rather than diversifying resources.
  • Accelerate technology development for future trends like AI, HBM, and more.

Strengthening global collaboration

  • Expanding market share through collaborations with global leaders like Nvidia.
  • Expanding production and investment in the U.S. to attract government support.

Gain customer trust

  • Enhanced security and personalized service to eliminate blueprint leak concerns.

By maintaining its technological edge and transforming its organization, Samsung will be able to avoid following in Intel's footsteps and achieve sustainable growth. I sincerely hope so.

Similar Posts