[R-SIG-Finance] LSPM - Unexpected Results

Joshua Ulrich josh.m.ulrich at gmail.com
Mon Dec 27 19:23:38 CET 2010


Noah,

On Mon, Dec 27, 2010 at 12:02 PM, Noah Silverman
<noah at smartmediacorp.com> wrote:
> Hi,
>
> I've been playing with the LSPM library from optimizing a portfolio of
> 13 assets (Using the interesting Leverage Space model developed by Ralph
> Vince.)
>
Which version (and revision) of LSPM are you using?  Which version of R?

> Using the function:  maxProbProfit
>
> res <- maxProbProfit(jpt, 1e-6, 6, probDrawdown, 0.1, DD=0.2,
> calc.max=4, snow=cl, control=DEctrl)
>
> It takes a LONG time for the optmizer to find a solution.
>
It's always going to take a long time, especially with 13 assets and
100 optimizer iterations (the default).  How many observations are in
your lsp object?  A reproducible example, or just some sample data,
would really help here.

> It has found a solution that has a 100% probability of profit given the
> constraints.
>
> The odd thing is that several of the values (optimal F) are negative.
> My understanding is that indicates shorting the asset.  This assets in
> this portfolio can't be shorted.
>
I doubt any f values are negative because they're bound between [0,1]
during the optimization.  My guess is that you're referring to the two
"z" values, which will always be negative.

Here's a quick example from ?maxProbProfit:

require(LSPM)
data(port)
ipop <- cbind(runif(50,0,0.01),runif(50,0,0.01),runif(50,0,0.01),
  runif(50,-1,-0.8),runif(50,-1,-0.8))
DEctrl <- list(itermax=11, NP=50, initial=ipop)
res <- maxProbProfit(port, 1e-6, 4, probDrawdown, 0.1,
  DD=0.2, calc.max=4, control=DEctrl)

> res
$f
[1] 0.002308994 0.001884296 0.116972712

$z
    zminus      zplus
-0.9256852 -0.9976883

$profitProb
[1] 0.9963587


> I've never read about shorting with the LSPM model, is this common?
> Is there a way to indicate, as a constraint, not to short?
> I have a portfolio of X dollars to allocate, so the percentages must sum
> to one, how do I do this once I get the F values?
>
You need to do this during the optimization via the "margin" and
"equity" arguments.

HTH,
--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com



> Thanks in advance for any and all suggestions!
>
> --
> Noah
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list