Read the R language today. Take a note.
Use the R language to read Yahoo wealth data. Analysis of Microsoft Corporation (stock code: MSFT) in 2015 when the share price fluctuated more than 10% of the date.
Then by retrieving the news of the way to see what happened to Microsoft that day, causing the stock price fluctuations.
First, read the stock price information:
Getsymbols ("MSFT", src= "Yahoo", from= "2015-1-1", to= "2015-12-31")
Then use CL to read the closing price, using the Delt function to analyze the difference from the previous day.
Finally, the plot function plot is used to display the analysis results.
Finally, the resulting graph is:
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>
Depending on the graph and output, the stock prices of "2015-4-24" and "2015-10-23" are more than 10% fluctuations in the two days.
Find, Baidu History news, see what happened on the day of fluctuations.
Can see on April 24, Microsoft released the financial report.
It's just that. It looks a little strange. April How did you publish the three-quarter financial report?
Take a look down October 23, what happened to Microsoft.
Can see Microsoft Microsoft released 2016 first quarter of the financial report.
Oh, it seems to be their time-setting problem.
In fact. Microsoft will also announce other quarterly financial reports in 2015, and it looks like the stock price is not necessarily rising.
Analyze stock price fluctuations using R language