Max individual and portfolio level positions
Author: maninjapan
Creation Date: 1/21/2010 10:32 AM
profile picture

maninjapan

#1
I'm using ActivePositions.Count in my strategy but would like to limit any individual symbol to a max of 1 entry at a time, but up to 15 positions max. across the portfolio. Is there an example on how this works.
Ive read the wealthScript QuickRef but wasnt able to find an answer there.
profile picture

Eugene

#2
You'll not find an answer to this problem in the QuickRef. Specifically to solve this task (requested on the forum several times), a PosSizer was created:

Position Options

It makes possible to:

* limit the number of open positions across the portfolio,
* limit the maximum allowed positions in a single instrument,
* limit the maximum long and/or short positions.

Of course, options can be combined.
profile picture

Eugene

#3
PosSizer Pack (demo)

QUOTE:
Existing Wealth-Lab 5 customers, please request the full version free of charge by creating a support ticket. Note: Fidelity Wealth-Lab Pro customers, please be prepared to prove your entitlement; Developer 5 customers: no proof required.
profile picture

jlu_68

#4
Eugene, i install this extention but i dont see the posizer options in the illustration..
profile picture

Eugene

#5
Then you gotta re-read what the description says in bold text! :)
profile picture

jlu_68

#6
Yea I saw that after I reread it, thanks.. I put in ticket, however, i havent heard back from the help desk. Is there a long turn around time on this request?
profile picture

Eugene

#7
Go to Support Center, click "Show my open tickets", and read my reply dated 01/22/2010.
profile picture

drekhead

#8
That is exactly what I was searching for as well. Thank you for the info, Eugene.

Just out of curiosity: How did other users of Wealth-Lab .NET limit the number of open positions across the portfolio before this library was released?
profile picture

Eugene

#9
You could create a portfolio-level backtest right in your Strategy code using a DataSetSymbols loop, like the "Symbol Rotation" strategies do. So, a PosSizer greatly simplifies this task.

By the way, the "Position Options" PosSizer will continue to make life easier by providing such options as selecting the type of position to include or reject. In other words, in the next release it will be possible to see how a long+short strategy works when you take only long or only short signals - without touching the Strategy code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).