Thanks Michael and Brian for your support, it was very helpful!
I have also noted that in the VaR example (my example 1) there is a match
with the *constrained_objective *and the VaR function because it seems
that,
unlike ES function, the VaR function doesn't consider user-defined mu for
the
calcul
Yes, agreed. This gets handled correctly, I think in
optimize.portfolio(), but when constrained_objective is called directly,
it looks like set.portfolio.moments doesn't merge arguments from ... or
the arguments=list correctly.
I think that the 'correct' way to deal with this would probably be to
The issue seems to be in the calculation of the co-skewness and co-kurtosis.
In particular, when calling ES directly, the user-supplied mu gets
used to calculate M3 and M4. When called through PortfolioAnalytics,
M3 and M4 are calculated (without using mu) before calling ES.
A pure PerformanceAna
Thanks Brian, I will avoid HTML format next time.
Best regards,
Marco
On Wed, Oct 12, 2016 at 12:21 PM, Brian G. Peterson
wrote:
> I attach what I think is a syntactically correct version of the email,
> which looks like it was pasted from HTML.
>
> We'll try to take a look.
>
> Regards,
>
> Br
I attach what I think is a syntactically correct version of the email,
which looks like it was pasted from HTML.
We'll try to take a look.
Regards,
Brian
On 10/12/2016 04:34 AM, Marco Mastrangeli wrote:
Hi Michael,
thanks for your reply, I apologize for the not full clarity of my question.
Hi Michael,
thanks for your reply, I apologize for the not full clarity of my question.
In the following, I try to report a full example.
#Library
*library(PerformanceAnalytics)*
*library(PortfolioAnalytics)*
#Returns data present in "PortfolioAnalytics"
*data(indexes)*
*indexes <- indexes[,1:4]
Hi Marco,
Can you put together a minimal reproducible example [1,2] so that it's
easier for others to answer your question?
For this problem, I'd recommend using the edhec data distributed with
PerformanceAnalytics.
Thanks,
Michael
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-g