Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aa.test() #19

Open
f1nasf1 opened this issue May 3, 2016 · 3 comments
Open

aa.test() #19

f1nasf1 opened this issue May 3, 2016 · 3 comments

Comments

@f1nasf1
Copy link

f1nasf1 commented May 3, 2016

Hi,
There seems to be issues with aa.test():

Error in create.historical.ia(hist.returns, 12, symbols, symbol.names) :
unused arguments (symbols, symbol.names)
3 create.historical.ia(hist.returns, 12, symbols, symbol.names) at con#2690
2 aa.test.create.ia() at con#1696
1 aa.test()

After overwriting so that the symbols and symbol.names are not passed to the create.histroical.aa:

Error in t(ia$hist.returns) - repmat(colMeans(ia$hist.returns), 1, nt) :
non-conformable arrays
6 match.fun(add.constraint.fn)(ia, 0, ">=", constraints) at con#708
5 optimize.portfolio(ia, constraints, add.constraint.fn, min.risk.fn) at con#693
4 min.portfolio(ia, constraints, add.constraint.mad, portfolio.mad) at con#849
3 match.fun(min.risk.fn)(ia, constraints) at con#1502
2 portopt(ia, constraints, 50, "MAD", min.mad.portfolio) at con#1719
1 aa.test()

Thanks.

@AlbertoBurchi
Copy link

Dear avanchev
I experienced the same problem in the string:
a[1 : n, ] = t(ia$hist.returns) - repmat(colMeans(ia$hist.returns), 1, nt)

So, it is impossible to obtain the MAD ptf.

The problem is related to the matrix dimension.

Have you any idea about how to solve?

Thanks, Alberto

@dxcv
Copy link

dxcv commented Apr 10, 2017

me too

@jupiters1117
Copy link

Here's my solution:
a[1 : n0, ] = t(ia$hist.returns) - repmat(matrix(colMeans(ia$hist.returns)), 1, nt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants