Last data update: 2014.03.03

R: Captial-distribution Objects
capdistR Documentation

Captial-distribution Objects

Description

The function capdist is used to create capital-distribution objects.

Usage

capdist(x)

Arguments

x

a numeric vector storing the market weights of assets.

Details

The function capdist is used to create capital-distribution objects. These are vectors with class "capdist" which represents the distribution of capital in a market at a single moment.

When the function is called, it is checked whether the sum of weights is equal to 1 up to 0.1%. If not, a warning message will be displayed.

Capital distribution objects can be plotted. See plot.capdist for details.

Value

A capdist object.

References

Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.

See Also

plot.capdist

Examples

# Create a random distribution
x <- runif(100)
x <- x/sum(x)
x <- capdist(x)
plot(x)

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(RelValAnalysis)
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RelValAnalysis/capdist.Rd_%03d_medium.png", width=480, height=480)
> ### Name: capdist
> ### Title: Captial-distribution Objects
> ### Aliases: capdist
> 
> ### ** Examples
> 
> # Create a random distribution
> x <- runif(100)
> x <- x/sum(x)
> x <- capdist(x)
> plot(x)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>