Data 609 Final Project

jim lung

December 4, 2018

Data 609 Final Project - Mathematical Modeling Techniques for Data Analytics

Title: Portfolio Optimization

Aim: - Use mathematical models to make a decision for portfolio optimization - Investigating portfolio optimization with expected return on investiment in risk control

Data source:

Sections

In the following sections, we use a variety of mathematical tools to perform the following tasks:

1. Loading data

Construct a vector of tickers and gather prices for them using the getSymbols function within quantmod. We will next calculate returns and convert the data to a time series object.

Ticker Stocks
AAPL Apple Inc.
AMD Advanced Micro Devices, Inc.
ADI Analog Devices, Inc.
ABBV AbbVie Inc
AET AETNA INC
A Agilent Technologies Inc
APD Air Products & Chemicals, Inc.
AA Alcoa Corp
CF CF Industries Holdings, Inc.

Use Ajusted closed price to Calculate Returns

Calculate returns

Calculate returns

## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
## 
## This message is shown once per session and may be disabled by setting 
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## 
## WARNING: There have been significant changes to Yahoo Finance data.
## Please see the Warning section of '?getSymbols.yahoo' for details.
## 
## This message is shown once per session and may be disabled by setting
## options("getSymbols.yahoo.warning"=FALSE).
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols

Graphical Exploration

Use adjusted closed price to plot graph from 2017 until now:

Adjusted price

Adjusted price

2. Compute daily, monthly and yearly return

Average yearly return To compare the average yearly return, AMD and AET are the most increasing return yearly.

3.Linear Programming - Mean Variance model

Investors are risk averse in that they prefer higher return for a given level of risk (variance, standard deviation), or they want to minimize risk for a given level of returns, so we go to minimize the variance and maximize the return. .

Calculation of Mean Variance model

. The average monthly return of the portofolio at the evenly distributed allocation is 6.8 %. After optimization, the average monthly return of portfolio is -0.436 % when the global variance is at minimum 0.048. The maximized monthly return of portfolio is 1.904 % when the global variance is 0.0915.

4.Linear Programming - Minimax Model

The minimax model will maximize return with respect to one of these prior distributions providing valuable insight regarding an investor’s risk attitude and decision behavior. .

Calculation of Minimax Model

. Average monthly return is 8.6%, After optimization, mininum average loss is 6.49 % when variance is 1e+07.

5. linear programming vs log returns:

Modeling linear vs log returns: Now we are ready to obtain the sample estimates from the returns\(\mathbf{x}_t\) .

Daily rebalancing

We will start with a daily rebalancing since we already have the daily returns readily available.

Compute the three corresponding GMV portfolios: .

compare the allocations

.

.

By portfolio allocation, AAPL, AET and APD are shown the most positive in investing value, but it is not significate in difference between log and tranformation.

6. Qudratic programming

Return-risk tradeoff for all portfolios

.

.

compare the weight of allocations

.

.

compare the performance:

.

.

Return Performance of different portfolios

.

.

plot the expected return vs the standard deviation along with the efficient frontier

.

.

Conclusion

Conclusion

We can conclude with the following points: