Description Usage Arguments Details Value Author(s) Examples
Represents a portfolio. Contains information about the portfolio composition, returns, window, etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
A TawnyPortfolio |
fun |
A function to apply against the TawnyPortfolio |
... |
Arguments to the constructor. See below for details |
This type is governed by futile.paradigm. Below are the supported function variants.
TawnyPortfolio(returns, window = 90)
TawnyPortfolio(symbols, window = 90, obs = 150)
Creates a benchmark portfolio to compare with the actual portfolio.
BenchmarkPortfolio(symbol, window = 90, obs = 150, end = Sys.Date(), ...)
Calculates portfolio returns based on the weights calculated.
PortfolioReturns(p, weights), p is a TawnyPortfolio
PortfolioReturns(h, weights), h is an AssetReturns object or zoo
'start' and 'end' operate on a TawnyPortfolio to return the start and end dates, respectively, of the portfolio.
'rollapply' is the implementation of the zoo function for a TawnyPortfolio. The 'window_at' function supports this by providing a window of the portfolio for the given index.
The type constructor returns a TawnyPortfolio.
The 'start' and 'end' functions return dates.
'window_at' returns a modified TawnyPortfolio that only contains returns for the given window. All other data is the same, and the original object is unchanged.
Brian Lee Yung Rowe
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.