王子豪



【摘 要】论文讲述了如何利用Python对多只股票进行数据分析,并且分析每只股票间的异同。运用Python,可将股票数据进行可视化处理,例如,运用线性图展现出股票随时间的变化情况;利用烛状图了解每只股票每日闭市与开市相比的盈利或者亏损情况;利用移动平均值直观地观察在规定时间内股票价格变动,了解股票价格是否稳定。论文以制定更好的决策为目的,从数据可视化入手,提供优质有效的数据信息,运用数据挖掘技术对微软、苹果、谷歌等多只股票价格波动趋势进行研究。
【Abstract】The paper describes how to use Python to analyze data on multiple stocks and analyze the similarities and differences between each stock. By using Python, the stock data can be visualized. For example, using a linear charting to show the changing situation of the stock over time. Using candlestick charting to understand the profit or loss situation of each stock when the market is closed compared to the open each day. Using moving averages to visually observe the stock price changes within a specified period of time to understand whether the stock price is stable. With the aim of making better decisions, the paper starts with data visualization to provide high-quality and effective data information, and uses data mining technology to study the price fluctuation trends of several stocks such as Microsoft, Apple and Google.
【关键词】移动平均;烛状图;股票数据
【Keywords】moving average; candlestick charting; stock data
【中图分类号】F831.5 【文獻标志码】A 【文章编号】1673-1069(2021)01-0111-03
1 引言
在21世纪,股票已经成为经济领域的重头戏,股票价格数据的变化直接影响的是股票市场,而股票市场的稳定程度可以从一定程度反映一个国家的经济状态。进行股票数据分析则有利于更好地去观察股票数据的变化趋势,将它们从多角度进行可视化处理,以客观的角度观察某只或一些股票价格的变化情况。
本文利用Python对苹果、微软、谷歌三只股票进行分析:其中,以线段的方式将股票自2019年1月1日至2019年7月8日的股票数据进行可视化,更加清晰地了解到股票的变化情况。以烛状图的方式展现每只股票当日的亏损与盈利,根据图中的所展示烛身形状、颜色及位置,可以作出更准确的判断。运用移动平均值来体现股票在某时间段内的变化波动,为大部分依靠图表信息而作……