Displaying 20 results from an estimated 41 matches for "fportfolio".
Did you mean:
portfolio
2008 Feb 24
2
Generic Functions
Hi
I have some problems in defining new generic functions and classes. Just
have a look at the following example:
require(fPortfolio)
setClass("PROBECLASS",
representation(
type="character"
)
)
isGeneric("setType<-")
#Returns
TRUE
#I would like to define a specific function for class PROBECLASS with other
argume...
2008 Feb 24
2
Generic Functions
Hi
I have some problems in defining new generic functions and classes. Just
have a look at the following example:
require(fPortfolio)
setClass("PROBECLASS",
representation(
type="character"
)
)
isGeneric("setType<-")
#Returns
TRUE
#I would like to define a specific function for class PROBECLASS with other
argume...
2005 Jun 01
1
Problem with fPortfolio
Hello,
I hesitate to call this a bug, because I could have forgotten something
important, but the MarkowitzPortfolio example in fPortfolio does not work
for me. Here's my code:
> library(fPortfolio)
>
>xmpPortfolio("\nStart: Load monthly data set of returns > ")
> data(berndtInvest)
> # Exclude Date, Market and Interest Rate columns from data frame,
> # then multiply by 10...
2011 Mar 28
1
portfolioBacktest in fPortfolio
Hello. I am trying to use the portfolio backtesting function in fPortfolio
package, but I don't now why in my version of fPortfolio I don't have either
the portfolioBactest nor the portfolioBacktesting functions. Does anybody
knows what might be going on?
thank you
Felipe Parra
[[alternative HTML version deleted]]
2007 Sep 21
1
fPortfolio Package
Hello,
I would like to do a portfolio optimization in R and I tried to use the
function in "fPortfolio", but it appears there does not exist such function.
Could anyone give me some advice?
Many thanks
--
View this message in context: http://www.nabble.com/fPortfolio-Package-tf4492927.html#a12813809
Sent from the R help mailing list archive at Nabble.com.
2012 Sep 04
0
Calculate a minimum-variance portfolio with fPortfolio
Hello everybody,
I'm running into an issue with the fPortfolio package.
1. What I want:
Calculate the minimum-variance portfolio on 20 assets with respect to the
following constraints:
- min weight per asset = 0% (i.e. no short-selling)
- max weight per asset = 10%
- min sum of asset weights = 100% (i.e. fully invested)
- max sum of asset weights = 100% (...
2008 Aug 12
1
fPortfolio constraints, maxsumW
Running R version 2.6.1 under Gentoo Linux and using the fPortfolio
package, I am having trouble specifying a sector constraint. One of the
constraints to be imposed is that assets 1 and 2 together account for no
more than 13.63% of the portfolio. My attempt at coding that
constraint, "maxsumW[1:2Assets]=13.63" fails. The relevant section of
my co...
2010 Feb 03
0
About the risk code in the fportfolio package
Hello,
I have a problem with fPortfolio recently. I am using below code:
Data = read.table("hf.txt",header = TRUE,sep = "")
Data = Data[, c("CA", "SS", "EM", "EMN", "ED", "DS", "MS", "RA", "FIA",
"GM", "LSE"...
2012 Feb 15
2
Control number of assets in resulting portfolio with optimizations using package fPortfolio
Dear All,
I am using package fPortfolio to run minimum variance portfolio
optimizations in R. I already know how to set portfolioSpecs, portfolio
objects and constraints. Unfortunately I am not able to set the following
type of constraints.
I have a timeSeries object with returns data for roughly 1.5k assets for 261
subperiods (workingd...
2011 Jan 25
0
Problems plotting the efficient frontier with fPortfolio
Hello, I have some simulations of financial data, I have 17 variables
simulated 1000 times to three horizons. I am tring to plot the efficient
frontier which I already obtained using th fPortfolio package. I am using
the following commands:
Data=timeSeries(X[1,,])
lppSpec <- portfolioSpec()
longFrontier <- portfolioFrontier(Data, lppSpec)
plot(longFrontier)
Selección: 1
Error en dimnames(x) <- dn :
la longitud de 'dimnames' [1] no es igual a la extensión del arreglo
>...
2010 Jan 21
0
fPortfolio prob: maxreturnPortfolio() returns Na/NaN/Inf error
Hi - First posting here.
I am using fPortfolio to try and optimize a simple portfolio consisting of 5 daily return series. I want to maximize return subject to setTargetRisk(myspec)=0.08 using only constraints="LongOnly"
I can run feasiblePortfolio() using a spec file that specifies the weights, and it works fine.
When I run maxretu...
2013 Jan 06
0
fPortfolio-portfolio optimization
Hello everyone,
I have been spending many hours on a seemingly simple portfolio optimization problem using the package fPortfolio.
My optimization problem is slightly different than a standard one such that I have a known set of asset returns. My problem is how to collect this information into my functions and pass them onto the optimization function.
I have written my own covariance estimation function using the "shri...
2009 Aug 25
2
Clarifications please.
Hi
I think I have asked these questions earlier, but I been able to find
answers from the documentation (which I found poorly written in several
places). Will someone be kind enough to give me answers and enlighten me?
(as in explain with CODE?)
I want to embed R in my application and use the fPortfolio package for
carrying out risk management computations. Right now I'm reading the
Rmetrics Ebook and trying to convert the various examples into embedded C
code.
Coming from a strictly C background, I have slight difficulty in
comprehending a functional language like R and it gets worse when I...
2009 Nov 11
1
Help with fPortfolio
Hi
I'm getting the following errors while using the efficientPortfolio function
even though I'm setting the target return to the mean of the TargetReturn I
obtain from the portfolio object created by the feasiblePortfolio function.
First Error:
Error: targetReturn >= min(mu) is not TRUE
Second Error:
Error in .rquadprog(Dmat = args$Dmat, dvec = args$dvec, Amat = args$Amat, :
2009 Sep 16
2
I want to get a reference to this time series object
...lude <Rinternals.h>
#include <Rdefines.h>
#include <Rembedded.h>
int main(int argc, char** argv)
{
SEXP e,c,portSpec,portData,portConstr,portVal,tsAssets;
int errorOccurred,nx,ny,i,j;
double *v;
const char *x,*y;
Rf_initEmbeddedR(argc, argv);
// loading fPortfolio
PROTECT(e = lang2(install("library"), mkString("fPortfolio")));
R_tryEval(e, R_GlobalEnv, NULL);
UNPROTECT(1);
// creating a default portfolioSpec object
PROTECT(e=lang1(install("portfolioSpec")));
PROTECT(portSpec=R_tryEval(e,R_GlobalEnv, NUL...
2009 Sep 29
3
How do I access class slots from C?
Hi
I'm trying to implement something similar to the following R snippet using
C. I seem to have hit the wall on accessing class slots using C.
library(fPortfolio)
lppData <- 100 * LPP2005.RET[, 1:6]
ewSpec <- portfolioSpec()
nAssets <- ncol(lppData)
setWeights(ewSpec) <- rep(1/nAssets, times = nAssets)
ewPortfolio <- feasiblePortfolio(
data = lppData,
spec = ewSpec,
constraints = "LongOnly")
ewSpec is an object of type P...
2012 Nov 27
2
Error: R could not find "listDescription"
Hi,
I am running R on Win 7.
I got error for > listDescription(fPortfolio)
Error: could not find function "listDescription"
What do I need to install for solving this ?
Any help will be appreciated.
Thanks
[[alternative HTML version deleted]]
2009 Aug 25
1
R command line behaving funny
...I am unable to try out examples from the Rmetrics Ebook from the R command
prompt. Below is an example of what happens:
> Covariance<-cov(SWX.RET)
Error in cov.timeSeries(SWX.RET) :
no slot of name "Data" for this object of class "timeSeries"
I have loaded Rmetrics and fPortfolio using the library function but still I
get these errors.
However, if I embed the R code into a C program like below it works. Why is
this happening? I'm very confused.
Program:
#include <Rinternals.h>
#include <Rembedded.h>
int main (int argc, char** argv) {
SEXP e,val;...
2007 Aug 22
0
Optimal Asset Allocation with a specific level of Target Risk
Dear All,
I would like to know if it is possible to obtain the
optimal asset allocation with the fPortfolio library (or
others),
but setting at the beginning a desired level of Target Risk.
For example I can obtain the optimal asset allocation with
fPortfolio library or portfolio.optim() function (in
tseries library) setting a desired Target Return, but I
dont't know any library or function that...
2011 Sep 26
1
How to determine the efficient frontier portfolios using the Black-Litterman model?
I'm trying to find 50 portfolios on the efficient frontier using the
Black-Litterman model but have not found a suitable method for doing so. I
tried using the "portfoliosFrontier" function given in the package
fPortfolio using the "optimalPortfolios.fPort" function on package "BLCOP"
but does not provide satisfactory results
--
View this message in context: http://r.789695.n4.nabble.com/How-to-determine-the-efficient-frontier-portfolios-using-the-Black-Litterman-model-tp3843954p3843954.html
Sen...