Description Usage Arguments Details Value Examples

View source: R/portfolio_optimizer.R

Optimizes portfolio weights by minimizing the variance

1 2 3 4 5 6 | ```
optim.portfolio(
asset.names,
increment = 100,
rf = 0,
period = c("months", "weeks", "quarters", "years")
)
``` |

`asset.names` |
Vector of ticker of securities |

`increment` |
Number of portfolio to be generated, Default: 100 |

`rf` |
Risk-free rate of return, Default: 0 |

`period` |
Period for which the returns are calculated, Default: c("months", "weeks", "quarters", "years") |

Minimizes the variance using the method of lagrange multiplier to calculate the portfolio weights with minimized variance for given target return.

Returns a dataframe of the portfolios with different portfolio weights and different target returns and target standard deviation. Using this an investor can choose between range of portfolio to allocate funds.

1 | ```
optim.portfolio(c('FXAIX', 'TIBFX'), period = 'days')
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.