Description Usage Arguments Details Value References See Also Examples
The function fgport
is used to create functionally generated portfolio objects.
1 |
name |
a string which is the name of the portfolio (e.g. "Equal-weighted portfolio"") |
gen.function |
the generating function. It is a smooth function of the market weights (see Theorem 3.1.5 of Fernholz (2002)). |
weight.function |
the weight function of the portfolio. It must be related to |
The function fgp
is used to create functionally generated portfolio objects. Detailed treatments of functionally generated portfolios can be found in Chapter 3 of Fernholz (2002) as well as Pal and Wong (2014). In brief, a functionally generated portfolio is determined by a generating function (gen.function
) and the weight function (weight.function
).
Some common functionally generated portfolios are provided in the package. For example, EntropyPortfolio
is the entropy-weighted, DiversityPortfolio
is a constructs fgp
objects for the diversity-weigthed portfolio, and ConstantPortfolio
defines constant-weighted portfolios.
The most important operation concerning fgp
objects is Fernholz's decomposition. See FernholzDecomp
for more details.
name |
a character string, representing the name of the portfolio |
gen.funtion |
a function object, representating the generating function |
weight.function |
a function object, representing the weight function |
Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.
Pal, S. and T.-K. L. Wong (2014). The geometry of relative arbitrage. arXiv preprint arXiv:1402.3720.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Example 1: The diversity-weighted portfolio with p = 0.5
# This has the same effect has DiversityPortfolio(p = 0.5)
my.portfolio <- fgp("Diversity-Weighted Portfolio, p = 0.5",
function(x) (sum(sqrt(x)))^2,
function(x) sqrt(x) / sum(sqrt(x)))
# Example 2: A quadratic Gini coefficient
# See Example 3.4.7 of Fernholz (2002)
# Generating function
gen.function <- function(x) {
n <- length(x)
return(1 - sum((x - 1/n)^2)/2)
}
# Weight function
weight.function <- function(x) {
n <- length(x)
S <- gen.function(x)
return(((1/n - x)/S + 1 - sum(x*(1/n - x)/S))*x)
}
# Define fgp object
my.portfolio <- fgp("Quadratic Gini",
gen.function, weight.function)
# Its performance in the apple-starbucks market
data(applestarbucks)
market <- toymkt(applestarbucks)
result <- FernholzDecomp(market, my.portfolio, plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.