Last data update: 2014.03.03

R: Portfolio Data
PortfolioR Documentation

Portfolio Data

Description

A simple simulated data set containing 100 returns for each of two assets, X and Y. The data is used to estimate the optimal fraction to invest in each asset to minimize investment risk of the combined portfolio. One can then use the Bootstrap to estimate the standard error of this estimate.

Usage

Portfolio

Format

A data frame with 100 observations on the following 2 variables.

X

Returns for Asset X

Y

Returns for Asset Y

Source

Simulated data

References

Games, G., Witten, D., Hastie, T., and Tibshirani, R. (2013) An Introduction to Statistical Learning with applications in R, www.StatLearning.com, Springer-Verlag, New York

Examples

summary(Portfolio)
attach(Portfolio)
plot(X,Y)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ISLR)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ISLR/Portfolio.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Portfolio
> ### Title: Portfolio Data
> ### Aliases: Portfolio
> ### Keywords: datasets
> 
> ### ** Examples
> 
> summary(Portfolio)
       X                  Y           
 Min.   :-2.43276   Min.   :-2.72528  
 1st Qu.:-0.88847   1st Qu.:-0.88572  
 Median :-0.26889   Median :-0.22871  
 Mean   :-0.07713   Mean   :-0.09694  
 3rd Qu.: 0.55809   3rd Qu.: 0.80671  
 Max.   : 2.46034   Max.   : 2.56599  
> attach(Portfolio)
> plot(X,Y)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>