Stock
Stock is developed to access and analyze stock, ETF, bond and mutual fund data from NYSE, NASDAQ and AMEX. Data is access through Yahoo finance. The ultimate goal is to provide tools for the users to create portfolios that meet their risk appetite. This article describes how to use this app to visualize historical data, return, correlation and finally create optimum investment portfolio.
Under ‘Select Stocks’, write desired company name or stock symbol and click the item to enter into this multiple selection.
Once stock symbols are entered, click ‘Submit’.
This will plot multiple stock in ‘Plot’ window.
Hoover mouse over the plot to see individual data point i.e. date and price of the stock. Select start and end dates under ‘Select Date’. By default ‘end date’ is the last date when ‘adjusted closing value’ is available. More than one year historic data may not be available for mutual and bond funds. In this example, we will use 10 year data for the above stocks.
After entering the date, click ‘Submit’. This will plot 10 year data in ‘Plot’ window.
Next, we will see the historical daily return of the stocks in histogram. Under ‘Select Plot Type’, check ‘Daily Return’.
Now, we will find how stocks are distributed in risk-return space. Check ‘Risk Vs Return’ under ‘Select Plot Type’. X-Axis of this plot is the standard deviation of the selected data and Y-Axis is the average return. Both axis values are converted into dollar amounts per $1000 investment. For example, AAPL generates $1.2 average return everyday at $20 standard deviation per $1000 investment. This will give you a practical of of risk and return when investing in a single stock. You can use this information later to compare the risk-return of portfolios. Change investment amount in ‘Enter Investment Amount’ as you want.
Correlation of returns is one of the most valuable information in selecting stocks. It varies between -1 to +1 where -1 being perfect negative correlation, 0 being no correlation and +1 being perfect positive correlatoin. We do not want all positively correlated stocks in our portfolio. This will increase or decrease return simultaneously. Rather we want to select stocks that are not correlated or, even better, negatively correlated so that loss of one will be compensated by other. To see the correlation of the selected stocks for the specified time, check ‘Return Correlation’ under ‘Select Plot Type’.
Each block in this image represents the correlation of two stocks in X and Y-Axis. For example correlation between AAPL and GOOG is 0.53.
Selecting ‘Construct Portfolio’ under ‘Select Plot Type’ will create numerous portfolios. Hoover mouse over each point to see asset allocation, risk and return.
For example, the portfolio in image shows asset allocation of 14.40% MSFT, 48.40% AAPL, 9.80% GOOG and 27.40% AMZN. This will generate on average $1.14 daily return.
To further adjust generated portfolios, use the slider bar under ‘Plot’ window. ‘Minimum Asset %Weight’ is the the minimum percentage allocation of each asset.
Select minimum allocation to 0.1 (10%) and maximum to 0.65 (65%) and create random portfolios again.
In this image all portfolios have minimum asset allocation of 10% and maximum of 65%. This will limit investing or divesting in a single asset of the portfolio.