Free Essay

New R Program

In: Philosophy and Psychology

Submitted By hidan
Words 663
Pages 3
R Tools for Portfolio Optimization
Guy Yollin
Quantitative Research Analyst Rotella Capital Management Bellevue, Washington

Backgrounder
Rotella Capital Management
Quantitative Research Analyst Systematic CTA hedge fund trading 80+ global futures and foreign exchange markets

Insightful Corporation
Director of Financial Engineering Developers of S-PLUS®, S+FinMetrics®, and S+NuOPT®

J.E. Moody, LLC
Financial Engineer Futures Trading, Risk Management, Business Development

OGI School of Engineering at Oregon Health & Science University
Adjunct Instructor Statistical Computing & Financial Time Series Analysis

Electro Scientific Industries, Inc
Director of Engineering, Vision Products Division Machine Vision and Pattern Recognition

Started Using R in 1999

R Tools for Portfolio Optimization

2

Introduction
DJIA: 12/02/2008 - 04/15/2009
100
GM C

80

IBM

annualized return (%)

JPM

60

INTC HD

DD

GE

PG

BAC

R-SIG-FINANCE QUESTION: stock price 90

40

MMM

20

KFT XOM PFE CVX JNJ VZ HPQ MCD KO UTX WMT T

CAT MRK AXP

BA

Can I do < fill in the blank > portfolio optimization in R?

MSFT DIS AA

0

IBM: 12/02/2008 - 04/15/2009
0 100 5 10 conditional value-at-risk (%) 15 20

95

80

85

Maximum Drawdown

Jan

Mar

ANSWER: drawdown (%)

IBM Underwater Graph
0 -5

P/L Distribution
-10 -15

Yes!

(98% confidence level)

0.12

0.14

Jan

Mar

0.10

VaR 0.08 Density

CVaR 0.06 0.00 -15 0.02 0.04

-10

-5 daily return

0

5

10

R Tools for Portfolio Optimization

3

Outline
Mean-Variance Portfolio Optimization quadratic programming tseries, quadprog

Conditional Value-at-Risk Optimization linear programming Rglpk_solve_LP package

General Nonlinear Optimization
Differential Evolution Algorithm DEoptim package
Omega Optimization Adding Constraints Maximum Drawdown Optimization R-Ratio Optimization

Wrap-Up

R Tools for Portfolio Optimization

4

Efficient Portfolio Solution

DJIA Returns: 02/04/2009 - 04/03/2009
0.10
BAC

Portfolio Weights

200

0.08
JPM

100

INTC HD WMT IBM T KO VZ MSFT MMM CAT AA DD

annualized return (%)

0.06

0

CVX MCD UTX PG JNJ DIS HPQ

GE AXP

0.04

PFE XOM BA MRK

-100

C KFT

0.02

GM

0.00 GM MMM HPQ JNJ KO PG MSFT

0

50

100 annualized volatility (%)

150

200

R Tools for Portfolio Optimization

INTC

5

WMT

MRK

MCD

XOM

IBM

JPM

CAT

T

KFT

CVX

AXP

BAC

UTX

DIS

GE

AA

BA

PFE

DD

HD

VZ

C

Mean-Variance Portfolio Optimization
Function
portfolio.optim {tseries}

Description computer mean-variance efficient portfolio

Usage portfolio.optim(x, pm = mean(x), riskless = FALSE, shorts = FALSE, rf = 0.0, reslow = NULL, reshigh = NULL, covmat = cov(x), ...)

Example
> > > >

averet = matrix(colMeans(r),nrow=1) rcov = cov(r) target.return = 15/250 port.sol = portfolio.optim(x = averet, pm = target.return, covmat = rcov, shorts = F, reslow = rep(0,30), reshigh = rep(0.1,30)) > w = cleanWeights(port.sol$pw,syms) > w[w!=0] HD IBM INTC JNJ KO MCD MSFT PFE PG T VZ WMT 0.05 0.10 0.04 0.10 0.10 0.10 0.07 0.04 0.10 0.10 0.10 0.10

1 - returns vector 2 - covariance matrix 3 - minimum return

R Tools for Portfolio Optimization

6

Efficient Frontier
DJIA Returns: 02/04/2009 - 04/03/2009

efficient frontier with shorts
200
JPM

BAC

100

INTC HD WMT DD IBM T KO VZ MSFT MMM CAT AA

annualized return (%)

0

CVX MCD UTX PG JNJ DIS HPQ

GE AXP

PFE XOM BA MRK

-100

C KFT

efficient frontier long only
0 50 100 annualized volatility (%) 150

GM

200

R Tools for Portfolio Optimization

7

Efficient Frontier Calculation effFrontier = function (averet, rcov, nports = 20, shorts=T, wmax=1) { mxret = max(abs(averet)) mnret = -mxret n.assets = ncol(averet) reshigh = rep(wmax,n.assets) if( shorts ) { reslow = rep(-wmax,n.assets) } else { reslow = rep(0,n.assets) wrapped in try to } min.rets = seq(mnret, mxret, len = nports) handle unfeasible vol = rep(NA, nports) optimizations ret = rep(NA, nports) for (k in 1:nports) { port.sol = NULL try(port.sol

Similar Documents

Free Essay

Swot

...Essential Oils and Plant Extracts Five-Year R&D Plan 2008 – 2013 RIRDC Shaping the future Essential Oils and Plant Extracts Five-Year R&D Plan 2008 to 2013 May 2008 RIRDC Publication No 08/053 © 2008 Rural Industries Research and Development Corporation. All rights reserved. ISBN 1 74151 642 0 ISSN 1440-6845 Essential Oils and Plant Extracts R&D Five-Year Plan 2008–2013 Publication No. 08/053 The information contained in this publication is intended for general use to assist public knowledge and discussion and to help improve the development of sustainable regions. You must not rely on any information contained in this publication without taking specialist advice relevant to your particular circumstances. While reasonable care has been taken in preparing this publication to ensure that information is true and correct, the Commonwealth of Australia gives no assurance as to the accuracy of any information in this publication. The Commonwealth of Australia, the Rural Industries Research and Development Corporation (RIRDC), the authors or contributors expressly disclaim, to the maximum extent permitted by law, all responsibility and liability to any person, arising directly or indirectly from any act or omission, or for any consequences of any such act or omission, made in reliance on the contents of this publication, whether or not caused by any negligence on the part of the Commonwealth of Australia, RIRDC, the authors or contributors....

Words: 10572 - Pages: 43

Premium Essay

Analysis of Memo

...R has been asked to make a recommendation as to whether or not there is merit in participating in the leadership program. At the end of his memorandum to the CEO, Mr. R presents his conclusion that the company should not participate in the program on the basis that 1) it would not...

Words: 3255 - Pages: 14

Premium Essay

What Is Bar?

...Further expanded and strengthened the mandate of BAR by providing leadership in enhancing, consolidating and unifying the national and regional agriculture and fisheries research and development programs of the National Research and Development System in Agriculture and Fisheries (NaRDSAF).   Major R&D Programs 1. Community-Based Participatory Action Research Program (CPAR) 2. National Technology Commercialization Program 3. Organic agriculture Program 4. Climate Change Program 5. Biotechnology program 6. Indigenous plants for health and...

Words: 7358 - Pages: 30

Free Essay

Info Request on John Molson Sb

...Chemical Engineering (1975) Indian Institute of Technology, Madras Research Streams • • • • Economics of IT – MSP and Cloud Computing Markets Conceptual Modeling and Ontologies Database Systems and Distributed Computing Supply Chains & Decision Analysis Employment Professor Department of Management Science & Systems School of Management State University of New York at Buffalo (September 1998 - ) Associate Professor Department of Management Science & Systems State University of New York at Buffalo (September, 1990 – September 1998) Assistant Professor Department of Management Science & Systems State University of New York at Buffalo (September, 1984 - September, 1990) 1 Research and Teaching Assistant Doctoral Program in Operations Research Department of Industrial Engineering State University of New York at Buffalo (January, 1981 - September, 1984) Entrepreneur SYMBIOSIS Consulting Madras, India (September, 1977 - January, 1981) Appointments Chairman Department of Management Science & Systems School of Management State University of New York at Buffalo (September, 2005 - ) Program Director Dual Degree MS Program in Management of IT Services (MITS) Collaborative Venture among SUNY at Buffalo, HP (India) and Amrita University at...

Words: 7611 - Pages: 31

Premium Essay

My Research

...Clothes 'R' Us Point-of-Sale Initiative: Managing IT Programs by Mark Jeffery, Joseph F. Norton, Derek Yung, Alex Gershbeyn Source: Kellogg School of Management 22 pages. Publication Date: Jan 01, 2006. Prod. #: KEL304-PDF-ENG The case concerns a real $25 million program consisting of nine concurrent projects to deliver and implement a custom-built in-store customer relationship management (CRM) system and a new point-of-sale system in 400 stores of a national retail chain. The name of the company has been disguised for confidentiality reasons. Once deployed, the new system should give Clothes R' Us a significant strategic advantage over competitors in the marketplace; it will increase in-store manager productivity, cut costs, and ultimately drive increased sales for the retail chain. The program is in crisis, however, because the product managers have just left to join a competitor. The explicit details of the program are given, including examples of best practice program governance and the real activity network diagram for the program. Detailed Excel spreadsheets are also provided with the actual earned value data for the program. Students analyze the spreadsheets and the data given in the case to diagnose the impact of the most recent risk event and past risk events that occurred in the program. Ultimately students must answer the essential executive questions: What is wrong with the program?...

Words: 593 - Pages: 3

Premium Essay

Overview of R&D Evaluation- Accounting

...• Promote innovation • Co-relate past efforts with the future to reduce down time. 4/27/2015 5 R&D Evaluation programs: Logic diagram for R&D program 4/27/2015 6 R&D Evaluation programs: Steps for program evaluation • Program Manager Goals – Improve Program – Communicate why the program is worth doing • Performance cycle – – – – 1. Design/revise, plan, select and budget 2....

Words: 1140 - Pages: 5

Premium Essay

Week 5

...A Basic Reading and Thinking Skill Ranking American Values References 324 Human Services in Contemporary America - © Cengage Learning c u r r e n t c o n t r ov e r s i e s a n d i s s u e s 325 INTRODUCTION You may have gathered by now that the human services field is quite complex. Complete agreement regarding philosophies, methods, goals, services, funding, or anything else just does not exist nor, from our point of view, should it. There are times when controversies and differences are stimulating, healthy, and valid and lead to creative solutions. At other times, they are repetitious, meaningless, and destructive. Too frequently they consume time, energy, and resources that might better be used providing needed services. To this end, we highly recommend that students become familiar with the books in the Opposing Viewpoints series, published by the Greenhaven Press, that deal with issues of concern to human services workers. The purpose of this chapter is to present a sampling of basic controversies and issues in the field of human services that have not yet been resolved and may never be resolved to everyone’s satisfaction. The questions raised in this chapter influence all human services workers. Some issues affect the human services worker more directly than others, but they all impact on the worker and the services provided....

Words: 8154 - Pages: 33

Free Essay

Cognitive Behaviour

...After summarizing cognitive behaviour therapy principles, he discusses strategies for implementation, and provides research data supporting its effectiveness, including post release outcomes on the Reasoning and Rehabilitation (R & R) program. Porporino’s conclusions are subsequently compared with other researcher’s opinions and research based empirical data. Methodology Porporino criticises several programs he reviewed that claimed to be cognitive. In particular, he disregards motivational programs that lack empirical evidence of reduction of recidivism, and those programs that criticise forms of thinking without providing reasoning. Likewise, he dismisses programs that criticise current forms of thinking without providing reasoning, or adapted to corrections without adequate training or strategies for implementation. He is also critical of holistic programs that claim to address life skills, stating that they lack the systematic targeting of key factors that maintain criminal attitudes. Although in 1991, he advocated for a living skills program based on the success of the cognitive skills program. Furthermore, he dismisses cognitive programming models based on stages of morality, because they lack empirical evidence and he maintains they are not cognitive (Porporino, 1995, p.p. 2, 3, 18)....

Words: 2468 - Pages: 10

Premium Essay

No Title

...Senior management thinks that a new employee incentive program may boost employee morale (University of Phoenix, 2012, para. 3). This paper will include the work breakdown structure, activities, the sequenced activity diagram, a human resources plan, and a communication plan. The communication methods identified in the communication plan will be evaluated by identifying the communication tools and techniques most effective for the audience, and an explanation of why the methods of communication identified are most effective. The objective to this project management planning process is to successfully implement an employee incentive program within the university to boost employee morale that has declined because of the changes in compensation structure. Although the university cannot control what laws and regulations are changed governing federal financial aid, the university must abide by the changes to keep their accreditation. The university can boost employee morale by creating a program that will encourage employees to work as hard as they did when they were receiving bonuses for performance. Work Breakdown Structure |Level 1 |Level 2 |Level 3 | |1 Employee Incentive Program |1.1...

Words: 4553 - Pages: 19

Premium Essay

Hr Case Study

...Review the scenario and consider the requirements for staffi ng the new project. Additional information is provided for each scenario to help students make their decisions. Students have 35 minutes to read about the organization and review information gathered from...

Words: 6125 - Pages: 25

Premium Essay

Community Health

...R., Penny M. E., R. C., Narro R., Willis J., Caulfield L. E., & Black, 2008). The increased uptake of unhealthy food products is also one of the main reasons of malnutrition. Children aged less than 18 are the main victims of the food irregularities. The data collected in this paper includes the communities of America and according to statistics there are around 16 million children in America who live in food insecurity in recent times. The problem is rarely a concern for adults because they are more aware of their nutrition choices and adult body is developed and not requires a continued supply of nutrients which is the case with children. Children under the age of 5 years are at the greatest risk of developing malnutrition. There are food secure and food insecure states defined based on the findings of the Community health services for children suffering from malnutrition (Schaible U. E., & Kaufmann, 2010). There are prospects of emergency food assistance and there are children who depend on them for their nutrition which remain inadequate. The problem of malnutrition has affected children world over but this...

Words: 1472 - Pages: 6

Premium Essay

Sustainability

...Read more at 2013annualreport.jnj.com/stories/ New-Hope-for-MDR-TB-Patients CONTENTS CHAI R MAN’S LETTE R S UCCE SS E S & CHALLE NG E S Advancing Human Health & Well-Being Leading a Dynamic & Growing Business Responsibly Safeguarding the Planet H EALTHY FUTU R E S 2015 GOALS & PROG R E SS U.N. G LOBAL COM PACT DATA S U M MARY G R I I N DEX 2 Letter from Our Chairman & CEO 52 Labor Practices & Workforce Guide to the Icons 4 Successes & Challenges 55  Employee Retention, Development & Recruitment 9 Organizational Profile 58 Compensation 10 Report Profile 58 Diversity & Inclusion The icons below help to communicate the scope and boundary for each topic covered in our report....

Words: 54528 - Pages: 219

Free Essay

Words

...STEM Scholars Program Conditions – 2016-2017 STEM Scholars A program funded by the National Science Foundation that provides financial support (covering tuition, fees and cost of living) as well as academic support to selected students who meet the following requirements: 1. The student must be planning on transferring to a four-year school and majoring in STEM. STEM refers to, “science, technology, engineering, and mathematics that includes biological sciences (except medicine and other clinical fields); physical sciences (including physics, chemistry, astronomy, and materials science); mathematical sciences; computer and information sciences; geosciences; engineering; and technology areas associated with the preceding disciplines (for example, biotechnology, chemical technology, engineering technology, information technology, etc.),” according to NSF’s S-STEM solicitation. 2. The student must file a Free Application for Federal Student Aid (FAFSA) listing Southwestern Illinois College, (School code:001636) as a choice of school in the college release section. The student must be eligible for federal aid. 3. All recipients of this scholarship must be a resident of SWIC District 522 or East St. Louis at the time of application and during attendance at SWIC. 4. All recipients of this scholarship must be U....

Words: 1543 - Pages: 7

Premium Essay

Eikon Device Inc.: Creating an International Strategy

...There are two alternatives for considering which are establishment of a new distributional facility in other country and continuing products diversification in the North America market. Because of the restricted scale of company, ED can just undertake one alternative at the same time. The company has to decide if they should build facility oversea to become a multinational company or further expand new products line in the North America. Internal and External Analysis: Eikon Device Inc was established in 1994. Currently, there are two founders in the board of director. Dean Byrnes is the president and Monika Stengele occupies the VP marketing. Another founder, Bill Baker who is a tattoo artist suggested that tattoo industry was shifting into the mainstream. His perspective of tattoo industry has led the rapid development of the company later. The management performance of ED before 2013 is impressive though several successful events like the R&D program and opened new market on medical supply. The R&D program had come out with some new designs on the tattoo equipments...

Words: 2720 - Pages: 11

Premium Essay

Cost Accounting

...The Importance of Research and Development (R&D) for U.S. Competitiveness and a Clean Energy Future Michael Greenstone June 2011 CEEPR WP 2011-010 A Joint Center of the Department of Economics, MIT Energy Initiative and MIT Sloan School of Management. The Importance of Research and Development (R&D) for U.S. Competitiveness and a Clean Energy Future Michael Greenstone 3M Professor of Economics, MIT Director, The Hamilton Project Senior Fellow, The Brookings Institution Thank you Chair Maloney, Ranking Member Brownback and members of the Committee for inviting me to testify today. I believe it is critically important that we give greater priority to new and better research and development (R&D) investments, to help ensure our country’s future competitiveness and to pave the wave for clean energy innovation. I am grateful for the opportunity to speak today about two interrelated challenges that our country faces. The first is the stagnation in economic opportunity for many families that dates back at least three decades. The second is the economic, national security, and environmental risks posed by our continued reliance on fossil fuels. The key purpose of my testimony is to discuss how R&D can enable us to begin confronting these dual challenges by creating new jobs for American workers, and fundamentally altering the way we produce and consume energy. I....

Words: 4183 - Pages: 17