Group10 Report

From Visual Analytics and Applications
Revision as of 17:35, 8 December 2018 by Yanli.zhang.2017 (talk | contribs)
Jump to navigation Jump to search

Title.jpg China Stock Data Visualization

Proposal

Poster

Application

Report

1 Motivation of the application

Predicting the stock change is difficult since a complex mix of factors is involved. And although the stock market data is abundant, it is usually disorderly retained on a lot of websites. A visualization dashboard that enables the users to explore the patterns of stock market data, directly eyeball the trend of different stocks and also forecast the future market changes will be extremely helpful for market participants.
This project aims to provide investors and traders with advanced data visualization of stock market data to reveal the hidden pattern of market movement, providing portfolio recommendations based on risk assessment and the preference of investors.

2 Review and Critic on Past Work

In the most of websites, they provided the value and volume graphs of each stocks. But there are two main critic on the past work:

  • Most of websites are not provided the predictive analysis for user to forecast future trend in a short period.
  • Most of websites are not provided portfolio optimization for user can choose the stock they are interested and are not provided the expected return of combined stocks.

Report1.png

3 Design Framework

The visualization dashboard implements ggplot2 to create graphics, based on The Grammar of Graphics. After the data input, ggplot2 is able to map variables according to various aesthetics. For auto ARIMA time-series forecast, the dashboard makes use of tseries to plot the forecasting fan chart. The dashboard also includes googleVis for annotation trend chart and portfolio pie chart. The completed dashboard is based on R Shiny application.

4 Demonstration

The dataset comes from CSMAR, a comprehensive database of China stock returns, covering all companies listed on Shanghai Stock Exchange and Shenzen Stock Exchange.
Create an interface for users to directly find the trend of different stocks and predict the stock prices. For each investor, provided investment recommendations based on risk assessment and preference of investors.
The dashboard consists of three section:
Exploratory analysis: to give a general view of the price trend of certain stocks and to perform comparison between a pair of stocks.
Predictive analysis: decompose the trend, season, cycle & noise in time series data future stock price, using ARIMA methods to forecast the with reported accuracy and confidence interval.
Portfolio optimization: to suggest users with optimized portfolio based on the preference of the users and the historical return data. It aims to help investors on their decisions on how many should they invest in different stocks that they like.

4.1 Data preparation

Report2.png
For the data we make use of the package dplyr to combine the stock code and the Chinese name of the stock. Since for the raw data it only includes stock code without stock name. For better user experience, we add in the Chinese name of the stock name, enabling the user to select stocks based on their familiar information when performing various analyses.
We select the data from the beginning of 2018 to 23 November 2018. In the future we plan to implement the function that allows user to input their own dataset and perform independent analysis.

4.2 Exploratory Analysis

In the description analysis, we will visualize individual stock time series data with the ability to compare different other stocks & market index, to study the correlations and relative trend to industry/market.
The dashboard interface implement package googleViz to include two selection panels and one graph section. With the selection panels the user could alternatively choose one stock from the dataset, and click to visualize the price fluctuation within various duration, such as one day, five days, one month, six months and the maximum duration is one year. Report3.png
When the user hover the mouse over the graph, on the top right of the graph will appear the annotation of the specific stock with its Chinese name, stock code, price and date.
On the bottom of the graph the user could zoom in the view based on specific dates, which will allow the user to perform deep and personalized exploration upon the trend of certain stock.
The second panel enables users to select a pair of stocks for price comparison. After selection, the stocks will appear on the same graph with different color, along with the annotation on the graph. In view of this, the user could eyeball the differences between two stocks on the price and the trend. The above timeline function still applies.